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] [day] [month] [year] [list]
Message-ID: <64f188d8-9336-2578-fb47-ce6ff615acab@bootlin.com>
Date: Mon, 13 May 2024 09:26:12 +0200 (CEST)
From: Romain Gantois <romain.gantois@...tlin.com>
To: Simon Horman <horms@...nel.org>
cc: Romain Gantois <romain.gantois@...tlin.com>, 
    "David S. Miller" <davem@...emloft.net>, 
    Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
    Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh@...nel.org>, 
    Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, 
    Conor Dooley <conor+dt@...nel.org>, 
    Geert Uytterhoeven <geert+renesas@...der.be>, 
    Magnus Damm <magnus.damm@...il.com>, 
    Alexandre Torgue <alexandre.torgue@...s.st.com>, 
    Jose Abreu <joabreu@...opsys.com>, 
    Maxime Coquelin <mcoquelin.stm32@...il.com>, 
    Russell King <linux@...linux.org.uk>, 
    Clément Léger <clement.leger@...tlin.com>, 
    Serge Semin <fancer.lancer@...il.com>, 
    Thomas Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org, 
    devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
    linux-renesas-soc@...r.kernel.org, 
    linux-stm32@...md-mailman.stormreply.com, 
    linux-arm-kernel@...ts.infradead.org, 
    "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>, 
    Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next v6 4/7] net: stmmac: introduce pcs_init/pcs_exit
 stmmac operations

Hello Simon,

On Sat, 11 May 2024, Simon Horman wrote:

> > -	if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) {
> > +	if (priv->plat->pcs_init) {
> > +		ret = priv->plat->pcs_init(priv);
> > +	} else if (priv->plat->mdio_bus_data &&
> > +		   priv->plat->mdio_bus_data->has_xpcs) {
> >  		/* Try to probe the XPCS by scanning all addresses */
> >  		for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
> >  			xpcs = xpcs_create_mdiodev(priv->mii, addr, mode);
> 
> I am unsure if this can occur, but if priv->plat->pcs_init returns 0 then
> xpcs will be used while uninitialised towards the end of this function.

Indeed this could occur, I've just sent a v7 that fixes this.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ