Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2893029lqt; Tue, 23 Apr 2024 05:08:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyN+9Cy4LKZ+0k1wWdn4HvgXJUnjvNZG7Ygba2nU1aCVYGk1vx5zrFEmYlHbJnYcc6Z/UeVw/WtTUl6wk9XrUnU2YcLtNhkhBNbL2nug== X-Google-Smtp-Source: AGHT+IHzBmN+TlhR+866sQCNSGaQ12k0put2zLFw1oh1ETRoJ2m9WBgjj8z2Aerd/wtuC++1/7sM X-Received: by 2002:a05:620a:244d:b0:789:e28c:d73 with SMTP id h13-20020a05620a244d00b00789e28c0d73mr18705278qkn.49.1713874104094; Tue, 23 Apr 2024 05:08:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713874104; cv=pass; d=google.com; s=arc-20160816; b=ZWRBRVvih/CYPKdam478alEGEOKoT1ALlbotQvR3DCVrjUdB5U1j6cAZEODG6FVD5H yPW4wKzFCMND7T7imd+V+7LWBYs4dAvkYixjR8aw7yEKNlhXFLbfxuxdHsLYXSlLxbYb XHytLh7b4FJMqLFPqOgo8l+hWYGPGAv2zKCc0p6phWbyRyvJmjvzFP3Gt3TAKBAnualv Y55TwrIa5t5CegZSH/H4i9at7OkP4+T5Rx8FxLwwi+gOnMJo4d982U5IUGE79YSgX6NH U8JzxclkcY7SCM4dhOptvCWG+i3XlJLtlChRF68rKIgkqDVg5uYN4hssdgoOd3yNn36u fPKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=PrUSX9yYdP1eRtT8Y2kRZ+IpXNFafUAGZD/OhPwcyQ0=; fh=8eerjabpXUUs+yD1pwTAFBeiObhY6f8s4CDxMigN9O8=; b=dsIoix7WeJanEdsTp9OeeatXdeT2cGRwp7FEGascKQTcKXtcOchpLuwDAHmwKY4p7x Qz7qIgDLCyhhIHBjwci8D+aL13bv/ZYELBXVI4NLyh8jIEyf9mcD92E3PQ3M5nLQMm92 Etm2TMMkRqptQg86I6sDaOZbO6rhYRusPKRiK3ZkTSRQdKo0zYRDajWEaJh8NxqLxUhg ogYc5sG893Sv7LMKGqp20gqWnSEqP2xxGbaQV0n12Dy5KLzf4knWGw+XlUwzwhzgB6w3 F25RbqdsTvQJ5OtR+H/0u5qccmtnjFvj65gYzC5fzQvUBwcDx3hxsSmT9bZBQeTXI6IP 7Udg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=strlen.de); spf=pass (google.com: domain of linux-kernel+bounces-155123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155123-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 o17-20020a05620a22d100b0078f0cbcf4dasi12060494qki.335.2024.04.23.05.08.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 05:08:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155123-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; arc=pass (i=1 spf=pass spfdomain=strlen.de); spf=pass (google.com: domain of linux-kernel+bounces-155123-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155123-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 C544F1C22F04 for ; Tue, 23 Apr 2024 12:08:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 377A7136660; Tue, 23 Apr 2024 12:03:28 +0000 (UTC) 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 949176EB70; Tue, 23 Apr 2024 12:03:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713873807; cv=none; b=Cqe8/tJ1m+gRyerwm9mkAOIgNZlZ8e6/fPG4YusEVWelAxmWyHwm8mY9kUgSPlQdiAQqY62j78XIcTWnXdpyl6mYU+cmAgz+nUuBbz/EMIZxB6HNbuLsmgZaDjJedeNBpqYtMS7UFwujGFxoRaf5Dik1sOOcP7PvAEaSuieWQoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713873807; c=relaxed/simple; bh=96I0kNJ+O/vKVFMzIcptJmjvlnHCw6mQHNnzLfM8sjE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dGvWPSaIkzFomFThNa8UDRjLEZI5yguhZj9jqyP95fxLmlCLgQOCdtelcP8vflcBL5M2bLV+QbW2UX5CUOSgeKP79hxtfqA6heIVYikk3LpbMwrDtdVZHEJA9XHfiPp6AXtotNtiG80hfAmAIW/2S5uG/aZ46HkrGtOz1j5IpNo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.client-ip=91.216.245.30 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 1rzErd-0007SS-Gu; Tue, 23 Apr 2024 14:03:09 +0200 Date: Tue, 23 Apr 2024 14:03:09 +0200 From: Florian Westphal To: linke li Cc: xujianhao01@gmail.com, Pablo Neira Ayuso , 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: <20240423120309.GA18954@breakpoint.cc> 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=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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. Acked-by: Florian Westphal Should proably go to nf tree.