diff options
author | Dave Hansen <dave.hansen@linux.intel.com> | 2015-12-01 03:31:13 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-12-05 20:52:14 +0300 |
commit | 8e8efe0379bd93e8219ca0fc6fa80b5dd85b09cb (patch) | |
tree | cafd4b6681fb012104320c9b0a63494566746b63 /arch/x86/kernel/signal.c | |
parent | 70f1528747651b20c7769d3516ade369f9963237 (diff) | |
download | linux-8e8efe0379bd93e8219ca0fc6fa80b5dd85b09cb.tar.xz |
x86/mpx: Fix instruction decoder condition
MPX decodes instructions in order to tell which bounds register
was violated. Part of this decoding involves looking at the "REX
prefix" which is a special instrucion prefix used to retrofit
support for new registers in to old instructions.
The X86_REX_*() macros are defined to return actual bit values:
#define X86_REX_R(rex) ((rex) & 4)
*not* boolean values. However, the MPX code was checking for
them like they were booleans. This might have led to us
mis-decoding the "REX prefix" and giving false information out to
userspace about bounds violations. X86_REX_B() actually is bit 1,
so this is really only broken for the X86_REX_X() case.
Fix the conditionals up to tolerate the non-boolean values.
Fixes: fcc7ffd67991 "x86, mpx: Decode MPX instruction to get bound violation information"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: Dave Hansen <dave@sr71.net>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20151201003113.D800C1E0@viggo.jf.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/signal.c')
0 files changed, 0 insertions, 0 deletions