debug: show pfn info when undefined instr happens at user space [1/1]

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>
This commit is contained in:
Jiamin Ma
2018-12-12 17:37:01 +08:00
committed by Luan Yuan
parent 57d49e8a7f
commit 3cb6da402d
2 changed files with 8 additions and 0 deletions

View File

@@ -491,6 +491,10 @@ die_sig:
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);
}

View File

@@ -418,6 +418,10 @@ static void force_signal_inject(int signal, int code, struct pt_regs *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);
}