diff options
author | Dave Hansen <[email protected]> | 2015-06-07 11:37:02 -0700 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2015-06-09 12:24:31 +0200 |
commit | eb099e5bc5457c42043e57cf0f4ce574669b9697 (patch) | |
tree | e969f2269bd83ec3374daee2da146b0af1814d81 | |
parent | 3c1d32300920a446c67d697cd6b80f012ad06028 (diff) |
x86/mpx: Restrict the mmap() size check to bounds tables
The comment and code here are confusing. We do not currently
allocate the bounds directory in the kernel.
Signed-off-by: Dave Hansen <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | arch/x86/mm/mpx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c index 47e4a8564012..d6e02f3adee0 100644 --- a/arch/x86/mm/mpx.c +++ b/arch/x86/mm/mpx.c @@ -46,8 +46,8 @@ static unsigned long mpx_mmap(unsigned long len) vm_flags_t vm_flags; struct vm_area_struct *vma; - /* Only bounds table and bounds directory can be allocated here */ - if (len != MPX_BD_SIZE_BYTES && len != MPX_BT_SIZE_BYTES) + /* Only bounds table can be allocated here */ + if (len != MPX_BT_SIZE_BYTES) return -EINVAL; down_write(&mm->mmap_sem); |