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: <3e895811-ad23-4687-b440-5375ad2af2ff@lunn.ch>
Date: Sun, 28 Jul 2024 01:29:10 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Dragan Simic <dsimic@...jaro.org>
Cc: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>,
	UNGLinuxDriver@...rochip.com, davem@...emloft.net,
	edumazet@...gle.com, f.fainelli@...il.com,
	gregkh@...uxfoundation.org, kuba@...nel.org,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org, lucas.demarchi@...el.com,
	masahiroy@...nel.org, mcgrof@...nel.org, netdev@...r.kernel.org,
	pabeni@...hat.com, woojung.huh@...rochip.com
Subject: Re: [PATCH] net: usb: lan78xx: add weak dependency with micrel phy
 module

> Before going into explaining my viewpoint, could someone, please, clarify
> which LAN78xx USB-to-Ethernet bridge does this apply to?  I already had
> a look at a few LAN78xx datasheets, and I'm not sure how the external PHY
> becomes exposed over the USB interface, so it needs a driver.

https://elixir.bootlin.com/linux/v6.10/source/drivers/net/usb/lan78xx.c#L2049

This is creating an MDIO bus device. The MDIO bus will be scanned and
PHYs on the bus found. There are then a few calls to phy_find_first()
which will get the PHY.

The code itself looks pretty broken, it is directly accessing PHY
registers, which a MAC driver should not do. That is a layering
violation.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ