Commit dba7770d authored by Tom Lendacky's avatar Tom Lendacky Committed by Khalid Elmously

x86/microcode: Extend post microcode reload to support IBPB feature

CVE-2017-5715 (Spectre v2 Intel)

Add an IBPB feature check to the speculative control update check after
a microcode reload.
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
(backported from commit 073bee2caa42ddde1134cb87c955b4cad7b7d38b)
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Acked-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent c4cc0f55
......@@ -430,6 +430,13 @@ static ssize_t reload_store(struct device *dev,
if (ibpb_inuse)
sysctl_ibpb_enabled = 1;
mutex_unlock(&spec_ctrl_mutex);
} else if (boot_cpu_has(X86_FEATURE_IBPB)) {
printk_once(KERN_INFO "FEATURE IBPB Present\n");
mutex_lock(&spec_ctrl_mutex);
set_ibpb_supported();
if (ibpb_inuse)
sysctl_ibpb_enabled = 1;
mutex_unlock(&spec_ctrl_mutex);
}
mutex_unlock(&microcode_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment