]>
Commit | Line | Data |
---|---|---|
035dbe67 FG |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Thomas Gleixner <tglx@linutronix.de> | |
3 | Date: Fri, 5 Jan 2018 15:27:34 +0100 | |
4 | Subject: [PATCH] x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | CVE-2017-5754 | |
10 | ||
11 | Use the name associated with the particular attack which needs page table | |
12 | isolation for mitigation. | |
13 | ||
14 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | |
15 | Acked-by: David Woodhouse <dwmw@amazon.co.uk> | |
16 | Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk> | |
17 | Cc: Jiri Koshina <jikos@kernel.org> | |
18 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | |
19 | Cc: Tim Chen <tim.c.chen@linux.intel.com> | |
20 | Cc: Andi Lutomirski <luto@amacapital.net> | |
21 | Cc: Andi Kleen <ak@linux.intel.com> | |
22 | Cc: Peter Zijlstra <peterz@infradead.org> | |
23 | Cc: Paul Turner <pjt@google.com> | |
24 | Cc: Tom Lendacky <thomas.lendacky@amd.com> | |
25 | Cc: Greg KH <gregkh@linux-foundation.org> | |
26 | Cc: Dave Hansen <dave.hansen@intel.com> | |
27 | Cc: Kees Cook <keescook@google.com> | |
28 | Cc: stable@vger.kernel.org | |
29 | Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801051525300.1724@nanos | |
30 | ||
31 | (cherry picked from commit de791821c295cc61419a06fe5562288417d1bc58) | |
32 | Signed-off-by: Andy Whitcroft <apw@canonical.com> | |
33 | Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> | |
34 | (cherry picked from commit aefb6725ee33758a2869c37e22dbc7ca80548007) | |
35 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
36 | --- | |
37 | arch/x86/include/asm/cpufeatures.h | 2 +- | |
38 | arch/x86/kernel/cpu/common.c | 2 +- | |
39 | arch/x86/mm/pti.c | 6 +++--- | |
40 | 3 files changed, 5 insertions(+), 5 deletions(-) | |
41 | ||
42 | diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h | |
43 | index 9b0c283afcf0..b7900d26066c 100644 | |
44 | --- a/arch/x86/include/asm/cpufeatures.h | |
45 | +++ b/arch/x86/include/asm/cpufeatures.h | |
46 | @@ -340,6 +340,6 @@ | |
47 | #define X86_BUG_SWAPGS_FENCE X86_BUG(11) /* SWAPGS without input dep on GS */ | |
48 | #define X86_BUG_MONITOR X86_BUG(12) /* IPI required to wake up remote CPU */ | |
49 | #define X86_BUG_AMD_E400 X86_BUG(13) /* CPU is among the affected by Erratum 400 */ | |
50 | -#define X86_BUG_CPU_INSECURE X86_BUG(14) /* CPU is insecure and needs kernel page table isolation */ | |
51 | +#define X86_BUG_CPU_MELTDOWN X86_BUG(14) /* CPU is affected by meltdown attack and needs kernel page table isolation */ | |
52 | ||
53 | #endif /* _ASM_X86_CPUFEATURES_H */ | |
54 | diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c | |
55 | index 1854dd8071a6..142ab555dafa 100644 | |
56 | --- a/arch/x86/kernel/cpu/common.c | |
57 | +++ b/arch/x86/kernel/cpu/common.c | |
58 | @@ -900,7 +900,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |
59 | setup_force_cpu_cap(X86_FEATURE_ALWAYS); | |
60 | ||
61 | if (c->x86_vendor != X86_VENDOR_AMD) | |
62 | - setup_force_cpu_bug(X86_BUG_CPU_INSECURE); | |
63 | + setup_force_cpu_bug(X86_BUG_CPU_MELTDOWN); | |
64 | ||
65 | fpu__init_system(c); | |
66 | } | |
67 | diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c | |
68 | index 2da28ba97508..43d4a4a29037 100644 | |
69 | --- a/arch/x86/mm/pti.c | |
70 | +++ b/arch/x86/mm/pti.c | |
71 | @@ -56,13 +56,13 @@ | |
72 | ||
73 | static void __init pti_print_if_insecure(const char *reason) | |
74 | { | |
75 | - if (boot_cpu_has_bug(X86_BUG_CPU_INSECURE)) | |
76 | + if (boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) | |
77 | pr_info("%s\n", reason); | |
78 | } | |
79 | ||
80 | static void __init pti_print_if_secure(const char *reason) | |
81 | { | |
82 | - if (!boot_cpu_has_bug(X86_BUG_CPU_INSECURE)) | |
83 | + if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) | |
84 | pr_info("%s\n", reason); | |
85 | } | |
86 | ||
87 | @@ -96,7 +96,7 @@ void __init pti_check_boottime_disable(void) | |
88 | } | |
89 | ||
90 | autosel: | |
91 | - if (!boot_cpu_has_bug(X86_BUG_CPU_INSECURE)) | |
92 | + if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN)) | |
93 | return; | |
94 | enable: | |
95 | setup_force_cpu_cap(X86_FEATURE_PTI); | |
96 | -- | |
97 | 2.14.2 | |
98 |