Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp938329rdg; Wed, 11 Oct 2023 09:28:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtU9PKM3yVY+9J7vwyll0BwAAnVcIvz8Ke/Z1Bd1Zi2xoYa7+vXKZwQcQ9E/8MsFz3oLQc X-Received: by 2002:a05:6a21:338c:b0:159:e0b9:bd25 with SMTP id yy12-20020a056a21338c00b00159e0b9bd25mr22359371pzb.57.1697041737832; Wed, 11 Oct 2023 09:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697041737; cv=none; d=google.com; s=arc-20160816; b=FaWCGkZmCIeNTMede4+7PCbId4vQp4Uh6TpyRz9JJvD+IWD8DcopyL/ZCdKV4Yho+p WsuRL7t04R8cN0DklzsrW6XTfOeu3SjSKdtCPdgjwY7MAVjO7gR3eVKgtweorg86Ip1e DQpDKzDQxQ+uIqcvJ8ioK+fbyUERASLHRz+2AeBbZe+9N8ES560nd0YlG+dbeibWXg/P kIgxTlvyc5B2hkcKc6mUNGrJ/EUCdHJ6L9e7G31d8m1lxzPwcBFH48L11xL1WbxIpqir tqgzPgez0uMSTnd2Z76DUxCkdaM7SvWkuVSxeOHhuXOHCvvEOAuCGxNxoNSJCpBUxbbl uF2Q== 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=ohlJo7B8lgm4u06V3oyeFxkRJC+dzEeITgZDlpryTas=; fh=GfP2fXubZ1Wn/83gcagvnbPSZkRsv/t7CztUMqA9EH8=; b=zipQm3WOWvWB+A+1Vptb95GRwSK7lHmrNl+kUJmadlu1nOhsJYT+DtETNA5mCnAFKe 6Nuv7AoJirUFLhkyKB5FyrZuu6zbjurquh4zGuUkwwNCjv73uAIjAT4xii0H+OOnX161 4pBszaqEYzF6+ucjzJRlrPmZ8dmdQf6maZy8Mvao0v5PzlAM9XqskzJ6sA0nDW/Qnev8 I1K0G6EyE/70qF38qTkoEK8LyhkerO8o0VTWagDOQ15yNa6DE3544YDRFuawflyjKRtA tWlqWEit8WUlsl/rvQZ4EIqD/5PkRsaSH+L/3/yXH2wcGBG8uVbKb2YLC5iMqkEXVW4/ fdbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hIrAbuca; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bs190-20020a6328c7000000b00577723d24b0si136654pgb.46.2023.10.11.09.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 09:28:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hIrAbuca; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A114A801B181; Wed, 11 Oct 2023 09:28:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232936AbjJKQ2t (ORCPT + 99 others); Wed, 11 Oct 2023 12:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230271AbjJKQ2s (ORCPT ); Wed, 11 Oct 2023 12:28:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8517091 for ; Wed, 11 Oct 2023 09:28:45 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5410C433C7; Wed, 11 Oct 2023 16:28:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697041725; bh=eLVqglcIaYXm0eePP87XMceGaZzYZyMwAu+YaWboENI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hIrAbucaf0W+q5nNMsuaZdHR6B9UV+EryXYG41J9kWM9IIivmSwx9/L3XxF5n+jmC gliSY1yjBukF1PJSgYPTE66KzIY1it1+xQ/CdPvVL8YExPeSNG8OimghZnU9/BwGMO TQdJ8i9tQ9B/rkEHRsyedWjiEV+/7DpaekA16nC8cjJW4f5vrGMMWxoHyCda0S+2hC +e4MP8xJC8oGXEgv2dWkrBjt0DKHKYxiCWhN1817aqcx3/AZ9F6jnWkaIcGOjpbItx IPKQ7NlDdYzws7lKBkokkI6fU3IiSrF/dAt/W9chBFz1E+w+2FmsGKy3jdKlqzOy3e yf3umg9aO6Daw== Date: Wed, 11 Oct 2023 09:28:43 -0700 From: Josh Poimboeuf To: Peter Zijlstra Cc: Borislav Petkov , David Kaplan , x86@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] Revert "x86/retpoline: Remove .text..__x86.return_thunk section" Message-ID: <20231011162843.grv6kixw4ides6uw@treble> References: <20231010171020.462211-1-david.kaplan@amd.com> <20231010171020.462211-2-david.kaplan@amd.com> <20231010174833.GG14330@noisy.programming.kicks-ass.net> <20231010195721.p5pb273kevg7ydxz@treble> <20231010200429.GIZSWuTWSUM9aId7a6@fat_crate.local> <20231010201912.7pjksbparssqu34k@treble> <20231010212254.ypk2wdogno55shit@treble> <20231011074142.GK14330@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231011074142.GK14330@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 11 Oct 2023 09:28:54 -0700 (PDT) X-Spam-Level: ** On Wed, Oct 11, 2023 at 09:41:42AM +0200, Peter Zijlstra wrote: > > +++ b/tools/objtool/check.c > > @@ -1610,6 +1610,15 @@ static int add_jump_destinations(struct objtool_file *file) > > return -1; > > } > > > > + /* > > + * Since retpolines are in the same section as the return > > + * thunk, they might not use a relocation when branching to it. > > + */ > > + if (jump_dest->sym && jump_dest->sym->return_thunk) { > > + add_return_call(file, insn, true); > > + continue; > > + } > > *urgh*... I mean, yes, that obviously works, but should we not also have > the retpoline thingy for consistency? That case makes less sense though > :/ Consistency with what? The extra section seems pointless but maybe I'm missing something. -- Josh