]> git.baikalelectronics.ru Git - kernel.git/commit
Do not hash userspace addresses in fault handlers
authorKees Cook <keescook@chromium.org>
Tue, 19 Dec 2017 21:52:23 +0000 (13:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Dec 2017 01:04:43 +0000 (17:04 -0800)
commit95c543ee84d5741b2d5bb3b8e645c5a191e063d8
treefa44e287635811bbc18ee4c722c3c32c9cf78ce5
parent0af639cf88dfacb9e22d37514419a39cbb2f0c6f
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: 7f32ed5e940bb53e ("printk: hash addresses printed with %p")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/sparc/mm/fault_32.c
arch/sparc/mm/fault_64.c
arch/um/kernel/trap.c
arch/x86/mm/fault.c