]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0232-UBUNTU-SAUCE-only-attempt-to-use-PCID-in-64-bit-buil.patch
cbc69e65f9289eb68c548bb1a4a4c9809481d599
[pve-kernel.git] / patches / kernel / 0232-UBUNTU-SAUCE-only-attempt-to-use-PCID-in-64-bit-buil.patch
1 From 0000000000000000000000000000000000000000 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] UBUNTU: SAUCE: only attempt to use PCID in 64 bit builds
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 [apw@canonical.com: need to review if this is still needed with the
12 latest patches.]
13 Signed-off-by: Andy Whitcroft <apw@canonical.com>
14 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
15 (cherry picked from commit babace1d1ac19075498675cd787500cfa24d2b55)
16 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
17 ---
18 arch/x86/kernel/smpboot.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
22 index 6ad8391b9866..398e8324fea4 100644
23 --- a/arch/x86/kernel/smpboot.c
24 +++ b/arch/x86/kernel/smpboot.c
25 @@ -222,7 +222,7 @@ static void notrace start_secondary(void *unused)
26 * before cpu_init(), SMP booting is too fragile that we want to
27 * limit the things done here to the most necessary things.
28 */
29 - if (boot_cpu_has(X86_FEATURE_PCID))
30 + if (IS_ENABLED(CONFIG_X86_64) && boot_cpu_has(X86_FEATURE_PCID))
31 __write_cr4(__read_cr4() | X86_CR4_PCIDE);
32 cpu_init();
33 x86_cpuinit.early_percpu_clock_init();
34 --
35 2.14.2
36