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: <CAJZ5v0jHdd=1HALbUPQ2TDYJuzxfW6+UHH6+2jss-6NJ1v64rw@mail.gmail.com>
Date:   Wed, 21 Feb 2018 10:09:10 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Dominik Brodowski <linux@...inikbrodowski.net>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux PM <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCMCIA / PM: Combine system resume callbacks

On Tue, Feb 20, 2018 at 10:38 PM, Dominik Brodowski
<linux@...inikbrodowski.net> wrote:
> On Tue, Feb 20, 2018 at 12:47:27PM +0100, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>>
>> There is a problem with PCMCIA system resume callbacks with respect
>> to suspend-to-idle in which the ->suspend_noirq() callback may be
>> invoked after the ->resume_noirq() one without resuming the system
>> entirely in some cases.  This doesn't work for PCMCIA because of
>> the lack of symmetry between its system suspend and system resume
>> "noirq" callbacks.
>>
>> The system resume handling in PCMCIA is split between
>> socket_early_resume() and socket_late_resume() which are called in
>> different phases of system resume and both need to run for
>> socket_suspend() (invoked by the system suspend "noirq" callback)
>> to work.  Specifically, socket_suspend() returns an error when
>> called after socket_early_resume() without socket_late_resume(),
>> so if the suspend-to-idle core detects a spurious wakeup event and
>> attempts to put the system back to sleep, that is aborted by the
>> error coming from socket_suspend().
>>
>> This design doesn't follow the power management documentation
>> stating that the "noirq" resume callback is expected to reverse
>> the changes made by the "noirq" suspend one.  Moreover, I don't see
>> a reason for splitting the PCMCIA socket system resume handling this
>> way
>
> Unless I am mistaken, this split was introduced by commit
> 9905d1b411946 . So we should take into account the reasons stated
> in that commit message.

Well, I should have done more research, thanks for reminding me about that.

I guess I'll need to add one more state flag, then.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ