aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/x86
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-05-14 10:59:08 +0200
committerIngo Molnar <mingo@kernel.org>2018-05-14 11:14:45 +0200
commit73bb4d6cd192b8629c5125aaada9892d9fc986b6 (patch)
tree708c5069e8d6379dc3841f53e8ba4b32690f1428 /tools/testing/selftests/x86
parentx86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI (diff)
downloadwireguard-linux-73bb4d6cd192b8629c5125aaada9892d9fc986b6.tar.xz
wireguard-linux-73bb4d6cd192b8629c5125aaada9892d9fc986b6.zip
x86/mpx/selftests: Adjust the self-test to fresh distros that export the MPX ABI
Fix this warning: mpx-mini-test.c:422:0: warning: "SEGV_BNDERR" redefined Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: akpm@linux-foundation.org Cc: dave.hansen@intel.com Cc: linux-mm@kvack.org Cc: linuxram@us.ibm.com Cc: mpe@ellerman.id.au Cc: shakeelb@google.com Cc: shuah@kernel.org Link: http://lkml.kernel.org/r/20180514085908.GA12798@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/testing/selftests/x86')
-rw-r--r--tools/testing/selftests/x86/mpx-mini-test.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/testing/selftests/x86/mpx-mini-test.c b/tools/testing/selftests/x86/mpx-mini-test.c
index 9c0325e1ea68..50f7e9272481 100644
--- a/tools/testing/selftests/x86/mpx-mini-test.c
+++ b/tools/testing/selftests/x86/mpx-mini-test.c
@@ -368,6 +368,11 @@ static int expected_bnd_index = -1;
uint64_t shadow_plb[NR_MPX_BOUNDS_REGISTERS][2]; /* shadow MPX bound registers */
unsigned long shadow_map[NR_MPX_BOUNDS_REGISTERS];
+/* Failed address bound checks: */
+#ifndef SEGV_BNDERR
+# define SEGV_BNDERR 3
+#endif
+
/*
* The kernel is supposed to provide some information about the bounds
* exception in the siginfo. It should match what we have in the bounds
@@ -419,8 +424,6 @@ void handler(int signum, siginfo_t *si, void *vucontext)
br_count++;
dprintf1("#BR 0x%jx (total seen: %d)\n", status, br_count);
-#define SEGV_BNDERR 3 /* failed address bound checks */
-
dprintf2("Saw a #BR! status 0x%jx at %016lx br_reason: %jx\n",
status, ip, br_reason);
dprintf2("si_signo: %d\n", si->si_signo);