summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2022-07-29 04:40:16 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-08-30 11:02:43 +0100
commitee50036b25be62e4abbac46665f410b887b66130 (patch)
treec8ecf2c0eb4543539958497eae0ef5dcdae2e98c /arch/arm/kernel
parentb90cb1053190353cc30f0fef0ef1f378ccc063c5 (diff)
downloadlinux-ee50036b25be62e4abbac46665f410b887b66130.tar.gz
linux-ee50036b25be62e4abbac46665f410b887b66130.tar.bz2
linux-ee50036b25be62e4abbac46665f410b887b66130.zip
ARM: 9221/1: traps: print un-hashed user pc on undefined instruction
When user undefined instruction debug is enabled pc value is hashed like kernel pointers for security reason. But the security benefit of this hash is very limited because the code goes on to call __show_regs() that prints the plain pointer value. pc is a user pointer anyway, so the kernel does not leak anything. The only result is confusion about the difference between the pc value on the first printed line, and the value that __show_regs() prints. Always print the plain value of pc. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 9283dc65be31..82fde11d6b8d 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -487,7 +487,7 @@ asmlinkage void do_undefinstr(struct pt_regs *regs)
die_sig:
#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_UNDEFINED) {
- pr_info("%s (%d): undefined instruction: pc=%p\n",
+ pr_info("%s (%d): undefined instruction: pc=%px\n",
current->comm, task_pid_nr(current), pc);
__show_regs(regs);
dump_instr(KERN_INFO, regs);