Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp854915rwb; Fri, 18 Nov 2022 09:06:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ezEirNdaYJkPdRJF9KvHN/6efBEdUNtXx3BV1VkQowsSgycND1B0eirRft/mmb22YjHty X-Received: by 2002:a17:902:82c5:b0:188:ef2a:b275 with SMTP id u5-20020a17090282c500b00188ef2ab275mr484277plz.24.1668791211423; Fri, 18 Nov 2022 09:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668791211; cv=none; d=google.com; s=arc-20160816; b=QkgphTWtTfEbV9FuRtKitaulfhTwe2BCalCFTlIj8byHxTcHUpCCeJ6cazTxih9Bhz Dj8nFgRkEIrIrWitlytmSKpDO8SjN7szIpgN1ruIJWhSwu3xnQ17C3rPbJuVln4Ys+W6 S/f7ACJ4oeF5Lya/VFViTSG7FqAHqve8y/6mA4U+5VV8hJtD9cnWfJV6cPC8hC1Hcp3r Aer6+/HTWKmhvJN4vsfMwmFcIRaSvluuEA9RiMKXyAUXfIsFIVkXcjFavVBIcKEU1QMa 8jC1oTuHlX4Ta1pzq9/q1u3j+CiPKjKxYbR+TitkWegad6GRFCa75SdaktXle3JII2HO jIVQ== 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=ojzPz8k2DLr1WGazt45nObZ5JkEQxnNfk8DvpmDnBbk=; b=cGQvQRVlXK4WBT8yRhZtkDSNhFH6UapA/8BZGW6ELWbTzbfvthJOe/CEItgCt8dkEh fPB4U745hP1gF5IiXuZhEU4wASmcH32xhnXc4bFeYmbxbIFdsbnAz8wuF4S0PTlOTx73 mwzVOJvw10k51MQywHG6A+aZ5RW2Ee5dXOppYhqt6eSVbl7P2WtWYxsggfu4c2jKZEj2 dJ5YSfSlsWCvj+Un5qcWiOr3pWL53wYAA2eOSLD+eN7Co3pgcwO70VRe1qsm+Z2jwllQ DnyXKoRKEjspdqkHUt6KjB0k8JqHpqF+ixjC/EV1uy8knYAmzluTnGoNAIt0fBcGYkFz h6aw== 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 b15-20020a170902e94f00b00186a2274386si4358588pll.469.2022.11.18.09.06.34; Fri, 18 Nov 2022 09:06:51 -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 S235243AbiKRQ0l (ORCPT + 91 others); Fri, 18 Nov 2022 11:26:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbiKRQ0k (ORCPT ); Fri, 18 Nov 2022 11:26:40 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0C36764F; Fri, 18 Nov 2022 08:26:39 -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 D124623A; Fri, 18 Nov 2022 08:26:45 -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 A582E3F663; Fri, 18 Nov 2022 08:26:37 -0800 (PST) Date: Fri, 18 Nov 2022 16:26:34 +0000 From: Mark Rutland To: Alexei Starovoitov Cc: Masami Hiramatsu , Florent Revest , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , KP Singh , Brendan Jackman , markowsky@google.com, Steven Rostedt , Xu Kuohai , LKML Subject: Re: [RFC 0/1] BPF tracing for arm64 using fprobe Message-ID: References: <20221108220651.24492-1-revest@chromium.org> <20221117223353.431e29124ba51a72c3507ced@kernel.org> 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 Hi Alexei, On Thu, Nov 17, 2022 at 08:50:12AM -0800, Alexei Starovoitov wrote: > There might not be a task available where bpf trampoline is running. I'm not sure what you mean by "there might not be a task available"; do you mean that there might not be space in the per-task shadow stack, or that the BPF program can be invoked inan IRQ context? > rcu protection might not be there either. We've spent a lot of time reworking entry/idle sequences with noinstr, so any time BPF can be invoked, we should have a regular kernel environment available, with RCU watching (but not necessarily in an RCU read-side critical section). If BPF is being invoked without RCU watching, that is a bug that needs to be fixed. Do you have a specific example in mind? Thanks, Mark.