]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/process: Don't mix user/kernel regs in 64bit __show_regs()
authorJann Horn <jannh@google.com>
Fri, 31 Aug 2018 19:41:51 +0000 (21:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:41:23 +0000 (22:41 +0200)
commit0d07d02abd5826215cd39eef7fb55c44f1912310
tree89479337c9aaa477254f7345a0592b6579def2cd
parentc6f8e398c10ea9a664374d8dbb8b0e7a7265b382
x86/process: Don't mix user/kernel regs in 64bit __show_regs()

commit 9fe6299dde587788f245e9f7a5a1b296fad4e8c7 upstream.

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: 45807a1df9f5 ("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>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180831194151.123586-1-jannh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kdebug.h
arch/x86/kernel/dumpstack.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c