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

y2038: s390: Remove unneeded ipc uapi header files

The s390 msgbuf/sembuf/shmbuf header files are all identical to the
version from asm-generic.

This patch removes the files and replaces them with 'generic-y'
statements, to avoid having to modify each copy when we extend sysvipc
to deal with 64-bit time_t in 32-bit user space.

Note that unlike alpha and ia64, the ipcbuf.h header file is slightly
different here, so I'm leaving the private copy.

To deal with 32-bit compat tasks, we also have to adapt the definitions
of compat_{shm,sem,msg}id_ds to match the changes to the respective
asm-generic files.

Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+19 -133
+16 -16
arch/s390/include/asm/compat.h
··· 232 232 233 233 struct compat_semid64_ds { 234 234 struct compat_ipc64_perm sem_perm; 235 - compat_time_t sem_otime; 236 - compat_ulong_t __pad1; 237 - compat_time_t sem_ctime; 238 - compat_ulong_t __pad2; 235 + compat_ulong_t sem_otime; 236 + compat_ulong_t sem_otime_high; 237 + compat_ulong_t sem_ctime; 238 + compat_ulong_t sem_ctime_high; 239 239 compat_ulong_t sem_nsems; 240 240 compat_ulong_t __unused1; 241 241 compat_ulong_t __unused2; ··· 243 243 244 244 struct compat_msqid64_ds { 245 245 struct compat_ipc64_perm msg_perm; 246 - compat_time_t msg_stime; 247 - compat_ulong_t __pad1; 248 - compat_time_t msg_rtime; 249 - compat_ulong_t __pad2; 250 - compat_time_t msg_ctime; 251 - compat_ulong_t __pad3; 246 + compat_ulong_t msg_stime; 247 + compat_ulong_t msg_stime_high; 248 + compat_ulong_t msg_rtime; 249 + compat_ulong_t msg_rtime_high; 250 + compat_ulong_t msg_ctime; 251 + compat_ulong_t msg_ctime_high; 252 252 compat_ulong_t msg_cbytes; 253 253 compat_ulong_t msg_qnum; 254 254 compat_ulong_t msg_qbytes; ··· 261 261 struct compat_shmid64_ds { 262 262 struct compat_ipc64_perm shm_perm; 263 263 compat_size_t shm_segsz; 264 - compat_time_t shm_atime; 265 - compat_ulong_t __pad1; 266 - compat_time_t shm_dtime; 267 - compat_ulong_t __pad2; 268 - compat_time_t shm_ctime; 269 - compat_ulong_t __pad3; 264 + compat_ulong_t shm_atime; 265 + compat_ulong_t shm_atime_high; 266 + compat_ulong_t shm_dtime; 267 + compat_ulong_t shm_dtime_high; 268 + compat_ulong_t shm_ctime; 269 + compat_ulong_t shm_ctime_high; 270 270 compat_pid_t shm_cpid; 271 271 compat_pid_t shm_lpid; 272 272 compat_ulong_t shm_nattch;
+3
arch/s390/include/uapi/asm/Kbuild
··· 9 9 generic-y += fcntl.h 10 10 generic-y += ioctl.h 11 11 generic-y += mman.h 12 + generic-y += msgbuf.h 12 13 generic-y += param.h 13 14 generic-y += poll.h 14 15 generic-y += resource.h 16 + generic-y += sembuf.h 17 + generic-y += shmbuf.h 15 18 generic-y += sockios.h 16 19 generic-y += swab.h 17 20 generic-y += termbits.h
-38
arch/s390/include/uapi/asm/msgbuf.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef _S390_MSGBUF_H 3 - #define _S390_MSGBUF_H 4 - 5 - /* 6 - * The msqid64_ds structure for S/390 architecture. 7 - * Note extra padding because this structure is passed back and forth 8 - * between kernel and user space. 9 - * 10 - * Pad space is left for: 11 - * - 64-bit time_t to solve y2038 problem 12 - * - 2 miscellaneous 32-bit values 13 - */ 14 - 15 - struct msqid64_ds { 16 - struct ipc64_perm msg_perm; 17 - __kernel_time_t msg_stime; /* last msgsnd time */ 18 - #ifndef __s390x__ 19 - unsigned long __unused1; 20 - #endif /* ! __s390x__ */ 21 - __kernel_time_t msg_rtime; /* last msgrcv time */ 22 - #ifndef __s390x__ 23 - unsigned long __unused2; 24 - #endif /* ! __s390x__ */ 25 - __kernel_time_t msg_ctime; /* last change time */ 26 - #ifndef __s390x__ 27 - unsigned long __unused3; 28 - #endif /* ! __s390x__ */ 29 - unsigned long msg_cbytes; /* current number of bytes on queue */ 30 - unsigned long msg_qnum; /* number of messages in queue */ 31 - unsigned long msg_qbytes; /* max number of bytes on queue */ 32 - __kernel_pid_t msg_lspid; /* pid of last msgsnd */ 33 - __kernel_pid_t msg_lrpid; /* last receive pid */ 34 - unsigned long __unused4; 35 - unsigned long __unused5; 36 - }; 37 - 38 - #endif /* _S390_MSGBUF_H */
-30
arch/s390/include/uapi/asm/sembuf.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef _S390_SEMBUF_H 3 - #define _S390_SEMBUF_H 4 - 5 - /* 6 - * The semid64_ds structure for S/390 architecture. 7 - * Note extra padding because this structure is passed back and forth 8 - * between kernel and user space. 9 - * 10 - * Pad space is left for: 11 - * - 64-bit time_t to solve y2038 problem (for !__s390x__) 12 - * - 2 miscellaneous 32-bit values 13 - */ 14 - 15 - struct semid64_ds { 16 - struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ 17 - __kernel_time_t sem_otime; /* last semop time */ 18 - #ifndef __s390x__ 19 - unsigned long __unused1; 20 - #endif /* ! __s390x__ */ 21 - __kernel_time_t sem_ctime; /* last change time */ 22 - #ifndef __s390x__ 23 - unsigned long __unused2; 24 - #endif /* ! __s390x__ */ 25 - unsigned long sem_nsems; /* no. of semaphores in array */ 26 - unsigned long __unused3; 27 - unsigned long __unused4; 28 - }; 29 - 30 - #endif /* _S390_SEMBUF_H */
-49
arch/s390/include/uapi/asm/shmbuf.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef _S390_SHMBUF_H 3 - #define _S390_SHMBUF_H 4 - 5 - /* 6 - * The shmid64_ds structure for S/390 architecture. 7 - * Note extra padding because this structure is passed back and forth 8 - * between kernel and user space. 9 - * 10 - * Pad space is left for: 11 - * - 64-bit time_t to solve y2038 problem (for !__s390x__) 12 - * - 2 miscellaneous 32-bit values 13 - */ 14 - 15 - struct shmid64_ds { 16 - struct ipc64_perm shm_perm; /* operation perms */ 17 - size_t shm_segsz; /* size of segment (bytes) */ 18 - __kernel_time_t shm_atime; /* last attach time */ 19 - #ifndef __s390x__ 20 - unsigned long __unused1; 21 - #endif /* ! __s390x__ */ 22 - __kernel_time_t shm_dtime; /* last detach time */ 23 - #ifndef __s390x__ 24 - unsigned long __unused2; 25 - #endif /* ! __s390x__ */ 26 - __kernel_time_t shm_ctime; /* last change time */ 27 - #ifndef __s390x__ 28 - unsigned long __unused3; 29 - #endif /* ! __s390x__ */ 30 - __kernel_pid_t shm_cpid; /* pid of creator */ 31 - __kernel_pid_t shm_lpid; /* pid of last operator */ 32 - unsigned long shm_nattch; /* no. of current attaches */ 33 - unsigned long __unused4; 34 - unsigned long __unused5; 35 - }; 36 - 37 - struct shminfo64 { 38 - unsigned long shmmax; 39 - unsigned long shmmin; 40 - unsigned long shmmni; 41 - unsigned long shmseg; 42 - unsigned long shmall; 43 - unsigned long __unused1; 44 - unsigned long __unused2; 45 - unsigned long __unused3; 46 - unsigned long __unused4; 47 - }; 48 - 49 - #endif /* _S390_SHMBUF_H */