3.2.101-rc1 review patch. If anyone has any objections, please let me know.
------------------ From: Waiman Long <long...@redhat.com> commit 1df37383a8aeabb9b418698f0bcdffea01f4b1b2 upstream. 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 <l...@redhat.com> Signed-off-by: Waiman Long <long...@redhat.com> Signed-off-by: Thomas Gleixner <t...@linutronix.de> Acked-by: David Woodhouse <d...@amazon.co.uk> Cc: Tom Lendacky <thomas.lenda...@amd.com> Cc: Kees Cook <keesc...@google.com> Cc: Andi Kleen <a...@linux.intel.com> Cc: Tim Chen <tim.c.c...@linux.intel.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Jiri Kosina <ji...@kernel.org> Cc: Andy Lutomirski <l...@amacapital.net> Cc: Dave Hansen <dave.han...@intel.com> Cc: Josh Poimboeuf <jpoim...@redhat.com> Cc: Arjan van de Ven <ar...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linux-foundation.org> Cc: Paul Turner <p...@google.com> Link: https://lkml.kernel.org/r/1516658974-27852-1-git-send-email-long...@redhat.com [bwh: Backported to 3.2: adjust filename] Signed-off-by: Ben Hutchings <b...@decadent.org.uk> --- arch/x86/lib/retpoline-export.c | 1 - arch/x86/lib/retpoline.S | 1 - 2 files changed, 2 deletions(-) --- a/arch/x86/lib/retpoline-export.c +++ b/arch/x86/lib/retpoline-export.c @@ -22,5 +22,4 @@ INDIRECT_THUNK(dx) INDIRECT_THUNK(si) INDIRECT_THUNK(di) INDIRECT_THUNK(bp) -INDIRECT_THUNK(sp) #endif /* CONFIG_RETPOLINE */ --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -35,7 +35,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)