]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/x86/mpx: Fix incorrect bounds with old _sigfault
authorRui Wang <rui.y.wang@intel.com>
Mon, 18 Dec 2017 08:34:10 +0000 (16:34 +0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 15 Feb 2018 00:15:52 +0000 (01:15 +0100)
commit762c191bf77a5b64fdfa5d867454e2072452f601
tree86b0a55fa18b843cf21efa3a7c98e055567e72a4
parent3b7bd87cd04527a2016634bce138d71ede52aea4
selftests/x86/mpx: Fix incorrect bounds with old _sigfault

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: 9372f8ea9a7c ("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>
tools/testing/selftests/x86/mpx-mini-test.c