]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86/mpx: Add temporary variable to reduce masking
authorDave Hansen <dave.hansen@linux.intel.com>
Sun, 7 Jun 2015 18:37:04 +0000 (11:37 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 9 Jun 2015 10:24:33 +0000 (12:24 +0200)
commita1149fc83a1f97612e72ec24a0bdbabff7b85e77
tree6bc1db6d8c3cbf20c3b3fe30de585a41a7180c2e
parentb0e9b09b3bd64e67bba862e238d3757b2482b6de
x86/mpx: Add temporary variable to reduce masking

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.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/mpx.c