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: <20231205181735.csbtkcy3g256kwxl@skbuf>
Date: Tue, 5 Dec 2023 20:17:35 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Daniel Danzberger <dd@...edd.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, Dec 05, 2023 at 06:33:18PM +0100, Daniel Danzberger wrote:
> 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...

What does "regular switch ports" mean? L2 forwarding between them?
Could you give us an "ip addr" output?

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

The platform_data code path has reduced functionality, at some point you
will get some pushback to help kickstart the software node conversion.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ