summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorPawan Gupta <pawan.kumar.gupta@linux.intel.com>2025-08-14 10:20:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-11 17:19:15 +0200
commit893387c18612bb452336a5881da0d015a7e8f4a2 (patch)
tree2d8b1e791eeb35450d513695ee03919a9c8abd9a /drivers/base
parent15006289e5c38b2a830e1fba221977a27598176c (diff)
downloadlinux-893387c18612bb452336a5881da0d015a7e8f4a2.tar.gz
linux-893387c18612bb452336a5881da0d015a7e8f4a2.tar.bz2
linux-893387c18612bb452336a5881da0d015a7e8f4a2.zip
x86/vmscape: Enable the mitigation
Commit 556c1ad666ad90c50ec8fccb930dd5046cfbecfb upstream. Enable the previously added mitigation for VMscape. Add the cmdline vmscape={off|ibpb|force} and sysfs reporting. Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index d68c60f35764..186bd680e741 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -606,6 +606,11 @@ ssize_t __weak cpu_show_tsa(struct device *dev, struct device_attribute *attr, c
return sysfs_emit(buf, "Not affected\n");
}
+ssize_t __weak cpu_show_vmscape(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ return sysfs_emit(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);
@@ -622,6 +627,7 @@ static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NU
static DEVICE_ATTR(reg_file_data_sampling, 0444, cpu_show_reg_file_data_sampling, NULL);
static DEVICE_ATTR(indirect_target_selection, 0444, cpu_show_indirect_target_selection, NULL);
static DEVICE_ATTR(tsa, 0444, cpu_show_tsa, NULL);
+static DEVICE_ATTR(vmscape, 0444, cpu_show_vmscape, NULL);
static struct attribute *cpu_root_vulnerabilities_attrs[] = {
&dev_attr_meltdown.attr,
@@ -640,6 +646,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = {
&dev_attr_reg_file_data_sampling.attr,
&dev_attr_indirect_target_selection.attr,
&dev_attr_tsa.attr,
+ &dev_attr_vmscape.attr,
NULL
};