Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp971082lqs; Wed, 6 Mar 2024 02:18:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUUu1WtZ4jkqRxV1Pf2Yr9OigA/47yjGfMHQRDuGg5uOZXiq1l6GuMfzZ0Evpf+vn+OKOjbxUku9QW8kIG5YR5Aj5LPF8R8EE83/3B7QQ== X-Google-Smtp-Source: AGHT+IE02YXMZseyoczVXi0EUaen5UmKfVPiihRWwDS59F0uE73eB5wD9VbYmysMBJAi3zFhhTYm X-Received: by 2002:ad4:4524:0:b0:690:8d82:5630 with SMTP id l4-20020ad44524000000b006908d825630mr5110413qvu.14.1709720290151; Wed, 06 Mar 2024 02:18:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709720290; cv=pass; d=google.com; s=arc-20160816; b=w8Cl6QiPgQUy9yHlxFrAADNpI9whiVuyy3yZ1JTEaE7looejXR2sQlVf+YL9Wvfcm4 V3c6HHzDdS/mJ/3UmZU0HsarYqw4zd0E8OET3lm13lSyhNlRQCNYrWtGFX10l78Jt2DI 6fcQWFTI+agYjSKFQnpBA2QUeXOz/SlcPn4VO5o21t05tf+xphcEXSCSIuDrTvJxVJWo l+Tz5IxG7NTrEtXGeD5baxWbaXLkVk8sSp/FiyCvgQ0dGONXsGLXBtzVTR3Ow8fBvJN7 E4xQVpquC8oBNMhJbzxAf44h05skXMytj8+HDXbL5lY3vCZmWDVtJAgjkW4OkvWZu2wX ft5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=KXp3dvj8RXyd5VC25WQpvIY0TxZT9QViO+VH9V+80YQ=; fh=rNodtBqNkzPaB49VJkIl85iiMvBWZPkX2OLgwhQW6Fc=; b=PGtYg/kJrtUG7LbcJYt54VfMusNTVF2C1GMDIE3KoHG3ch3I9Nct+qMWwryuZlTUia UDaD1BU5474Rg6tCHMi9w6SffHX/7vfpaocJZnlg9YQAyFXokYVxiTLCht1BfdGVORix oY38D3ytb05/q2kIFTw+lpZqMy0d1ilZM5+gBkbm3A53thAD39GFEVm9VJwQV4RzZ7fc 53rkrTs0yKiUUKkt0+XIqx/Zza8gLKJWNFqkgZHSmubyXyT1zlVCtHIZ2QgYpdTokvPD wgrXZypl+/dO9qshr0IB78dBABVBbSHSQjLtun7IjaC6nBWXat9AfXU3CA+NX78kNbem WpxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ax8isse2; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-93727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jl11-20020ad45e8b000000b0068d0e9eb1c4si14075858qvb.534.2024.03.06.02.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 02:18:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93727-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; dkim=pass header.i=@google.com header.s=20230601 header.b=ax8isse2; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-93727-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 CD8B11C21CA4 for ; Wed, 6 Mar 2024 10:18:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66AEF5FBA3; Wed, 6 Mar 2024 10:17:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ax8isse2" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DF845FDA3 for ; Wed, 6 Mar 2024 10:17:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709720254; cv=none; b=pIgMyZJjEPIeMopQQrRJ8OVhyy21cx/ooGTBRSd/BcR0U5ZBEettB3qzZC/OITA2eeNaN1WYFPrEZyYhZoXzp3pMzx0W3EidtcEGJeftY4gHnAnhVR3pX13VhH4zTy27XJW3oX/DvPzTDwE+eccHbiZTKqLin60H/s6SsySX7oM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709720254; c=relaxed/simple; bh=aftI2J7tWkan9F3k+WavIQOst/Q5zH24e7gYDaM6WSE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=makjnKLtylsSVYqAbKBO9QIYzdYzLdemvKCQ0AosGroyZvPo45O8zt74eqPO20Tc86DSO4PSbHwaV0ONOHDojDZZ6P/+ShwEnzV/4YH1jmQc5s0JuBysuHDDExswS/C+Zsrt+33bDvNBefZQssH+vtetzkYNtXr3HWS6nNvRhg4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ax8isse2; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5654ef0c61fso10767a12.0 for ; Wed, 06 Mar 2024 02:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709720251; x=1710325051; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KXp3dvj8RXyd5VC25WQpvIY0TxZT9QViO+VH9V+80YQ=; b=ax8isse2Qrt0neu0ZgmwndWhy7bYynNrWDe28OZRNaaw2JYZIq0xVm1XBTNvxoOv3K M+U6YZLd8aP47h6FFpkqu2wx1HnIapmxb1+dfMitbmcrjfnZwb8yiwvpX5ybi/9iJsSH qeJytmX5UIU1kuvKoCs1+uq4uBKG11juCntX9koKVL8yA/NFbagR1OTkI00dArdVOirL yrSLPTSwUgCibfvLxSP5PZVaS+DKTMsR/iIkXMNcrn308VKFdKcL1QdFKC0odHwVAEMP 3corNO22Y4tdo1XyBEbGIMJnfUp+3cG9ZXupM0uHaCb+yvA371Ski/dwtenCJ8oF2JCb NSaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709720251; x=1710325051; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KXp3dvj8RXyd5VC25WQpvIY0TxZT9QViO+VH9V+80YQ=; b=JVC9AgXlHsRtFfN49j/c2CSva7k/CUWwcWcprFnXjny/sj7g2NIMNrf537c+WjyIJH ROuo7IYewaxhCJ7bxZPWGAyAuLR3i+LZYD1EPE7ACu9nLfeQsyIzPHI6qokANNtXHCQP dzxJB/roUSik/I0/V2C6Fve2oQ6Q/AutYVUboUl/0PPBGM/w1wmaemNRYb+wqLHdcnUQ ywL0ViKOaveV6JNy+EB4XKlpo2YCpSuCbQ+XJi6KhJXtqLYpDDR3c4nnR39wDRC5PfMu Tjqy465PX7jnySE5OCLxDINBoAE+HAZrIsi+ZefG2yX7XZD6grkFZNuHtOsHjFEfCna/ YjMQ== X-Forwarded-Encrypted: i=1; AJvYcCVEObwnArYJWjsS8Tn1xrn9d6xPn9Easag19GOjre/jQD0wR6OFboQYmCK7eaYq3vyo8etnKox5AlVOBt+XOmm9TYRginFLdH1uhX45 X-Gm-Message-State: AOJu0Yw7xxyt9VKScZTT5xpdjpsKkI+jC8497tWIqhmV7o8WLj5yXJPB Dz68/DIu1XNxFLBUPMlkj3ydtJloxQb7a83qanMN0orq7rZL4Oq7BbvO9aXcCPVXsFzIcE7Z/s1 WsXtIuv7KoDvUDtZdgId4263B4l+9k6maXkA9 X-Received: by 2002:a50:8744:0:b0:567:9d6a:b82b with SMTP id 4-20020a508744000000b005679d6ab82bmr274320edv.7.1709720250668; Wed, 06 Mar 2024 02:17:30 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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> <20240306110312.04ddcde3@meshulam.tesarici.cz> In-Reply-To: <20240306110312.04ddcde3@meshulam.tesarici.cz> From: Eric Dumazet Date: Wed, 6 Mar 2024 11:17:17 +0100 Message-ID: Subject: Re: [PATCH net v3] net: stmmac: protect updates of 64-bit statistics counters To: =?UTF-8?B?UGV0ciBUZXNhxZnDrWs=?= Cc: "Linux regression tracking (Thorsten Leemhuis)" , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 6, 2024 at 11:03=E2=80=AFAM Petr Tesa=C5=99=C3=ADk wrote: > > 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: > > > > > On 28.02.24 12:03, Petr Tesa=C5=99=C3=ADk wrote: > > > > On Wed, 28 Feb 2024 07:19:56 +0100 > > > > "Linux regression tracking (Thorsten Leemhuis)" wrote: > > > > > > > >> Net maintainers, chiming in here, as it seems handling this regres= sion > > > >> stalled. > > > > Indeed, I was too busy with sandbox mode... > > > > > > Hmm, no reply in the past week to Petr's request for help from someon= e > > > with more knowledge about the field. :-/ > > > > > > So I guess this means that this won't be fixed for 6.8? Unfortunate, = but > > > well, that's how it it sometimes. > > > > 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. > > > > 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? Oh, nice ! Well, this would not be a revert, let's keep type safety checks if possible= . Thanks.