]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0247-x86-pti-Rename-BUG_CPU_INSECURE-to-BUG_CPU_MELTDOWN.patch
update ABI file
[pve-kernel.git] / patches / kernel / 0247-x86-pti-Rename-BUG_CPU_INSECURE-to-BUG_CPU_MELTDOWN.patch
CommitLineData
035dbe67
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Thomas Gleixner <tglx@linutronix.de>
3Date: Fri, 5 Jan 2018 15:27:34 +0100
4Subject: [PATCH] x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9CVE-2017-5754
10
11Use the name associated with the particular attack which needs page table
12isolation for mitigation.
13
14Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15Acked-by: David Woodhouse <dwmw@amazon.co.uk>
16Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
17Cc: Jiri Koshina <jikos@kernel.org>
18Cc: Linus Torvalds <torvalds@linux-foundation.org>
19Cc: Tim Chen <tim.c.chen@linux.intel.com>
20Cc: Andi Lutomirski <luto@amacapital.net>
21Cc: Andi Kleen <ak@linux.intel.com>
22Cc: Peter Zijlstra <peterz@infradead.org>
23Cc: Paul Turner <pjt@google.com>
24Cc: Tom Lendacky <thomas.lendacky@amd.com>
25Cc: Greg KH <gregkh@linux-foundation.org>
26Cc: Dave Hansen <dave.hansen@intel.com>
27Cc: Kees Cook <keescook@google.com>
28Cc: stable@vger.kernel.org
29Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801051525300.1724@nanos
30
31(cherry picked from commit de791821c295cc61419a06fe5562288417d1bc58)
32Signed-off-by: Andy Whitcroft <apw@canonical.com>
33Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
34(cherry picked from commit aefb6725ee33758a2869c37e22dbc7ca80548007)
35Signed-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
42diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
43index 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 */
54diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
55index 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 }
67diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
68index 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--
972.14.2
98