Skip to content

Commit 1df3738

Browse files
Waiman-LongKAGA-KOKO
authored andcommitted
x86/retpoline: Remove the esp/rsp thunk
It doesn't make sense to have an indirect call thunk with esp/rsp as retpoline code won't work correctly with the stack pointer register. Removing it will help compiler writers to catch error in case such a thunk call is emitted incorrectly. Fixes: 76b0438 ("x86/retpoline: Add initial retpoline support") Suggested-by: Jeff Law <[email protected]> Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: David Woodhouse <[email protected]> Cc: Tom Lendacky <[email protected]> Cc: Kees Cook <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Tim Chen <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Paul Turner <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 3f7d875 commit 1df3738

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

arch/x86/include/asm/asm-prototypes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,4 @@ INDIRECT_THUNK(dx)
3838
INDIRECT_THUNK(si)
3939
INDIRECT_THUNK(di)
4040
INDIRECT_THUNK(bp)
41-
INDIRECT_THUNK(sp)
4241
#endif /* CONFIG_RETPOLINE */

arch/x86/lib/retpoline.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ GENERATE_THUNK(_ASM_DX)
3636
GENERATE_THUNK(_ASM_SI)
3737
GENERATE_THUNK(_ASM_DI)
3838
GENERATE_THUNK(_ASM_BP)
39-
GENERATE_THUNK(_ASM_SP)
4039
#ifdef CONFIG_64BIT
4140
GENERATE_THUNK(r8)
4241
GENERATE_THUNK(r9)

0 commit comments

Comments
 (0)