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: <3952a6b6-6428-4c7b-9a3f-7ae9c8599077@lunn.ch>
Date: Mon, 8 Sep 2025 18:18:26 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Niklas Söderlund <niklas.soderlund@...natech.se>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
	linux-sh@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] sh_eth: Convert to
 DEFINE_SIMPLE_DEV_PM_OPS()

On Mon, Sep 08, 2025 at 04:36:29PM +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
> 
> On Fri, 5 Sept 2025 at 20:41, Niklas Söderlund
> <niklas.soderlund@...natech.se> wrote:
> > On 2025-09-05 13:57:05 +0200, Andrew Lunn wrote:
> > > > You cannot enter system sleep without CONFIG_PM_SLEEP, so enabling
> > > > WoL would be pointless.
> > >
> > > Yet get_wol will return WoL can be used, and set_wol will allow you to
> > > configure it. It seems like EOPNOTSUPP would be better.
> >
> > Out of curiosity. Are you suggesting a compile time check/construct for
> > CONFIG_PM_SLEEP be added in the driver itself, or in ethtool_set_wol()
> > and ethtool_get_wol() in net/ethtool/ioctl.c to complement the
> >
> >     if (!dev->ethtool_ops->get_wol || !dev->ethtool_ops->set_wol)
> >         return -EOPNOTSUPP;
> >
> > checks already there? To always return EOPNOTSUPP if PM_SLEEP is not
> > selected?
> 
> Iff we want to go that route, I'd vote for handling it in common code.
> Still, there is no guarantee that WoL will actually work, as on
> some systems it may depend on the firmware, too.  E.g. on ARM
> systems with PSCI, the SoC may be powered down during s2ram, so
> there is no guarantee that any of the wake-up sources shown in
> /sys/kernel/debug/wakeup_sources can actually wake up the system.
> I tried having a mechanism to describe that in DT, but it was rejected.

WoL is a bit of a mess. Russell has done a little cleanup for when the
PHY does WoL, not the MAC.

I don't think we can check for PM_SLEEP in the core. There are some
PHYs which are powered by the standby voltage, so not effected by
power off. And their WoL output is connected directly to the PMIC. So
they have the ability to wake the system from off, not just suspend.

For the hardware you are dealing with, the MAC does WoL. You know it
cannot work without PM_SLEEP, so i think it needs to be the MAC which
returns EOPNOTSUP.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ