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:   Fri, 15 Oct 2021 19:14:10 +0200
From:   "Rafael J. Wysocki" <>
To:     Linux ACPI <>,
        "Andreas K. Huettel" <>
Cc:     LKML <>,
        Linux PCI <>,
        Linux PM <>,
        Mika Westerberg <>
Subject: [PATCH v1 2/2][RFT] ACPI: PM: Check states of power resources during initialization

From: Rafael J. Wysocki <>

To avoid situations in which the actual states of certain ACPI power
resources are not known just because they have never been referenced
by any device configuration objects, check the initial states of all
power resources as soon as they are found in the ACPI namespace (and
fall back to turning them on if the state check fails).

Signed-off-by: Rafael J. Wysocki <>

Andreas, please test this patch (on top of the [1/2]) and let me know
if it works for you.


 drivers/acpi/power.c |   30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

Index: linux-pm/drivers/acpi/power.c
--- linux-pm.orig/drivers/acpi/power.c
+++ linux-pm/drivers/acpi/power.c
@@ -923,6 +919,7 @@ struct acpi_device *acpi_add_power_resou
 	union acpi_object acpi_object;
 	struct acpi_buffer buffer = { sizeof(acpi_object), &acpi_object };
 	acpi_status status;
+	u8 state_dummy;
 	int result;
 	acpi_bus_get_device(handle, &device);
@@ -951,6 +948,10 @@ struct acpi_device *acpi_add_power_resou
 	resource->order = acpi_object.power_resource.resource_order;
+	/* Get the initial state or just flip it on if that fails. */
+	if (acpi_power_get_state(resource, &state_dummy))
+		__acpi_power_on(resource);
 	pr_info("%s [%s]\n", acpi_device_name(device), acpi_device_bid(device));
 	device->flags.match_driver = true;

Powered by blists - more mailing lists