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: <vzxdjhhkukb62kifaliwld3hhfrq2auhxt23bbz5r4vzebs3c7@2gjhlykrxfdd>
Date: Fri, 28 Nov 2025 11:36:57 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: "zhenglifeng (A)" <zhenglifeng1@...wei.com>
Cc: rafael@...nel.org, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linuxarm@...wei.com, jonathan.cameron@...wei.com, 
	zhanjie9@...ilicon.com, lihuisong@...wei.com, yubowen8@...wei.com, 
	zhangpengjie2@...wei.com, wangzhi12@...wei.com, linhongye@...artners.com
Subject: Re: [PATCH] cpufreq: Return -EINVAL if no policy is boost supported

On 28-11-25, 12:02, zhenglifeng (A) wrote:
> On 2025/11/26 14:29, Viresh Kumar wrote:
> > On 26-11-25, 11:19, Lifeng Zheng wrote:
> >> In cpufreq_boost_trigger_state(), if all the policies are boost
> >> unsupported, policy_set_boost() will not be called and this function will
> >> return 0. But it is better to return an error to indicate that the platform
> >> doesn't support boost.
> > 
> > I am not sure if it is a good idea. If boost isn't supported by any policy then
> > the driver shouldn't enable it at all.

Drivers like cpufreq-dt actually set the boost callback unconditionally, which
can lead to the case you mentioned. None of the policies support boost, but it
is configurable.

> Yes. So I think return an error is more reasonable when try to 'echo 1 >
> boost' in this situation.

I am inclining towards this now.

> > Also, cpufreq_table_validate_and_sort()
> > sets boost supported only if at least one policy supports it.
> 
> Sorry, I don't see any connection to cpufreq_table_validate_and_sort().

Yeah, I misread, we are only configuring policy's boost flag there, not
driver's.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ