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: <20200421193802.GG25745@shell.armlinux.org.uk>
Date:   Tue, 21 Apr 2020 20:38:02 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Michael Walle <michael@...le.cc>, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [RFC PATCH net-next 1/3] net: phy: add concept of shared storage
 for PHYs

On Tue, Apr 21, 2020 at 09:30:55PM +0200, Andrew Lunn wrote:
> > Speaking of it. Does anyone have an idea how I could create the hwmon
> > device without the PHY device? At the moment it is attached to the
> > first PHY device and is removed when the PHY is removed, although
> > there might be still other PHYs in this package. Its unlikely to
> > happen though, but if someone has a good idea how to handle that,
> > I'd give it a try.
> 
> There is a somewhat similar problem with Marvell Ethernet switches and
> their internal PHYs. The PHYs are the same as the discrete PHYs, and
> the usual Marvell PHY driver is used. But there is only one
> temperature sensor for the whole switch, and it is mapped into all the
> PHYs. So we end up creating multiple hwmon devices for the one
> temperature sensor, one per PHY.

And sometimes we really mess it up - like on the 88e6141:

cp1configspacef4000000mdio12a200switch04mdio14-mdio-e
Adapter: MDIO adapter
temp1:        -75.0°C

because DSA forces the 6390 PHY ID for this PHY, and the marvell
driver tries to drive the PHY as if it's a different switch, so
we end up reading a register that isn't meaningful.

So, imho, the current approach isn't as good as you think it is.

That aside from wasting memory allocating multiple sensors when
there's really only one.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ