Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp984615lqd; Thu, 25 Apr 2024 02:37:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUe4gGY03L5fvqHMvqJ0A/Uf5AFyamrhTgrbnSJY2TjqCwTx8wCMnkFBIT1cwR8eAAd5ikRc++awPNjlqHfTDr4rktR15VzPS7b5PNEDQ== X-Google-Smtp-Source: AGHT+IGOkWE0+VsgZUpgb6sGSOXC1Z6/MdmFJ2r3N3tcSxFVUHR+8W72bMho+oAG4yMcYr8YKSY7 X-Received: by 2002:a17:906:17c5:b0:a55:b331:73c0 with SMTP id u5-20020a17090617c500b00a55b33173c0mr3170351eje.24.1714037832023; Thu, 25 Apr 2024 02:37:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714037832; cv=pass; d=google.com; s=arc-20160816; b=jbE5/UlRMj+u09zL/iMq738Rsejc/agU6mS9hJ/zGHoYub8e1AZLUyhrUMJcrJeAmm UBLVTyHVfFQ+Xxm7odcqxKMzLiL/D9R+jh+5eBaw2Jza7Zc3a5w3ZR+ZedlC/HCBWcEP ekwmBCOgu7pBvI5IBaDkHy9q4mzfzJhbRG7CjnXvHNdT/ItoL9wj1j/CX7bF2vYuXJkz GvKMjGpUH+8wRJfo7/F7i1pOBl+psP6kEzw2d3fOhv3CnYWvla1kyAQRcFIVd+fL+NZA 4QPByV5OcLBJ3aUXdogGZn6z4ueZrpkn38vt3DEE9nhREQMdLX/FJA8oi+DQ6IFuIAql wAqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=xf2ckAllqwCh9ddS0w4nWJakGBZqLqZ1RQNJk3Lf9Dk=; fh=LJFprGquTQQw31u1MnKWTrakr6SpF9zWwx8ncXspBPQ=; b=NY9/z4Wkpzj7T0hhnL9eLyyh05wk4sr+2myjeiB1WSoweGq+9LYY82a6hKBcjF6eWO U3+BHPK6H5ZnAJMM4RRqmM3oxy37r1Bp4UzIOH2FALFNCh7zHnVCTzT4juOYwN5knRwk YZjI2RnSqrD8J8A4hDYT1UcJ410rnGwjNHwhtOG1pgi+zXkBN0rEJhlShbvexOZ3hPJY D/T7Lvb1Gvpl217Zs1Xovtp089CZNwt6ydF3qSKJkR/RVBze8VgRE6+Sx3TG5zzUfrW/ zacOSEDEg+fZIyWwxMCMPRx2ce4uWRPNxoevL3MH6ri5KXCCRWLhoELnYgBZiMxzTQeR yUtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netfilter.org); spf=pass (google.com: domain of linux-kernel+bounces-158310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158310-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hr19-20020a1709073f9300b00a55b336138bsi5683762ejc.935.2024.04.25.02.37.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 02:37:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netfilter.org); spf=pass (google.com: domain of linux-kernel+bounces-158310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158310-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 am.mirrors.kernel.org (Postfix) with ESMTPS id E73F21F24081 for ; Thu, 25 Apr 2024 09:37:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6844C85952; Thu, 25 Apr 2024 09:36:17 +0000 (UTC) Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8539C28F7; Thu, 25 Apr 2024 09:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.188.207 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714037776; cv=none; b=PfqC2BF1CA0X1otmjN9yBPu4nR/vb/Mz1p0WETVhXaoFpanBQChifQ4Ir7yWJH+427/7TA7WzripVCp5dAsyDOFSdCJmh2TNJ6yxZSxX650B+V5t7fJKdhk70/vusXE8joeQt9xV6aJK6YyvAM1VaT7nD54XunPMsV3dK8qy0rM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714037776; c=relaxed/simple; bh=Bj0ZQY1fsfYT5ptnAo2M/eBI3dM8XVsmZlPJfOdCnWM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DRJ2JhNCZ/T5unc2xqc+Cx/Ugjs5K8yru/mb6f1yD6LqFXm30bHIIFcdhy6lgn7IiWsT9T+JGxICQnzpKRcWFNygxN9/n64SAzXDA/BNegdXxXYsvVeCxCEiQbin36F5dcWI8gMXbaxfEzPj3gtcXzNDjoCJ+hGGhgAVcyEWz94= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; arc=none smtp.client-ip=217.70.188.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org Date: Thu, 25 Apr 2024 11:36:11 +0200 From: Pablo Neira Ayuso To: linke li Cc: xujianhao01@gmail.com, Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] netfilter: mark racy access on ext->gen_id Message-ID: References: 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 In-Reply-To: On Tue, Apr 23, 2024 at 07:50:22PM +0800, linke li wrote: > In __nf_ct_ext_find(), ext->gen_id can be changed by > nf_ct_ext_valid_post(), using WRITE_ONCE. Mark data races on ext->gen_id > as benign using READ_ONCE. > > This patch is aimed at reducing the number of benign races reported by > KCSAN in order to focus future debugging effort on harmful races. There are a more uses ext->gen_id in the code, my understanding this patch is just a stub.