Skip to content

Commit b8da0b3

Browse files
leitaobp3tk0v
authored andcommitted
x86/bugs: Add a separate config for TAA
Currently, the CONFIG_SPECULATION_MITIGATIONS is halfway populated, where some mitigations have entries in Kconfig, and they could be modified, while others mitigations do not have Kconfig entries, and could not be controlled at build time. Create an entry for the TAA CPU mitigation under CONFIG_SPECULATION_MITIGATIONS. This allow users to enable or disable it at compilation time. Signed-off-by: Breno Leitao <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9404556 commit b8da0b3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

arch/x86/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,6 +2659,17 @@ config MITIGATION_MDS
26592659
a hardware vulnerability which allows unprivileged speculative access
26602660
to data which is available in various CPU internal buffers.
26612661
See also <file:Documentation/admin-guide/hw-vuln/mds.rst>
2662+
2663+
config MITIGATION_TAA
2664+
bool "Mitigate TSX Asynchronous Abort (TAA) hardware bug"
2665+
depends on CPU_SUP_INTEL
2666+
default y
2667+
help
2668+
Enable mitigation for TSX Asynchronous Abort (TAA). TAA is a hardware
2669+
vulnerability that allows unprivileged speculative access to data
2670+
which is available in various CPU internal buffers by using
2671+
asynchronous aborts within an Intel TSX transactional region.
2672+
See also <file:Documentation/admin-guide/hw-vuln/tsx_async_abort.rst>
26622673
endif
26632674

26642675
config ARCH_HAS_ADD_PAGES

arch/x86/kernel/cpu/bugs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ enum taa_mitigations {
294294
};
295295

296296
/* Default mitigation for TAA-affected CPUs */
297-
static enum taa_mitigations taa_mitigation __ro_after_init = TAA_MITIGATION_VERW;
297+
static enum taa_mitigations taa_mitigation __ro_after_init =
298+
IS_ENABLED(CONFIG_MITIGATION_TAA) ? TAA_MITIGATION_VERW : TAA_MITIGATION_OFF;
298299
static bool taa_nosmt __ro_after_init;
299300

300301
static const char * const taa_strings[] = {

0 commit comments

Comments
 (0)