diff options
Diffstat (limited to 'arch/arm64/kernel/traps.c')
| -rw-r--r-- | arch/arm64/kernel/traps.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 61d7dd29f756..f30852d28590 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c | |||
| @@ -267,7 +267,8 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs) | |||
| 267 | return; | 267 | return; |
| 268 | #endif | 268 | #endif |
| 269 | 269 | ||
| 270 | if (show_unhandled_signals) { | 270 | if (show_unhandled_signals && unhandled_signal(current, SIGILL) && |
| 271 | printk_ratelimit()) { | ||
| 271 | pr_info("%s[%d]: undefined instruction: pc=%p\n", | 272 | pr_info("%s[%d]: undefined instruction: pc=%p\n", |
| 272 | current->comm, task_pid_nr(current), pc); | 273 | current->comm, task_pid_nr(current), pc); |
| 273 | dump_instr(KERN_INFO, regs); | 274 | dump_instr(KERN_INFO, regs); |
| @@ -294,7 +295,7 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs) | |||
| 294 | } | 295 | } |
| 295 | #endif | 296 | #endif |
| 296 | 297 | ||
| 297 | if (show_unhandled_signals) { | 298 | if (show_unhandled_signals && printk_ratelimit()) { |
| 298 | pr_info("%s[%d]: syscall %d\n", current->comm, | 299 | pr_info("%s[%d]: syscall %d\n", current->comm, |
| 299 | task_pid_nr(current), (int)regs->syscallno); | 300 | task_pid_nr(current), (int)regs->syscallno); |
| 300 | dump_instr("", regs); | 301 | dump_instr("", regs); |
| @@ -310,14 +311,20 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs) | |||
| 310 | */ | 311 | */ |
| 311 | asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) | 312 | asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) |
| 312 | { | 313 | { |
| 314 | siginfo_t info; | ||
| 315 | void __user *pc = (void __user *)instruction_pointer(regs); | ||
| 313 | console_verbose(); | 316 | console_verbose(); |
| 314 | 317 | ||
| 315 | 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", |
| 316 | 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; | ||
| 317 | 326 | ||
| 318 | die("Oops - bad mode", regs, 0); | 327 | arm64_notify_die("Oops - bad mode", regs, &info, 0); |
| 319 | local_irq_disable(); | ||
| 320 | panic("bad mode"); | ||
| 321 | } | 328 | } |
| 322 | 329 | ||
| 323 | void __pte_error(const char *file, int line, unsigned long val) | 330 | void __pte_error(const char *file, int line, unsigned long val) |
