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 70CFAC4332F for ; Fri, 18 Nov 2022 16:26:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241743AbiKRQ0m (ORCPT ); Fri, 18 Nov 2022 11:26:42 -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: 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.