1
0
Fork 0
remarkable-linux/tools/testing
Rui Wang b0809f5422 selftests/x86/mpx: Fix incorrect bounds with old _sigfault
commit 961888b1d7 upstream.

For distributions with old userspace header files, the _sigfault
structure is different. mpx-mini-test fails with the following
error:

  [root@Purley]# mpx-mini-test_64 tabletest
  XSAVE is supported by HW & OS
  XSAVE processor supported state mask: 0x2ff
  XSAVE OS supported state mask: 0x2ff
   BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
    BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
  starting mpx bounds table test
  ERROR: siginfo bounds do not match shadow bounds for register 0

Fix it by using the correct offset of _lower/_upper in _sigfault.
RHEL needs this patch to work.

Signed-off-by: Rui Wang <rui.y.wang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@linux.intel.com
Fixes: e754aedc26 ("x86/mpx, selftests: Add MPX self test")
Link: http://lkml.kernel.org/r/1513586050-1641-1-git-send-email-rui.y.wang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-22 15:43:54 +01:00
..
fault-injection fault-injection: fix failcmd.sh warning 2012-07-31 18:42:38 -07:00
ktest ktest: Fix child exit code processing 2017-03-15 10:02:45 +08:00
nvdimm tools/testing/nvdimm: unit test acpi_nfit_ctl() 2016-12-06 17:42:36 -08:00
radix-tree radix-tree tests: properly initialize mutex 2016-10-11 15:06:30 -07:00
selftests selftests/x86/mpx: Fix incorrect bounds with old _sigfault 2018-02-22 15:43:54 +01:00