Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp842192rwb; Fri, 18 Nov 2022 08:58:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf7HCLtL/zKIQA5frFOyWpykHyegRl4VEJsMiH9YLoVUfGjWCy9FsaCH/2PHr40R49aRkbHf X-Received: by 2002:aa7:dbd9:0:b0:461:e8c4:d21f with SMTP id v25-20020aa7dbd9000000b00461e8c4d21fmr7017738edt.186.1668790697198; Fri, 18 Nov 2022 08:58:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668790697; cv=none; d=google.com; s=arc-20160816; b=JfMiivAxtyB8L+d5REiRMfE6oS9sJgIM9YOe8akz7OmrNOqayCAhgYs30WtGUgGwWS u75vdEYo3ex0KVNwP38jELnKYZ2FXDz5JDbwDZEAPYyrD8fQW+GsQqNwVWigT4fC3oRt e7Jmh2wvad+MfI6glM1eo7+kRSJeroOBZ1YrH+FeVX11a3bz3mbVdZilS0/HfXCiag12 luzrPxCTyBQGqr0hYeiPvAQEpo4Qm/k01+joZd++YYV3MdNehZB28JPAzNzgVez9b3Qq AhxmwmERcdYZ2sN+e9gPvaiOuI1vpRvMg0pc8zyWXx92WzNodoldIUXQBbGfy3fZEmz0 VicQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lR9K9xIl/RZeRhYUAHwCYSMEC154Kotjpv/A9uTY66k=; b=dWqydSTSN7agphiOLIefse/izJw3DnoI5lilkiZFoPj5GoAJyu9XQiCQS//rwN1Pab o6Jht7TyxrqLhyZ5zlWLTKuqLD99nKYBYihxDROhtSAb9syjPp2q1bf1WvklgyrnuO+o SYZcbzhCGsSU3Sm5V1SRHcSG/fY9RyKliMnX/nCVCo0sIVXUtPinbS7AX+9ZpXoJWXYx os4Gjmj35zX7IM90K6uO2BwPvV5d1Fjg539whE0e9xEsLWWpmYVFmTGvMi2XcqQ0DZX3 GqaGLKgSCBqJR55M6N2EUhZ3wvtPZpJ5JtXEP3Eo13xYzwFKeGcPGmkdSWOSUbSyXGix oGIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a056402249100b00468d5d7d4afsi3251140eda.440.2022.11.18.08.57.54; Fri, 18 Nov 2022 08:58:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241473AbiKRQSo (ORCPT + 91 others); Fri, 18 Nov 2022 11:18:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbiKRQSk (ORCPT ); Fri, 18 Nov 2022 11:18:40 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9711CFCD3; Fri, 18 Nov 2022 08:18:37 -0800 (PST) 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 AEF2C23A; Fri, 18 Nov 2022 08:18:43 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.35.13]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F3EC63F663; Fri, 18 Nov 2022 08:18:34 -0800 (PST) Date: Fri, 18 Nov 2022 16:18:32 +0000 From: Mark Rutland To: Chris Mason Cc: Steven Rostedt , Alexei Starovoitov , Florent Revest , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , KP Singh , Brendan Jackman , markowsky@google.com, Masami Hiramatsu , Xu Kuohai , LKML , Greg Kroah-Hartman , Linus Torvalds , Christoph Hellwig , Peter Zijlstra Subject: Re: [RFC 0/1] BPF tracing for arm64 using fprobe Message-ID: References: <20221108220651.24492-1-revest@chromium.org> <20221117121617.4e1529d3@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 17, 2022 at 04:55:12PM -0500, Chris Mason wrote: > On 11/17/22 12:16 PM, Steven Rostedt wrote: > > On Wed, 16 Nov 2022 18:41:26 -0800 > > Alexei Starovoitov wrote: > > > > > Even with all optimization the performance overhead is not acceptable. > > > It feels to me that folks are still thinking about bpf trampoline > > > as a tracing facility. > > > It's a lot more than that. It needs to run 24/7 with zero overhead. > > > > It obviously doesn't have zero overhead. > > > > And correctness and maintainability trumps micro-optimizations. > > During the bpf office hours today Mark Rutland and Florent had some > great ideas about how to wire things up. I'm sure Mark will need some > time to write it all down but it was a fun call. I'd hoped to write that up today, but I haven't had enough time yet, so I'll try to write up that proposal next week. The rough idea was to *somehow* rejig the per-callsite ftrace_ops code I've been working on to permit (but not require) the use of custom trampolines. As mentioned during the call I want to ensure that this doesn't adversely affect regular ftrace usage, and I'd also like to ensure that the regular ftrace code is able to gain form those changes (without the need for trampolines). AFAICT, that's likely to require some rework to the way direct functions are managed. The WIP code for per-callsite ftrace_ops is at: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/ftrace/per-callsite-ops To be clear, my comments were purely about the *mechanism* we end up implementing. I do have concerns w.r.t. overriding arbitrary parts of the kernel. Thanks, Mark.