diff options
author | Kees Cook <keescook@chromium.org> | 2017-12-19 22:52:23 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-20 02:04:43 +0100 |
commit | 10a7e9d849150a2879efc0b04d8a51068c9dd0c5 (patch) | |
tree | fa44e287635811bbc18ee4c722c3c32c9cf78ce5 /arch/sparc/mm/fault_64.c | |
parent | Merge tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd (diff) | |
download | linux-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/sparc/mm/fault_64.c')
-rw-r--r-- | arch/sparc/mm/fault_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 815c03d7a765..41363f46797b 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c @@ -154,7 +154,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->tpc, (void *)regs->u_regs[UREG_I7], |