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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAODwPW_5WaLpqUeuJ0QhW=itgVq7iN_H3QH9_WzrVfsK+L-Rbg@mail.gmail.com>
Date:	Thu, 10 Dec 2015 10:57:24 -0800
From:	Julius Werner <jwerner@...omium.org>
To:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc:	Julius Werner <jwerner@...omium.org>,
	Doug Anderson <dianders@...omium.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Sonny Rao <sonnyrao@...omium.org>,
	Chris Zhong <zyw@...k-chips.com>,
	Heiko Stuebner <heiko@...ech.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	rtc-linux@...glegroups.com
Subject: Re: [PATCH v2] RTC: RK808: Work around hardware bug on November 31st

> I'll try to review and evaluate both solution by the end of the week (no
> guarantee though).

To summarize, it's a pretty simple trade-off. Do you:

a) try to detect every time the RTC deviated from the real-world time
and correct it instantly? This can be done most of the time but there
are edge cases (when the system is completely powered off while the
RTC ticks over Nov 31st) where you cannot detect it. Or,

b) just completely let the RTC tick in its own world where every year
has an extra day and convert that "calendar" to/from the real-world
calendar on every access. This essentially relegates the RTC to a
"dumb second counter" and the timestamp in its registers doesn't have
any direct connection to the real world time anymore (unless you know
the conversion algorithm). This has the nice advantage that it
perfectly solves all use cases (time-keeping, accurate alarms, even
when shut down or browning out at inopportune times)... the only real
disadvantage is that other software (e.g. U-Boot) reading the same RTC
must know about this and use the same conversion code to get the
correct real-world time from it.
--
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