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] [day] [month] [year] [list]
Message-ID: <1458e4f8-bd76-4d75-acb9-87f7064ea40c@arm.com>
Date: Wed, 18 Jun 2025 15:57:15 +0100
From: Christian Loehle <christian.loehle@....com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 linux-pm <linux-pm@...r.kernel.org>, Viresh Kumar <viresh.kumar@...aro.org>,
 Robin Murphy <robin.murphy@....com>, zhenglifeng1@...wei.com
Subject: Re: [PATCH] cpufreq: Fix initialization with disabled boost

On 6/18/25 15:32, Rafael J. Wysocki wrote:
> On Mon, Jun 16, 2025 at 7:25 PM Christian Loehle
> <christian.loehle@....com> wrote:
>>
>> The boost_enabled early return in policy_set_boost() caused
>> the boost disabled at initialization to not actually set the
>> initial policy->max, therefore effectively enabling boost while
>> it should have been enabled.
> 
> Did you mean "disabled"?

Yup, the latter 'enabled' should be disabled.

> 
> It would be good to mention the failure scenario here too.
> 

Absolutely, let me respin this in a series that provides some context, too.

>> Fixes: 27241c8b63bd ("cpufreq: Introduce policy_set_boost()")
>> Reported-by: Robin Murphy <robin.murphy@....com>
>> Signed-off-by: Christian Loehle <christian.loehle@....com>
>> ---
>>  drivers/cpufreq/cpufreq.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index d7426e1d8bdd..e85139bd0436 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -1630,7 +1630,7 @@ static int cpufreq_online(unsigned int cpu)
>>          */
>>         if (cpufreq_driver->set_boost && policy->boost_supported &&
>>             (new_policy || !cpufreq_boost_enabled())) {
>> -               ret = policy_set_boost(policy, cpufreq_boost_enabled());
>> +               ret = cpufreq_driver->set_boost(policy, cpufreq_boost_enabled());
>>                 if (ret) {
>>                         /* If the set_boost fails, the online operation is not affected */
>>                         pr_info("%s: CPU%d: Cannot %s BOOST\n", __func__, policy->cpu,
>> --
>> 2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ