]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0293-x86-microcode-Extend-post-microcode-reload-to-suppor.patch
fix #1622: i40e memory leak
[pve-kernel.git] / patches / kernel / 0293-x86-microcode-Extend-post-microcode-reload-to-suppor.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Tom Lendacky <thomas.lendacky@amd.com>
3 Date: Wed, 20 Dec 2017 10:55:47 +0000
4 Subject: [PATCH] x86/microcode: Extend post microcode reload to support IBPB
5 feature
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 CVE-2017-5753
11 CVE-2017-5715
12
13 Add an IBPB feature check to the speculative control update check after
14 a microcode reload.
15
16 Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
17 Signed-off-by: Andy Whitcroft <apw@canonical.com>
18 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
19 (cherry picked from commit 099878acd3738271fb2ade01f4649b1ed2fb72d5)
20 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 ---
22 arch/x86/kernel/cpu/microcode/core.c | 7 +++++++
23 1 file changed, 7 insertions(+)
24
25 diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
26 index 55086921d29e..638c08350d65 100644
27 --- a/arch/x86/kernel/cpu/microcode/core.c
28 +++ b/arch/x86/kernel/cpu/microcode/core.c
29 @@ -546,6 +546,13 @@ static ssize_t reload_store(struct device *dev,
30 if (ibpb_inuse)
31 sysctl_ibpb_enabled = 1;
32 mutex_unlock(&spec_ctrl_mutex);
33 + } else if (boot_cpu_has(X86_FEATURE_IBPB)) {
34 + printk_once(KERN_INFO "FEATURE IBPB Present\n");
35 + mutex_lock(&spec_ctrl_mutex);
36 + set_ibpb_supported();
37 + if (ibpb_inuse)
38 + sysctl_ibpb_enabled = 1;
39 + mutex_unlock(&spec_ctrl_mutex);
40 }
41
42 mutex_unlock(&microcode_mutex);
43 --
44 2.14.2
45