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-next>] [day] [month] [year] [list]
Message-Id: <1252011886.2781.45.camel@achroite>
Date:	Thu, 03 Sep 2009 22:04:46 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	netdev@...r.kernel.org
Subject: [RFC] Inconsistency in MDIO ioctl behaviour

While comparing the various implementations of SIOC{G,S}MIIREG and
SIOCGMIIPHY, I found some differences in behaviour that could make some
applications unreliable across different drivers.

1. Implementations of SIOCGMIIPHY must set phy_id to the PHY's MDIO
address (PRTAD) or to a dummy address if there is no real MDIO bus.
Many implementations, including the generic ones (mii, phylib,
pci-skeleton and now mdio) then proceed as for SIOCGMIIPHY.  Others
return without accessing any registers.  Which behaviour is right?

2. Implementations of SIOC{G,S}MIIREG that do not support access to
arbitary MDIO addresses handle non-matching values of phy_id in at least
three different ways:
(a) ignore it and always use the expected PHY address
(b) ignore writes and return a dummy value for reads
(c) fail
I favour behaviour (c) but I'm not sure what the error code should be.
ENODEV, EINVAL or EIO?

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ