Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp964495lqs; Wed, 6 Mar 2024 02:04:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU7KrO/07Li0Hz6aT7BnLT+QyLfSKd3ixuKyaO1zA1EXA69/qWpFcWm7HWe5gmSG7dNMn+00nJrkFMNVUY2LOzdEQcspb9poTHRNs6Cyg== X-Google-Smtp-Source: AGHT+IEDcHblm7Yj+d6JDtkzOKD3/tzh/HIwygdVFwY+kHiAuX3cmF6B0wghtX3F7hYro/Ww0y26 X-Received: by 2002:a54:4483:0:b0:3c2:214a:c0bc with SMTP id v3-20020a544483000000b003c2214ac0bcmr8797oiv.39.1709719456651; Wed, 06 Mar 2024 02:04:16 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j29-20020a63595d000000b005e49edcec34si11486892pgm.623.2024.03.06.02.04.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 02:04:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93699-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@tesarici.cz header.s=mail header.b=RlP2Oi+O; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-93699-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93699-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=tesarici.cz 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9B69F289373 for ; Wed, 6 Mar 2024 10:03:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E84C45F861; Wed, 6 Mar 2024 10:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=tesarici.cz header.i=@tesarici.cz header.b="RlP2Oi+O" Received: from bee.tesarici.cz (unknown [77.93.223.253]) (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 D47295F578; Wed, 6 Mar 2024 10:03:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.93.223.253 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709719399; cv=none; b=Q+1uQe0Rs+FQG/EkFEnm6gEOQ1KVNtFYSfVzv9hVr6ZHSj2gXVDTAZiBP4Qr4AvIBvC7Cvp/Mxh/2KHPGoe5/fMA4xAJO9XUC01BroB1eB45gCjXa/w70PAoWIzL5rhxWTVwtlwOhgW1qsX9GZoQxz9ASSkfpIKOrbZVR0wqeIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709719399; c=relaxed/simple; bh=jxwznpdyYueFkeb4KzOmzTRoxHJqaVHSTFEhTSAKMtI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HdHACIqrbyCnXUMIAcrIiz9acEktTkEZV8uNu0K8NcgPD5Ag6CmwZ1hsKEekxzyfgRYPPdppBrKsh+BTNz8vSLd8bzg6gfYyqx3uDFVPb+zLNQD5kZapoA7UZ2pLnW0VX2eUMMiwXtr9us4AU6/ImG3EA+oHIFhro5VkxQr4NG8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tesarici.cz; spf=pass smtp.mailfrom=tesarici.cz; dkim=pass (2048-bit key) header.d=tesarici.cz header.i=@tesarici.cz header.b=RlP2Oi+O; arc=none smtp.client-ip=77.93.223.253 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tesarici.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tesarici.cz Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id 8F1AE1CA694; Wed, 6 Mar 2024 11:03:13 +0100 (CET) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=quarantine dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tesarici.cz; s=mail; t=1709719394; bh=LS0wJFf5B1tehneoZpGaqF5s3dF3oVsKN5z6xY0DqMY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RlP2Oi+O4wJ/Ea1AjU8xy+THyjDsyEFw51VxG9ETIqAxI8g1tCOlVx4XquuNwsBvU IEkz8g7NsRz4iqnJl6dlhVR3ltrOvh+/GtDgYmE8MuN1WYhLMqql3I3KRESYlBz3V/ 8WVSnoUfBhGMNEhdSZt3EBy7LnEbMuDDFyASgMkRZuNYgbuqUEiB8WAkJb3MXpQFSi 0HwRq4R0lscJwUlb/QXb1ThASEAZRMWCuIog0BaqMS8GqSBOoWU/rXuI1Pr8g0J4hK TivKZmrO0NS868efpT0j0M1zp08xfRJNCtvJm7HKYtvt4t9CfMZOJXqI4RwbtqXBV2 3xIa4SYfK+7Ow== Date: Wed, 6 Mar 2024 11:03:12 +0100 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: "Linux regression tracking (Thorsten Leemhuis)" , Eric Dumazet Cc: Linux regressions mailing list , "David S. Miller" , Paolo Abeni , Jakub Kicinski , Jisheng Zhang , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , "open list:STMMAC ETHERNET DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "moderated list:ARM/STM32 ARCHITECTURE" , open list , "open list:ARM/Allwinner sunXi SoC support" , Marc Haber , Andrew Lunn , Florian Fainelli , stable@vger.kernel.org, alexis.lothore@bootlin.com, Guenter Roeck Subject: Re: [PATCH net v3] net: stmmac: protect updates of 64-bit statistics counters Message-ID: <20240306110312.04ddcde3@meshulam.tesarici.cz> In-Reply-To: <20240306100153.32d305f7@meshulam.tesarici.cz> References: <20240203190927.19669-1-petr@tesarici.cz> <20d94512-c4f2-49f7-ac97-846dc24a6730@roeck-us.net> <20240228120308.48d6a9c2@meshulam.tesarici.cz> <20240306100153.32d305f7@meshulam.tesarici.cz> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-suse-linux-gnu) 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-Transfer-Encoding: quoted-printable On Wed, 6 Mar 2024 10:01:53 +0100 Petr Tesa=C5=99=C3=ADk wrote: > On Wed, 6 Mar 2024 09:23:53 +0100 > "Linux regression tracking (Thorsten Leemhuis)" wrote: >=20 > > On 28.02.24 12:03, Petr Tesa=C5=99=C3=ADk wrote: =20 > > > On Wed, 28 Feb 2024 07:19:56 +0100 > > > "Linux regression tracking (Thorsten Leemhuis)" wrote: > > > =20 > > >> Net maintainers, chiming in here, as it seems handling this regressi= on > > >> stalled. =20 > > > Indeed, I was too busy with sandbox mode... =20 > >=20 > > Hmm, no reply in the past week to Petr's request for help from someone > > with more knowledge about the field. :-/ > >=20 > > So I guess this means that this won't be fixed for 6.8? Unfortunate, but > > well, that's how it it sometimes. =20 >=20 > For the record, I _can_ reproduce lockdep splats on my device, but they > don't make any sense to me. They seem to confirm Jisheng Zhang's > conclusion that lockdep conflates two locks which should have different > lock-classes. >=20 > So far I have noticed only one issue: the per-cpu syncp's are not > initialized. I'll recompile and see if that's what confuses lockdep. That wasn't the issue. FTR the syncp was in fact initialized, because devm_netdev_alloc_pcpu_stats() is a macro that also takes care of the initialization of the syncp struct field. The problem is u64_stats_init(). Commit 9464ca650008 ("net: make u64_stats_init() a function") changed it to an inline function. But that's wrong. It uses seqcount_init(), which in turn declares: static struct lock_class_key __key; This assumes that each lock gets its own instance. But if u64_stats_init() is a function (albeit an inline one), all calls within the same file end up using the same instance. Eric, would it be OK to revert the above-mentioned commit? Petr T