mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
x86/bugs: Change commas to semicolons in 'spectre_v2' sysfs file
commit 0cd01ac5dc
upstream.
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>
Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
046545314c
commit
108feca9e4
1 changed files with 12 additions and 12 deletions
|
@ -2694,15 +2694,15 @@ static char *stibp_state(void)
|
||||||
|
|
||||||
switch (spectre_v2_user_stibp) {
|
switch (spectre_v2_user_stibp) {
|
||||||
case SPECTRE_V2_USER_NONE:
|
case SPECTRE_V2_USER_NONE:
|
||||||
return ", STIBP: disabled";
|
return "; STIBP: disabled";
|
||||||
case SPECTRE_V2_USER_STRICT:
|
case SPECTRE_V2_USER_STRICT:
|
||||||
return ", STIBP: forced";
|
return "; STIBP: forced";
|
||||||
case SPECTRE_V2_USER_STRICT_PREFERRED:
|
case SPECTRE_V2_USER_STRICT_PREFERRED:
|
||||||
return ", STIBP: always-on";
|
return "; STIBP: always-on";
|
||||||
case SPECTRE_V2_USER_PRCTL:
|
case SPECTRE_V2_USER_PRCTL:
|
||||||
case SPECTRE_V2_USER_SECCOMP:
|
case SPECTRE_V2_USER_SECCOMP:
|
||||||
if (static_key_enabled(&switch_to_cond_stibp))
|
if (static_key_enabled(&switch_to_cond_stibp))
|
||||||
return ", STIBP: conditional";
|
return "; STIBP: conditional";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -2711,10 +2711,10 @@ static char *ibpb_state(void)
|
||||||
{
|
{
|
||||||
if (boot_cpu_has(X86_FEATURE_IBPB)) {
|
if (boot_cpu_has(X86_FEATURE_IBPB)) {
|
||||||
if (static_key_enabled(&switch_mm_always_ibpb))
|
if (static_key_enabled(&switch_mm_always_ibpb))
|
||||||
return ", IBPB: always-on";
|
return "; IBPB: always-on";
|
||||||
if (static_key_enabled(&switch_mm_cond_ibpb))
|
if (static_key_enabled(&switch_mm_cond_ibpb))
|
||||||
return ", IBPB: conditional";
|
return "; IBPB: conditional";
|
||||||
return ", IBPB: disabled";
|
return "; IBPB: disabled";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -2724,11 +2724,11 @@ static char *pbrsb_eibrs_state(void)
|
||||||
if (boot_cpu_has_bug(X86_BUG_EIBRS_PBRSB)) {
|
if (boot_cpu_has_bug(X86_BUG_EIBRS_PBRSB)) {
|
||||||
if (boot_cpu_has(X86_FEATURE_RSB_VMEXIT_LITE) ||
|
if (boot_cpu_has(X86_FEATURE_RSB_VMEXIT_LITE) ||
|
||||||
boot_cpu_has(X86_FEATURE_RSB_VMEXIT))
|
boot_cpu_has(X86_FEATURE_RSB_VMEXIT))
|
||||||
return ", PBRSB-eIBRS: SW sequence";
|
return "; PBRSB-eIBRS: SW sequence";
|
||||||
else
|
else
|
||||||
return ", PBRSB-eIBRS: Vulnerable";
|
return "; PBRSB-eIBRS: Vulnerable";
|
||||||
} else {
|
} else {
|
||||||
return ", PBRSB-eIBRS: Not affected";
|
return "; PBRSB-eIBRS: Not affected";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2747,9 +2747,9 @@ static ssize_t spectre_v2_show_state(char *buf)
|
||||||
return sysfs_emit(buf, "%s%s%s%s%s%s%s\n",
|
return sysfs_emit(buf, "%s%s%s%s%s%s%s\n",
|
||||||
spectre_v2_strings[spectre_v2_enabled],
|
spectre_v2_strings[spectre_v2_enabled],
|
||||||
ibpb_state(),
|
ibpb_state(),
|
||||||
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? ", IBRS_FW" : "",
|
boot_cpu_has(X86_FEATURE_USE_IBRS_FW) ? "; IBRS_FW" : "",
|
||||||
stibp_state(),
|
stibp_state(),
|
||||||
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? ", RSB filling" : "",
|
boot_cpu_has(X86_FEATURE_RSB_CTXSW) ? "; RSB filling" : "",
|
||||||
pbrsb_eibrs_state(),
|
pbrsb_eibrs_state(),
|
||||||
spectre_v2_module_string());
|
spectre_v2_module_string());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue