Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp980894rwb; Fri, 18 Nov 2022 10:50:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf7MCzdrcSxBH/Chy0p2RtU8/WV55DN3TUnKNMUYzv/bqQ5JVhqW5ggJtZNOMj+V12T6dVjC X-Received: by 2002:a63:ff0e:0:b0:434:aa69:bba2 with SMTP id k14-20020a63ff0e000000b00434aa69bba2mr7436304pgi.567.1668797459208; Fri, 18 Nov 2022 10:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668797459; cv=none; d=google.com; s=arc-20160816; b=HMktQrPcCKvieEiHx+YivOiKKXGlhrRjWwxw3DQie/Yjz9HSw0akwE+xgWf0eE9pPC tdSOy9WH6cxOE3XJUK6nExFpDA4EZ1ZPAZyiXVTOEakjv2t6eGUdhzba8GrBkn1Zgs2W dHBXrg19WfdSapXmfa+RqGabUfJtPXp61c2nhDC3xPFdQMbhgYbUUpfhGFek4Q/mKxQO FSgRYy0UKmQ9pDSWJ8wXceq9T5uUWiixEAsl1/BjFKq1POWXD2Qt9WgJFzASqa7YK/mc ePHyvZqRxQXLW+HTjUGBrYC3hpOrG3XxYg3pc2ce5FxhnmfT2lf/qc2nZNxnT2xEAWyW VMDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=lIlp+3q93JSjf9Yia2697b0ojvmo2pIPAwL+tnMKz3o=; b=Gc0savzYI1Zfb0OVvVZyQgRlrRoVu/oaQIzR8QtZ0JJieoAivrsNJwXsWeM/pMVD98 7ZsbYGAX7umF715FXeaiWEd+5AGEF7Xe2Z3S1gyCXRsF0IKi8rGBLMy3eOBevoLzRdgS LQBdDpOF/49Y/CreHqsjneJx9BK9+1Wxoh6O3QwXO5yuVqfYfiAjX19wIGtR3uRZYL9n yzx/3uBilUByzASSSkAal2LWeU1TkCu9hhP9XV3v5vVn/YFpicGgBMbJus30THA/Aw9Z YG0XvgvU9hmhU/lXh+4JvwnhOgtN2VhENoaKgL+cmeiOQ/FPIKqjDALxe8IfOj+LBKZ2 NXxw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg7-20020a17090b1e0700b001fd7d02c976si9056587pjb.87.2022.11.18.10.50.39; Fri, 18 Nov 2022 10:50:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242127AbiKRSGS (ORCPT + 90 others); Fri, 18 Nov 2022 13:06:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234351AbiKRSGP (ORCPT ); Fri, 18 Nov 2022 13:06:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6166679E2F; Fri, 18 Nov 2022 10:06:14 -0800 (PST) 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 15140B824EB; Fri, 18 Nov 2022 18:06:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDDEBC433D6; Fri, 18 Nov 2022 18:06:09 +0000 (UTC) Date: Fri, 18 Nov 2022 13:06:08 -0500 From: Steven Rostedt To: Chris Mason Cc: Mark Rutland , 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: <20221118130608.5ba89bd8@gandalf.local.home> In-Reply-To: <43d5d1f5-c01d-c0db-b421-386331c2b8c1@meta.com> References: <20221108220651.24492-1-revest@chromium.org> <20221117121617.4e1529d3@gandalf.local.home> <20221117174030.0170cd36@gandalf.local.home> <20221118114519.2711d890@gandalf.local.home> <43d5d1f5-c01d-c0db-b421-386331c2b8c1@meta.com> 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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Fri, 18 Nov 2022 12:44:00 -0500 Chris Mason wrote: > > My biggest concern is changing functionality of arbitrary functions by BPF. > > I would much rather limit what functions BPF could change with some > > annotation. > > > > int __bpf_modify foo() > > { > > ... > > } > > > > > > That way if somethings not working, you can see directly in the code that > > the function could be modified by a BPF program, instead of getting some > > random bug report because a function returned an unexpected result that the > > code of that function could never produce. > > > > The good news is that BPF generally confines the function replacement > through struct ops interfaces. What struct ops interfaces? > There are also explicit allow lists to > limit functions where you can do return value overrides etc, so I think Where are these lists. > it's fair to say these concerns are already baked in. I'm sure they can How do I know that a function return was modified by BPF? If I'm debugging something, is it obvious to the developer that is debugging an issue (perhaps unaware of what BPF programs are loaded on the users machine), that the return of a function was tweaked by BPF and that could be the source of the bug? > be improved over the long term, but I don't think that's related to this > set of functionality on ARM. I disagree. These issues may have been added to x86, but perhaps we should take a deeper look at them again before extending them to other architectures. -- Steve