Skip to content

Commit 03267a5

Browse files
leitaobp3tk0v
authored andcommitted
x86/bugs: Remove GDS Force Kconfig option
Remove the MITIGATION_GDS_FORCE Kconfig option, which aggressively disables AVX as a mitigation for Gather Data Sampling (GDS) vulnerabilities. This option is not widely used by distros. While removing the Kconfig option, retain the runtime configuration ability through the `gather_data_sampling=force` kernel parameter. This allows users to still enable this aggressive mitigation if needed, without baking it into the kernel configuration. Simplify the kernel configuration while maintaining flexibility for runtime mitigation choices. Suggested-by: Borislav Petkov <[email protected]> Signed-off-by: Breno Leitao <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Daniel Sneddon <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b908cda commit 03267a5

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

arch/x86/Kconfig

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,25 +2610,6 @@ config MITIGATION_SLS
26102610
against straight line speculation. The kernel image might be slightly
26112611
larger.
26122612

2613-
config MITIGATION_GDS_FORCE
2614-
bool "Force GDS Mitigation"
2615-
depends on CPU_SUP_INTEL
2616-
default n
2617-
help
2618-
Gather Data Sampling (GDS) is a hardware vulnerability which allows
2619-
unprivileged speculative access to data which was previously stored in
2620-
vector registers.
2621-
2622-
This option is equivalent to setting gather_data_sampling=force on the
2623-
command line. The microcode mitigation is used if present, otherwise
2624-
AVX is disabled as a mitigation. On affected systems that are missing
2625-
the microcode any userspace code that unconditionally uses AVX will
2626-
break with this option set.
2627-
2628-
Setting this option on systems not vulnerable to GDS has no effect.
2629-
2630-
If in doubt, say N.
2631-
26322613
config MITIGATION_RFDS
26332614
bool "RFDS Mitigation"
26342615
depends on CPU_SUP_INTEL

arch/x86/kernel/cpu/bugs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,11 +735,7 @@ enum gds_mitigations {
735735
GDS_MITIGATION_HYPERVISOR,
736736
};
737737

738-
#if IS_ENABLED(CONFIG_MITIGATION_GDS_FORCE)
739-
static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FORCE;
740-
#else
741738
static enum gds_mitigations gds_mitigation __ro_after_init = GDS_MITIGATION_FULL;
742-
#endif
743739

744740
static const char * const gds_strings[] = {
745741
[GDS_MITIGATION_OFF] = "Vulnerable",

0 commit comments

Comments
 (0)