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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515193609.3da84ac3@kernel.org>
Date: Thu, 15 May 2025 19:36:09 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: <andrew+netdev@...n.ch>, <davem@...emloft.net>, <edumazet@...gle.com>,
 <horms@...nel.org>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
 <sdf@...ichev.me>
Subject: Re: [PATCH net-next] net: let lockdep compare instance locks

On Thu, 15 May 2025 18:49:07 -0700 Kuniyuki Iwashima wrote:
> > +#ifdef CONFIG_DEBUG_NET_SMALL_RTNL
> > +	/* It's okay to use per-netns rtnl_lock if devices share netns */
> > +	if (net_eq(dev_net(dev_a), dev_net(dev_b)) &&
> > +	    lockdep_rtnl_net_is_held(dev_net(dev_a)))  
> 
> Do we need
> 
>   !from_cleanup_net()
> 
> before lockdep_rtnl_net_is_held() ?
> 
> __rtnl_net_lock() is not held in ops_exit_rtnl_list() and
> default_device_exit_batch() when calling unregister_netdevice_many().

Or do we need

  if (from_cleanup_net())
  	return -1;

?
Is the thinking that once the big rtnl lock disappears in cleanup_net
the devices are safe to destroy without any locking because there can't
be any live users trying to access them?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ