From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DF7B8C433F5 for ; Wed, 25 May 2022 17:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jgtlho0+FtTjWKMU4u7zEjWQlMx7Ej14z5TeILXktqw=; b=who3cmofRXBGyL bta6JoI1B7wmPLPWByZiAe6SfSDV4kOC85AAkTe5vhZsivQvK7z3ZEj/CzZZX4D/DtgOYV4+BjGlN OYzK7F01uJ2/W6Gkr+ccgy9SnOx6OX2rw4jC9xMVQN9T5ZtbG7HgX/sBzPbdJ/43xvvdYtmCtpj2L fXZjIJQJ6AwnNTwpQDm9NTv7dEkE//Ss3KlpVb0A+0fU4TDmoGeOYC+E3PpCIrq67zZLyRvirwfqx JP7MjmnQ4VydAkEfRDLEvK8D1oQtqwOplFnMsm+RP7IQEIq05VMp+Okv3usqCm3YFxLyBbVPa9R27 Z6zv5gXvdS90Y5R9BNQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntuYp-00BwuK-Dy; Wed, 25 May 2022 17:12:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntuYl-00Bwte-Tl for linux-arm-kernel@lists.infradead.org; Wed, 25 May 2022 17:12:37 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0AA81424; Wed, 25 May 2022 10:12:33 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.0.228]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CAACE3F66F; Wed, 25 May 2022 10:12:31 -0700 (PDT) Date: Wed, 25 May 2022 18:12:27 +0100 From: Mark Rutland To: Steven Rostedt Cc: Masami Hiramatsu , Wang ShaoBo , cj.chengjian@huawei.com, huawei.libin@huawei.com, xiexiuqi@huawei.com, liwei391@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, zengshun.wu@outlook.com, Jiri Olsa Subject: Re: [RFC PATCH -next v2 3/4] arm64/ftrace: support dynamically allocated trampolines Message-ID: References: <20220505121538.04773ac98e2a8ba17f675d39@kernel.org> <20220509142203.6c4f2913@gandalf.local.home> <20220510181012.d5cba23a2547f14d14f016b9@kernel.org> <20220510104446.6d23b596@gandalf.local.home> <20220511233450.40136cdf6a53eb32cd825be8@kernel.org> <20220511111207.25d1a693@gandalf.local.home> <20220512210231.f9178a98f20a37981b1e89e3@kernel.org> <20220525094307.1f1fb561@gandalf.local.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220525094307.1f1fb561@gandalf.local.home> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220525_101236_046458_33B5D485 X-CRM114-Status: GOOD ( 18.10 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 25, 2022 at 09:43:07AM -0400, Steven Rostedt wrote: > On Wed, 25 May 2022 13:17:30 +0100 > Mark Rutland wrote: > > > For arm64 I'd like to make this static, and have ftrace *always* capture a > > minimal set of ftrace_regs, which would be: > > > > X0 to X8 inclusive > > SP > > PC > > LR > > FP > > > > Since X0 to X8 + SP is all that we need for arguments and return values (per > > the calling convention we use), and PC+LR+FP gives us everything we need for > > unwinding and live patching. > > > > I *might* want to add x18 to that when SCS is enabled, but I'm not immediately > > sure. > > Does arm64 have HAVE_DYNAMIC_FTRACE_WITH_ARGS enabled? Not yet. I'd like to implement it, but always only saving the values above and never saving a full pt_regs (since as mentioned elsewhere we can't do that correctly anyway). > If so, then having the normal ftrace call back save the above so that all > functions have it available would be useful. I think that's what I'm saying: I'd want to have one trampoline which always saved the above, so all functions would get that. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel