File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1817,7 +1817,7 @@ static enum spectre_v2_user_cmd __init spectre_v2_parse_user_cmdline(void)
1817
1817
char arg [20 ];
1818
1818
int ret , i ;
1819
1819
1820
- if (cpu_mitigations_off () || !IS_ENABLED (CONFIG_MITIGATION_SPECTRE_V2 ))
1820
+ if (!IS_ENABLED (CONFIG_MITIGATION_SPECTRE_V2 ))
1821
1821
return SPECTRE_V2_USER_CMD_NONE ;
1822
1822
1823
1823
ret = cmdline_find_option (boot_command_line , "spectre_v2_user" ,
@@ -1855,6 +1855,13 @@ static void __init spectre_v2_user_select_mitigation(void)
1855
1855
spectre_v2_user_stibp = SPECTRE_V2_USER_STRICT ;
1856
1856
break ;
1857
1857
case SPECTRE_V2_USER_CMD_AUTO :
1858
+ if (!should_mitigate_vuln (X86_BUG_SPECTRE_V2_USER ))
1859
+ break ;
1860
+ spectre_v2_user_ibpb = SPECTRE_V2_USER_PRCTL ;
1861
+ if (smt_mitigations == SMT_MITIGATIONS_OFF )
1862
+ break ;
1863
+ spectre_v2_user_stibp = SPECTRE_V2_USER_PRCTL ;
1864
+ break ;
1858
1865
case SPECTRE_V2_USER_CMD_PRCTL :
1859
1866
spectre_v2_user_ibpb = SPECTRE_V2_USER_PRCTL ;
1860
1867
spectre_v2_user_stibp = SPECTRE_V2_USER_PRCTL ;
You can’t perform that action at this time.
0 commit comments