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: <965905ef-cc00-49fa-bee9-2b45d6155108@lunn.ch>
Date: Wed, 2 Oct 2024 14:38:19 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Kyle Swenson <kyle.swenson@....tech>,
	thomas.petazzoni@...tlin.com,
	Oleksij Rempel <o.rempel@...gutronix.de>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] net: pse-pd: Fix enabled status mismatch

On Wed, Oct 02, 2024 at 02:17:05PM +0200, Kory Maincent wrote:
> PSE controllers like the TPS23881 can forcefully turn off their
> configuration state. In such cases, the is_enabled() and get_status()
> callbacks will report the PSE as disabled, while admin_state_enabled
> will show it as enabled. This mismatch can lead the user to attempt
> to enable it, but no action is taken as admin_state_enabled remains set.
> 
> The solution is to disable the PSE before enabling it, ensuring the
> actual status matches admin_state_enabled.
> 
> Fixes: d83e13761d5b ("net: pse-pd: Use regulator framework within PSE framework")
> Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
> ---
> 
> FYI: Saving the enabled state in the driver is not a viable solution, as a
> reboot may cause a mismatch between the real and software-saved states.

This seems O.K. to me.

I'm assuming the controller has turned the configuration state to off
to stop the magic smoke escaping? Is there any sort of notification of
this?  Does it raise an interrupt? Sometime in the future we might
want to add a netlink notification about this?

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ