]> Git Repo - linux.git/commitdiff
x86/retpoline: Remove the esp/rsp thunk
authorWaiman Long <[email protected]>
Mon, 22 Jan 2018 22:09:34 +0000 (17:09 -0500)
committerThomas Gleixner <[email protected]>
Wed, 24 Jan 2018 11:31:55 +0000 (12:31 +0100)
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: 76b043848fd2 ("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]
arch/x86/include/asm/asm-prototypes.h
arch/x86/lib/retpoline.S

index 0927cdc4f9460165a9159b1c4f7bea0e759bdbb9..1908214b91257f1d2442e2e6fc08b2f4c4f5bf65 100644 (file)
@@ -38,5 +38,4 @@ INDIRECT_THUNK(dx)
 INDIRECT_THUNK(si)
 INDIRECT_THUNK(di)
 INDIRECT_THUNK(bp)
-INDIRECT_THUNK(sp)
 #endif /* CONFIG_RETPOLINE */
index dfb2ba91b670dca795100e7de84bf0e57800d7b3..c909961e678a594bd3812cb14936bdf035af2bb9 100644 (file)
@@ -36,7 +36,6 @@ GENERATE_THUNK(_ASM_DX)
 GENERATE_THUNK(_ASM_SI)
 GENERATE_THUNK(_ASM_DI)
 GENERATE_THUNK(_ASM_BP)
-GENERATE_THUNK(_ASM_SP)
 #ifdef CONFIG_64BIT
 GENERATE_THUNK(r8)
 GENERATE_THUNK(r9)
This page took 0.055552 seconds and 4 git commands to generate.