From c99b23299face3ff41f7bb0e30299be4806929a8 Mon Sep 17 00:00:00 2001 From: jiamin ma Date: Mon, 22 Oct 2018 09:02:52 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20After=20reboot=EF=BC=8Cthe=20platform?= =?UTF-8?q?=20print=20a=20lot=20of=20logs=20Frequency=20[1/1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD#SWPL-892 Problem: We can see many user space unhandled page fault at 0 address: such as [ 140.882524@2] Chrome_InProcGp: unhandled page fault (11) at 0x00000000, code 0x005 which seems to be triggered by user space on purpose Solution: Show debug infos only if this fault cannot be handled by user space Verify: Locally on P212 Change-Id: I54e8256de2f5465e5dd0f8d90d9d9058fe67f808 Signed-off-by: jiamin ma --- arch/arm/mm/fault.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 19c749a5b610..6e59e64195cc 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -238,8 +238,12 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr, struct siginfo si; #ifdef CONFIG_DEBUG_USER - if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) || - ((user_debug & UDBG_BUS) && (sig == SIGBUS))) { + if ( + #ifdef CONFIG_AMLOGIC_USER_FAULT + unhandled_signal(tsk, sig) && + #endif + (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) || + ((user_debug & UDBG_BUS) && (sig == SIGBUS)))) { #ifdef CONFIG_AMLOGIC_USER_FAULT pr_info("%s: unhandled page fault (%d) at 0x%08lx, code 0x%03x\n", tsk->comm, sig, addr, fsr);