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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0j8nebEAjC3L--Dz-2UkHUDAPxMTJ5P2zAh+=yVW4ASyg@mail.gmail.com>
Date:   Wed, 21 Jun 2023 19:44:12 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Tero Kristo <tero.kristo@...ux.intel.com>
Cc:     rafael@...nel.org, viresh.kumar@...aro.org,
        srinivas.pandruvada@...ux.intel.com, lenb@...nel.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Niklas Neronin <niklas.neronin@...el.com>
Subject: Re: [PATCH] cpufreq: intel_pstate: Fix energy_performance_preference
 for passive

On Wed, Jun 21, 2023 at 8:59 AM Tero Kristo <tero.kristo@...ux.intel.com> wrote:
>
> If the intel_pstate driver is set to passive mode, then writing the
> same value to the energy_performance_preference sysfs twice will fail.
> This is caused by the wrong return value used (index of the matched
> energy_perf_string), instead of the length of the passed in parameter.
> Fix by forcing the internal return value to zero when the same
> preference is passed in by user. This same issue is not present when
> active mode is used for the driver.
>
> Fixes: f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled")
> Reported-by: Niklas Neronin <niklas.neronin@...el.com>
> Signed-off-by: Tero Kristo <tero.kristo@...ux.intel.com>
> ---
>  drivers/cpufreq/intel_pstate.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 2548ec92faa2..f29182512b98 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -824,6 +824,8 @@ static ssize_t store_energy_performance_preference(
>                         err = cpufreq_start_governor(policy);
>                         if (!ret)
>                                 ret = err;
> +               } else {
> +                       ret = 0;
>                 }
>         }
>
> --

Applied as 6.5 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ