mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-16 22:39:48 +00:00
x86/process: Don't mix user/kernel regs in 64bit __show_regs()
commit9fe6299ddeupstream. When the kernel.print-fatal-signals sysctl has been enabled, a simple userspace crash will cause the kernel to write a crash dump that contains, among other things, the kernel gsbase into dmesg. As suggested by Andy, limit output to pt_regs, FS_BASE and KERNEL_GS_BASE in this case. This also moves the bitness-specific logic from show_regs() into process_{32,64}.c. Fixes:45807a1df9("vdso: print fatal signals") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bpetkov@suse.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lkml.kernel.org/r/20180831194151.123586-1-jannh@google.com [bwh: Backported to 3.16: - Keep using user_mode_vm() to in 32-bit show_regs() - Also update call to __show_regs() in kmemcheck - Don't add redundant rdmsrl()s in 64-bit __show_regs() - Adjust filenames, context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
d62d5d3a06
commit
d3eb8015ec
6 changed files with 24 additions and 8 deletions
Loading…
Add table
Add a link
Reference in a new issue