[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-824eea38d239fb2a6027e65e18a5daef23019b00@git.kernel.org>
Date: Mon, 8 Oct 2018 02:56:34 -0700
From: "tip-bot for Chang S. Bae" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: riel@...riel.com, torvalds@...ux-foundation.org,
luto@...capital.net, ravi.v.shankar@...el.com, luto@...nel.org,
brgerst@...il.com, bp@...en8.de, ak@...ux.intel.com, hpa@...or.com,
peterz@...radead.org, markus.t.metzger@...el.com,
dave.hansen@...ux.intel.com, tglx@...utronix.de,
chang.seok.bae@...el.com, dvlasenk@...hat.com,
linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: [tip:x86/asm] x86/fsgsbase/64: Convert the ELF core dump code to
the new FSGSBASE helpers
Commit-ID: 824eea38d239fb2a6027e65e18a5daef23019b00
Gitweb: https://git.kernel.org/tip/824eea38d239fb2a6027e65e18a5daef23019b00
Author: Chang S. Bae <chang.seok.bae@...el.com>
AuthorDate: Tue, 18 Sep 2018 16:08:55 -0700
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 8 Oct 2018 10:41:09 +0200
x86/fsgsbase/64: Convert the ELF core dump code to the new FSGSBASE helpers
Replace open-coded rdmsr()'s with their <asm/fsgsbase.h> API
counterparts.
No change in functionality intended.
[ mingo: Wrote new changelog. ]
Based-on-code-from: Andy Lutomirski <luto@...nel.org>
Signed-off-by: Chang S. Bae <chang.seok.bae@...el.com>
Reviewed-by: Andi Kleen <ak@...ux.intel.com>
Reviewed-by: Andy Lutomirski <luto@...nel.org>
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Markus T Metzger <markus.t.metzger@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ravi Shankar <ravi.v.shankar@...el.com>
Cc: Rik van Riel <riel@...riel.com>
Link: http://lkml.kernel.org/r/1537312139-5580-5-git-send-email-chang.seok.bae@intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/include/asm/elf.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 0d157d2a1e2a..1527ec351036 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -10,6 +10,7 @@
#include <asm/ptrace.h>
#include <asm/user.h>
#include <asm/auxvec.h>
+#include <asm/fsgsbase.h>
typedef unsigned long elf_greg_t;
@@ -205,7 +206,6 @@ void set_personality_ia32(bool);
#define ELF_CORE_COPY_REGS(pr_reg, regs) \
do { \
- unsigned long base; \
unsigned v; \
(pr_reg)[0] = (regs)->r15; \
(pr_reg)[1] = (regs)->r14; \
@@ -228,8 +228,8 @@ do { \
(pr_reg)[18] = (regs)->flags; \
(pr_reg)[19] = (regs)->sp; \
(pr_reg)[20] = (regs)->ss; \
- rdmsrl(MSR_FS_BASE, base); (pr_reg)[21] = base; \
- rdmsrl(MSR_KERNEL_GS_BASE, base); (pr_reg)[22] = base; \
+ (pr_reg)[21] = x86_fsbase_read_cpu(); \
+ (pr_reg)[22] = x86_gsbase_read_cpu_inactive(); \
asm("movl %%ds,%0" : "=r" (v)); (pr_reg)[23] = v; \
asm("movl %%es,%0" : "=r" (v)); (pr_reg)[24] = v; \
asm("movl %%fs,%0" : "=r" (v)); (pr_reg)[25] = v; \
Powered by blists - more mailing lists