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: <35e30e3260f6669b28dcdde6ea58f480eac3db91.camel@siemens.com>
Date: Thu, 22 Feb 2024 07:16:20 +0000
From: "Sverdlin, Alexander" <alexander.sverdlin@...mens.com>
To: "andrew@...n.ch" <andrew@...n.ch>
CC: "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>, "sre@...nel.org"
	<sre@...nel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] power: reset: restart-poweroff: convert to module

On Wed, 2024-02-21 at 22:56 +0100, Andrew Lunn wrote:
> > @@ -47,15 +45,8 @@ static const struct of_device_id of_restart_poweroff_match[] = {
> >   };
> >   MODULE_DEVICE_TABLE(of, of_restart_poweroff_match);
> >   
> > -static struct platform_driver restart_poweroff_driver = {
> > -       .probe = restart_poweroff_probe,
> > -       .remove = restart_poweroff_remove,
> > -       .driver = {
> > -               .name = "poweroff-restart",
> > -               .of_match_table = of_restart_poweroff_match,
> > -       },
> > -};
> 
> of_restart_poweroff_match now seems to be disconnected from the
> driver.
> 
> kirkwood-linkstation.dtsi:              compatible = "restart-poweroff";
> kirkwood-lsxl.dtsi:             compatible = "restart-poweroff";
> orion5x-linkstation.dtsi:               compatible = "restart-poweroff";
> orion5x-lswsgl.dts:             compatible = "restart-poweroff";
> 
> How do these devices get this driver loaded?
> 
> This appears to be another reason to NACK it.

That's why MODULE_DEVICE_TABLE() was preserved for backwards compatibility,
because *loading* happens via MODULE_DEVICE_TABLE(). But I didn't realize
it was never buildable as module as Sebastian pointed out, because of
machine_restart().

For your use case it would continue to work as before I believe, just
the callback would be installed because of the fact the code
was compiled-in, not because there was a fake platform device.

I also didn't understand what is so special about bootloader support
for this functionality if no data is passed to the bootloader.
After ARM-specifics was removed from the code quite some time ago
any platform could re-use the code for the deployments which meant
to be "always on".

But If the resistance is so serious, so be it.

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ