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: <20201020181537.753b1c90@kernel.org>
Date:   Tue, 20 Oct 2020 18:15:37 +0200
From:   Marek BehĂșn <kabel@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Russell King - ARM Linux admin <linux@...linux.org.uk>,
        netdev@...r.kernel.org
Subject: Re: [PATCH russell-kings-net-queue v2 1/3] net: phy: mdio-i2c:
 support I2C MDIO protocol for RollBall SFP modules

On Tue, 20 Oct 2020 18:00:39 +0200
Andrew Lunn <andrew@...n.ch> wrote:

> > This extends the mdio-i2c driver so that when SFP PHY address 17 is used
> > (which in mdio-i2c terms corresponds to I2C address 0x51), then this
> > different protocol is used for MDIO access.  
> 
> Hi Marek
> 
> I don't see that being very scalable. What happens when the next SFP
> comes along which has a different protocol at address 0x51. Since you
> can identify the SFP via the EEPROM information, i would prefer you
> explicitly tell it to use the rollball protocol when instantiating the
> MDIO bus.

At first I proposed a separate mdio bus driver for RollBall SFPs.
But Russell suggested doing this instead, saying that in the future
this can be changed.

> 
> >   * I2C bus addresses 0x50 and 0x51 are normally an EEPROM, which is
> >   * specified to be present in SFP modules.  These correspond with PHY
> > - * addresses 16 and 17.  Disallow access to these "phy" addresses.
> > + * addresses 16 and 17.  Disallow access to 0x50 "phy" address.
> > + * Use RollBall protocol when accessing via the 0x51 address.
> >   */
> >  static bool i2c_mii_valid_phy_id(int phy_id)
> >  {
> > -	return phy_id != 0x10 && phy_id != 0x11;
> > +	return phy_id != 0x10;
> > +}  
> 
> I'm not sure that is safe. It means that we will scan address 0x11 to
> see if there is a PHY there. And if the SFP does have diagnostics
> registers, that might be enough that phylib thinks there is a PHY
> there.
> 
> I think you only need to allow access to 0x11 if rollball protocol has
> been enabled.

I can do that...

> 
>      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ