• Andy Lutomirski's avatar
    x86/fsgsbase/64: Report FSBASE and GSBASE correctly in core dumps · 831621ad
    Andy Lutomirski authored
    commit 9584d98b 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: default avatarAndy 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: default avatarIngo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    831621ad
elf.h 10.7 KB