Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64

Pull arm64 fixes from Catalin Marinas:
- Module compilation issues (symbol not exported).
- Plug a hole where user space can bring the kernel down.

* tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
arm64: don't kill the kernel on a bad esr from el0
arm64: treat unhandled compat el0 traps as undef
arm64: Do not report user faults for handled signals
arm64: kernel: compiling issue, need 'EXPORT_SYMBOL(clear_page)'

+25 -6
+1
arch/arm64/kernel/arm64ksyms.c
··· 34 34 EXPORT_SYMBOL(__strncpy_from_user); 35 35 36 36 EXPORT_SYMBOL(copy_page); 37 + EXPORT_SYMBOL(clear_page); 37 38 38 39 EXPORT_SYMBOL(__copy_from_user); 39 40 EXPORT_SYMBOL(__copy_to_user);
+10
arch/arm64/kernel/entry.S
··· 390 390 b.eq el0_fpsimd_exc 391 391 cmp x24, #ESR_EL1_EC_UNKNOWN // unknown exception in EL0 392 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 403 cmp x24, #ESR_EL1_EC_BREAKPT_EL0 // debug exception in EL0 394 404 b.ge el0_dbg 395 405 b el0_inv
+12 -5
arch/arm64/kernel/traps.c
··· 267 267 return; 268 268 #endif 269 269 270 - if (show_unhandled_signals) { 270 + if (show_unhandled_signals && unhandled_signal(current, SIGILL) && 271 + printk_ratelimit()) { 271 272 pr_info("%s[%d]: undefined instruction: pc=%p\n", 272 273 current->comm, task_pid_nr(current), pc); 273 274 dump_instr(KERN_INFO, regs); ··· 295 294 } 296 295 #endif 297 296 298 - if (show_unhandled_signals) { 297 + if (show_unhandled_signals && printk_ratelimit()) { 299 298 pr_info("%s[%d]: syscall %d\n", current->comm, 300 299 task_pid_nr(current), (int)regs->syscallno); 301 300 dump_instr("", regs); ··· 311 310 */ 312 311 asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr) 313 312 { 313 + siginfo_t info; 314 + void __user *pc = (void __user *)instruction_pointer(regs); 314 315 console_verbose(); 315 316 316 317 pr_crit("Bad mode in %s handler detected, code 0x%08x\n", 317 318 handler[reason], esr); 319 + __show_regs(regs); 318 320 319 - die("Oops - bad mode", regs, 0); 320 - local_irq_disable(); 321 - panic("bad mode"); 321 + info.si_signo = SIGILL; 322 + info.si_errno = 0; 323 + info.si_code = ILL_ILLOPC; 324 + info.si_addr = pc; 325 + 326 + arm64_notify_die("Oops - bad mode", regs, &info, 0); 322 327 } 323 328 324 329 void __pte_error(const char *file, int line, unsigned long val)
+2 -1
arch/arm64/mm/fault.c
··· 113 113 { 114 114 struct siginfo si; 115 115 116 - if (show_unhandled_signals) { 116 + if (show_unhandled_signals && unhandled_signal(tsk, sig) && 117 + printk_ratelimit()) { 117 118 pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n", 118 119 tsk->comm, task_pid_nr(tsk), fault_name(esr), sig, 119 120 addr, esr);