Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93CCEC433FE for ; Tue, 2 Nov 2021 18:39:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5732960F90 for ; Tue, 2 Nov 2021 18:39:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5732960F90 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vFeg5QXuIe0xYfqYgAVsfbs7HlOc8GtRtYritlDk528=; b=yhqPkx2/wOnWgTQHzFnzX+e2yl D32bGCUBucv4xq/jNbsZvsSin8xL1SQkFwEvDqMPtGRZgnivouaZHbZF7P9H0JQFi1NayldZ5ahYL vmWsYRhR8Sksn9CUorS1BGm0adOTd+bGfUPu8s6pW9ZDxO1zmpk0fpClCpZR7l8hxzOT7QVdmFkDg za52buFdfKWhfexhJT6DDOqKqEqDoFm60X6EsiznDEsk5oUrKXt9W9VQTFMNI2gWemQhoCFnw1Fw3 hWPCH5rBt1wtHztEqBmXwJzA9ovdWqkLCpL6OUbMG/SuahEsPomriEw0CMA/rhpLAR6FLFA/8iqY1 x9iNWyPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhyfn-002hps-O1; Tue, 02 Nov 2021 18:38:15 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhyfk-002hog-0j for linux-arm-kernel@lists.infradead.org; Tue, 02 Nov 2021 18:38:13 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D806611CA; Tue, 2 Nov 2021 18:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635878291; bh=vmTQ8x8e5dzGnPo0OtHkgphc6BEtO8aKBNUj3W+swGw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bh/jcwtHEbkPbyLdXT6sNx71bdARk1l4lz+Itq89PcCoXyKW5eb94I2JOkS7FD5R4 3f9br17z3HTc/O7GeDFNOcGj4iT4SD42Ld3UGiPmgkuvrHeMtIrxmTLqYDtbxgGnbB YVCjNSc5VzFnIgAIpZSNSn08wZJIh9Vy2ki7+m7Kve6uHL01l4gnKo++nIgK8JtPM5 XF643M6+8V8A6V0ReR305S/DUhrzDQeukuikLf2vS/TKmsSK20yw4gB2Ad50aezc5T fzR0RxuoE4EYgU6kv7rbfWQ13vb8DpwWh5eciLkkHAJGZoBgsNS074qnq24c0GtzQY bff818PcZUWEg== Date: Tue, 2 Nov 2021 18:38:07 +0000 From: Mark Brown To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, madvenka@linux.microsoft.com, rostedt@goodmis.org, will@kernel.org Subject: Re: [PATCH v2] arm64: ftrace: use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR Message-ID: References: <20211029162245.39761-1-mark.rutland@arm.com> MIME-Version: 1.0 In-Reply-To: <20211029162245.39761-1-mark.rutland@arm.com> X-Cookie: Love America -- or give it back. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211102_113812_101283_ECD57C46 X-CRM114-Status: GOOD ( 14.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1628438301208717029==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1628438301208717029== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TlXNDqLxALowxy4r" Content-Disposition: inline --TlXNDqLxALowxy4r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 29, 2021 at 05:22:45PM +0100, Mark Rutland wrote: > To fix this, we need to be able to uniquely identify each rewritten > return address such that we can map this back to the original return > address. We can use HAVE_FUNCTION_GRAPH_RET_ADDR_PTR to associate > each rewritten return address with a unique location on the stack. As > the return address is passed in the LR (and so is not guaranteed a > unique location in memory), we use the FP upon entry to the function > (i.e. the address of the caller's frame record) as the return address > pointer. Any nested call will have a different FP value as the caller > must create its own frame record and update FP to point to this. As a bonus since we're relying on core code more the result is also simpler. Reviewed-by: Mark Brown --TlXNDqLxALowxy4r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmGBhY4ACgkQJNaLcl1U h9DMcAf+K9pvoiMPODCGUA8E1Ksnm/lpfpqrdvx5zq547/aryVF7f40G0CUD4YvC QaHef1EhNgiqLlLS4C+zKz5wx4aQPnXwk9ymqIpkhlbGKQDIhzfjtvABWOTtb0mJ plrOFrbWhWwh0gQiYc8DFqb1HGR8vN7IKvMaxCE/VkszWRa4JE5dZte21vsXYeNy /7Fjtm8J3aePQlD2Ns3JPRoIdH4/Z0//Ek+7TOmzWWEOST4TaTD8I/ItpKK3/V/g Uzrk9uWibfswZ/yDCESPLRO6m/kPT7DPzwQ2TWcLTYNPpRwJA+qC9mFI6eLpMkGI HynI2yt2utOVO8aoAm9HEV6Ev31CYw== =SetG -----END PGP SIGNATURE----- --TlXNDqLxALowxy4r-- --===============1628438301208717029== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1628438301208717029==--