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: <NZ5JHR.JGO592OT0D961@att.net>
Date:   Thu, 01 Sep 2022 08:14:11 -0400
From:   Steven J Abner <pheonix.sja@....net>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org, Linux PM <linux-pm@...r.kernel.org>
Subject: Re: thermal driver patch


On Thu, Sep 1, 2022 at 05:59, Daniel Lezcano 
<daniel.lezcano@...aro.org> wrote:
> Could it be related to this bug?
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=201761
> 
> Is it possible to give the thermal zone 'type'

Did verify that that my thermal_zone0 is my wifi:
used lm-sensor and cat /sys/class/thermal/thermal_zone0/temp
along with wifi load to heat to temps different then others to check 
outputs.
The above mentioned bug page could have lead to this, I can't say or 
track.

Prefix the following with I'm not an expert, just info provider:

My guess is not supposed to be calling function during initial kernel 
loading, based on following:

from thermal_core.c:
18:
#include <linux/thermal.h>

397:
static void update_temperature(struct thermal_zone_device *tz)
{
	int temp, ret;

	ret = thermal_zone_get_temp(tz, &temp);
	if (ret) {
		if (ret != -EAGAIN)
			dev_warn(&tz->device,
				 "failed to read out thermal zone (%d)\n",
				 ret);
		return;
	}

	mutex_lock(&tz->lock);
	tz->last_temperature = tz->temperature;
	tz->temperature = temp;
	mutex_unlock(&tz->lock);

	trace_thermal_temperature(tz);

	thermal_genl_sampling_temp(tz->id, temp);
}

from linux/thermal.h:
429:
static inline int thermal_zone_get_temp(
		struct thermal_zone_device *tz, int *temp)
{ return -ENODEV; }


compiler should then read:
static void update_temperature(struct thermal_zone_device *tz)
{
	int temp, ret;

	ret = -ENODEV;
	if (ret) {
		if (ret != -EAGAIN)
			dev_warn(&tz->device,
				 "failed to read out thermal zone (%d)\n",
				 ret);
		return;
	}

however did find with extra search:
in /drivers/thermal/thermal_helpers.c:
78:
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
and
115:
EXPORT_SYMBOL_GPL(thermal_zone_get_temp);


so is this bootup vs system hand off?
where bootup call thermal_zone_get_temp() shouldn't occur?

Steve


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ