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: <20250904044557.tde36hekoeuhnsci@vireshk-i7>
Date: Thu, 4 Sep 2025 10:15:57 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Zihuan Zhang <zhangzihuan@...inos.cn>
Cc: "Rafael J . wysocki" <rafael@...nel.org>,
	Saravana Kannan <saravanak@...gle.com>,
	zhenglifeng <zhenglifeng1@...wei.com>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 3/3] cpufreq: Make cpufreq_frequency_table_verify()
 internal

On 04-09-25, 11:22, Zihuan Zhang wrote:
> diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c
> index 642ddb9ea217..ee3fd1e71b90 100644
> --- a/drivers/cpufreq/sh-cpufreq.c
> +++ b/drivers/cpufreq/sh-cpufreq.c
> @@ -90,10 +90,8 @@ static int sh_cpufreq_verify(struct cpufreq_policy_data *policy)
>  {
>  	struct clk *cpuclk = &per_cpu(sh_cpuclk, policy->cpu);
>  
> -	if (policy->freq_table)
> -		return cpufreq_frequency_table_verify(policy);
> -
> -	cpufreq_verify_within_cpu_limits(policy);
> +	if (!cpufreq_generic_frequency_table_verify(policy))
> +		return 0;
>  
>  	policy->min = (clk_round_rate(cpuclk, 1) + 500) / 1000;
>  	policy->max = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
> diff --git a/drivers/cpufreq/virtual-cpufreq.c b/drivers/cpufreq/virtual-cpufreq.c
> index 6ffa16d239b2..2498f40cd57e 100644
> --- a/drivers/cpufreq/virtual-cpufreq.c
> +++ b/drivers/cpufreq/virtual-cpufreq.c
> @@ -249,10 +249,7 @@ static int virt_cpufreq_offline(struct cpufreq_policy *policy)
>  
>  static int virt_cpufreq_verify_policy(struct cpufreq_policy_data *policy)
>  {
> -	if (policy->freq_table)
> -		return cpufreq_frequency_table_verify(policy);
> -
> -	cpufreq_verify_within_cpu_limits(policy);
> +	cpufreq_generic_frequency_table_verify(policy);
>  	return 0;
>  }

You ended up changing the logic of both these files and it isn't the
same anymore. Earlier if freq_table was there and
cpufreq_frequency_table_verify() failed, we used to return, but not
anymore.

And we don't return the error anymore for virtual driver.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ