[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180509171342.846B9B2E@viggo.jf.intel.com>
Date: Wed, 09 May 2018 10:13:42 -0700
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org, Dave Hansen <dave.hansen@...ux.intel.com>,
linuxram@...ibm.com, tglx@...utronix.de, dave.hansen@...el.com,
mpe@...erman.id.au, mingo@...nel.org, akpm@...ux-foundation.org,
shuah@...nel.org
Subject: [PATCH 03/13] x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal
From: Dave Hansen <dave.hansen@...ux.intel.com>
There is some noisy debug code at the end of the signal handler. It was
disabled by an early, unconditional "return". However, that return also
hid a dprint_in_signal=0, which kept dprint_in_signal=1 and effectively
locked us into permanent dprint_in_signal=1 behavior.
Remove the return and the dead code, fixing dprint_in_signal.
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Ram Pai <linuxram@...ibm.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Michael Ellermen <mpe@...erman.id.au>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Shuah Khan <shuah@...nel.org>
---
b/tools/testing/selftests/x86/protection_keys.c | 16 ----------------
1 file changed, 16 deletions(-)
diff -puN tools/testing/selftests/x86/protection_keys.c~pkeys-selftests-remove-dead-code-after-return tools/testing/selftests/x86/protection_keys.c
--- a/tools/testing/selftests/x86/protection_keys.c~pkeys-selftests-remove-dead-code-after-return 2018-05-09 09:20:19.228698406 -0700
+++ b/tools/testing/selftests/x86/protection_keys.c 2018-05-09 09:20:19.232698406 -0700
@@ -315,22 +315,6 @@ void signal_handler(int signum, siginfo_
dprintf1("WARNING: set PRKU=0 to allow faulting instruction to continue\n");
pkru_faults++;
dprintf1("<<<<==================================================\n");
- return;
- if (trapno == 14) {
- fprintf(stderr,
- "ERROR: In signal handler, page fault, trapno = %d, ip = %016lx\n",
- trapno, ip);
- fprintf(stderr, "si_addr %p\n", si->si_addr);
- fprintf(stderr, "REG_ERR: %lx\n",
- (unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]);
- exit(1);
- } else {
- fprintf(stderr, "unexpected trap %d! at 0x%lx\n", trapno, ip);
- fprintf(stderr, "si_addr %p\n", si->si_addr);
- fprintf(stderr, "REG_ERR: %lx\n",
- (unsigned long)uctxt->uc_mcontext.gregs[REG_ERR]);
- exit(2);
- }
dprint_in_signal = 0;
}
_
Powered by blists - more mailing lists