From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224O0X9/jlRyYY3osVy3Z5uKwFDC7bza7XjqFZcjB5W3wiIy3Jn0CEpcDHPu1mNZC0KQiHt6 ARC-Seal: i=1; a=rsa-sha256; t=1516659013; cv=none; d=google.com; s=arc-20160816; b=g89O7pCjdCLGxH9ptQCl2J2yK/KSv9twzs6IR8woyuxcOvL9S+LZthANgYfGPgdUuZ O/NQh0/u5NU6T9ie6t0o+joyv4vKr1Aqy3QrnoV+QDBdnflpDKbbRtc5+OaQJBPUOrn8 +YVvGCfdcoQGcxk8+QPkDcaMazSw0FQ8RUrKoO1Jlr1wvViZ7wTKCM94NMbw8cVxaRzA 7Pq86x3ensSWb05AxmOqxa34jA+HSf98rhxNxDsECMtIrYKvoVP83ty2CneeKI7f04nt biSZ4QUujgtiV3y18eYgIs3zVI1VXzzC+imgTW2ab0Bd+e1W0GTbCs6qn2BnRmKM2ERC 0ssw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=WhS6ny04hMZl3Yt8iiZTzJKwJ3YUyaL3ckt7ePMVeZU=; b=lcqal2NcvVcLhVrk2rJCniXknn/31zIzv+EVwJKViVIOLp2tjnTD9jPiJEgp1/xLlk NrSYiz5O+EKQupQlbE1qtLg5p1QkjXaTN13+ui68zB8ZBTKFeFPh3msFJKNw+bZh/3mK p5BV4zswqb7qAwTVmhsT+qXhxBwGC53pqqp4vPK4PNfam75KJzQoZ7vyoU4hlCAyIDEu iCKSrBOdgbPgZT+fMOppMmRsuswbR1LDJmcSzQkYGqzqKuYn4mbAczObPLYp54980Rrh aEQPqS+3oe+ECGFM2j3GSyHQ05/Mndy5RDKf3m0t1+0RCsSGwk6MhgIzDf6LXq9OMm6d Ak8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of longman@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of longman@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=longman@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com From: Waiman Long To: Thomas Gleixner , Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, David Woodhouse , Arjan van de Ven , Andi Kleen , Josh Poimboeuf , Jeff Law , Linus Torvalds , Jiri Kosina , Andy Lutomirski , Dave Hansen , Kees Cook , Tim Chen , Greg Kroah-Hartman , Paul Turner , Tom Lendacky , Waiman Long Subject: [PATCH] x86/retpoline: Remove the esp/rsp thunk Date: Mon, 22 Jan 2018 17:09:34 -0500 Message-Id: <1516658974-27852-1-git-send-email-longman@redhat.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590332241345318630?= X-GMAIL-MSGID: =?utf-8?q?1590332241345318630?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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 Signed-off-by: Waiman Long --- arch/x86/include/asm/asm-prototypes.h | 1 - arch/x86/lib/retpoline.S | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h index 0927cdc..1908214 100644 --- a/arch/x86/include/asm/asm-prototypes.h +++ b/arch/x86/include/asm/asm-prototypes.h @@ -38,5 +38,4 @@ INDIRECT_THUNK(si) INDIRECT_THUNK(di) INDIRECT_THUNK(bp) -INDIRECT_THUNK(sp) #endif /* CONFIG_RETPOLINE */ diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S index dfb2ba9..c909961 100644 --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -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) -- 1.8.3.1