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 3B869ECAAA1 for ; Mon, 31 Oct 2022 15:48:29 +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=X6FyH/FzTLZmAYY8Z/GjNV525jG+NjAXGEt/A4w/JfM=; b=e+oi928QD2M12u x9hwrFV/9QbFRuDcOFJ2C4Z0zAn2c5KjMgP3GE4EdB33M42Xn51dK16A5iI85lMDYh7Qwy45q22A1 u6lyAo0V83qBFTM3LrEsmnNS2j3X8GyPNvEapVCyU/ZpCC0GvvWZH+xZxCMD6GbxXX8S6CkkANBZD 5zoBwWw/Rxyzj+NHVz+TG2YNeiOn6+VkCUV/KkKgHYwFAJqego0xlDnB027oOTC6TkjiCxkgngnkS G9iW1zFi0lVscVRkjyaooDJ2ZDZ10Phz7UStcGi3+SM477pUP3EKjVuwg059P2078wtB5tVo+pJMP Y+oO1S7YQ1xLBMvqtTRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opX0T-00Ck2k-Kh; Mon, 31 Oct 2022 15:47:22 +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 1opX0O-00Cjyd-5N for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 15:47:17 +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 AF3CA1FB; Mon, 31 Oct 2022 08:47:18 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.5.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2D05D3F5A1; Mon, 31 Oct 2022 08:47:11 -0700 (PDT) Date: Mon, 31 Oct 2022 15:47:08 +0000 From: Mark Rutland To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, revest@chromium.org, rostedt@goodmis.org, will@kernel.org Subject: Re: [PATCH 3/4] ftrace: abstract DYNAMIC_FTRACE_WITH_ARGS accesses Message-ID: References: <20221024140846.3555435-1-mark.rutland@arm.com> <20221024140846.3555435-4-mark.rutland@arm.com> <20221025174001.cf5a189a23aaeadc2c8887a2@kernel.org> <20221026001754.3a7dba42b8d3633d335283ef@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221026001754.3a7dba42b8d3633d335283ef@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_084716_277639_CDA3D43B X-CRM114-Status: GOOD ( 28.34 ) 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, Oct 26, 2022 at 12:17:54AM +0900, Masami Hiramatsu wrote: > On Tue, 25 Oct 2022 11:30:38 +0100 > Mark Rutland wrote: > > > On Tue, Oct 25, 2022 at 05:40:01PM +0900, Masami Hiramatsu wrote: > > > Hi Mark, > > > > > > On Mon, 24 Oct 2022 15:08:45 +0100 > > > Mark Rutland wrote: > > > > > > > In subsequent patches we'll arrange for architectures to have an > > > > ftrace_regs which is entirely distinct from pt_regs. In preparation for > > > > this, we need to minimize the use of pt_regs to where strictly necessary > > > > in the core ftrace code. > > > > > > > > This patch adds new ftrace_regs_{get,set}_*() helpers which can be used > > > > to manipulate ftrace_regs. When CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y, > > > > these can always be used on any ftrace_regs, and when > > > > CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=n these can be used when regs are > > > > available. A new ftrace_regs_has_args(fregs) helper is added which code > > > > can use to check when these are usable. > > > > > > Can you also add the ftrace_regs_query_register_offset() as a wrapper of > > > regs_query_register_offset()? I would like to use it for fprobe_events. > > > > Sure! > > > > Just to check, with FTRACE_WITH_REGS, does fprobe always sample the full > > pt_regs, or do callers also need to check ftrace_regs_has_args(fregs)? > > No, please return -ENOENT or any error value if the given register > is not saved on arm64. Sure, that's what I intend to implement for arm64. I'll use -EINVAL to match the existing regs_query_register_offset() logic. > Others will just return regs_query_register_offset(&fregs->regs, name). That > is enough at this moment. Later we can improve it. Sorry, what I was trying to ask was whether fprobe currently always set FTRACE_OPS_FL_SAVE_REGS (which AFAICT it does); so I now agree that's sufficient -- sorry for the noise! Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel