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: <aYFqWcyuuN8V71LX@fedora>
Date: Tue, 3 Feb 2026 03:24:09 +0000
From: Hangbin Liu <liuhangbin@...il.com>
To: Thomas Bogendoerfer <tbogendoerfer@...e.de>
Cc: Jay Vosburgh <jv@...sburgh.net>, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] bonding: only set speed/duplex to unknown, if
 getting speed failed

On Mon, Feb 02, 2026 at 03:17:26PM +0100, Thomas Bogendoerfer wrote:
> On Fri, 30 Jan 2026 12:36:19 +0000
> Hangbin Liu <liuhangbin@...il.com> wrote:
> 
> > On Fri, Jan 30, 2026 at 12:19:04PM +0100, Thomas Bogendoerfer wrote:
> > > bond_update_speed_duplex() first set speed/duplex to unknown and
> > > then asks slave driver for current speed/duplex. Since getting
> > > speed/duplex might take longer there is a race, where this false state
> > > is visible by /proc/net/bonding. With commit 691b2bf14946 ("bonding:  
> > 
> > The patch looks good to me. But based on your description, I don't think
> > the fixes tag is correct.
> 
> the race is old, but it got visible by that commit. Before 
> bond_update_speed_duplex() was only called on enslaving and when bond
> is brought up. Now it could also be called during normal operation and
> that's what caught attention by customers.
> 
> I'm fine changing the fixes tag to whatever we agree to. So which should
> I take ?

Maybe
98f41f694f46 ("bonding:update speed/duplex for NETDEV_CHANGE") and
589665f5a600 ("bonding: comparing a u8 with -1 is always false")?

The 98f41f694f46 set speed/duplex to -1 by default, which could cause the race
to show SPEED_UNKNOWN. But (slave->duplex == -1) checking is always false, so
no possible to show DUPLEX_UNKNOWN. The 589665f5a600 fixed this issue, after
that speed/duplex both could be shown as UNKNOWN.

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ