diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2018-04-26 05:04:20 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-10-03 06:09:39 +0300 |
commit | 65d362d590594c95c2f33ba96b314dba6d1b97ab (patch) | |
tree | f9b0dba707e3fd9cfdbb003b4259c5a9ea882711 /drivers/base | |
parent | df53e5d9c5c7debdfb99e84caa3903dfc47cbd4e (diff) | |
download | linux-65d362d590594c95c2f33ba96b314dba6d1b97ab.tar.xz |
x86/bugs: Expose /sys/../spec_store_bypass
commit c456442cd3a59eeb1d60293c26cbe2ff2c4e42cf upstream.
Add the sysfs file for the new vulerability. It does not do much except
show the words 'Vulnerable' for recent x86 cores.
Intel cores prior to family 6 are known not to be vulnerable, and so are
some Atoms and some Xeon Phi.
It assumes that older Cyrix, Centaur, etc. cores are immune.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
[bwh: Backported to 3.16:
- Renumber X86_BUG_SPEC_STORE_BYPASS
- Adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 9175c84161ec..ba68d18ac4e9 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -438,14 +438,22 @@ ssize_t __weak cpu_show_spectre_v2(struct device *dev, return sprintf(buf, "Not affected\n"); } +ssize_t __weak cpu_show_spec_store_bypass(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return sprintf(buf, "Not affected\n"); +} + static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL); static DEVICE_ATTR(spectre_v2, 0444, cpu_show_spectre_v2, NULL); +static DEVICE_ATTR(spec_store_bypass, 0444, cpu_show_spec_store_bypass, NULL); static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr, &dev_attr_spectre_v1.attr, &dev_attr_spectre_v2.attr, + &dev_attr_spec_store_bypass.attr, NULL }; |