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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89E38C433EF for ; Fri, 22 Apr 2022 15:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1449398AbiDVPsn (ORCPT ); Fri, 22 Apr 2022 11:48:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449378AbiDVPsk (ORCPT ); Fri, 22 Apr 2022 11:48:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 449DE5D64B for ; Fri, 22 Apr 2022 08:45:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00F94B830D6 for ; Fri, 22 Apr 2022 15:45:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 608ABC385A8; Fri, 22 Apr 2022 15:45:43 +0000 (UTC) Date: Fri, 22 Apr 2022 11:45:41 -0400 From: Steven Rostedt To: Mark Rutland Cc: 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, Masami Hiramatsu Subject: Re: [RFC PATCH -next v2 3/4] arm64/ftrace: support dynamically allocated trampolines Message-ID: <20220422114541.34d71ad9@gandalf.local.home> In-Reply-To: References: <20220316100132.244849-1-bobo.shaobowang@huawei.com> <20220316100132.244849-4-bobo.shaobowang@huawei.com> <20220421100639.03c0d123@gandalf.local.home> <20220421114201.21228eeb@gandalf.local.home> <20220421130648.56b21951@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Apr 2022 11:12:39 +0100 Mark Rutland wrote: > As an aside, I'd also love to remove the REGS/!REGs distinction, and always > save a minimum amount of state (like ARGS, but never saving a full pt_regs), > since on arm64 the extra state stored for the REGS case isn't useful (and we > can't reliably capture all of the pt_regs state anyway, so bits of it are made > up or not filled in). Note, the reason for the addition of REGS was a requirement of kprobes. Because before ftrace, kprobes would be triggered at the start of a function by a breakpoint that would load in all the regs. And for backward compatibility, Masami wanted to make sure that kprobes coming from ftrace had all the regs just like it had when coming from a breakpoint. IIUC, kprobes is the only reason we have the "regs" variant (all other use cases could get by with the ARGS version). -- Steve 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 1BDB3C433EF for ; Fri, 22 Apr 2022 15:50:55 +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:MIME-Version:References:In-Reply-To: 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=88G7mAbdrr5dDDYq17LOofpE6kpKXLXmfAktTOEwAbo=; b=mUtuABrb7hg3Lo bMGjnMTtoVEwSlt9NTqjLseFkbeZiChGXjxtaS6jiAIIedttMjKUP+scguwDuLLRoqECyJZr37bOu 2NuxY6YzU6qF+zdKeMK9TVTmbRX97zLidZNq9ph4JXNTGmR75PhDA27L+T7/cwnB5s3Om9sxXpZAO 7/A0w2nKh0U0t6BuCpa2pGbe0+99eMUIcICRK75iS+UOcN7NKe19NIIRDStAUC+eLDJx9ls/Mq2n/ KsPjd1Sa8qgOb6LejM+wrm+VuZXAUn6Qt4OUzlA1CKFKCORtLw3UWR2q2ulQpnG3Ql8ObDkHHliKF m4qgP6Or4F6cPMMf7HHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvXX-001Djj-3m; Fri, 22 Apr 2022 15:49:47 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhvTg-001CEH-Aw for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 15:45:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 417CF61F8F; Fri, 22 Apr 2022 15:45:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 608ABC385A8; Fri, 22 Apr 2022 15:45:43 +0000 (UTC) Date: Fri, 22 Apr 2022 11:45:41 -0400 From: Steven Rostedt To: Mark Rutland Cc: 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, Masami Hiramatsu Subject: Re: [RFC PATCH -next v2 3/4] arm64/ftrace: support dynamically allocated trampolines Message-ID: <20220422114541.34d71ad9@gandalf.local.home> In-Reply-To: References: <20220316100132.244849-1-bobo.shaobowang@huawei.com> <20220316100132.244849-4-bobo.shaobowang@huawei.com> <20220421100639.03c0d123@gandalf.local.home> <20220421114201.21228eeb@gandalf.local.home> <20220421130648.56b21951@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_084548_523501_26FE8353 X-CRM114-Status: GOOD ( 13.28 ) 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 Fri, 22 Apr 2022 11:12:39 +0100 Mark Rutland wrote: > As an aside, I'd also love to remove the REGS/!REGs distinction, and always > save a minimum amount of state (like ARGS, but never saving a full pt_regs), > since on arm64 the extra state stored for the REGS case isn't useful (and we > can't reliably capture all of the pt_regs state anyway, so bits of it are made > up or not filled in). Note, the reason for the addition of REGS was a requirement of kprobes. Because before ftrace, kprobes would be triggered at the start of a function by a breakpoint that would load in all the regs. And for backward compatibility, Masami wanted to make sure that kprobes coming from ftrace had all the regs just like it had when coming from a breakpoint. IIUC, kprobes is the only reason we have the "regs" variant (all other use cases could get by with the ARGS version). -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel