Skip to content

Commit bc03559

Browse files
author
Martin Schwidefsky
committed
s390: report spectre mitigation via syslog
Add a boot message if either of the spectre defenses is active. The message is "Spectre V2 mitigation: execute trampolines." or "Spectre V2 mitigation: limited branch prediction." Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 6e179d6 commit bc03559

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/s390/kernel/nospec-branch.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ static int __init nospec_setup_early(char *str)
3232
}
3333
early_param("nospec", nospec_setup_early);
3434

35+
static int __init nospec_report(void)
36+
{
37+
if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable)
38+
pr_info("Spectre V2 mitigation: execute trampolines.\n");
39+
if (__test_facility(82, S390_lowcore.alt_stfle_fac_list))
40+
pr_info("Spectre V2 mitigation: limited branch prediction.\n");
41+
return 0;
42+
}
43+
arch_initcall(nospec_report);
44+
3545
#ifdef CONFIG_EXPOLINE
3646

3747
int nospec_disable = IS_ENABLED(CONFIG_EXPOLINE_OFF);

0 commit comments

Comments
 (0)