diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-05-14 04:59:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-05-14 05:14:45 -0400 |
commit | 73bb4d6cd192b8629c5125aaada9892d9fc986b6 (patch) | |
tree | 708c5069e8d6379dc3841f53e8ba4b32690f1428 | |
parent | 0fb96620dce351608aa82eed5942e2f58b07beda (diff) |
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>
-rw-r--r-- | tools/testing/selftests/x86/mpx-mini-test.c | 7 |
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; | |||
368 | uint64_t shadow_plb[NR_MPX_BOUNDS_REGISTERS][2]; /* shadow MPX bound registers */ | 368 | uint64_t shadow_plb[NR_MPX_BOUNDS_REGISTERS][2]; /* shadow MPX bound registers */ |
369 | unsigned long shadow_map[NR_MPX_BOUNDS_REGISTERS]; | 369 | unsigned long shadow_map[NR_MPX_BOUNDS_REGISTERS]; |
370 | 370 | ||
371 | /* Failed address bound checks: */ | ||
372 | #ifndef SEGV_BNDERR | ||
373 | # define SEGV_BNDERR 3 | ||
374 | #endif | ||
375 | |||
371 | /* | 376 | /* |
372 | * The kernel is supposed to provide some information about the bounds | 377 | * The kernel is supposed to provide some information about the bounds |
373 | * exception in the siginfo. It should match what we have in the bounds | 378 | * 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) | |||
419 | br_count++; | 424 | br_count++; |
420 | dprintf1("#BR 0x%jx (total seen: %d)\n", status, br_count); | 425 | dprintf1("#BR 0x%jx (total seen: %d)\n", status, br_count); |
421 | 426 | ||
422 | #define SEGV_BNDERR 3 /* failed address bound checks */ | ||
423 | |||
424 | dprintf2("Saw a #BR! status 0x%jx at %016lx br_reason: %jx\n", | 427 | dprintf2("Saw a #BR! status 0x%jx at %016lx br_reason: %jx\n", |
425 | status, ip, br_reason); | 428 | status, ip, br_reason); |
426 | dprintf2("si_signo: %d\n", si->si_signo); | 429 | dprintf2("si_signo: %d\n", si->si_signo); |