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: <aAjbLNUErWRPa03b@shredder>
Date: Wed, 23 Apr 2025 15:21:00 +0300
From: Ido Schimmel <idosch@...dia.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
	edumazet@...gle.com, andrew+netdev@...n.ch, horms@...nel.org,
	petrm@...dia.com, razor@...ckwall.org
Subject: Re: [PATCH net-next 12/15] vxlan: Create wrappers for FDB lookup

On Tue, Apr 22, 2025 at 10:46:01AM +0200, Paolo Abeni wrote:
> On 4/15/25 2:11 PM, Ido Schimmel wrote:
> > @@ -1286,7 +1300,7 @@ int __vxlan_fdb_delete(struct vxlan_dev *vxlan,
> >  	struct vxlan_fdb *f;
> >  	int err = -ENOENT;
> >  
> > -	f = __vxlan_find_mac(vxlan, addr, src_vni);
> > +	f = vxlan_find_mac(vxlan, addr, src_vni);
> 
> Minor note for a possible follow-up (not blocking this series): AFAICS
> the above is safe because the caller held the hash lock (otherwise f can
> be released as soon as vxlan_find_mac() returns). It could be possibly
> useful to make the code more readable a vxlan_find_mac_locked() variant
> do to this lookup without the RCU lock and with the proper lockdep
> annotation.

Thanks for the feedback, but I'm not sure I understand what you are
asking for. vxlan_find_mac() expects to be called with the hash lock
held and there's a lockdep annotation there to make sure the lock is
held. You want me to rename vxlan_find_mac() to vxlan_find_mac_locked()?

> 
> I think even the previous lookup could use a similar helper.
> 
> Cheers,
> 
> Paolo
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ