Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

y2038: arm64: Extend sysvipc compat data structures

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>

+16 -16
+16 -16
arch/arm64/include/asm/compat.h
··· 181 181 182 182 struct compat_semid64_ds { 183 183 struct compat_ipc64_perm sem_perm; 184 - compat_time_t sem_otime; 185 - compat_ulong_t __unused1; 186 - compat_time_t sem_ctime; 187 - compat_ulong_t __unused2; 184 + compat_ulong_t sem_otime; 185 + compat_ulong_t sem_otime_high; 186 + compat_ulong_t sem_ctime; 187 + compat_ulong_t sem_ctime_high; 188 188 compat_ulong_t sem_nsems; 189 189 compat_ulong_t __unused3; 190 190 compat_ulong_t __unused4; ··· 192 192 193 193 struct compat_msqid64_ds { 194 194 struct compat_ipc64_perm msg_perm; 195 - compat_time_t msg_stime; 196 - compat_ulong_t __unused1; 197 - compat_time_t msg_rtime; 198 - compat_ulong_t __unused2; 199 - compat_time_t msg_ctime; 200 - compat_ulong_t __unused3; 195 + compat_ulong_t msg_stime; 196 + compat_ulong_t msg_stime_high; 197 + compat_ulong_t msg_rtime; 198 + compat_ulong_t msg_rtime_high; 199 + compat_ulong_t msg_ctime; 200 + compat_ulong_t msg_ctime_high; 201 201 compat_ulong_t msg_cbytes; 202 202 compat_ulong_t msg_qnum; 203 203 compat_ulong_t msg_qbytes; ··· 210 210 struct compat_shmid64_ds { 211 211 struct compat_ipc64_perm shm_perm; 212 212 compat_size_t shm_segsz; 213 - compat_time_t shm_atime; 214 - compat_ulong_t __unused1; 215 - compat_time_t shm_dtime; 216 - compat_ulong_t __unused2; 217 - compat_time_t shm_ctime; 218 - compat_ulong_t __unused3; 213 + compat_ulong_t shm_atime; 214 + compat_ulong_t shm_atime_high; 215 + compat_ulong_t shm_dtime; 216 + compat_ulong_t shm_dtime_high; 217 + compat_ulong_t shm_ctime; 218 + compat_ulong_t shm_ctime_high; 219 219 compat_pid_t shm_cpid; 220 220 compat_pid_t shm_lpid; 221 221 compat_ulong_t shm_nattch;