aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2013-05-28 10:54:15 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2013-05-31 11:04:51 -0400
commit9955ac47f4ba1c95ecb6092aeaefb40a22e99268 (patch)
treec875695e3bba3d45cea40678671b6bb6b67e6d76 /arch/arm64
parent381cc2b9705512ee7c7f1839cbdde374625a2a9f (diff)
arm64: don't kill the kernel on a bad esr from el0
Rather than completely killing the kernel if we receive an esr value we can't deal with in the el0 handlers, send the process a SIGILL and log the esr value in the hope that we can debug it. If we receive a bad esr from el1, we'll die() as before. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/kernel/traps.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index f1ff9bad00f7..f30852d28590 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -311,14 +311,20 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs)
311 */ 311 */
312asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) 312asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
313{ 313{
314 siginfo_t info;
315 void __user *pc = (void __user *)instruction_pointer(regs);
314 console_verbose(); 316 console_verbose();
315 317
316 pr_crit("Bad mode in %s handler detected, code 0x%08x\n", 318 pr_crit("Bad mode in %s handler detected, code 0x%08x\n",
317 handler[reason], esr); 319 handler[reason], esr);
320 __show_regs(regs);
321
322 info.si_signo = SIGILL;
323 info.si_errno = 0;
324 info.si_code = ILL_ILLOPC;
325 info.si_addr = pc;
318 326
319 die("Oops - bad mode", regs, 0); 327 arm64_notify_die("Oops - bad mode", regs, &info, 0);
320 local_irq_disable();
321 panic("bad mode");
322} 328}
323 329
324void __pte_error(const char *file, int line, unsigned long val) 330void __pte_error(const char *file, int line, unsigned long val)