x86/mpx: Add temporary variable to reduce masking
commit a1149fc8 upstream. When we allocate a bounds table, we call mmap(), then add a "valid" bit to the value before storing it in to the bounds directory. If we fail along the way, we go and mask that valid bit _back_ out. That seems a little silly, and this makes it much more clear when we have a plain address versus an actual table _entry_. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave@sr71.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20150607183704.3D69D5F4@viggo.jf.intel.comSigned-off-by: Ingo Molnar <mingo@kernel.org> [ kamal: 3.19-stable prereq for "46561c39 x86/mpx: Do proper get_user() when running 32-bit binaries on 64-bit kernels" ] Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Showing
Please register or sign in to comment