]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/fsgsbase/64: Report FSBASE and GSBASE correctly in core dumps
authorAndy Lutomirski <luto@kernel.org>
Tue, 1 Aug 2017 14:11:35 +0000 (07:11 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 5 Oct 2017 17:56:20 +0000 (14:56 -0300)
commit9dd57a44e63e0af10417cf4190ed67bf7a1d18b8
tree26b7b63128aeadb40e3b06bad3fe673bb257f507
parent653daa297264316127c931841b47442d8638bce2
x86/fsgsbase/64: Report FSBASE and GSBASE correctly in core dumps

BugLink: http://bugs.launchpad.net/bugs/1721477
commit 9584d98bed7a7a904d0702ad06bbcc94703cb5b4 upstream.

In ELF_COPY_CORE_REGS, we're copying from the current task, so
accessing thread.fsbase and thread.gsbase makes no sense.  Just read
the values from the CPU registers.

In practice, the old code would have been correct most of the time
simply because thread.fsbase and thread.gsbase usually matched the
CPU registers.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Chang Seok <chang.seok.bae@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/x86/include/asm/elf.h