Skip to content

Commit 412851b

Browse files
mcarabasBrian Maly
authored andcommitted
x86/microcode: add SPEC_CTRL_SSBD to x86_spec_ctrl_mask on late loading.
This is required so that we don't filter out the SPEC_CTRL_SSBD bit from what the guest is trying to write to the MSR_IA32_SPEC_CTRL in x86_virt_spec_ctrl(). Failure to do would make it look like the guest correctly enabled SSBD when it did not, as reading back the MSR from the guest would not show the bit was filtered out, giving a false sense of security. Orabug: 29642139 Reported-by: Quentin Casasnovas <[email protected]> Signed-off-by: Mihai Carabas <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent 75d9142 commit 412851b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kernel/cpu/bugs_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,7 @@ void microcode_late_select_mitigation(void)
15511551
else
15521552
ssb_mode = SPEC_STORE_BYPASS_PRCTL;
15531553
}
1554+
x86_spec_ctrl_mask |= SPEC_CTRL_SSBD;
15541555
#undef pr_fmt
15551556
#define pr_fmt(fmt) "Speculative Store Bypass late loading: " fmt
15561557
pr_info("%s\n", ssb_strings[ssb_mode]);

0 commit comments

Comments
 (0)