Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp308652rdg; Tue, 10 Oct 2023 10:48:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEa23Vbp/FS1gqJq4iNy33sU8rNYETPEwQ3UQxiPU6HgQnQbQpizqhdLYixL/VWWFTtXTsg X-Received: by 2002:a17:902:9a44:b0:1c3:f4fa:b1a2 with SMTP id x4-20020a1709029a4400b001c3f4fab1a2mr16071694plv.8.1696960130609; Tue, 10 Oct 2023 10:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696960130; cv=none; d=google.com; s=arc-20160816; b=SMJNSY/KJhFeTNYwatIe2LSLXKJekfB88TO0LqJDeFbiNLROvA6iQh6+VxkZQWFzbE 2IlVG2LUXJPxYbyAPLeBRljQ+utp7bxJdf9RsM/jTiYik/Nk2nAMx87L32G6MGbrqDYq xad5+J2WDBRiX5qcg2wVJcqlMSXHlCZWI5XUaT8j6umfiWuChNTG6gEN0XrsOjZZJg+u YENpPjCoc394JMwttU9+2Bs6GsyklUs1VUjhe90iyo1BcHIZX8uQj94qZA98UGtSvBbS k3fQYt+8nZ9iAtSCui4jl/DFgLKAvCSKDXCDkK1ShkDbxgS14VTmSZMoIlfr8/T8cxIH UHNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m7DQWBMz8yLU63XLUakLZSqJHmYw8jWnqgK8hjlHCfw=; fh=Q2h6sy/7KeH3hy1G42JQmlbV+Bxvhk0nC81lYg0bUaU=; b=wHJtKbEXClvf701d02P16ppj17d4d2v/iK2NCoEjtUk1G6sJudT2dTjLznJftfmv/o 1ciOf/OLKBfe1NyjsTxJ36pKbwEUgB1jmgI9vRODJSQwdNfSb3a8y2jEZERnpxPelszl KcvVPzOop4I43zYkC0tIsZngVEtPjzZyZm6dPzU3piAD2RqzfC91zdgFLfIH2IoEECNl 4XPw9WZ/DrTk+G6haUFjQ6T8ont0DXJTchn0xUi8xVOcl74RP3Qhzevi+alopajt6zw0 CCsOK4AlsSGgApmr1bXogGsfETv8KZVXeqPW5POqQl+rT/SIYCOemsYpxl2yz4/Tvwq+ Jsgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OtehqaCg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id u7-20020a170902e5c700b001c9ad30e4b8si2054177plf.320.2023.10.10.10.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 10:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OtehqaCg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6D8C580309C7; Tue, 10 Oct 2023 10:48:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233489AbjJJRsm (ORCPT + 99 others); Tue, 10 Oct 2023 13:48:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbjJJRsl (ORCPT ); Tue, 10 Oct 2023 13:48:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8CBD99 for ; Tue, 10 Oct 2023 10:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=m7DQWBMz8yLU63XLUakLZSqJHmYw8jWnqgK8hjlHCfw=; b=OtehqaCgzj8JHUVLeIgT20tOws TAH65SYQlbthMPK0xK9AaonDMcE2tYOliylEjtUZSOGEVJdLNVP603y3DFr2BTWDGgHRvFXGirdvw nxRNfhjJ/l9AOGdkRfKJA+bOixvgm2TS399aSCe0D5U176kLRAzDRfT/jWXlb3XLAUSnOoUzWCWXU CaBEWO3nuJ0sYkE59uTkl5w4iIXP5B6sixr91j+01i/wv5NznyyIRktZA+iiVFVjDO19HtFsN8gfF 8d6MjUQuwLGINQgvPvg/HcENpg230aRGVziLIPfKpQ4/WKpj6C1KHOcoLXU7DmRKdNNmWsihEuVsp dWsRnZMw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qqGqQ-005wuc-5r; Tue, 10 Oct 2023 17:48:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id D2FD4300392; Tue, 10 Oct 2023 19:48:33 +0200 (CEST) Date: Tue, 10 Oct 2023 19:48:33 +0200 From: Peter Zijlstra To: David Kaplan Cc: x86@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf Subject: Re: [PATCH 1/3] Revert "x86/retpoline: Remove .text..__x86.return_thunk section" Message-ID: <20231010174833.GG14330@noisy.programming.kicks-ass.net> References: <20231010171020.462211-1-david.kaplan@amd.com> <20231010171020.462211-2-david.kaplan@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010171020.462211-2-david.kaplan@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 10 Oct 2023 10:48:49 -0700 (PDT) On Tue, Oct 10, 2023 at 12:10:18PM -0500, David Kaplan wrote: > arch/x86/kernel/vmlinux.lds.S | 3 +++ > arch/x86/lib/retpoline.S | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S > index 9cdb1a7332c4..54a5596adaa6 100644 > --- a/arch/x86/kernel/vmlinux.lds.S > +++ b/arch/x86/kernel/vmlinux.lds.S > @@ -132,7 +132,10 @@ 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 db813113e637..3da768a71cf9 100644 > --- a/arch/x86/lib/retpoline.S > +++ b/arch/x86/lib/retpoline.S > @@ -129,6 +129,8 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) > > #ifdef CONFIG_RETHUNK Perhaps elucidate the future reader with a comment here? Lest someone tries removing it again. > > + .section .text..__x86.return_thunk > + > #ifdef CONFIG_CPU_SRSO