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: <aTG82SREd9Nllkzs@shell.armlinux.org.uk>
Date: Thu, 4 Dec 2025 16:54:49 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: John Madieu <john.madieu.xa@...renesas.com>
Cc: prabhakar.mahadev-lad.rj@...renesas.com, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, geert+renesas@...der.be,
	biju.das.jz@...renesas.com, claudiu.beznea@...on.dev,
	magnus.damm@...il.com, mcoquelin.stm32@...il.com,
	alexandre.torgue@...s.st.com, netdev@...r.kernel.org,
	linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 1/3] net: stmmac: add physical port
 identification support

On Thu, Dec 04, 2025 at 04:31:20PM +0000, John Madieu wrote:
> +static int stmmac_get_phys_port_name(struct net_device *dev,
> +				     char *name, size_t len)
> +{
> +	struct stmmac_priv *priv = netdev_priv(dev);
> +
> +	/* Allow glue driver to override */
> +	if (priv->plat->get_phys_port_name)
> +		return priv->plat->get_phys_port_name(dev, name, len);
> +
> +	/* Default: use bus_id as port identifier */
> +	return snprintf(name, len, "p%d", priv->plat->bus_id) >= len ? -EINVAL : 0;

priv->plat->bus_id may not be stable - for example, if a SoC describes
two stmmac ethernet, but omits the ethernet aliases, then plat->bus_id
is assigned in order that stmmac_probe_config_dt() is called for each
device.

How important is it that the phys_port_name is stable across boots?
If it should be stable, then I think we should not report it if we end
up falling back to the "assign in order of stmmac_probe_config_dt()".

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ