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]
Date:   Tue, 25 Jun 2019 19:09:18 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Linux PCI <linux-pci@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Lukas Wunner <lukas@...ner.de>
Subject: Re: [PATCH] PCI: PM/ACPI: Refresh all stale power state data in
 pci_pm_complete()

On Tue, Jun 25, 2019 at 02:09:12PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> In pci_pm_complete() there are checks to decide whether or not to
> resume devices that were left in runtime-suspend during the preceding
> system-wide transition into a sleep state.  They involve checking the
> current power state of the device and comparing it with the power
> state of it set before the preceding system-wide transition, but the
> platform component of the device's power state is not handled
> correctly in there.
> 
> Namely, on platforms with ACPI, the device power state information
> needs to be updated with care, so that the reference counters of
> power resources used by the device (if any) are set to ensure that
> the refreshed power state of it will be maintained going forward.
> 
> To that end, introduce a new ->refresh_state() platform PM callback
> for PCI devices, for asking the platform to refresh the device power
> state data and ensure that the corresponding power state will be
> maintained going forward, make it invoke acpi_device_update_power()
> (for devices with ACPI PM) on platforms with ACPI and make
> pci_pm_complete() use it, through a new pci_refresh_power_state()
> wrapper function.
> 
> Fixes: a0d2a959d3da (PCI: Avoid unnecessary resume after direct-complete)
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Reviewed-by: Mika Westerberg <mika.westerberg@...ux.intel.com>

I also tested this on Ice Lake system and did not see any issues over
several suspend-to-ram cycles.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ