]> git.baikalelectronics.ru Git - kernel.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)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 6 Sep 2018 12:33:12 +0000 (14:33 +0200)
commit3474a28899d761a9fd0d6b6f2f5985355d165905
tree45fd4582b522ebfe51c990470f409ba66ba22f17
parent109ac9ca7a370644cc9bdc6b8058ad026f6f043d
x86/process: Don't mix user/kernel regs in 64bit __show_regs()

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: bef9bc22be15 ("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
arch/x86/include/asm/kdebug.h
arch/x86/kernel/dumpstack.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c