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, 19 Nov 2019 22:55:27 -0800
From:   "Doug Smythies" <dsmythies@...us.net>
To:     "'Rafael J. Wysocki'" <rjw@...ysocki.net>
Cc:     "'Rafael J. Wysocki'" <rafael@...nel.org>,
        "'Linux PM'" <linux-pm@...r.kernel.org>,
        "'Linux ACPI'" <linux-acpi@...r.kernel.org>,
        "'LKML'" <linux-kernel@...r.kernel.org>,
        "'Viresh Kumar'" <viresh.kumar@...aro.org>,
        "'Sudeep Holla'" <sudeep.holla@....com>,
        "'Dmitry Osipenko'" <digetx@...il.com>
Subject: RE: [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS

On 2019.11.19 14:14 Rafael J. Wysocki wrote:
> On Tuesday, November 19, 2019 8:17:05 PM CET Rafael J. Wysocki wrote:

...
 
>> However, I now also see that freq_qos_remove_request() doesn't clear
>> the qos field in req which is should do, so freq_qos_add_request()
>> will complain and fail if the object pointed to by req is passed to it
>> again.
>> 
>> I'll send a patch to test for this later today.
>> 
>
> The patch is appended.  Please test it (on top of 5.4-rc8) and report back.
>
> ---
> kernel/power/qos.c |    8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> Index: linux-pm/kernel/power/qos.c
> ===================================================================
> --- linux-pm.orig/kernel/power/qos.c
> +++ linux-pm/kernel/power/qos.c
> @@ -814,6 +814,8 @@ EXPORT_SYMBOL_GPL(freq_qos_update_reques
>  */
> int freq_qos_remove_request(struct freq_qos_request *req)
> {
> +	int ret;
> +
> 	if (!req)
> 		return -EINVAL;
> 
> @@ -821,7 +823,11 @@ int freq_qos_remove_request(struct freq_
> 		 "%s() called for unknown object\n", __func__))
> 		return -EINVAL;
> 
> -	return freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> +	ret = freq_qos_apply(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
> +	req->qos = NULL;
> +	req->type = 0;
> +
> +	return ret;
>  }
>  EXPORT_SYMBOL_GPL(freq_qos_remove_request);
 
Yes the patch fixes the problem. Thanks.

I tested several hundred times switching between
passive and active modes with the intel_pstate driver,
including with various CPUs disabled and re-enabled.

... Doug


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ