History

Merge tag 'y2038-drivers-for-v5.6-signed' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground

Pull y2038 updates from Arnd Bergmann: "Core, driver and file system changes These are updates to device drivers and file systems that for some reason or another were not included in the kernel in the previous y2038 series. I've gone through all users of time_t again to make sure the kernel is in a long-term maintainable state, replacing all remaining references to time_t with safe alternatives. Some related parts of the series were picked up into the nfsd, xfs, alsa and v4l2 trees. A final set of patches in linux-mm removes the now unused time_t/timeval/timespec types and helper functions after all five branches are merged for linux-5.6, ensuring that no new users get merged. As a result, linux-5.6, or my backport of the patches to 5.4 [1], should be the first release that can serve as a base for a 32-bit system designed to run beyond year 2038, with a few remaining caveats: - All user space must be compiled with a 64-bit time_t, which will be supported in the coming musl-1.2 and glibc-2.32 releases, along with installed kernel headers from linux-5.6 or higher. - Applications that use the system call interfaces directly need to be ported to use the time64 syscalls added in linux-5.1 in place of the existing system calls. This impacts most users of futex() and seccomp() as well as programming languages that have their own runtime environment not based on libc. - Applications that use a private copy of kernel uapi header files or their contents may need to update to the linux-5.6 version, in particular for sound/asound.h, xfs/xfs_fs.h, linux/input.h, linux/elfcore.h, linux/sockios.h, linux/timex.h and linux/can/bcm.h. - A few remaining interfaces cannot be changed to pass a 64-bit time_t in a compatible way, so they must be configured to use CLOCK_MONOTONIC times or (with a y2106 problem) unsigned 32-bit timestamps. Most importantly this impacts all users of 'struct input_event'. - All y2038 problems that are present on 64-bit machines also apply to 32-bit machines. In particular this affects file systems with on-disk timestamps using signed 32-bit seconds: ext4 with ext3-style small inodes, ext2, xfs (to be fixed soon) and ufs" [1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=y2038-endgame * tag 'y2038-drivers-for-v5.6-signed' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: (21 commits) Revert "drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC" y2038: sh: remove timeval/timespec usage from headers y2038: sparc: remove use of struct timex y2038: rename itimerval to __kernel_old_itimerval y2038: remove obsolete jiffies conversion functions nfs: fscache: use timespec64 in inode auxdata nfs: fix timstamp debug prints nfs: use time64_t internally sunrpc: convert to time64_t for expiry drm/etnaviv: avoid deprecated timespec drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC drm/msm: avoid using 'timespec' hfs/hfsplus: use 64-bit inode timestamps hostfs: pass 64-bit timestamps to/from user space packet: clarify timestamp overflow tsacct: add 64-bit btime field acct: stop using get_seconds() um: ubd: use 64-bit time_t where possible xtensa: ISS: avoid struct timeval dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD ...

Linus Torvalds committed 6 years ago

Commit 22b17db2 parents a4fe2b4 c4e712149 files · +283 −266Browse files

Showing the changes to include/uapi/linux (4 of 49 files). Show all

Unified · Split

4 files
  1. include/uapi/linux/acct.h +2 −0
  2. include/uapi/linux/taskstats.h +5 −1
  3. include/uapi/linux/time_types.h +5 −0
  4. include/uapi/linux/timex.h +2 −0
include/uapi/linux/acct.h+2−0
@@ -49,6 +49,7 @@ struct acct · 48 unmodified lines
49 __u16 ac_uid16; /* LSB of Real User ID */49 __u16 ac_uid16; /* LSB of Real User ID */
50 __u16 ac_gid16; /* LSB of Real Group ID */50 __u16 ac_gid16; /* LSB of Real Group ID */
51 __u16 ac_tty; /* Control Terminal */51 __u16 ac_tty; /* Control Terminal */
52 /* __u32 range means times from 1970 to 2106 */
52 __u32 ac_btime; /* Process Creation Time */53 __u32 ac_btime; /* Process Creation Time */
53 comp_t ac_utime; /* User Time */54 comp_t ac_utime; /* User Time */
54 comp_t ac_stime; /* System Time */55 comp_t ac_stime; /* System Time */
@@ -81,6 +82,7 @@ struct acct_v3 · 26 unmodified lines
81 __u32 ac_gid; /* Real Group ID */82 __u32 ac_gid; /* Real Group ID */
82 __u32 ac_pid; /* Process ID */83 __u32 ac_pid; /* Process ID */
83 __u32 ac_ppid; /* Parent Process ID */84 __u32 ac_ppid; /* Parent Process ID */
85 /* __u32 range means times from 1970 to 2106 */
84 __u32 ac_btime; /* Process Creation Time */86 __u32 ac_btime; /* Process Creation Time */
85#ifdef __KERNEL__87#ifdef __KERNEL__
86 __u32 ac_etime; /* Elapsed Time */88 __u32 ac_etime; /* Elapsed Time */
include/uapi/linux/taskstats.h+5−1
@@ -34,7 +34,7 @@ · 33 unmodified lines
34 */34 */
35 35
36 36
37#define TASKSTATS_VERSION 937#define TASKSTATS_VERSION 10
38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN38#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
39 * in linux/sched.h */39 * in linux/sched.h */
40 40
@@ -112,6 +112,7 @@ struct taskstats { · 71 unmodified lines
112 __u32 ac_gid; /* Group ID */112 __u32 ac_gid; /* Group ID */
113 __u32 ac_pid; /* Process ID */113 __u32 ac_pid; /* Process ID */
114 __u32 ac_ppid; /* Parent process ID */114 __u32 ac_ppid; /* Parent process ID */
115 /* __u32 range means times from 1970 to 2106 */
115 __u32 ac_btime; /* Begin time [sec since 1970] */116 __u32 ac_btime; /* Begin time [sec since 1970] */
116 __u64 ac_etime __attribute__((aligned(8)));117 __u64 ac_etime __attribute__((aligned(8)));
117 /* Elapsed time [usec] */118 /* Elapsed time [usec] */
@@ -168,6 +169,9 @@ struct taskstats { · 50 unmodified lines
168 /* Delay waiting for thrashing page */169 /* Delay waiting for thrashing page */
169 __u64 thrashing_count;170 __u64 thrashing_count;
170 __u64 thrashing_delay_total;171 __u64 thrashing_delay_total;
172
173 /* v10: 64-bit btime to avoid overflow */
174 __u64 ac_btime64; /* 64-bit begin time */
171};175};
172 176
173 177
include/uapi/linux/time_types.h+5−0
@@ -33,6 +33,11 @@ struct __kernel_old_timespec { · 32 unmodified lines
33 long tv_nsec; /* nanoseconds */33 long tv_nsec; /* nanoseconds */
34};34};
35 35
36struct __kernel_old_itimerval {
37 struct __kernel_old_timeval it_interval;/* timer interval */
38 struct __kernel_old_timeval it_value; /* current value */
39};
40
36struct __kernel_sock_timeval {41struct __kernel_sock_timeval {
37 __s64 tv_sec;42 __s64 tv_sec;
38 __s64 tv_usec;43 __s64 tv_usec;
include/uapi/linux/timex.h+2−0
@@ -57,6 +57,7 @@ · 56 unmodified lines
57 57
58#define NTP_API 4 /* NTP API version */58#define NTP_API 4 /* NTP API version */
59 59
60#ifndef __KERNEL__
60/*61/*
61 * syscall interface - used (mainly by NTP daemon)62 * syscall interface - used (mainly by NTP daemon)
62 * to discipline kernel clock oscillator63 * to discipline kernel clock oscillator
@@ -91,6 +92,7 @@ struct timex { · 28 unmodified lines
91 int :32; int :32; int :32; int :32;92 int :32; int :32; int :32; int :32;
92 int :32; int :32; int :32;93 int :32; int :32; int :32;
93};94};
95#endif
94 96
95struct __kernel_timex_timeval {97struct __kernel_timex_timeval {
96 __kernel_time64_t tv_sec;98 __kernel_time64_t tv_sec;