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]
Date: Wed, 07 Feb 2024 12:26:26 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Pranav Prasad
 <pranavpp@...gle.com>
Cc: rafael@...nel.org, pavel@....cz, linux-pm@...r.kernel.org,
 linux-kernel@...r.kernel.org, krossmo@...gle.com, jstultz@...gle.com
Subject: Re: [PATCH] alarmtimer, PM: suspend: Expose a function from

On Wed, Jan 31 2024 at 21:10, Rafael J. Wysocki wrote:
> On Wed, Jan 31, 2024 at 8:13 PM Pranav Prasad <pranavpp@...gle.com> wrote:
>> @@ -564,6 +565,8 @@ static int enter_state(suspend_state_t state)
>>  #endif
>>         } else if (!valid_state(state)) {
>>                 return -EINVAL;
>> +       } else if (time_check_suspend_fail()) {
>> +               return -ETIME;
>
> This causes a function defined in modular code to be called from
> non-modular code which is an obvious mistake.
>
> It also makes the generic suspend code call a function defined in a
> random driver, which is a total no-go as far as I am concerned.

Alarmtimers is built-in core infrastructure and not a random modular
driver, but nevertheless:

> Why don't you instead define a PM notifier in the alarmtimer driver
> and check if it is going to trigger shortly from there?  PM notifiers
> run before the tasks freezer, so there would be a little difference
> timing-wise and you can return whatever error code you like from
> there.  As an additional benefit, you'd be able to handle hibernation
> in the same way.

Makes sense.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ