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 3EEFDC4167B for ; Fri, 9 Dec 2022 23:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229813AbiLIXev (ORCPT ); Fri, 9 Dec 2022 18:34:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbiLIXeu (ORCPT ); Fri, 9 Dec 2022 18:34:50 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C28916F4A5; Fri, 9 Dec 2022 15:34:49 -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 4BC3AB829BD; Fri, 9 Dec 2022 23:34:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4822CC433D2; Fri, 9 Dec 2022 23:34:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670628886; bh=AkVK/rY6tpVEJi9WGUCZ3St66jkh+zvB7lm647zQjhg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SN4ycjIa71P6cIrIn4KxTO6jglUuhdxTfl72zKSE2Gh+dwZxlhXpJNm48aFv+5RAU TiHH1XMZ/MMQhwpmeVR4yPiL9mEFG/Ob/g/l8C2N/sSCfz4ibDtATwNXWnovXZ+C2R cMojI+oR2hMvVWkXWa4LF8RnjSfLdEeWweUJRqrk5Ij+zBDu01l0I0R+BNMF76Huoe GIwJoRid+Tw/7C0Ed2L2w/ig86XLqH1//G2lVNPhBiJem9oMExtAmCvRfRLIYfHr0t Xgtq9hLK5xUeiqG0+EgZwagVc/uOc5/MZ7o3Aa8yN9RQflnW3YylHE/ouY9yJQ6O05 eRPkoGqSH9DBw== Date: Fri, 9 Dec 2022 15:34:45 -0800 From: Jakub Kicinski To: Daniel Borkmann Cc: Jiri Olsa , Yonghong Song , Alexei Starovoitov , Song Liu , Hao Sun , Peter Zijlstra , bpf , Alexei Starovoitov , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , David Miller , Jesper Dangaard Brouer , Linux Kernel Mailing List , netdev , Thorsten Leemhuis Subject: Re: BUG: unable to handle kernel paging request in bpf_dispatcher_xdp Message-ID: <20221209153445.22182ca5@kernel.org> In-Reply-To: <96b0d9d8-02a7-ce70-de1e-b275a01f5ff3@iogearbox.net> References: <5c9d77bf-75f5-954a-c691-39869bb22127@meta.com> <96b0d9d8-02a7-ce70-de1e-b275a01f5ff3@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, 10 Dec 2022 00:32:07 +0100 Daniel Borkmann wrote: > fwiw, these should not be necessary, Documentation/RCU/checklist.rst : > > [...] One example of non-obvious pairing is the XDP feature in networking, > which calls BPF programs from network-driver NAPI (softirq) context. BPF > relies heavily on RCU protection for its data structures, but because the > BPF program invocation happens entirely within a single local_bh_disable() > section in a NAPI poll cycle, this usage is safe. The reason that this usage > is safe is that readers can use anything that disables BH when updaters use > call_rcu() or synchronize_rcu(). [...] FWIW I sent a link to the thread to Paul and he confirmed the RCU will wait for just the BH.