Skip to content

Commit 8f7c0d8

Browse files
KAGA-KOKOPeter Zijlstra
authored andcommitted
x86/Kconfig: Add CONFIG_CALL_THUNKS
In preparation for mitigating the Intel SKL RSB underflow issue in software, add a new configuration symbol which allows to build the required call thunk infrastructure conditionally. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220915111146.849523555@infradead.org
1 parent cb85597 commit 8f7c0d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/x86/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,14 @@ config CC_HAS_SLS
24462446
config CC_HAS_RETURN_THUNK
24472447
def_bool $(cc-option,-mfunction-return=thunk-extern)
24482448

2449+
config HAVE_CALL_THUNKS
2450+
def_bool y
2451+
depends on RETHUNK && OBJTOOL
2452+
2453+
config CALL_THUNKS
2454+
def_bool n
2455+
select FUNCTION_ALIGNMENT_16B
2456+
24492457
menuconfig SPECULATION_MITIGATIONS
24502458
bool "Mitigations for speculative execution vulnerabilities"
24512459
default y

0 commit comments

Comments
 (0)