File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -748,13 +748,17 @@ static inline bool __init verw_clears_cpu_reg_file(void)
748
748
749
749
static void __init rfds_select_mitigation (void )
750
750
{
751
- if (!boot_cpu_has_bug (X86_BUG_RFDS ) || cpu_mitigations_off () ) {
751
+ if (!boot_cpu_has_bug (X86_BUG_RFDS )) {
752
752
rfds_mitigation = RFDS_MITIGATION_OFF ;
753
753
return ;
754
754
}
755
755
756
- if (rfds_mitigation == RFDS_MITIGATION_AUTO )
757
- rfds_mitigation = RFDS_MITIGATION_VERW ;
756
+ if (rfds_mitigation == RFDS_MITIGATION_AUTO ) {
757
+ if (should_mitigate_vuln (X86_BUG_RFDS ))
758
+ rfds_mitigation = RFDS_MITIGATION_VERW ;
759
+ else
760
+ rfds_mitigation = RFDS_MITIGATION_OFF ;
761
+ }
758
762
759
763
if (rfds_mitigation == RFDS_MITIGATION_OFF )
760
764
return ;
@@ -765,7 +769,7 @@ static void __init rfds_select_mitigation(void)
765
769
766
770
static void __init rfds_update_mitigation (void )
767
771
{
768
- if (!boot_cpu_has_bug (X86_BUG_RFDS ) || cpu_mitigations_off () )
772
+ if (!boot_cpu_has_bug (X86_BUG_RFDS ))
769
773
return ;
770
774
771
775
if (verw_clear_cpu_buf_mitigation_selected )
You can’t perform that action at this time.
0 commit comments