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>] [day] [month] [year] [list]
Message-ID: <5738410.DvuYhMxLoT@kreacher>
Date:   Thu, 28 Sep 2023 17:45:59 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Linux ACPI <linux-acpi@...r.kernel.org>
Cc:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>
Subject: [PATCH v1] ACPI: thermal: Mark uninitialized active trips as invalid

From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

After removing the valid flag from struct acpi_thermal_trip, the trip
temperature value is used in validity checks, so it must be
THERMAL_TEMP_INVALID for the active trip entries in struct acpi_thermal_trips
that are not going to be used (because the corresponding objects are not
present in the ACPI tables, for example).

Accordingly, modify acpi_thermal_get_trip_points() to set the temperature
value to THERMAL_TEMP_INVALID for trip point entries skipped by it after
acpi_thermal_init_trip() has returned 'false' for an active trip.

Fixes: 058f5e407deb ("ACPI: thermal: Drop valid flag from struct acpi_thermal_trip")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---

Commit 058f5e407deb mentioned above is present in the linux-next branch
of linux-pm.git and acpi_thermal_init_trip() is introduced by

https://patchwork.kernel.org/project/linux-pm/patch/1785516.VLH7GnMWUR@kreacher/

---
 drivers/acpi/thermal.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-pm/drivers/acpi/thermal.c
===================================================================
--- linux-pm.orig/drivers/acpi/thermal.c
+++ linux-pm/drivers/acpi/thermal.c
@@ -480,6 +480,9 @@ static int acpi_thermal_get_trip_points(
 
 	}
 
+	while (++i < ACPI_THERMAL_MAX_ACTIVE)
+		tz->trips.active[i].trip.temperature = THERMAL_TEMP_INVALID;
+
 	return count;
 }
 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ