Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp1961417rdb; Tue, 5 Sep 2023 09:58:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0H+zrnmk8qIWQihOOdoWsno/ZPH0ca2QdENsWDs4QhK1dis0/s99kBCmnbzMMYAAgfpe8 X-Received: by 2002:a17:902:728e:b0:1c3:4073:bf80 with SMTP id d14-20020a170902728e00b001c34073bf80mr5292237pll.0.1693933084765; Tue, 05 Sep 2023 09:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693933084; cv=none; d=google.com; s=arc-20160816; b=QTAAFB03yVHxRb4pq+VMgRpjQwiKei9hl3RHPShctxE/pau79W/FeP27VuqWJ4ApGQ g9cmTWU3SMf2ciD/K25owrW6MP7pNZFAwOQYn58RQ9OB1yz66Mofitvgebc+tvSQXqty KF/HI0ickB0dCusN4QDyVzH/Q9IMgLXME/glMCn/LAE7w3YmTPd63fF5POGWQ/Ib8FxH yWXzRP4OsaYBBLnaoIWud3QrQG+U1PBzb1HUZRP8dr1CUx6jmLjxMb1ueneYUvIJ0MTD IfWEsLpHTbWUBc2w090YS58MBZSbOO4VqoOdOPR1QhjKHm738gN2ofL0npSiJvSx+uOf 8jCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aOBMicZEz7Ljg63be/MngVcmadEK9dPurRpNMNjlTRU=; fh=ZwaEcDYNCnlh+U7YxZ1LCEcet9pcdhSkEX0cCEOksvY=; b=W1wLd1L6u0CnsYzrgzF4d8EvplslNNtKOF36YdR4CXO4u0sWIzQ+RkGW0U/9YbRg9k ZVOezqNKuJaGvJ1SzsQe3w0skOUMO8LvTWT84GgNScR6FpsOlhj12aHNoOiocXwBHGDE CxWGvENr9zQMHCErBhefKQdtdlxegmn3e1HQ+wu9ZtrBpV89XpDgnb8HnR4ycM+L9Svm ISks9EGixi5cibCcdA2mqMgG5X11rLrCC5VTqqvpLpN6NWCA86IzSMPajtPrFYJDBu5N 92BEVFP7c71ngy+aJ/fZIQyviohshf/7qP5xi07f+u2/N0M8WGg9A60EeTQBH+pDBgj+ jesw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qm7hFpPu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kq6-20020a170903284600b001bf1d1d99f7si9428151plb.567.2023.09.05.09.57.51; Tue, 05 Sep 2023 09:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qm7hFpPu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243923AbjIEQkD (ORCPT + 99 others); Tue, 5 Sep 2023 12:40:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351049AbjIEFFW (ORCPT ); Tue, 5 Sep 2023 01:05:22 -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 B4FF6CC5 for ; Mon, 4 Sep 2023 22:05:18 -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 4C1376144F for ; Tue, 5 Sep 2023 05:05:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A382EC433CA; Tue, 5 Sep 2023 05:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693890318; bh=vc/fpVk3bxy2ex4nbxSxEwbS+F8Y//JwnGv+3rBD+Rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qm7hFpPuoneMtpu352C4KgS1bjCK9qX6s/MPeb+HOZsrPJ1aU/5DDsqNm7L/gv2NW WfADhO00YENHlRM5wKgo5eh6JWSW24XQ3x7YKLSHmcDtfuG2ID21sTTr3sa6ROh95Q wGfaxre5AdYJd7KPFABwPu9iHhV1GKJzW3FUuSnRd5h3ADQEmHRzf3y3SmgyUiaDQJ gxRmVlI0UwmjBvZ33CcLuj3y3EoktGjdZTe2AUbgRx3t+NCSR+y501FLO4LB5pLw3I bpIgIdw1Q841XIRCkkBIVI+33NNYHcNyEL2HtdXlOuI/lcS7cnjhRL1mkxK56BApie /4iAaR4tu1wOw== 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 v3 18/20] x86/retpoline: Remove .text..__x86.return_thunk section Date: Mon, 4 Sep 2023 22:05:02 -0700 Message-ID: <291aad1dcb2d27c6241fe3f182d66119857757fd.1693889988.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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