Commit 88b00371 authored by Tom Lendacky's avatar Tom Lendacky Committed by Marcelo Henrique Cerri

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

CVE-2017-5753
CVE-2017-5715

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>
parent 0c42069d
......@@ -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);
......@@ -711,4 +718,4 @@ int __init microcode_init(void)
return error;
}
late_initcall(microcode_init);
fs_initcall(save_microcode_in_initrd);
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