]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/srso: Disentangle rethunk-dependent options
authorJosh Poimboeuf <jpoimboe@kernel.org>
Tue, 5 Sep 2023 05:05:00 +0000 (22:05 -0700)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 20 Oct 2023 10:30:50 +0000 (12:30 +0200)
commit34a3cae7474c6e6f4a85aad4a7b8191b8b35cdcd
tree2c3c62864ab2b14a39d22a9e4fda0638fc4b044c
parent351236947a45a512c517153bbe109fe868d05e6d
x86/srso: Disentangle rethunk-dependent options

CONFIG_RETHUNK, CONFIG_CPU_UNRET_ENTRY and CONFIG_CPU_SRSO are all
tangled up.  De-spaghettify the code a bit.

Some of the rethunk-related code has been shuffled around within the
'.text..__x86.return_thunk' section, but otherwise there are no
functional changes.  srso_alias_untrain_ret() and srso_alias_safe_ret()
((which are very address-sensitive) haven't moved.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/2845084ed303d8384905db3b87b77693945302b4.1693889988.git.jpoimboe@kernel.org
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/vmlinux.lds.S
arch/x86/lib/retpoline.S