Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp554450rdh; Tue, 19 Dec 2023 07:01:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8FrbePO3wHigtdkkCOqA6D4xzHBAiTJDJchenCM5Vn64GVOj/2l8zrbmqYo2733D0ant/ X-Received: by 2002:a05:620a:46a6:b0:77e:fba3:7588 with SMTP id bq38-20020a05620a46a600b0077efba37588mr22466961qkb.128.1702998082260; Tue, 19 Dec 2023 07:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702998082; cv=none; d=google.com; s=arc-20160816; b=QlPJ0zhbpH2bwokW6PwAFYVxQauvIHc7C1B323DxPVHbiK9GL3tsMMPMyXKA5U9bOo 1YZK3uRhaYLUUV1VFqjtrwL14ksERm6xdpfJ6jblh2vcCAFvbef4/oi+2Hem6rfpV65Z nLWrJgoNNwMDxDL5klZ00h3SgEmH09TA4yHOyspShBw5rsJA0eqsiCGlzePme4i17+L5 PA4asNeTsTldTG8OBfFY+hlOpJNpZpXWeMyTFWnxBolqWECxXIWFIR+njpFYeCDhtol/ qsQNpTG4CVr+nMUUJADMHy7mLXE82fsOTaP6kv0SOvlOZfTARlYqS0Ik7h5p1oCKShYP 2POw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date; bh=R7yd1ayaMYogbzPf8FAIvylcEHBG4ttRe76qO7nx3R8=; fh=oJKzRA1ZHWSFM/WEY41HpUOAe7fDeOFnNpoVWn3YGU4=; b=zfOlgyZXxLP1UdZumtGxrD94MEMsrGX7hiu5Wk43tJHliHXHbxKfMUSAWDyEDlf78B yNwKHVqt4E2ky8RuP5wiXW28ykgFcz7NtNqDpN+UR2ZsIej7sqqJdm3vUGLZOmSn8BC4 A1nbkj5Z0MnpAuPWzPU5ENgob04p4OVjeMDt9pcTMk35jVXO2b9h8JatM0FJnE50qSRp jgc78h5u7y+sTilDbYEQO6QB50RDDxbm6olJF9dUiMfeJpywpb2iMRKqwVpbuS7iINUU cMb9mXPifq+GZ3t1+/onmzrmn6Yx3V9nSnqeje+mowaY2MhMkqVMtuihlTXvVR8wUBeK 7AUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5441-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m22-20020a05620a291600b007742f841ec5si26547840qkp.383.2023.12.19.07.01.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 07:01:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5441-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5441-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F0C0F1C21C6B for ; Tue, 19 Dec 2023 15:01:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 885541D537; Tue, 19 Dec 2023 14:58:24 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BBED1C29F; Tue, 19 Dec 2023 14:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1rFbXx-0007lI-5j; Tue, 19 Dec 2023 15:58:13 +0100 Date: Tue, 19 Dec 2023 15:58:13 +0100 From: Florian Westphal To: "D. Wythe" Cc: Simon Horman , pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, coreteam@netfilter.org, netfilter-devel@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org Subject: Re: [RFC nf-next v2 1/2] netfilter: bpf: support prog update Message-ID: <20231219145813.GA28704@breakpoint.cc> References: <1702873101-77522-1-git-send-email-alibuda@linux.alibaba.com> <1702873101-77522-2-git-send-email-alibuda@linux.alibaba.com> <20231218190640.GJ6288@kernel.org> <2fd4fb88-8aaa-b22d-d048-776a6c19d9a6@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2fd4fb88-8aaa-b22d-d048-776a6c19d9a6@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) D. Wythe wrote: > net/netfilter/nf_bpf_link.c:31:22: note: in expansion of macro > ‘rcu_dereference’ >    31 |  return bpf_prog_run(rcu_dereference((const struct bpf_prog __rcu > *)nf_link->link.prog), &ctx); >       |                      ^~~~~~~~~~~~~~~ > > So, I think we might need to go back to version 1. > > @ Florian , what do you think ? Use rcu_dereference_raw().