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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 26 Apr 2024 12:34:47 +0200
From: Borislav Petkov <bp@...en8.de>
To: Perry Yuan <perry.yuan@....com>
Cc: rafael.j.wysocki@...el.com, Mario.Limonciello@....com,
	viresh.kumar@...aro.org, Ray.Huang@....com, gautham.shenoy@....com,
	Alexander.Deucher@....com, Xinmei.Huang@....com,
	Xiaojian.Du@....com, Li.Meng@....com, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 2/6] cpufreq: amd-pstate: initialize new core
 precision boost state

On Fri, Apr 26, 2024 at 02:34:45PM +0800, Perry Yuan wrote:
> @@ -665,18 +667,31 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
>  	return 0;
>  }
>  
> -static void amd_pstate_boost_init(struct amd_cpudata *cpudata)
> +static int amd_pstate_boost_init(struct amd_cpudata *cpudata)
>  {
> -	u32 highest_perf, nominal_perf;
> +	u64 boost_val;
> +	int ret;
>  
> -	highest_perf = READ_ONCE(cpudata->highest_perf);
> -	nominal_perf = READ_ONCE(cpudata->nominal_perf);
> +	if (!boot_cpu_has(X86_FEATURE_CPB)) {

Repeat after me:

Everytime I need to test a X86_FEATURE flag, I will use cpu_feature_enabled()!
Everytime I need to test a X86_FEATURE flag, I will use cpu_feature_enabled()!
Everytime I need to test a X86_FEATURE flag, I will use cpu_feature_enabled()!
Everytime I need to test a X86_FEATURE flag, I ...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ