From: Jiamin Ma Date: Wed, 12 Dec 2018 09:37:01 +0000 (+0800) Subject: debug: show pfn info when undefined instr happens at user space [1/1] X-Git-Tag: hardkernel-4.9.236-104~2033 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=820dbdca725477a45321547280f93d8483a927cb;p=platform%2Fkernel%2Flinux-amlogic.git 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 --- diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 6a32470..95cf506 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -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); } diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 6e2d130f..5f2f085 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -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); }