[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/ELF: also record FS/GS bases in elf_core_save_regs()
commit c8b2488a817b3aedbb10fad72d9d41911f40eb17 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Sep 29 10:52:32 2020 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Sep 29 10:52:32 2020 +0200 x86/ELF: also record FS/GS bases in elf_core_save_regs() No idea why this wasn't done before. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/include/asm-x86/x86_64/elf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-x86/x86_64/elf.h b/xen/include/asm-x86/x86_64/elf.h index 43c9cf3a3f..f9c2789b7e 100644 --- a/xen/include/asm-x86/x86_64/elf.h +++ b/xen/include/asm-x86/x86_64/elf.h @@ -1,6 +1,7 @@ #ifndef __X86_64_ELF_H__ #define __X86_64_ELF_H__ +#include <asm/msr.h> #include <asm/regs.h> typedef struct { @@ -59,8 +60,8 @@ static inline void elf_core_save_regs(ELF_Gregset *core_regs, asm volatile("pushfq; popq %0" :"=m"(core_regs->rflags)); asm volatile("movq %%rsp,%0" : "=m"(core_regs->rsp)); core_regs->ss = read_sreg(ss); - /* thread_fs not filled in for now */ - /* thread_gs not filled in for now */ + rdmsrl(MSR_FS_BASE, core_regs->thread_fs); + rdmsrl(MSR_GS_BASE, core_regs->thread_gs); core_regs->ds = read_sreg(ds); core_regs->es = read_sreg(es); core_regs->fs = read_sreg(fs); -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |