summaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/fault_32.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-12-19 13:52:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-19 17:04:43 -0800
commit10a7e9d849150a2879efc0b04d8a51068c9dd0c5 (patch)
treefa44e287635811bbc18ee4c722c3c32c9cf78ce5 /arch/sparc/mm/fault_32.c
parentace52288edf0cb5e7a52b681f057f86224c49c27 (diff)
downloadlinux-10a7e9d849150a2879efc0b04d8a51068c9dd0c5.tar.bz2
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/sparc/mm/fault_32.c')
-rw-r--r--arch/sparc/mm/fault_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index be3136f142a9..a8103a84b4ac 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -113,7 +113,7 @@ show_signal_msg(struct pt_regs *regs, int sig, int code,
if (!printk_ratelimit())
return;
- printk("%s%s[%d]: segfault at %lx ip %p (rpc %p) sp %p error %x",
+ printk("%s%s[%d]: segfault at %lx ip %px (rpc %px) sp %px error %x",
task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG,
tsk->comm, task_pid_nr(tsk), address,
(void *)regs->pc, (void *)regs->u_regs[UREG_I7],