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: <20250215093509.11745-1-kuniyu@amazon.com>
Date: Sat, 15 Feb 2025 18:35:09 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <edumazet@...gle.com>
CC: <apw@...onical.com>, <davem@...emloft.net>, <dwaipayanray1@...il.com>,
	<horms@...nel.org>, <joe@...ches.com>, <kuba@...nel.org>,
	<kuni1840@...il.com>, <kuniyu@...zon.com>, <lukas.bulwahn@...il.com>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH v2 net-next] checkpatch: Discourage a new use of rtnl_lock() variants.

From: Eric Dumazet <edumazet@...gle.com>
Date: Fri, 14 Feb 2025 15:15:48 +0100
> On Fri, Feb 14, 2025 at 5:54 AM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
> >
> > rtnl_lock() is a "Big Kernel Lock" in the networking slow path
> > and still serialises most of RTM_(NEW|DEL|SET)* rtnetlink requests.
> >
> > Commit 76aed95319da ("rtnetlink: Add per-netns RTNL.") started a
> > very large, in-progress, effort to make the RTNL lock scope per
> > network namespace.
> >
> > However, there are still some patches that newly use rtnl_lock(),
> > which is now discouraged, and we need to revisit it later.
> >
> > Let's warn about the case by checkpatch.
> >
> > The target functions are as follows:
> >
> >   * rtnl_lock()
> >   * rtnl_trylock()
> >   * rtnl_lock_interruptible()
> >   * rtnl_lock_killable()
> >
> > and the warning will be like:
> >
> >   WARNING: A new use of rtnl_lock() variants is discouraged, try to use rtnl_net_lock(net) variants
> >   #18: FILE: net/core/rtnetlink.c:79:
> >   +     rtnl_lock();
> 
> I do wonder if this is not premature.
> 
> After all, we have nothing in Documentation/ yet about this.

Fair point.  I'll defer this patch at least until rtnetlink
handlers are fully converted and the left thing to do is almost
replacing existing RTNL, then I'll repost with a small doc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ