summaryrefslogtreecommitdiff
path: root/arch/x86/Kconfig
diff options
context:
space:
mode:
authorAlexandre Chartre <alexandre.chartre@oracle.com>2022-06-15 00:15:50 +0300
committerBorislav Petkov <bp@suse.de>2022-06-27 11:33:59 +0300
commit7fbf47c7ce50b38a64576b150e7011ae73d54669 (patch)
tree8cb177c7abdd79b9f1344be6881ef9a46631a2e2 /arch/x86/Kconfig
parent6b80b59b3555706508008f1f127b5412c89c7fd8 (diff)
downloadlinux-7fbf47c7ce50b38a64576b150e7011ae73d54669.tar.xz
x86/bugs: Add AMD retbleed= boot parameter
Add the "retbleed=<value>" boot parameter to select a mitigation for RETBleed. Possible values are "off", "auto" and "unret" (JMP2RET mitigation). The default value is "auto". Currently, "retbleed=auto" will select the unret mitigation on AMD and Hygon and no mitigation on Intel (JMP2RET is not effective on Intel). [peterz: rebase; add hygon] [jpoimboe: cleanups] Signed-off-by: Alexandre Chartre <alexandre.chartre@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/Kconfig')
-rw-r--r--arch/x86/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index be0b95e51df6..e35eecfb74f2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -475,6 +475,9 @@ config RETPOLINE
config CC_HAS_SLS
def_bool $(cc-option,-mharden-sls=all)
+config CC_HAS_RETURN_THUNK
+ def_bool $(cc-option,-mfunction-return=thunk-extern)
+
config SLS
bool "Mitigate Straight-Line-Speculation"
depends on CC_HAS_SLS && X86_64