Skip to content

Commit c1d09b6

Browse files
committed
x86/bugs: Change commas to semicolons in 'spectre_v2' sysfs file
jira LE-2015 cve CVE-2024-2201 Rebuild_History Non-Buildable kernel-5.14.0-427.42.1.el9_4 commit-author Josh Poimboeuf <jpoimboe@kernel.org> commit 0cd01ac Change the format of the 'spectre_v2' vulnerabilities sysfs file slightly by converting the commas to semicolons, so that mitigations for future variants can be grouped together and separated by commas. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> (cherry picked from commit 0cd01ac) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent e5812e1 commit c1d09b6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,15 +2776,15 @@ static char *stibp_state(void)
27762776

27772777
switch (spectre_v2_user_stibp) {
27782778
case SPECTRE_V2_USER_NONE:
2779-
return ", STIBP: disabled";
2779+
return "; STIBP: disabled";
27802780
case SPECTRE_V2_USER_STRICT:
2781-
return ", STIBP: forced";
2781+
return "; STIBP: forced";
27822782
case SPECTRE_V2_USER_STRICT_PREFERRED:
2783-
return ", STIBP: always-on";
2783+
return "; STIBP: always-on";
27842784
case SPECTRE_V2_USER_PRCTL:
27852785
case SPECTRE_V2_USER_SECCOMP:
27862786
if (static_key_enabled(&switch_to_cond_stibp))
2787-
return ", STIBP: conditional";
2787+
return "; STIBP: conditional";
27882788
}
27892789
return "";
27902790
}
@@ -2793,10 +2793,10 @@ static char *ibpb_state(void)
27932793
{
27942794
if (boot_cpu_has(X86_FEATURE_IBPB)) {
27952795
if (static_key_enabled(&switch_mm_always_ibpb))
2796-
return ", IBPB: always-on";
2796+
return "; IBPB: always-on";
27972797
if (static_key_enabled(&switch_mm_cond_ibpb))
2798-
return ", IBPB: conditional";
2799-
return ", IBPB: disabled";
2798+
return "; IBPB: conditional";
2799+
return "; IBPB: disabled";
28002800
}
28012801
return "";
28022802
}
@@ -2806,11 +2806,11 @@ static char *pbrsb_eibrs_state(void)
28062806
if (boot_cpu_has_bug(X86_BUG_EIBRS_PBRSB)) {
28072807
if (boot_cpu_has(X86_FEATURE_RSB_VMEXIT_LITE) ||
28082808
boot_cpu_has(X86_FEATURE_RSB_VMEXIT))
2809-
return ", PBRSB-eIBRS: SW sequence";
2809+
return "; PBRSB-eIBRS: SW sequence";
28102810
else
2811-
return ", PBRSB-eIBRS: Vulnerable";
2811+
return "; PBRSB-eIBRS: Vulnerable";
28122812
} else {
2813-
return ", PBRSB-eIBRS: Not affected";
2813+
return "; PBRSB-eIBRS: Not affected";
28142814
}
28152815
}
28162816

@@ -2829,9 +2829,9 @@ static ssize_t spectre_v2_show_state(char *buf)
28292829
return sysfs_emit(buf, "%s%s%s%s%s%s%s\n",
28302830
spectre_v2_strings[spectre_v2_enabled],
28312831
ibpb_state(),
2832-
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "",
2832+
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? "; IBRS_FW" : "",
28332833
stibp_state(),
2834-
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? ", RSB filling" : "",
2834+
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? "; RSB filling" : "",
28352835
pbrsb_eibrs_state(),
28362836
spectre_v2_module_string());
28372837
}

0 commit comments

Comments
 (0)