summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/fsgsbase.h
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2020-08-18 13:28:31 +0300
committerBorislav Petkov <bp@suse.de>2020-08-24 19:18:32 +0300
commit5f1dd4dda5c8796c405e856aaa11e187f6885924 (patch)
treec926f850d07a282d7e86cc78cfda37ed26694e98 /arch/x86/include/asm/fsgsbase.h
parent0b2c605fa4ee3117c00b97b7af67791576b28f88 (diff)
downloadlinux-5f1dd4dda5c8796c405e856aaa11e187f6885924.tar.xz
x86/fsgsbase: Replace static_cpu_has() with boot_cpu_has()
ptrace and prctl() are not really fast paths to warrant the use of static_cpu_has() and cause alternatives patching for no good reason. Replace with boot_cpu_has() which is simple and fast enough. No functional changes. Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20200818103715.32736-1-bp@alien8.de
Diffstat (limited to 'arch/x86/include/asm/fsgsbase.h')
-rw-r--r--arch/x86/include/asm/fsgsbase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/fsgsbase.h b/arch/x86/include/asm/fsgsbase.h
index d552646411a9..35cff5f2becf 100644
--- a/arch/x86/include/asm/fsgsbase.h
+++ b/arch/x86/include/asm/fsgsbase.h
@@ -57,7 +57,7 @@ static inline unsigned long x86_fsbase_read_cpu(void)
{
unsigned long fsbase;
- if (static_cpu_has(X86_FEATURE_FSGSBASE))
+ if (boot_cpu_has(X86_FEATURE_FSGSBASE))
fsbase = rdfsbase();
else
rdmsrl(MSR_FS_BASE, fsbase);
@@ -67,7 +67,7 @@ static inline unsigned long x86_fsbase_read_cpu(void)
static inline void x86_fsbase_write_cpu(unsigned long fsbase)
{
- if (static_cpu_has(X86_FEATURE_FSGSBASE))
+ if (boot_cpu_has(X86_FEATURE_FSGSBASE))
wrfsbase(fsbase);
else
wrmsrl(MSR_FS_BASE, fsbase);