]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
y2038: arm64: Extend sysvipc compat data structures
authorArnd Bergmann <arnd@arndb.de>
Thu, 12 Apr 2018 10:34:16 +0000 (12:34 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 20 Apr 2018 14:20:01 +0000 (16:20 +0200)
Both 32-bit amd 64-bit ARM use the asm-generic header files for their
sysvipc data structures, so no special care is needed to make those
work beyond y2038, with the one exception of compat mode: Since there
is no asm-generic definition of the compat mode IPC structures, ARM64
provides its own copy, and we make those match the changes in the native
asm-generic header files.

There is sufficient padding in these data structures to extend all
timestamps to 64 bit, but on big-endian ARM kernels, the padding
is in the wrong place, so the C library has to ensure it reassembles
a 64-bit time_t correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm64/include/asm/compat.h

index 0030f79808b32c7a722dc4ca74ea577604fbf631..1a037b94eba10d481866063bfcc8c5f59adf2e35 100644 (file)
@@ -181,10 +181,10 @@ struct compat_ipc64_perm {
 
 struct compat_semid64_ds {
        struct compat_ipc64_perm sem_perm;
-       compat_time_t  sem_otime;
-       compat_ulong_t __unused1;
-       compat_time_t  sem_ctime;
-       compat_ulong_t __unused2;
+       compat_ulong_t sem_otime;
+       compat_ulong_t sem_otime_high;
+       compat_ulong_t sem_ctime;
+       compat_ulong_t sem_ctime_high;
        compat_ulong_t sem_nsems;
        compat_ulong_t __unused3;
        compat_ulong_t __unused4;
@@ -192,12 +192,12 @@ struct compat_semid64_ds {
 
 struct compat_msqid64_ds {
        struct compat_ipc64_perm msg_perm;
-       compat_time_t  msg_stime;
-       compat_ulong_t __unused1;
-       compat_time_t  msg_rtime;
-       compat_ulong_t __unused2;
-       compat_time_t  msg_ctime;
-       compat_ulong_t __unused3;
+       compat_ulong_t msg_stime;
+       compat_ulong_t msg_stime_high;
+       compat_ulong_t msg_rtime;
+       compat_ulong_t msg_rtime_high;
+       compat_ulong_t msg_ctime;
+       compat_ulong_t msg_ctime_high;
        compat_ulong_t msg_cbytes;
        compat_ulong_t msg_qnum;
        compat_ulong_t msg_qbytes;
@@ -210,12 +210,12 @@ struct compat_msqid64_ds {
 struct compat_shmid64_ds {
        struct compat_ipc64_perm shm_perm;
        compat_size_t  shm_segsz;
-       compat_time_t  shm_atime;
-       compat_ulong_t __unused1;
-       compat_time_t  shm_dtime;
-       compat_ulong_t __unused2;
-       compat_time_t  shm_ctime;
-       compat_ulong_t __unused3;
+       compat_ulong_t shm_atime;
+       compat_ulong_t shm_atime_high;
+       compat_ulong_t shm_dtime;
+       compat_ulong_t shm_dtime_high;
+       compat_ulong_t shm_ctime;
+       compat_ulong_t shm_ctime_high;
        compat_pid_t   shm_cpid;
        compat_pid_t   shm_lpid;
        compat_ulong_t shm_nattch;