]> Git Repo - linux.git/commit
x86/retpoline: Ensure default return thunk isn't used at runtime
authorJosh Poimboeuf <[email protected]>
Wed, 3 Jan 2024 18:36:26 +0000 (19:36 +0100)
committerBorislav Petkov (AMD) <[email protected]>
Mon, 12 Feb 2024 10:42:15 +0000 (11:42 +0100)
commit4461438a8405e800f90e0e40409e5f3d07eed381
tree1c660616f321919a56e80cac4fd9e0e980065a68
parent0911b8c52c4d68c57d02f172daa55a42bce703f0
x86/retpoline: Ensure default return thunk isn't used at runtime

Make sure the default return thunk is not used after all return
instructions have been patched by the alternatives because the default
return thunk is insufficient when it comes to mitigating Retbleed or
SRSO.

Fix based on an earlier version by David Kaplan <[email protected]>.

  [ bp: Fix the compilation error of warn_thunk_thunk being an invisible
        symbol, hoist thunk macro into calling.h ]

Signed-off-by: Josh Poimboeuf <[email protected]>
Co-developed-by: Borislav Petkov (AMD) <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/20240104132446.GEZZaxnrIgIyat0pqf@fat_crate.local
arch/x86/entry/calling.h
arch/x86/entry/entry.S
arch/x86/entry/thunk_32.S
arch/x86/entry/thunk_64.S
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c
arch/x86/lib/retpoline.S
This page took 0.048565 seconds and 4 git commands to generate.