diff options
author | 2023-07-12 19:43:13 -0700 | |
---|---|---|
committer | 2023-07-21 13:02:35 -0700 | |
commit | 53cf5797f114ba2bd86d23a862302119848eff19 (patch) | |
tree | 11cf22869eabd05aaeccd71feb7cb0fd9a6719a7 /arch/x86/kernel/cpu/bugs.c | |
parent | x86/speculation: Add force option to GDS mitigation (diff) | |
download | wireguard-linux-53cf5797f114ba2bd86d23a862302119848eff19.tar.xz wireguard-linux-53cf5797f114ba2bd86d23a862302119848eff19.zip |
x86/speculation: Add Kconfig option for GDS
Gather Data Sampling (GDS) is mitigated in microcode. However, on
systems that haven't received the updated microcode, disabling AVX
can act as a mitigation. Add a Kconfig option that uses the microcode
mitigation if available and disables AVX otherwise. Setting this
option has no effect on systems not affected by GDS. This is the
equivalent of setting gather_data_sampling=force.
Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 155e8d1c325e..41821a4551a2 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -659,7 +659,11 @@ enum gds_mitigations { GDS_MITIGATION_HYPERVISOR, }; +#if IS_ENABLED(CONFIG_GDS_FORCE_MITIGATION) +static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FORCE; +#else static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FULL; +#endif static const char * const gds_strings[] = { [GDS_MITIGATION_OFF] = "Vulnerable", |