Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1198213pxb; Fri, 21 Jan 2022 12:03:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxericZO2aN2/osb0xAe0UGB0o3SEHpv1u1c0dsBvjPqial+j1EwZA7okNTtRqMfCa8up3A X-Received: by 2002:a17:902:8494:b0:149:8a72:98bb with SMTP id c20-20020a170902849400b001498a7298bbmr4965450plo.0.1642795431964; Fri, 21 Jan 2022 12:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642795431; cv=none; d=google.com; s=arc-20160816; b=JQhKrjv8pgdBySVVlxJ7Si/JxpDTSjtbzNa8j4L971jCUOrGPWvN2oFDkB/BXpTKhB Sz5w8kmzvRgBSlj8lkILjA8kjaJf0RndYZ8hAwffpJ5fxssLg+QvectNXonnUef3v4u8 cA9ixGFeQyyEdI2qFhC1/pZOR0V4dUSJwWG25VV1HYyGBLe3TA294LecStGaBygVjx2x nApCgoTPIE6JyucsTd9gy85Bsz1gySv3ddpfxnxKM5kvG3d9ZcOE3pIhVEr537o3iUHc jLZxM/UPRAuBJQik/hXa8nCREUbmGrA14yC1gCyGYZn0QGJSWt/U/T69tm1dHPQGRVv1 1miw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=VUx/FixPaEe6YT7F4YysqIz+YufT/bqww2Y78WeYZFs=; b=v8eMnx3+RXl6Ul3GDlcueu74c7d9ONdPqCNEG8ECBgiw65fM7Q8xlbI2ez2IsJDNI9 qwLmNBvZ2W623EmveqcF9ujxbOl3rz1UQpzmQQPTiPNCsmvJvrpxOzx+YmYXqgDWyDC4 AD5K4xtNISdLOynrjQQH4KQsi2cQWS+E1mCeK+U37RLgKuWHTb1/p+rWfC7vs2gBIzQX LGHW8VIAUay4vI7v0Ex0qW/AY5FhABmnztwnslZ5tE5ftJ/5N71hGdRIWaeJo2XRp9KU 6EfO2ZIuGsGFMlJzZtSwIqsgA7ZATXGDRKjawTH5sA0F3H4yfW9g2Ff/BnOrPDWJaGcL n9Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=mDIxsahH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t32si2250173pfg.98.2022.01.21.12.03.39; Fri, 21 Jan 2022 12:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=mDIxsahH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240237AbiASUsw (ORCPT + 99 others); Wed, 19 Jan 2022 15:48:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232095AbiASUsv (ORCPT ); Wed, 19 Jan 2022 15:48:51 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCACBC061574 for ; Wed, 19 Jan 2022 12:48:50 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id r132-20020a1c448a000000b0034e043aaac7so684045wma.5 for ; Wed, 19 Jan 2022 12:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jrtc27.com; s=gmail.jrtc27.user; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VUx/FixPaEe6YT7F4YysqIz+YufT/bqww2Y78WeYZFs=; b=mDIxsahHNCOZMq2u6spiErkwTPbcHGPtRXj5dQGR5QmB0ZU56Z5BoDCoj6iItpBlpP JEf8jxKyVWUNnSHQQPp/RGtng9w0DuZWAIy34RvdVllTdACcMBuD7IMtFvR2XOxiwj1A OUvbAW/JQyzGfe/uxCb51JZL9WRfbnvJ0DPXIdjR5dey5yZtYGtPVcxGbHzNDGx7f0Tm L6nEnANQCuzEiaN5epZkXOHaiwT/mLdsO4qK5A2PF2DnrfcbNuAnVrWzlZe7T2NL1jZe bU1mWXESbAHBJcI7wjw+VaPQB7pgKQPfgZamh5otlqTcLIQw8nRGUsDNJRqTONOaWgpk TQzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VUx/FixPaEe6YT7F4YysqIz+YufT/bqww2Y78WeYZFs=; b=phA+eoGiHdU9qWjaIjc2OHmSz1krG+GOImT2uzcey7ePzwQBBEgyqLyiM8am/RiSQO sz3/XQ8cqgqQnwKrDg5PXe8fsPyM7CXk58hlBj8wF+90y9lRqcCR6Byn5t9UCz96T0kz 1hm1WU/mahpg0hbDwbe5oA9Qd9Bz+yfE72R0PwZ1SAjbAjfBpuZ1Wd6qCYUkru08SSkL Q9ZqcNB56FpO7UfNZhnHmN+3gEZExtiLW8vFk9u+DC6mv9TbARNjDfYIGek0VG+FCxUQ dnc6nheVMajL2YpXJ+9Rt7cHWM/7a09kU+eBAaS9eGAoi0iSi7J1M35JDv5kHCZl3ZZ+ OdTg== X-Gm-Message-State: AOAM530bKA49ISGFBMkZm6PAiv0TIef57fYKcrflv0+gVeUxzlrwq0uL Xt7+ycq6kt79LKxTrxWaSgju5g== X-Received: by 2002:a1c:4d09:: with SMTP id o9mr5402464wmh.22.1642625329512; Wed, 19 Jan 2022 12:48:49 -0800 (PST) Received: from smtpclient.apple (global-5-142.nat-2.net.cam.ac.uk. [131.111.5.142]) by smtp.gmail.com with ESMTPSA id d11sm1134397wri.65.2022.01.19.12.48.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jan 2022 12:48:49 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: [PATCH] riscv: eliminate unreliable __builtin_frame_address(1) From: Jessica Clarke In-Reply-To: <8735lj78wu.fsf@igel.home> Date: Wed, 19 Jan 2022 20:48:48 +0000 Cc: Changbin Du , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv , linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <8F8D535F-3637-4BC7-8853-B709EC5D14C9@jrtc27.com> References: <20220117154433.3124-1-changbin.du@gmail.com> <87v8yg6lhf.fsf@igel.home> <8735lj78wu.fsf@igel.home> To: Andreas Schwab X-Mailer: Apple Mail (2.3693.40.0.1.81) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19 Jan 2022, at 20:44, Andreas Schwab wrote: >=20 > On Jan 19 2022, Jessica Clarke wrote: >=20 >> Leaf functions by definition don=E2=80=99t have callees that are = trying to read >> their frame pointer so aren=E2=80=99t relevant here. >=20 > ??? __builtin_frame_address(1) is about the caller, not the callee. My point is that the only thing that can possibly read the incoming frame pointer of a leaf function is the leaf function itself, and since it knows where it=E2=80=99s putting it then there is no ABI issue, it = just remembers where it put it and loads it from there. The issue of whether it=E2=80=99s part of the ABI or not only arises when you=E2=80=99re = trying to read the incoming frame pointer from a caller, which by definition is not a leaf function. Jess