diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-11-01 01:53:12 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-11-08 13:57:10 +0300 |
commit | e2b85f709a705808a71560de60732fd49e4516a5 (patch) | |
tree | 4eb7aece8cf489a913ed965c40cdfa95eee630a5 | |
parent | b99afae1390140f5b0039e6b37a7380de31ae874 (diff) | |
download | linux-e2b85f709a705808a71560de60732fd49e4516a5.tar.xz |
ARM: 8807/1: mm: Facilitate debugging CONFIG_KUSER_HELPERS disabled
Some software such as perf makes unconditional use of the special
[vectors] page which is only provided when CONFIG_KUSER_HELPERS is
enabled in the kernel.
Facilitate the debugging of such situations by printing a debug message
to the kernel log showing the task name and the faulting address.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | arch/arm/mm/fault.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index f4ea4c62c613..58f69fa07df9 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -173,6 +173,12 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr, show_regs(regs); } #endif +#ifndef CONFIG_KUSER_HELPERS + if ((sig == SIGSEGV) && ((addr & PAGE_MASK) == 0xffff0000)) + printk_ratelimited(KERN_DEBUG + "%s: CONFIG_KUSER_HELPERS disabled at 0x%08lx\n", + tsk->comm, addr); +#endif tsk->thread.address = addr; tsk->thread.error_code = fsr; |