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: <06a180e5c21761c53c18dd208c9ea756570dd142.camel@microchip.com>
Date: Thu, 20 Jun 2024 05:48:31 +0000
From: <Rengarajan.S@...rochip.com>
To: <andrew@...n.ch>
CC: <linux-usb@...r.kernel.org>, <davem@...emloft.net>,
	<Woojung.Huh@...rochip.com>, <linux-kernel@...r.kernel.org>,
	<pabeni@...hat.com>, <netdev@...r.kernel.org>, <edumazet@...gle.com>,
	<UNGLinuxDriver@...rochip.com>, <kuba@...nel.org>
Subject: Re: [PATCH net-next v1] lan78xx: lan7801 MAC support with lan8841

Hi Andrew,

Apologies for the delay in reply. Thanks for reviewing the patch.
Please find my comments inline.

On Thu, 2024-06-13 at 22:46 +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Tue, Jun 11, 2024 at 03:12:33PM +0530, Rengarajan S wrote:
> > Add lan7801 MAC only support with lan8841. The PHY fixup is
> > registered
> > for lan8841 and the initializations are done using lan8835_fixup
> > since
> > the register configs are similar for both lann8841 and lan8835.
> 
> What exactly does this fixup do?

Fixup related to the phy handle and manage the configuration and status
registers of a particular phy. In this patch it is used to handle the
configuration registers of LAN8841 which are similar to registers in
LAN8835.

> 
> Looking at it, what protects it from being used on some other device
> which also happens to use the same PHY? Is there something to
> guarantee:
> 
> struct lan78xx_net *dev = netdev_priv(phydev->attached_dev);
> 
> really is a lan78xx_net * ?

In this case fixup is called through lan78xx only when interfacing the
phy with lan78xx MAC. Since this will not be called on interfacing with
other devices, it prevents them from accessing the registers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ