PD#SWPL-3076
Problem:
Lack of debug infos when undefined instr happens at user space
Solution:
Call show_all_pfn when undefined instr happens at user space
Verify:
Locally on ampere
Change-Id: Id24e797c2781c94c507ad07ec17a3d4ae7d44cd9
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
if (user_debug & UDBG_UNDEFINED) {
pr_info("%s (%d): undefined instruction: pc=%p\n",
current->comm, task_pid_nr(current), pc);
+#ifdef CONFIG_AMLOGIC_USER_FAULT
+ if (user_fault_debug_ratelimited())
+ show_all_pfn(current, regs);
+#endif
__show_regs(regs);
dump_instr(KERN_INFO, regs);
}
show_unhandled_signals_ratelimited()) {
pr_info("%s[%d]: %s: pc=%p\n",
current->comm, task_pid_nr(current), desc, pc);
+#ifdef CONFIG_AMLOGIC_USER_FAULT
+ show_all_pfn(current, regs);
+ show_regs(regs);
+#endif
dump_instr(KERN_INFO, regs);
}