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]
Date:	Fri, 17 May 2013 11:39:08 -0700
From:	John Stultz <john.stultz@...aro.org>
To:	Zoran Markovic <zoran.markovic@...aro.org>
CC:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Feng Tang <feng.tang@...el.com>, stable@...r.kernel.org
Subject: Re: [RFC PATCH] timekeeping: Correct run-time detection of real-time
 clock.

On 05/17/2013 11:24 AM, Zoran Markovic wrote:
> Since commit <31ade30692dc9680bfc95700d794818fa3f754ac>, timekeeping_init()
> checks for presence of persistent clock by attempting to read a non-zero
> time value from real-time clock. This is an issue on platforms where
> persistent_clock (instead of a RTC) is implemented as a free-running counter
> starting from zero on each boot and running during suspend. Examples are some
> ARM platforms (e.g. PandaBoard). An attempt to read such a clock during
> timekeeping_init() may return zero value and falsely declare persistent clock
> as missing. Additionally, in the above case suspend times may be accounted
> twice (once from timekeeping_resume() and once from rtc_resume()), resulting
> in a gradual drift of system time.
>
> This patch does a run-time correction of the issue by doing the same check
> during timekeeping_suspend().
>
> A better long-term solution would have to return error when trying to read
> non-existing clock and zero when trying to read an uninitialized clock, but
> that would require changing all persistent_clock implementations.
>
> This patch addresses the immediate breakage, for now.
>
> Cc: John Stultz <john.stultz@...aro.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Feng Tang <feng.tang@...el.com>
> Cc: stable@...r.kernel.org
> Signed-off-by: Zoran Markovic <zoran.markovic@...aro.org>

Thanks for finding and sending this out!  I'll queue this for 3.10.

thanks again
-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