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  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]
Date:   Thu, 26 Oct 2017 14:57:41 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Neeraj Upadhyay <neeraju@...eaurora.org>
cc:     sramana@...eaurora.org, sboyd@...eaurora.org,
        LKML <linux-kernel@...r.kernel.org>,
        John Stultz <john.stultz@...aro.org>
Subject: Re: Query regarding __hrtimer_get_next_event()

On Thu, 26 Oct 2017, Neeraj Upadhyay wrote:
> We have one query regarding the __hrtimer_get_next_event().
> The expires_next.tv64 is set to 0 if it is < 0. We observed
> an hrtimer interrupt storm for one of the hrtimers with
> below properties:
> 
> * Expires for the hrtimer was set to KTIME_MAX.
> * cpu base was HRTIMER_BASE_REALTIME with negative base->offset.
> * Due to below sub, expires overflowed to a negative value and
>   expires_next.tv64 was set to 0
>     expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
> * Due to this, clockevent was programmed to min_delta_ns, everytime
>   as __hrtimer_get_next_event() returned 0.
> 
> 
> This may not be a valid use case (queuing a hrtimer with KTIME_MAX)
> expires, but should we guard the hrtimer next event code against
> this by using KTIME_MAX upper bound. Is something like below a
> proper way to guard it? Or am I missing something here?

Can you please explain how you managed to have a negative base->offset?

Thanks,

	tglx

Powered by blists - more mailing lists