Skip to content

Commit bb4b3b7

Browse files
Jiri KosinaKAGA-KOKO
authored andcommitted
x86/speculation: Propagate information about RSB filling mitigation to sysfs
If spectrev2 mitigation has been enabled, RSB is filled on context switch in order to protect from various classes of spectrev2 attacks. If this mitigation is enabled, say so in sysfs for spectrev2. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: "WoodhouseDavid" <dwmw@amazon.co.uk> Cc: Andi Kleen <ak@linux.intel.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: "SchauflerCasey" <casey.schaufler@intel.com> Link: https://lkml.kernel.org/r/nycvar.YFH.7.76.1809251438580.15880@cbobk.fhfr.pm
1 parent 53c613f commit bb4b3b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,10 +874,11 @@ static ssize_t cpu_show_common(struct device *dev, struct device_attribute *attr
874874
return sprintf(buf, "Mitigation: __user pointer sanitization\n");
875875

876876
case X86_BUG_SPECTRE_V2:
877-
ret = sprintf(buf, "%s%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled],
877+
ret = sprintf(buf, "%s%s%s%s%s%s\n", spectre_v2_strings[spectre_v2_enabled],
878878
boot_cpu_has(X86_FEATURE_USE_IBPB) ? ", IBPB" : "",
879879
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "",
880880
(x86_spec_ctrl_base & SPEC_CTRL_STIBP) ? ", STIBP" : "",
881+
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? ", RSB filling" : "",
881882
spectre_v2_module_string());
882883
return ret;
883884

0 commit comments

Comments
 (0)