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: <51631FA8.10905@linaro.org>
Date:	Mon, 08 Apr 2013 12:51:04 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Prarit Bhargava <prarit@...hat.com>
CC:	Rik van Riel <riel@...hat.com>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] hrtimer, add expiry time overflow check in hrtimer_interrupt

On 04/08/2013 07:53 AM, Rik van Riel wrote:
> On 04/08/2013 08:47 AM, Prarit Bhargava wrote:
>
>> When we change the system time to a low value like this, the value of
>> timekeeper->offs_real will be a negative value.
>>
>> It seems that the WARN occurs because an hrtimer has been started in 
>> the time
>> between the releasing of the timekeeper lock and the IPI call (via a 
>> call to
>> on_each_cpu) in clock_was_set() in the do_settimeofday() code. The 
>> end result
>> is that a REALTIME_CLOCK timer has been added with softexpires = 
>> expires =
>> KTIME_MAX.  The hrtimer_interrupt() fires/is called and the loop at
>> kernel/hrtimer.c:1289 is executed.  In this loop the code subtracts the
>> clock base's offset (which was set to timekeeper->offs_real in
>> do_settimeofday()) from the current hrtimer_cpu_base->expiry value 
>> (which
>> was KTIME_MAX):
>>
>>     KTIME_MAX - (a negative value) = overflow
>>
>> A simple check for an overflow can resolve this problem.  Using 
>> KTIME_MAX
>> instead of the overflow value will result in the hrtimer function 
>> being run,
>> and the reprogramming of the timer after that.
> >
>> Signed-off-by: Prarit Bhargava <prarit@...hat.com>
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: John Stultz <john.stultz@...aro.org>
>
> Reviewed-by: Rik van Riel <riel@...hat.com>
>

Queued in my fortglx/3.10/time branch.

thanks
-john


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ