linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/5] y2038 in-kernel interface changes for drivers/rtc
@ 2014-11-18 11:15 pang.xunlei
  2014-11-18 11:15 ` [RFC PATCH v3 1/5] time: Provide y2038 safe do_settimeofday() replacement pang.xunlei
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: pang.xunlei @ 2014-11-18 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: rtc-linux, Thomas Gleixner, Alessandro Zummo, John Stultz,
	Arnd Bergmann, pang.xunlei

On 32bit systems, the kernel uses a 32bit signed time_t value
for seconds since 1970-01-01:00:00:00. This will overflow at
2038-01-19 03:14:08, and is widely known as the y2038 problem.

To address this, the plan is to create 64bit internal interfaces
which are 2038 safe, mark the unsafe versions as deprecated and 
then convert subsystems one by one over to the new interfaces.
Once all users are converted, the deprecated internal functions
will be removed.

NOTE: In some cases, there are issues with 32bit values that are
unsigned, and thus become y2106 issues. Since its somewhat simpler
to unify the time types, we'll try to convert those usage to 64bit
where it can be easily done. In those cases where a fix would be 
overly complicated, we'll simply explicitly mark the limitation.

This patchset introduces the 64bit interfaces needed to convert
the drivers/rtc subsystem, and to keep it relatively short some
patches to demonstrate how the conversion will be done. If the 
feedback is positive on this series, we'll provide the full 
conversion series as well.

pang.xunlei (5):
  time: Provide y2038 safe do_settimeofday() replacement
  time: Provide y2038 safe timekeeping_inject_sleeptime() replacement
  time: Provide y2038 safe mktime() replacement
  rtc/lib: Provide y2038 safe rtc_tm_to_time()/rtc_time_to_tm()
    replacement
  rtc/mc13xxx: Eliminate time problems

 drivers/rtc/rtc-lib.c       |   38 ++++++++++++++++++++------------------
 drivers/rtc/rtc-mc13xxx.c   |   25 +++++++++++--------------
 include/linux/rtc.h         |   21 +++++++++++++++++++--
 include/linux/time.h        |   17 ++++++++++++++---
 include/linux/timekeeping.h |   34 ++++++++++++++++++++++++++++++++--
 kernel/time/time.c          |   20 ++++++++------------
 kernel/time/timekeeping.c   |   29 +++++++++++++----------------
 7 files changed, 117 insertions(+), 67 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-11-19 23:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-18 11:15 [RFC PATCH v3 0/5] y2038 in-kernel interface changes for drivers/rtc pang.xunlei
2014-11-18 11:15 ` [RFC PATCH v3 1/5] time: Provide y2038 safe do_settimeofday() replacement pang.xunlei
2014-11-18 11:15 ` [RFC PATCH v3 2/5] time: Provide y2038 safe timekeeping_inject_sleeptime() replacement pang.xunlei
2014-11-18 12:05   ` Thomas Gleixner
2014-11-18 11:15 ` [RFC PATCH v3 3/5] time: Provide y2038 safe mktime() replacement pang.xunlei
2014-11-18 11:15 ` [RFC PATCH v3 4/5] rtc/lib: Provide y2038 safe rtc_tm_to_time()/rtc_time_to_tm() replacement pang.xunlei
2014-11-18 11:15 ` [RFC PATCH v3 5/5] rtc/mc13xxx: Eliminate time problems pang.xunlei
2014-11-18 14:13 ` [RFC PATCH v3 0/5] y2038 in-kernel interface changes for drivers/rtc Thomas Gleixner
2014-11-19 13:41   ` pang.xunlei
2014-11-19 23:53 ` John Stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).