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: <DM4PR12MB52786384C0BFEFF5E0A381079C789@DM4PR12MB5278.namprd12.prod.outlook.com>
Date:   Wed, 31 Aug 2022 08:53:29 +0000
From:   "Yuan, Perry" <Perry.Yuan@....com>
To:     Punit Agrawal <punit.agrawal@...edance.com>
CC:     "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
        "Huang, Ray" <Ray.Huang@....com>,
        "viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
        "Sharma, Deepak" <Deepak.Sharma@....com>,
        "Limonciello, Mario" <Mario.Limonciello@....com>,
        "Fontenot, Nathan" <Nathan.Fontenot@....com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Su, Jinzhou (Joe)" <Jinzhou.Su@....com>,
        "Huang, Shimmer" <Shimmer.Huang@....com>,
        "Du, Xiaojian" <Xiaojian.Du@....com>,
        "Meng, Li (Jassmine)" <Li.Meng@....com>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v5 4/7] cpufreq: amd_pstate: fix wrong lowest perf fetch

[AMD Official Use Only - General]

Hi Agrawal,

> -----Original Message-----
> From: Punit Agrawal <punit.agrawal@...edance.com>
> Sent: Monday, August 15, 2022 11:05 PM
> To: Yuan, Perry <Perry.Yuan@....com>
> Cc: rafael.j.wysocki@...el.com; Huang, Ray <Ray.Huang@....com>;
> viresh.kumar@...aro.org; Sharma, Deepak <Deepak.Sharma@....com>;
> Limonciello, Mario <Mario.Limonciello@....com>; Fontenot, Nathan
> <Nathan.Fontenot@....com>; Deucher, Alexander
> <Alexander.Deucher@....com>; Su, Jinzhou (Joe) <Jinzhou.Su@....com>;
> Huang, Shimmer <Shimmer.Huang@....com>; Du, Xiaojian
> <Xiaojian.Du@....com>; Meng, Li (Jassmine) <Li.Meng@....com>; linux-
> pm@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v5 4/7] cpufreq: amd_pstate: fix wrong lowest perf fetch
> 
> [CAUTION: External Email]
> 
> Hi Perry,
> 
> Perry Yuan <Perry.Yuan@....com> writes:
> 
> > Fix the wrong lowest perf value reading which is used for new des_perf
> > calculation by governor requested, the incorrect min_perf will get
> > incorrect des_perf to be set , that will cause the system frequency
> > changing unexpectedly.
> >
> > Reviewed-by: Huang Rui <ray.huang@....com>
> > Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
> > Signed-off-by: Perry Yuan <Perry.Yuan@....com>
> > Signed-off-by: Su Jinzhou <jinzhou.su@....com>
> > ---
> >  drivers/cpufreq/amd-pstate.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c
> > b/drivers/cpufreq/amd-pstate.c index 5cdef6638681..183cdd4ba00e 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -307,7 +307,7 @@ static int amd_pstate_target(struct cpufreq_policy
> *policy,
> >               return -ENODEV;
> >
> >       cap_perf = READ_ONCE(cpudata->highest_perf);
> > -     min_perf = READ_ONCE(cpudata->lowest_nonlinear_perf);
> > +     min_perf = READ_ONCE(cpudata->lowest_perf);
> >       max_perf = cap_perf;
> >
> >       freqs.old = policy->cur;
> 
> This looks to be a pretty big change (lowest nonlinear vs lowest). Does the patch
> need to be backported to older kernels?

The patch fixes the min perf initial value, the correct min perf is lowest_perf which is captured through MSR_AMD_CPPC_CAP1 register or the cppc_get_perf_caps().
Yes, the patch will need to be backported to other kernel branch as issue fix.
Sorry to response late.

Perry.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ