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: <CAGgjyvEx_F0C2XHDGxf3F0Z8iHF1vQZkoPft3_ZbTswVFv=SJA@mail.gmail.com>
Date:   Mon, 30 Sep 2019 14:11:59 +0000
From:   Oleksandr Suvorov <oleksandr.suvorov@...adex.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     Oleksandr Suvorov <oleksandr.suvorov@...adex.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        Jamie Lentin <jm@...tin.co.uk>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        Igor Opaniuk <igor.opaniuk@...adex.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 0/2] This patch introduces a feature to force
 gpio-poweroff module

Hi Andrew,

On Mon, Sep 30, 2019 at 3:16 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Mon, Sep 30, 2019 at 10:35:36AM +0000, Oleksandr Suvorov wrote:
> > to register its own pm_power_off handler even if someone has registered
> > this handler earlier.
> > Useful to change a way to power off the system using DT files.
>
> Hi Oleksandr
>
> I'm not sure this is a good idea. What happens when there are two
> drivers using forced mode? You then get which ever is register last.
> Non deterministic behaviour.

You're right, we have to handle a case when gpio-poweroff fails to
power the system off. Please look at the
2nd version of the patchset.

There are 3 only drivers that forcibly register its own pm_power_off
handler even if it has been registered before.

drivers/firmware/efi/reboot.c - supports chained call of next
pm_power_off handler if its own handler fails.

arch/x86/platform/iris/iris.c, drivers/char/ipmi/ipmi_poweroff.c -
don't support calling of next pm_power_off handler.
Looks like these drivers should be fixed too.

All other drivers don't change already initialized pm_power_off handler.

> What is the other driver which is causing you problems? How is it
> getting probed? DT?

There are several PMUs, RTCs, watchdogs that register their own pm_power_off.
Most of them, probably not all, are probed from DT.

>
> Thanks
>         Andrew

-- 
Best regards
Oleksandr Suvorov

Toradex AG
Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500
4800 (main line)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ