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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e37d2c6678f33b490e8ab56cd1472429ca3dcc7a.camel@embedd.com>
Date: Tue, 05 Dec 2023 18:33:18 +0100
From: Daniel Danzberger <dd@...edd.com>
To: Vladimir Oltean <olteanv@...il.com>
Cc: woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com, 
	netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>, Florian Fainelli
	 <f.fainelli@...il.com>
Subject: Re: [PATCH] net: dsa: microchip: fix NULL pointer dereference on
 platform init

On Tue, 2023-12-05 at 18:55 +0200, Vladimir Oltean wrote:
> On Tue, Dec 05, 2023 at 09:00:39AM +0100, Daniel Danzberger wrote:
> > > Is this all that's necessary for instantiating the ksz driver through
> > > ds->dev->platform_data? I suppose not, so can you post it all, please?
> > Yes, that NULL pointer was the only issue I encountered.
> 
> I was just thinking, the KSZ9477 has internal PHYs on ports 0-4, and an
> internal MDIO bus registered in ksz_mdio_register(). The bus registration
> won't work without OF, since it returns early when not finding
> of_get_child_by_name(dev->dev->of_node, "mdio").
Interesting, I did not notice that.
After the NULL pointer issue was fixed the switch just worked.
> 
> Don't you need the internal PHY ports to work?
For now the switch seems to run just fine, with port 0 being the CPU port and 1-4 being used as
regular switch ports.
I will do some more testing this week however...

And probably checkout some DTS files that use that switch to see what other options I might need
when going the platform_data path.

> 

-- 
Regards

Daniel Danzberger
embeDD GmbH, Alter Postplatz 2, CH-6370 Stans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ