lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFXsyoJ1ZIULrC3w@mini-arch>
Date: Fri, 20 Jun 2025 16:20:42 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: Jakub Kicinski <kuba@...nel.org>,
	Network Development <netdev@...r.kernel.org>,
	Jiri Pirko <jiri@...nulli.us>, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Hillf Danton <hdanton@...a.com>,
	Willem de Bruijn <willemdebruijn.kernel@...il.com>
Subject: Re: [PATCH net] team: replace team lock with rtnl lock

On 05/22, Tetsuo Handa wrote:
> On 2025/05/22 10:00, Tetsuo Handa wrote:
> > On 2025/05/22 3:00, Jakub Kicinski wrote:
> >> And as he pointed out this patch promptly generates all sort 
> >> of locking warnings, please test this properly.
> > 
> > I didn't get any compile-time warnings, and
> > https://lkml.kernel.org/r/682e6b1f.a00a0220.2a3337.0007.GAE@google.com didn't
> > get any run-time locking warnings.
> > 
> > What locking warnings did you get? Is there an automated testing environment
> > (like https://lkml.kernel.org/r/66a4b1a7.050a0220.12c792.8f9e@mx.google.com )
> > which I can use for testing this patch?
> > 
> 
> Ah, I got which posts you are referring to. I was failing to receive Jiri's mails
> because my spam filter setting was sending mails from .us domain to trash.
> Now I removed the .us entry.
> 
> 
> 
> Jiri Pirko wrote:
> > Sat, May 17, 2025 at 09:32:20AM +0200, penguin-kernel@...ove.SAKURA.ne.jp wrote:
> > 
> > [..]
> > 
> > >@@ -2319,13 +2301,12 @@ static struct team *team_nl_team_get(struct genl_info *info)
> > > 	}
> > > 
> > > 	team = netdev_priv(dev);
> > >-	mutex_lock(&team->lock);
> > > 	return team;
> > > }
> > 
> > 
> > Why do you think this is safe?
> > 
> > Rtnl is held only for set doit.
> 
> I assumed that the caller already held rtnl lock.
> 
> > 
> > 
> > > 
> > > static void team_nl_team_put(struct team *team)
> > > {
> > >-	mutex_unlock(&team->lock);
> > >+	ASSERT_RTNL();
> > 
> > Did you test this? How? Howcome you didn't hit this assertion?
> 
> Tests using syzbot's reproducer did not hit this assertion.
> 
> > 
> > 
> > > 	dev_put(team->dev);
> > > }
> > > 

[..]

> Anyway, we can't remove team lock. Too bad.

I was hoping to see another revision, but just noticed this part. Can
you share more on why we can't remove the team lock? I can try to
give it a stab if you're not planning to send a follow up...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ