summaryrefslogtreecommitdiff
path: root/arch/x86/Kconfig
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-09-15 13:11:17 +0200
committerPeter Zijlstra <peterz@infradead.org>2022-10-17 16:41:10 +0200
commit8f7c0d8b23c3f5f740a48db31ebadef28af17a22 (patch)
tree0a8ffceaa5e5ced02671727a3b95b41090f91288 /arch/x86/Kconfig
parentcb855971d717a2dd752241f66fedad9dc178388c (diff)
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
Diffstat (limited to 'arch/x86/Kconfig')
-rw-r--r--arch/x86/Kconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f408fa87ed94..e18963e77cb1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2446,6 +2446,14 @@ config CC_HAS_SLS
config CC_HAS_RETURN_THUNK
def_bool $(cc-option,-mfunction-return=thunk-extern)
+config HAVE_CALL_THUNKS
+ def_bool y
+ depends on RETHUNK && OBJTOOL
+
+config CALL_THUNKS
+ def_bool n
+ select FUNCTION_ALIGNMENT_16B
+
menuconfig SPECULATION_MITIGATIONS
bool "Mitigations for speculative execution vulnerabilities"
default y