From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 853ECEE49A4 for ; Mon, 21 Aug 2023 01:20:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232395AbjHUBUO (ORCPT ); Sun, 20 Aug 2023 21:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjHUBTu (ORCPT ); Sun, 20 Aug 2023 21:19:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C79E2 for ; Sun, 20 Aug 2023 18:19:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AD2DB62656 for ; Mon, 21 Aug 2023 01:19:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A833DC433C7; Mon, 21 Aug 2023 01:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692580779; bh=vc/fpVk3bxy2ex4nbxSxEwbS+F8Y//JwnGv+3rBD+Rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6JM0y6Va98w8Ku9RhzPIsJPh1GKZZwvBoNGv9Ghd+p75eCKzSAeS+bvkGig4j5kz em4QeLq0a15Z4rrcy7a5l6zeFftY3LH/5/dZUVoho6PFl965C1ItVatuPtwvyoRAdJ bKLrxxwesWLNjIqVN4ET5fIfMzlQeuVqkUB96bsDp9BBz/c/4vm/c8zcq2LD/NzAds nfANx9DmEW3znSW8aA761+Q47chkPMXdHAHVDja8g+VuhmYZ8BpxdCAPxghmfiW2Z9 AG7fhMg1GRuKtKCrZE2U3xc0xxv6ICMUlW0MCErVFrl3us9LU5WxwIsN4q5pS9LDj8 kvT7tfQvPzpNA== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Peter Zijlstra , Babu Moger , Paolo Bonzini , Sean Christopherson , David.Kaplan@amd.com, Andrew Cooper , Nikolay Borisov , gregkh@linuxfoundation.org, Thomas Gleixner Subject: [PATCH 20/22] x86/retpoline: Remove .text..__x86.return_thunk section Date: Sun, 20 Aug 2023 18:19:17 -0700 Message-ID: <5325966e6bdbaea6ffd79720cfeb44abe9a88513.1692580085.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The '.text..__x86.return_thunk' section has no purpose. Remove it and let the return thunk code live in '.text..__x86.indirect_thunk'. Signed-off-by: Josh Poimboeuf --- arch/x86/kernel/vmlinux.lds.S | 3 --- arch/x86/lib/retpoline.S | 2 -- 2 files changed, 5 deletions(-) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 9188834e56c9..f1c3516d356d 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -132,10 +132,7 @@ SECTIONS LOCK_TEXT KPROBES_TEXT SOFTIRQENTRY_TEXT -#ifdef CONFIG_RETPOLINE *(.text..__x86.indirect_thunk) - *(.text..__x86.return_thunk) -#endif STATIC_CALL_TEXT ALIGN_ENTRY_TEXT_BEGIN diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S index 415521dbe15e..49f2be7c7b35 100644 --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -129,8 +129,6 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) #ifdef CONFIG_RETHUNK - .section .text..__x86.return_thunk - #ifdef CONFIG_CPU_SRSO /* -- 2.41.0