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: <YmlW+pW41WBf0vu8@amd.com>
Date:   Wed, 27 Apr 2022 22:45:14 +0800
From:   Huang Rui <ray.huang@....com>
To:     "Limonciello, Mario" <Mario.Limonciello@....com>
Cc:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        "open list:AMD PSTATE DRIVER" <linux-pm@...r.kernel.org>,
        "Yuan, Perry" <Perry.Yuan@....com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 3/6] cpufreq: amd-pstate: Move cpufreq driver check
 later

On Fri, Apr 15, 2022 at 12:47:58AM +0800, Limonciello, Mario wrote:
> The cpufreq driver check occurs before we verify if the CPU is supported.
> 
> Depending upon module load order, this may mean that users are never
> notified they can enable the shared memory solution.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>

Acked-by: Huang Rui <ray.huang@....com>

> ---
> v2->v3:
>  * New patch
> 
>  drivers/cpufreq/amd-pstate.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index ecd1fd5e5b5a..d323f3e3888c 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -653,10 +653,6 @@ static int __init amd_pstate_init(void)
>  		return -ENODEV;
>  	}
>  
> -	/* don't keep reloading if cpufreq_driver exists */
> -	if (cpufreq_get_current_driver())
> -		return -EEXIST;
> -
>  	/* capability check */
>  	if (boot_cpu_has(X86_FEATURE_CPPC)) {
>  		pr_debug("AMD CPPC MSR based functionality is supported\n");
> @@ -670,6 +666,10 @@ static int __init amd_pstate_init(void)
>  		return -ENODEV;
>  	}
>  
> +	/* don't keep reloading if cpufreq_driver exists */
> +	if (cpufreq_get_current_driver())
> +		return -EEXIST;
> +
>  	/* enable amd pstate feature */
>  	ret = amd_pstate_enable(true);
>  	if (ret) {
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ