blob: 05429cdd3061fd7d9514ca99d43749524f72165e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 4f57c39fe783c453db2cfce3f344596541eb1cff Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Sun, 24 May 2020 19:20:19 -0600
Subject: [PATCH 18/32] x86: kaiser_enabled isn't always defined
This symbol only exists when CONFIG_PAGE_TABLE_ISOLATION is set, so
don't use it otherwise.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
arch/x86/kernel/cpu/bugs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 4f81e6de..c85d0534 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1137,8 +1137,10 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
switch (bug) {
case X86_BUG_CPU_MELTDOWN:
+#ifdef CONFIG_PAGE_TABLE_ISOLATION
if (kaiser_enabled)
return sprintf(buf, "Mitigation: PTI\n");
+#endif
break;
--
2.27.0
|