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: <106cc1c2-3e7a-438f-a7c3-7d8804665cb5@redhat.com>
Date: Tue, 25 Nov 2025 15:16:10 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Dmitry Skorodumov <skorodumov.dmitry@...wei.com>, netdev@...r.kernel.org,
 Kuniyuki Iwashima <kuniyu@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Xiao Liang <shaw.leon@...il.com>, Eric Dumazet <edumazet@...gle.com>,
 Guillaume Nault <gnault@...hat.com>, Julian Vetter
 <julian@...er-limits.org>, Stanislav Fomichev <sdf@...ichev.me>,
 Etienne Champetier <champetier.etienne@...il.com>,
 linux-kernel@...r.kernel.org
Cc: andrey.bokhanko@...wei.com, Andrew Lunn <andrew+netdev@...n.ch>,
 "David S. Miller" <davem@...emloft.net>, Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 05/12] ipvlan: Make the addrs_lock be per port

On 11/20/25 6:49 PM, Dmitry Skorodumov wrote:
> Make the addrs_lock be per port, not per ipvlan dev.
> 
> This appears to be a very minor problem though.
> Since it's highly unlikely that ipvlan_add_addr() will
> be called on 2 CPU simultaneously. But nevertheless,
> this may cause:
> 
> 1. False-negative of ipvlan_addr_busy(): one interface
> iterated through all port->ipvlans + ipvlan->addrs
> under some ipvlan spinlock, and another added IP
> under its own lock. Though this is only possible
> for IPv6, since looks like only ipvlan_addr6_event() can be
> called without rtnl_lock.
> 
> 2. Race since ipvlan_ht_addr_add(port) is called under
> different ipvlan->addrs_lock locks
> 
> This should not affect performance, since add/remove IP
> is a rare situation and spinlock is not locked on fast
> paths.
> 
> Also, it's quite convenient to have addrs_lock on
> ipvl_port, to dynamically prevent conflict of IPs
> with addresses on main port.
> 
> CC: Paolo Abeni <pabeni@...hat.com>
> Signed-off-by: Dmitry Skorodumov <skorodumov.dmitry@...wei.com>

This really looks like a fix, that should go via the 'net' tree with a
suitable fixes tag.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ