Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp814839rdb; Fri, 25 Aug 2023 01:42:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJzj/q1zc/xSELaD4VYdT5wqjO59u3pCD8oQgwiBTC0O9vKr7S+oom4Rn0SUQMZzQTpWE8 X-Received: by 2002:a17:906:310d:b0:991:c9da:70da with SMTP id 13-20020a170906310d00b00991c9da70damr14334742ejx.61.1692952939847; Fri, 25 Aug 2023 01:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692952939; cv=none; d=google.com; s=arc-20160816; b=Y654nqCFycCLCVk9K6Oll6Nb9BXa883rcOhEzSnoxqD5/Kh4YXaqM7WpyK/nUw0B+4 df/qq1wBA7Uln6+yGQc4lIVjafXsUmcZQsmBhClxZp47G/Kyws+NrpoGKsWY8HOlKx3K +oqlk5bCeKFAz17i9eYTBrYRuSagumpocSohMKFrR9rd/7hxT38RlV/bk/XvEazSAvWu RiUAXUokqCNzctNJu9mTTe+SU034gBgQt3jhYkxUJEbYoN07NSMvXmhDCabu8dAnxXl1 2/RI+HEMJHz77SzU91hdaVPWRwtaVu2jBfPh1Yx0FqiIFJSb5PWEaXnxuA1STk7hCO7X VXmA== 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=tHaCutK6BYP5pfScL0PY3QOfr9eFZkdOnHuaVud+v8y7P9Pqbd4eUOyNkQ7lmTj/x1 vMh6DJlzAfU9+Nfpp+8ttej1fouByOg7w+nIgivNznzhr/0CzSQ/bNiB3U3hb09/Gfhm cXcBnLniYxduLsjfsio9pCMyXKtUw9fbWoTliOXJsyadJG4EXRmFBMyhRdAkZUlJd+tq nrkELscG5vbJM4AQ0la++zlSdwdFQbWdfgmNR5RG9Np8UAQuHE9IPYE/Q/rUHb/OtkjB vmSJRJ1Yc6AIAlQtXgRIyVOAoKSgVA8lXt2K9d+Bxq5Sh3wdVnXmuLL2Dgh3RqmyFM0k JCQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mLHfznP8; 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 d21-20020a17090694d500b0098678728b52si695823ejy.123.2023.08.25.01.41.47; Fri, 25 Aug 2023 01:42:19 -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=mLHfznP8; 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 S243342AbjHYHDb (ORCPT + 99 others); Fri, 25 Aug 2023 03:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242733AbjHYHCR (ORCPT ); Fri, 25 Aug 2023 03:02:17 -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 8A621D3 for ; Fri, 25 Aug 2023 00:02:15 -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 20AEB66658 for ; Fri, 25 Aug 2023 07:02:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24DA7C433CB; Fri, 25 Aug 2023 07:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692946934; bh=vc/fpVk3bxy2ex4nbxSxEwbS+F8Y//JwnGv+3rBD+Rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mLHfznP8aizF6S7oxNi5andly3kHpxrG2MNiA7O5/5BmyJfQXd1HI0bp2RTsLSx1O qey0EXBV+RiYQMwjVsLZf2J2H9KCW3U9pUDTx4eXZI/Dy2nGtYQsKDi1Pc1adJ/ZZl Pk6uhMI/VfeS2cd4IdX4lQJEDP32Q6OCpGBI33mIcpSEf2KYVt2j0eFM5r0+rDKv9C /I4BPaA4iDrQ3QZem10oo1LgWaB4hCUr3OLtXJ3m26GlmA0kaJsfo/WiSgXnRA6I3s sML77KR4BFhXe5XYeev+14FmO1RMwTcD04zXzC/FN5GynAFg0Oi/VlIVOmKgh2+NCr zGo80eQ8t135w== 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 21/23] x86/retpoline: Remove .text..__x86.return_thunk section Date: Fri, 25 Aug 2023 00:01:52 -0700 Message-ID: <34947acf1c8a1be2d3ba9a4d0dd8a3001ae3c0db.1692919072.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