diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-01-05 09:27:34 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-01-05 09:34:43 -0500 |
commit | de791821c295cc61419a06fe5562288417d1bc58 (patch) | |
tree | 7c17f469a4686675175478713805a307344d73a0 | |
parent | b9e705ef7cfaf22db0daab91ad3cd33b0fa32eb9 (diff) |
x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN
Use the name associated with the particular attack which needs page table
isolation for mitigation.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Cc: Jiri Koshina <jikos@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andi Lutomirski <luto@amacapital.net>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Turner <pjt@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Greg KH <gregkh@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Kees Cook <keescook@google.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801051525300.1724@nanos
-rw-r--r-- | arch/x86/include/asm/cpufeatures.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/pti.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 07cdd1715705..21ac898df2d8 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h | |||
@@ -341,6 +341,6 @@ | |||
341 | #define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */ | 341 | #define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */ |
342 | #define X86_BUG_MONITOR X86_BUG(12) /* IPI required to wake up remote CPU */ | 342 | #define X86_BUG_MONITOR X86_BUG(12) /* IPI required to wake up remote CPU */ |
343 | #define X86_BUG_AMD_E400 X86_BUG(13) /* CPU is among the affected by Erratum 400 */ | 343 | #define X86_BUG_AMD_E400 X86_BUG(13) /* CPU is among the affected by Erratum 400 */ |
344 | #define X86_BUG_CPU_INSECURE X86_BUG(14) /* CPU is insecure and needs kernel page table isolation */ | 344 | #define X86_BUG_CPU_MELTDOWN X86_BUG(14) /* CPU is affected by meltdown attack and needs kernel page table isolation */ |
345 | 345 | ||
346 | #endif /* _ASM_X86_CPUFEATURES_H */ | 346 | #endif /* _ASM_X86_CPUFEATURES_H */ |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index b1be494ab4e8..2d3bd2215e5b 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -900,7 +900,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
900 | setup_force_cpu_cap(X86_FEATURE_ALWAYS); | 900 | setup_force_cpu_cap(X86_FEATURE_ALWAYS); |
901 | 901 | ||
902 | if (c->x86_vendor != X86_VENDOR_AMD) | 902 | if (c->x86_vendor != X86_VENDOR_AMD) |
903 | setup_force_cpu_bug(X86_BUG_CPU_INSECURE); | 903 | setup_force_cpu_bug(X86_BUG_CPU_MELTDOWN); |
904 | 904 | ||
905 | fpu__init_system(c); | 905 | fpu__init_system(c); |
906 | 906 | ||
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c index 2da28ba97508..43d4a4a29037 100644 --- a/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c | |||
@@ -56,13 +56,13 @@ | |||
56 | 56 | ||
57 | static void __init pti_print_if_insecure(const char *reason) | 57 | static void __init pti_print_if_insecure(const char *reason) |
58 | { | 58 | { |
59 | if (boot_cpu_has_bug(X86_BUG_CPU_INSECURE)) | 59 | if (boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) |
60 | pr_info("%s\n", reason); | 60 | pr_info("%s\n", reason); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void __init pti_print_if_secure(const char *reason) | 63 | static void __init pti_print_if_secure(const char *reason) |
64 | { | 64 | { |
65 | if (!boot_cpu_has_bug(X86_BUG_CPU_INSECURE)) | 65 | if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) |
66 | pr_info("%s\n", reason); | 66 | pr_info("%s\n", reason); |
67 | } | 67 | } |
68 | 68 | ||
@@ -96,7 +96,7 @@ void __init pti_check_boottime_disable(void) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | autosel: | 98 | autosel: |
99 | if (!boot_cpu_has_bug(X86_BUG_CPU_INSECURE)) | 99 | if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) |
100 | return; | 100 | return; |
101 | enable: | 101 | enable: |
102 | setup_force_cpu_cap(X86_FEATURE_PTI); | 102 | setup_force_cpu_cap(X86_FEATURE_PTI); |