summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/trap.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-12-19 22:52:23 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-20 02:04:43 +0100
commit10a7e9d849150a2879efc0b04d8a51068c9dd0c5 (patch)
treefa44e287635811bbc18ee4c722c3c32c9cf78ce5 /arch/um/kernel/trap.c
parentMerge tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd (diff)
downloadlinux-10a7e9d849150a2879efc0b04d8a51068c9dd0c5.tar.xz
linux-10a7e9d849150a2879efc0b04d8a51068c9dd0c5.zip
Do not hash userspace addresses in fault handlers
The hashing of %p was designed to restrict kernel addresses. There is no reason to hash the userspace values seen during a segfault report, so switch these to %px. (Some architectures already use %lx.) Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/trap.c')
-rw-r--r--arch/um/kernel/trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index 4e6fcb32620f..428644175956 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -150,7 +150,7 @@ static void show_segv_info(struct uml_pt_regs *regs)
if (!printk_ratelimit())
return;
- printk("%s%s[%d]: segfault at %lx ip %p sp %p error %x",
+ printk("%s%s[%d]: segfault at %lx ip %px sp %px error %x",
task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
tsk->comm, task_pid_nr(tsk), FAULT_ADDRESS(*fi),
(void *)UPT_IP(regs), (void *)UPT_SP(regs),