Skip to content

Commit 4fe581d

Browse files
committed
Merge tag 'y2038-ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground into timers/2038
Pull 'y2038: IPC system call conversion' from Arnd Bergmann: "This is a follow-up to Deepa's work on the timekeeping system calls, providing a y2038-safe syscall API for SYSVIPC. It uses a combination of two strategies: For sys_msgctl, sys_semctl and sys_shmctl, I do not introduce a completely new set of replacement system calls, but instead extend the existing ones to return data in the reserved fields of the normal data structure. This should be completely transparent to any existing user space, and only after the 32-bit time_t wraps, it will make a difference in the returned data. libc implementations will consequently have to provide their own data structures when they move to 64-bit time_t, and convert the structures in user space from the ones returned by the kernel. In contrast, mq_timedsend, mq_timedreceive and and semtimedop all do need to change because having a libc redefine the timespec type breaks the ABI, so with this series there will be two separate entry points for 32-bit architectures. There are three cases here: - little-endian architectures (except powerpc and mips) can use the normal layout and just cast the data structure to the user space type that contains 64-bit numbers. - parisc and sparc can do the same thing with big-endian user space - little-endian powerpc and most big-endian architectures have to flip the upper and lower 32-bit halves of the time_t value in memory, but can otherwise keep using the normal layout - mips and big-endian xtensa need to be more careful because they are not consistent in their definitions, and they have to provide custom libc implementations for the system calls to use 64-bit time_t."
2 parents 1cfd904 + 5dc0b15 commit 4fe581d

File tree

47 files changed

+471
-700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+471
-700
lines changed

arch/alpha/include/uapi/asm/Kbuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
include include/uapi/asm-generic/Kbuild.asm
33

44
generic-y += bpf_perf_event.h
5+
generic-y += ipcbuf.h
6+
generic-y += msgbuf.h
57
generic-y += poll.h
8+
generic-y += sembuf.h
9+
generic-y += shmbuf.h

arch/alpha/include/uapi/asm/ipcbuf.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

arch/alpha/include/uapi/asm/msgbuf.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

arch/alpha/include/uapi/asm/sembuf.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

arch/alpha/include/uapi/asm/shmbuf.h

Lines changed: 0 additions & 39 deletions
This file was deleted.

arch/arm64/include/asm/compat.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -181,23 +181,23 @@ struct compat_ipc64_perm {
181181

182182
struct compat_semid64_ds {
183183
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;
188188
compat_ulong_t sem_nsems;
189189
compat_ulong_t __unused3;
190190
compat_ulong_t __unused4;
191191
};
192192

193193
struct compat_msqid64_ds {
194194
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;
201201
compat_ulong_t msg_cbytes;
202202
compat_ulong_t msg_qnum;
203203
compat_ulong_t msg_qbytes;
@@ -210,12 +210,12 @@ struct compat_msqid64_ds {
210210
struct compat_shmid64_ds {
211211
struct compat_ipc64_perm shm_perm;
212212
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;
219219
compat_pid_t shm_cpid;
220220
compat_pid_t shm_lpid;
221221
compat_ulong_t shm_nattch;

arch/ia64/include/uapi/asm/Kbuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
include include/uapi/asm-generic/Kbuild.asm
33

44
generic-y += bpf_perf_event.h
5+
generic-y += ipcbuf.h
56
generic-y += kvm_para.h
7+
generic-y += msgbuf.h
68
generic-y += poll.h
9+
generic-y += sembuf.h
10+
generic-y += shmbuf.h

arch/ia64/include/uapi/asm/ipcbuf.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

arch/ia64/include/uapi/asm/msgbuf.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

arch/ia64/include/uapi/asm/sembuf.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)