|
@@ -223,13 +223,39 @@ void die(const char *str, struct pt_regs *regs, int err)
|
|
|
do_exit(SIGSEGV);
|
|
|
}
|
|
|
|
|
|
+void arm64_force_sig_info(struct siginfo *info, const char *str,
|
|
|
+ struct task_struct *tsk)
|
|
|
+{
|
|
|
+ unsigned int esr = tsk->thread.fault_code;
|
|
|
+ struct pt_regs *regs = task_pt_regs(tsk);
|
|
|
+
|
|
|
+ if (!unhandled_signal(tsk, info->si_signo))
|
|
|
+ goto send_sig;
|
|
|
+
|
|
|
+ if (!show_unhandled_signals_ratelimited())
|
|
|
+ goto send_sig;
|
|
|
+
|
|
|
+ pr_info("%s[%d]: unhandled exception: ", tsk->comm, task_pid_nr(tsk));
|
|
|
+ if (esr)
|
|
|
+ pr_cont("%s, ESR 0x%08x, ", esr_get_class_string(esr), esr);
|
|
|
+
|
|
|
+ pr_cont("%s", str);
|
|
|
+ print_vma_addr(KERN_CONT " in ", regs->pc);
|
|
|
+ pr_cont("\n");
|
|
|
+ __show_regs(regs);
|
|
|
+
|
|
|
+send_sig:
|
|
|
+ force_sig_info(info->si_signo, info, tsk);
|
|
|
+}
|
|
|
+
|
|
|
void arm64_notify_die(const char *str, struct pt_regs *regs,
|
|
|
struct siginfo *info, int err)
|
|
|
{
|
|
|
if (user_mode(regs)) {
|
|
|
+ WARN_ON(regs != current_pt_regs());
|
|
|
current->thread.fault_address = 0;
|
|
|
current->thread.fault_code = err;
|
|
|
- force_sig_info(info->si_signo, info, current);
|
|
|
+ arm64_force_sig_info(info, str, current);
|
|
|
} else {
|
|
|
die(str, regs, err);
|
|
|
}
|