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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251127080748.423605a3@kernel.org>
Date: Thu, 27 Nov 2025 08:07:48 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Birger Koblitz <mail@...ger-koblitz.de>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
 pabeni@...hat.com, edumazet@...gle.com, andrew+netdev@...n.ch,
 netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>, Paul Menzel
 <pmenzel@...gen.mpg.de>, Aleksandr Loktionov
 <aleksandr.loktionov@...el.com>, Rinitha S <sx.rinitha@...el.com>
Subject: Re: [PATCH net-next 03/11] ixgbe: Add 10G-BX support

On Thu, 27 Nov 2025 07:33:13 +0100 Birger Koblitz wrote:
> > In ixgbe_identify_sfp_module_generic(), what happens when a module has
> > the 10G-BX characteristics (empty comp_codes_10g, bitrate 0x67, fiber
> > mode) but the link length check fails (both sm_length values < 1km)?
> > 
> > The outer else-if condition matches, so we skip the final else clause
> > that sets sfp_type to unknown. But the inner if condition fails, so we
> > don't set the 10g_bx type either. This leaves hw->phy.sfp_type
> > unchanged from whatever value it had previously.
> > 
> > All other branches in this if-else chain explicitly set sfp_type, but
> > this path only conditionally sets it. Should there be an else clause
> > after the inner if to set sfp_type = ixgbe_sfp_type_unknown when the
> > link length requirement isn't met?  
> The ixgbe_identify_sfp_module_generic detects SFP modules that it knows 
> how to initialize in a positive manner, that is all the conditions have 
> to be fulfilled. If this is not the case, then the default from 
> ixgbe_main.c:ixgbe_probe() kicks in, which sets
> 	hw->phy.sfp_type = ixgbe_sfp_type_unknown;
> before probing the SFP. The else is unnecessary.
> 
> If the SFP module cannot be positively identified, then that functions 
> logs an error:
> 	e_dev_err("failed to load because an unsupported SFP+ or QSFP module 
> type was detected.\n");
> 	e_dev_err("Reload the driver after installing a supported module.\n");

Got it! perhaps add a note to the commit msg or a comment somewhere to
avoid AI flagging this again?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ