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: <e7763b75-205c-4e9f-ecdc-a32571a4b822@gmail.com>
Date:   Thu, 7 Oct 2021 11:52:46 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Lee Jones <lee.jones@...aro.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Mark Brown <broonie@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Russell King <linux@...linux.org.uk>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-tegra <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v1 0/6] Introduce power off call chain API

07.10.2021 10:18, Andy Shevchenko пишет:
> On Thu, Oct 7, 2021 at 9:05 AM Dmitry Osipenko <digetx@...il.com> wrote:
>>
>> Introduce power off call chain API that is inspired by the restart API.
>> It allows to have multiple power off handlers invoked along the chain
> 
> allows multiple
> 
>> until system is powered off. For the starter this series converts couple
> 
> the system
> a couple
> 
>> NVIDIA Tegra drivers to the new API. Existing pm_power_off() method
>> stays around and may be removed once all users will adopt the new API.
> 
> users adopt
> 
>>
>> There were couple attempts in the past to add power off API from
> 
> a couple
> 
>> Guenter Roeck and Thierry Reding, but they were never completed. This
>> is a somewhat simplified version which doesn't try to convert whole kernel
>> to the new API at once, but solves immediate practical problem that we
> 
> problems
> 
>> have on Nexus 7 Android tablet where device needs to chain power off
> 
> tablets where the device

Thank you for the corrections, so far there is one problem and one tablet :)

> Immediate question here is how do you see the plan of spreading this.
> I.o.w. can you put an explanation that you have checked, let's say
>> 80% current users, and they may be converted like [example
> placeholder] without any special tricks?

The rough plan is:

1. Add new API.
2. Convert drivers to the new API per subsystem.
3. Expose do_kernel_restart().
4. Replace pm_power_off() with do_kernel_poweroff() per arch/, making
power off similar to the restart that uses do_kernel_restart().
5. Remove do_kernel_restart() from kernel/reboot.c

Majority of pm_power_off() users shouldn't need the chaining and
pm_power_off() doesn't conflict with the new API, so there is no need to
rush the conversion.

The single-link chain users could be converted to the new API directly,
this will remove some global variables. But at first should be better to
gain more users who actually need the chained power off since they may
have very specific requirements not covered by the current variant of
the API and will be easier to evolve API with less users.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ