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: <20250910093100.3578130-1-yicongsrfy@163.com>
Date: Wed, 10 Sep 2025 17:31:00 +0800
From: yicongsrfy@....com
To: linux@...linux.org.uk
Cc: andrew@...n.ch,
	davem@...emloft.net,
	edumazet@...gle.com,
	hkallweit1@...il.com,
	kuba@...nel.org,
	linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org,
	pabeni@...hat.com,
	yicong@...inos.cn
Subject: Re: [PATCH] net: phy: avoid config_init failure on unattached PHY during resume

On Wed, 10 Sep 2025 17:17:03 +0800, yicongsrfy@....com <> wrote:
> My thought is, if a PHY device hasn't been attached to a net_device,
> is it still necessary to go through the resume procedure?
>
> My issue context is as follows:
> After entering `mdio_bus_phy_resume`, the call flow proceeds to:
> `phy_init_hw()`
>     => `phydev->drv->config_init`
>         => `yt8521_config_init`
>
> Then, because `phydev->interface != PHY_INTERFACE_MODE_SGMII`, it attempts
> to enter `ytphy_rgmii_clk_delay_config` to configure the RGMII tx/rx delay.
> However, since this PHY device is not associated with any GMAC and is not
> connected via an RGMII interface, the function returns `-EOPNOTSUPP`.
>
> Of course, I could submit a fix patch to `motorcomm.c` to terminate
> `config_init` early. But as I mentioned at the beginning, when a PHY
> device hasn't been attached, do we really need to let it go through
> the entire resume process?

One more point: in the suspend flow as shown below:
`mdio_bus_phy_suspend`
    => `mdio_bus_phy_may_suspend`
there is also a check whether `phydev->attached_dev` is NULL.

Therefore, my idea is to make this modification to maintain consistency in the logic.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ