Skip to content

Commit 0cd01ac

Browse files
jpoimboeKAGA-KOKO
authored andcommitted
x86/bugs: Change commas to semicolons in 'spectre_v2' sysfs file
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 <[email protected]> Signed-off-by: Daniel Sneddon <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 39cd87c commit 0cd01ac

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
@@ -2695,15 +2695,15 @@ static char *stibp_state(void)
26952695

26962696
switch (spectre_v2_user_stibp) {
26972697
case SPECTRE_V2_USER_NONE:
2698-
return ", STIBP: disabled";
2698+
return "; STIBP: disabled";
26992699
case SPECTRE_V2_USER_STRICT:
2700-
return ", STIBP: forced";
2700+
return "; STIBP: forced";
27012701
case SPECTRE_V2_USER_STRICT_PREFERRED:
2702-
return ", STIBP: always-on";
2702+
return "; STIBP: always-on";
27032703
case SPECTRE_V2_USER_PRCTL:
27042704
case SPECTRE_V2_USER_SECCOMP:
27052705
if (static_key_enabled(&switch_to_cond_stibp))
2706-
return ", STIBP: conditional";
2706+
return "; STIBP: conditional";
27072707
}
27082708
return "";
27092709
}
@@ -2712,10 +2712,10 @@ static char *ibpb_state(void)
27122712
{
27132713
if (boot_cpu_has(X86_FEATURE_IBPB)) {
27142714
if (static_key_enabled(&switch_mm_always_ibpb))
2715-
return ", IBPB: always-on";
2715+
return "; IBPB: always-on";
27162716
if (static_key_enabled(&switch_mm_cond_ibpb))
2717-
return ", IBPB: conditional";
2718-
return ", IBPB: disabled";
2717+
return "; IBPB: conditional";
2718+
return "; IBPB: disabled";
27192719
}
27202720
return "";
27212721
}
@@ -2725,11 +2725,11 @@ static char *pbrsb_eibrs_state(void)
27252725
if (boot_cpu_has_bug(X86_BUG_EIBRS_PBRSB)) {
27262726
if (boot_cpu_has(X86_FEATURE_RSB_VMEXIT_LITE) ||
27272727
boot_cpu_has(X86_FEATURE_RSB_VMEXIT))
2728-
return ", PBRSB-eIBRS: SW sequence";
2728+
return "; PBRSB-eIBRS: SW sequence";
27292729
else
2730-
return ", PBRSB-eIBRS: Vulnerable";
2730+
return "; PBRSB-eIBRS: Vulnerable";
27312731
} else {
2732-
return ", PBRSB-eIBRS: Not affected";
2732+
return "; PBRSB-eIBRS: Not affected";
27332733
}
27342734
}
27352735

@@ -2748,9 +2748,9 @@ static ssize_t spectre_v2_show_state(char *buf)
27482748
return sysfs_emit(buf, "%s%s%s%s%s%s%s\n",
27492749
spectre_v2_strings[spectre_v2_enabled],
27502750
ibpb_state(),
2751-
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "",
2751+
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? "; IBRS_FW" : "",
27522752
stibp_state(),
2753-
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? ", RSB filling" : "",
2753+
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? "; RSB filling" : "",
27542754
pbrsb_eibrs_state(),
27552755
spectre_v2_module_string());
27562756
}

0 commit comments

Comments
 (0)