Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2611840rdb; Fri, 18 Aug 2023 05:49:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+v8NdzFqsTmAXfdPU4OdUb4+zjJkEgtBzqgBp2xVes7PpKOq3t4ZzL1bRdIsSjKZQ89Dd X-Received: by 2002:a05:6808:148c:b0:398:5d57:3d08 with SMTP id e12-20020a056808148c00b003985d573d08mr3461321oiw.37.1692362950224; Fri, 18 Aug 2023 05:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692362950; cv=none; d=google.com; s=arc-20160816; b=ra54UEsSdYjvbCk4/40r2G+HeRSj2R+7PEbjPNsfmWOByaHaKdlwRYDsB4+lhWJ/3K PpptcM2CzxSYzMOpo3nR4Vr7+h1Rg7PUGVmVh7R9E9am0NMT1yoNzIfpnpUCcBHftXXb EQcOndHghEiJJhiXAnmEnunBDQKzUpwOPXwE7SI710F0S14Bdsp/bnvDEJOl+lUV80eO 4XcpVPn24oM1NQ9xJxRAtB54yO+6GjKbAZkcI9XzO6TmF/hxC7gc+Q8AkpToiIJUD5W0 r8m116namQRAWaUJKxo+kCULyKlj8ANj+cIil/dzGq1v4EsTO4sn2fhIptNafNxSzqtG W71Q== 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=mYkJ8LsrF7ZTzU48DqAwOhme7BJhhRmqm7eAgrSmv20=; fh=Z7YiKpK4o7AfnPuDE5WhFg5p45oZrmEFViEBzv+5rr0=; b=qVqPqvpkHFpixikcZDv9Cg3qkZCM4aKNhlP5mtATjKe/zUjZxGSACVjIuZSvjz2p31 ecAPxjRzq3KuICAavwwJvqPngr10FgGuu9FLRvOoJj9AHJCGprK05V2iRtXdMsrxfNya 8ixdgcj8FSZ7+l934wJifRmGEgsF9FS7vgS3TB4rz7hqsW3XecdhKpXCJkBLjGUI00oC +V+h4eZobgorL5eLT9IvsD0nlP4d58GZXLtoCPBIgBSiXzQ3MFSAWWMx47E8ssXVDWUz zxEDAZdVxAh/cxPKkSe3mLY8Mveu46sLbS1oVW38uYXqf/ZSRSsKCou9aebGokamNoEw Y02w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NatCkY2r; 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 m187-20020a6326c4000000b00565e9ee17d9si1304217pgm.118.2023.08.18.05.48.58; Fri, 18 Aug 2023 05:49:10 -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=NatCkY2r; 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 S1346853AbjHPWWi (ORCPT + 99 others); Wed, 16 Aug 2023 18:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346881AbjHPWWe (ORCPT ); Wed, 16 Aug 2023 18:22:34 -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 45341D1; Wed, 16 Aug 2023 15:22:33 -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 CDEC267019; Wed, 16 Aug 2023 22:22:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED051C433C7; Wed, 16 Aug 2023 22:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692224552; bh=ItLslPf7bW8pM/0eFJzpwDrV/zwwM2HsGWCvnRv4mAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NatCkY2r/+7cEL/jWcTm8J0fpWEgv0TBkrSrICE/VnqVC/M+kp7JU7MxpWgB1r6TK kxc0bUBH1f5XzpWlRSQYAYKDzHSYDhdhk/NrMVNAPQCdq+Nvi8Vwv1gAYkJKa98Qct zn/4HR8fu3WQ4/lZF4RG2OPlhMdvSQ6TJRzQp3qwoDkWRFEzWaA7p2eOxWFVE30Fph GzLRqVUS6hObEDYqHip89kLk70zGEshGoUH/hdUfZk21OZQKTArmJTPNVJnSXs0JwH 4l/xlHC1GR67iIUe9dKU187OrNw1BnZQYnQ/ocyUHyAY7ps9/oL/ekumck3ly0RjLy kzhOPqtJU1kZw== Date: Wed, 16 Aug 2023 15:22:30 -0700 From: Josh Poimboeuf To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, "Borislav Petkov (AMD)" , x86@kernel.org Subject: Re: [PATCH] objtool/x86: Fixup frame-pointer vs rethunk Message-ID: <20230816222230.ths3fs4qwklbhi47@treble> References: <20230814121148.704502245@infradead.org> <169217251760.27769.15304146275480287222.tip-bot2@tip-bot2> <20230816115921.GH980931@hirez.programming.kicks-ass.net> <20230816203152.co5hgmo2epd6wvef@treble> <20230816220840.GB998718@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230816220840.GB998718@hirez.programming.kicks-ass.net> 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 On Thu, Aug 17, 2023 at 12:08:40AM +0200, Peter Zijlstra wrote: > On Wed, Aug 16, 2023 at 01:31:52PM -0700, Josh Poimboeuf wrote: > > On Wed, Aug 16, 2023 at 01:59:21PM +0200, Peter Zijlstra wrote: > > > Turns out I forgot to build with FRAME_POINTER=y, that still gives: > > > > > > vmlinux.o: warning: objtool: srso_untrain_ret+0xd: call without frame pointer save/setup > > > > > > the below seems to cure this. > > > > LGTM > > OK, with Changelog below. > > --- > Subject: objtool/x86: Fixup frame-pointer vs rethunk > From: Peter Zijlstra > Date: Wed, 16 Aug 2023 13:59:21 +0200 > > For stack-validation of a frame-pointer build, objtool validates that > every CALL instructions is preceded by a frame-setup. The new SRSO > return thunks violate this with their RSB stuffing trickery. > > Extend the __fentry__ exception to also cover the embedded_insn case > used for this. This cures: > > vmlinux.o: warning: objtool: srso_untrain_ret+0xd: call without frame pointer save/setup > > Fixes: 4ae68b26c3ab ("objtool/x86: Fix SRSO mess") > Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf -- Josh