]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0230-UBUNTU-SAUCE-only-attempt-to-use-PCID-in-64-bit-buil.patch
KPTI: add follow-up fixes
[pve-kernel.git] / patches / kernel / 0230-UBUNTU-SAUCE-only-attempt-to-use-PCID-in-64-bit-buil.patch
1 From 3642d7fb8bcab15ab1f82531f8120e22181cd7da Mon Sep 17 00:00:00 2001
2 From: Andy Whitcroft <apw@canonical.com>
3 Date: Wed, 20 Dec 2017 13:33:50 +0000
4 Subject: [PATCH 230/241] UBUNTU: SAUCE: only attempt to use PCID in 64 bit
5 builds
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 CVE-2017-5754
11
12 [apw@canonical.com: need to review if this is still needed with the
13 latest patches.]
14 Signed-off-by: Andy Whitcroft <apw@canonical.com>
15 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
16 (cherry picked from commit babace1d1ac19075498675cd787500cfa24d2b55)
17 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
18 ---
19 arch/x86/kernel/smpboot.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
23 index 6ad8391b9866..398e8324fea4 100644
24 --- a/arch/x86/kernel/smpboot.c
25 +++ b/arch/x86/kernel/smpboot.c
26 @@ -222,7 +222,7 @@ static void notrace start_secondary(void *unused)
27 * before cpu_init(), SMP booting is too fragile that we want to
28 * limit the things done here to the most necessary things.
29 */
30 - if (boot_cpu_has(X86_FEATURE_PCID))
31 + if (IS_ENABLED(CONFIG_X86_64) && boot_cpu_has(X86_FEATURE_PCID))
32 __write_cr4(__read_cr4() | X86_CR4_PCIDE);
33 cpu_init();
34 x86_cpuinit.early_percpu_clock_init();
35 --
36 2.14.2
37