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]
Date: Tue, 2 Apr 2024 05:41:44 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
 stable@...r.kernel.org
Cc: Jacob Keller <jacob.e.keller@...el.com>,
 "David S . Miller" <davem@...emloft.net>, opendmb@...il.com, andrew@...n.ch,
 hkallweit1@...il.com, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 6.8 39/68] net: mdio: mdio-bcm-unimac: Manage
 clock around I/O accesses



On 3/29/2024 5:25 AM, Sasha Levin wrote:
> From: Florian Fainelli <florian.fainelli@...adcom.com>
> 
> [ Upstream commit ee975351cf0c2a11cdf97eae58265c126cb32850 ]
> 
> Up until now we have managed not to have the mdio-bcm-unimac manage its
> clock except during probe and suspend/resume. This works most of the
> time, except where it does not.
> 
> With a fully modular build, we can get into a situation whereby the
> GENET driver is fully registered, and so is the mdio-bcm-unimac driver,
> however the Ethernet PHY driver is not yet, because it depends on a
> resource that is not yet available (e.g.: GPIO provider). In that state,
> the network device is not usable yet, and so to conserve power, the
> GENET driver will have turned off its "main" clock which feeds its MDIO
> controller.
> 
> When the PHY driver finally probes however, we make an access to the PHY
> registers to e.g.: disable interrupts, and this causes a bus error
> within the MDIO controller space because the MDIO controller clock(s)
> are turned off.
> 
> To remedy that, we manage the clock around all of the I/O accesses to
> the hardware which are done exclusively during read, write and clock
> divider configuration.
> 
> This ensures that the register space is accessible, and this also
> ensures that there are not unnecessarily elevated reference counts
> keeping the clocks active when the network device is administratively
> turned off. It would be the case with the previous way of managing the
> clock.
> 
> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Sasha Levin <sashal@...nel.org>

Please drop this patch, it is usable in isolation and needs 2 additional 
patches to be meaningful:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee2b4cf8b281606bbf332cbd73ce2a73eac417f0
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
/commit/?id=ba0b78371c46b2104197ff2c244f13f011ddfa80

Thanks!
-- 
Florian

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ