diff options
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/arm64ksyms.c | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/entry.S | 10 | ||||
-rw-r--r-- | arch/arm64/kernel/traps.c | 17 | ||||
-rw-r--r-- | arch/arm64/mm/fault.c | 3 |
4 files changed, 25 insertions, 6 deletions
diff --git a/arch/arm64/kernel/arm64ksyms.c b/arch/arm64/kernel/arm64ksyms.c index 7df1aad29b67..41b4f626d554 100644 --- a/arch/arm64/kernel/arm64ksyms.c +++ b/arch/arm64/kernel/arm64ksyms.c | |||
@@ -34,6 +34,7 @@ EXPORT_SYMBOL(__strnlen_user); | |||
34 | EXPORT_SYMBOL(__strncpy_from_user); | 34 | EXPORT_SYMBOL(__strncpy_from_user); |
35 | 35 | ||
36 | EXPORT_SYMBOL(copy_page); | 36 | EXPORT_SYMBOL(copy_page); |
37 | EXPORT_SYMBOL(clear_page); | ||
37 | 38 | ||
38 | EXPORT_SYMBOL(__copy_from_user); | 39 | EXPORT_SYMBOL(__copy_from_user); |
39 | EXPORT_SYMBOL(__copy_to_user); | 40 | EXPORT_SYMBOL(__copy_to_user); |
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index c7e047049f2c..1d1314280a03 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S | |||
@@ -390,6 +390,16 @@ el0_sync_compat: | |||
390 | b.eq el0_fpsimd_exc | 390 | b.eq el0_fpsimd_exc |
391 | cmp x24, #ESR_EL1_EC_UNKNOWN // unknown exception in EL0 | 391 | cmp x24, #ESR_EL1_EC_UNKNOWN // unknown exception in EL0 |
392 | b.eq el0_undef | 392 | b.eq el0_undef |
393 | cmp x24, #ESR_EL1_EC_CP15_32 // CP15 MRC/MCR trap | ||
394 | b.eq el0_undef | ||
395 | cmp x24, #ESR_EL1_EC_CP15_64 // CP15 MRRC/MCRR trap | ||
396 | b.eq el0_undef | ||
397 | cmp x24, #ESR_EL1_EC_CP14_MR // CP14 MRC/MCR trap | ||
398 | b.eq el0_undef | ||
399 | cmp x24, #ESR_EL1_EC_CP14_LS // CP14 LDC/STC trap | ||
400 | b.eq el0_undef | ||
401 | cmp x24, #ESR_EL1_EC_CP14_64 // CP14 MRRC/MCRR trap | ||
402 | b.eq el0_undef | ||
393 | cmp x24, #ESR_EL1_EC_BREAKPT_EL0 // debug exception in EL0 | 403 | cmp x24, #ESR_EL1_EC_BREAKPT_EL0 // debug exception in EL0 |
394 | b.ge el0_dbg | 404 | b.ge el0_dbg |
395 | b el0_inv | 405 | b el0_inv |
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) |
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 98af6e760cce..1426468b77f3 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -113,7 +113,8 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr, | |||
113 | { | 113 | { |
114 | struct siginfo si; | 114 | struct siginfo si; |
115 | 115 | ||
116 | if (show_unhandled_signals) { | 116 | if (show_unhandled_signals && unhandled_signal(tsk, sig) && |
117 | printk_ratelimit()) { | ||
117 | pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n", | 118 | pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n", |
118 | tsk->comm, task_pid_nr(tsk), fault_name(esr), sig, | 119 | tsk->comm, task_pid_nr(tsk), fault_name(esr), sig, |
119 | addr, esr); | 120 | addr, esr); |