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: <5f43e80a-7f04-65c0-9c24-02c8330d691a@infradead.org>
Date:   Wed, 20 Jan 2021 14:11:38 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     "Zhou Ti (x2019cwm)" <x2019cwm@...x.ca>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fix the issue that the tick_nohz_get_sleep_length()
 function could return a negative value

On 1/20/21 10:58 AM, Zhou Ti (x2019cwm) wrote:
> Fix the issue that the tick_nohz_get_sleep_length() function could return
> a negative value.
> 
> The variable "next_event" has a small possibility to be smaller than the
> variable "now" during running. Since both the menu idle governor and the
> teo idle governor use u64 to store the return value of the function, this
> may result in an extremely large and invalid value.
> 
> One can easily detect the existence of this issue by using printk to
> output a warning.
> 
> Signed-off-by: Ti Zhou <x2019cwm@...x.ca>
> ---
> --- tip/kernel/time/tick-sched.c.orig   2021-01-20 05:34:25.151325912 -0400
> +++ tip/kernel/time/tick-sched.c        2021-01-20 07:09:15.060980886 -0400
> @@ -1156,6 +1156,9 @@ ktime_t tick_nohz_get_sleep_length(ktime
>         next_event = min_t(u64, next_event,
>                            hrtimer_next_event_without(&ts->sched_timer));
> 
> +       if (unlikely(next_event < now))
> +               next_event = now;
> +
>         return ktime_sub(next_event, now);
>  }
> 

Hi,

You need to send this to some maintainer who can apply/merge it.
Just sending it to a mailing list is not sufficient.

thanks.
-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ