procfs: avoid 32-bit time_t in /proc/*/stat
authorArnd Bergmann <arnd@arndb.de>
Tue, 2 Aug 2016 21:03:22 +0000 (14:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 21:31:41 +0000 (17:31 -0400)
commit519ded5a89ec0e46e5b0867ba9f5752239b73898
tree59af01944e5b0abfe24e9b8cdf619f7875f7a08a
parentef419398b68925f21fd3d8463c7bf6934d2ec926
procfs: avoid 32-bit time_t in /proc/*/stat

/proc/stat shows (among lots of other things) the current boottime (i.e.
number of seconds since boot).  While a 32-bit number is sufficient for
this particular case, we want to get rid of the 'struct timespec'
suffers from a 32-bit overflow in 2038.

This changes the code to use a struct timespec64, which is known to be
safe in all cases.

Link: http://lkml.kernel.org/r/20160617201247.2292101-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/stat.c