Commit 71585422 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Kleber Sacilotto de Souza

UBUNTU: SAUCE: claim mitigation via observable speculation barrier

CVE-2017-5753 (Spectre v1 Intel)
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 3627e887
......@@ -227,11 +227,19 @@ ssize_t cpu_show_meltdown(struct device *dev,
return sprintf(buf, "Vulnerable\n");
}
#ifndef osb
#define osb_is_enabled (0)
#endif
#ifndef osb_is_enabled
#define osb_is_enabled (1)
#endif
ssize_t cpu_show_spectre_v1(struct device *dev,
struct device_attribute *attr, char *buf)
{
if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V1))
return sprintf(buf, "Not affected\n");
if (osb_is_enabled)
return sprintf(buf, "Mitigation: OSB (observable speculation barrier, Intel v6)\n");
return sprintf(buf, "Vulnerable\n");
}
......
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