lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 06/19] x86, mpx: Restrict mmap size check to bounds tables
From
Date

From: Dave Hansen <dave.hansen@linux.intel.com>

The comment and code here are confusing. We do not currently
allocate the bounds directory in the kernel.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
---

b/arch/x86/mm/mpx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/x86/mm/mpx.c~x86-mpx-we-do-not-allocate-the-bounds-directory arch/x86/mm/mpx.c
--- a/arch/x86/mm/mpx.c~x86-mpx-we-do-not-allocate-the-bounds-directory 2015-05-27 09:32:16.681542138 -0700
+++ b/arch/x86/mm/mpx.c 2015-05-27 09:32:16.684542274 -0700
@@ -46,8 +46,8 @@ static unsigned long mpx_mmap(unsigned l
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);
_

\
 
 \ /
  Last update: 2015-05-27 21:21    [W:0.064 / U:11.108 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site