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: <2821853.MfSkROXiEm@kreacher>
Date:   Fri, 10 Jan 2020 12:13:28 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Ikjoon Jang <ikjn@...omium.org>
Cc:     linux-pm@...r.kernel.org,
        "RafaelJ . Wysocki" <rafael.j.wysocki@...el.com>,
        DanielLezcano <daniel.lezcano@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] BUG-REPORT: cpuidle: teo: intervals[] array index out

On Friday, January 10, 2020 2:59:17 AM CET Ikjoon Jang wrote:
> This seems to be a simple bug in rotating array index.

That's correct.

Please repost the patch with a Signed-off-by tag, so I can apply it.

> ---
>  drivers/cpuidle/governors/teo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
> index de7e706efd46..6deaaf5f05b5 100644
> --- a/drivers/cpuidle/governors/teo.c
> +++ b/drivers/cpuidle/governors/teo.c
> @@ -198,7 +198,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
>  	 * pattern detection.
>  	 */
>  	cpu_data->intervals[cpu_data->interval_idx++] = measured_ns;
> -	if (cpu_data->interval_idx > INTERVALS)
> +	if (cpu_data->interval_idx >= INTERVALS)
>  		cpu_data->interval_idx = 0;
>  }
>  
> 




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ