Re: [PATCH v2 13/29] arch: add split IPC system calls where needed
On Fri, Jan 18, 2019 at 05:18:19PM +0100, Arnd Bergmann wrote: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that set it implicitly. > > For the additon of a y2083 safe semtimedop() system call, I chose to only > support the separate entry points, but that requires first supporting > the regular ones with their own syscall numbers. > > The IPC_64 is now implied by the new semctl/shmctl/msgctl system > calls even on the architectures that require passing it with the ipc() > multiplexer. > > I'm not adding the new semtimedop() or semop() on 32-bit architectures, > those will get implemented using the new semtimedop_time64() version > that gets added along with the other time64 calls. > Three 64-bit architectures (powerpc, s390 and sparc) get semtimedop(). > > Signed-off-by: Arnd Bergmann > --- > One aspect here that might be a bit controversial is the use of > the same system call numbers across all architectures, synchronizing > all of them with the x86-32 numbers. With the new syscall.tbl > files, I hope we can just keep doing that in the future, and no > longer require the architecture maintainers to assign a number. > > This is mainly useful for implementers of the C libraries: if > we can add future system calls everywhere at the same time, using > a particular version of the kernel headers also guarantees that > the system call number macro is visible. > --- > arch/m68k/kernel/syscalls/syscall.tbl | 11 +++ > arch/mips/kernel/syscalls/syscall_o32.tbl | 11 +++ > arch/powerpc/kernel/syscalls/syscall.tbl | 13 + > arch/s390/kernel/syscalls/syscall.tbl | 12 > arch/sh/kernel/syscalls/syscall.tbl | 11 +++ > arch/sparc/kernel/syscalls/syscall.tbl| 12 > arch/x86/entry/syscalls/syscall_32.tbl| 11 +++ > 7 files changed, 81 insertions(+) For the s390 bits: Acked-by: Heiko Carstens
Re: [PATCH v2 13/29] arch: add split IPC system calls where needed
On Fri, Jan 18, 2019 at 5:20 PM Arnd Bergmann wrote: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that set it implicitly. > > For the additon of a y2083 safe semtimedop() system call, I chose to only > support the separate entry points, but that requires first supporting > the regular ones with their own syscall numbers. > > The IPC_64 is now implied by the new semctl/shmctl/msgctl system > calls even on the architectures that require passing it with the ipc() > multiplexer. > > I'm not adding the new semtimedop() or semop() on 32-bit architectures, > those will get implemented using the new semtimedop_time64() version > that gets added along with the other time64 calls. > Three 64-bit architectures (powerpc, s390 and sparc) get semtimedop(). > > Signed-off-by: Arnd Bergmann > arch/m68k/kernel/syscalls/syscall.tbl | 11 +++ For m68k: Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v2 13/29] arch: add split IPC system calls where needed
On Fri, Jan 18, 2019 at 05:18:19PM +0100, Arnd Bergmann wrote: > The IPC system call handling is highly inconsistent across architectures, > some use sys_ipc, some use separate calls, and some use both. We also > have some architectures that require passing IPC_64 in the flags, and > others that set it implicitly. > > For the additon of a y2083 safe semtimedop() system call, I chose to only It's not critical, but there are two typos in that line: additon -> addition 2083 -> 2038 Gabriel > support the separate entry points, but that requires first supporting > the regular ones with their own syscall numbers. > > The IPC_64 is now implied by the new semctl/shmctl/msgctl system > calls even on the architectures that require passing it with the ipc() > multiplexer. > > I'm not adding the new semtimedop() or semop() on 32-bit architectures, > those will get implemented using the new semtimedop_time64() version > that gets added along with the other time64 calls. > Three 64-bit architectures (powerpc, s390 and sparc) get semtimedop(). > > Signed-off-by: Arnd Bergmann
Re: [PATCH v2 13/29] arch: add split IPC system calls where needed
On Fri, Jan 18, 2019 at 6:20 PM Gabriel Paubert wrote: > > On Fri, Jan 18, 2019 at 05:18:19PM +0100, Arnd Bergmann wrote: > > The IPC system call handling is highly inconsistent across architectures, > > some use sys_ipc, some use separate calls, and some use both. We also > > have some architectures that require passing IPC_64 in the flags, and > > others that set it implicitly. > > > > For the additon of a y2083 safe semtimedop() system call, I chose to only > > It's not critical, but there are two typos in that line: > additon -> addition > 2083 -> 2038 Fixed both, thanks! Arnd
[PATCH v2 13/29] arch: add split IPC system calls where needed
The IPC system call handling is highly inconsistent across architectures, some use sys_ipc, some use separate calls, and some use both. We also have some architectures that require passing IPC_64 in the flags, and others that set it implicitly. For the additon of a y2083 safe semtimedop() system call, I chose to only support the separate entry points, but that requires first supporting the regular ones with their own syscall numbers. The IPC_64 is now implied by the new semctl/shmctl/msgctl system calls even on the architectures that require passing it with the ipc() multiplexer. I'm not adding the new semtimedop() or semop() on 32-bit architectures, those will get implemented using the new semtimedop_time64() version that gets added along with the other time64 calls. Three 64-bit architectures (powerpc, s390 and sparc) get semtimedop(). Signed-off-by: Arnd Bergmann --- One aspect here that might be a bit controversial is the use of the same system call numbers across all architectures, synchronizing all of them with the x86-32 numbers. With the new syscall.tbl files, I hope we can just keep doing that in the future, and no longer require the architecture maintainers to assign a number. This is mainly useful for implementers of the C libraries: if we can add future system calls everywhere at the same time, using a particular version of the kernel headers also guarantees that the system call number macro is visible. --- arch/m68k/kernel/syscalls/syscall.tbl | 11 +++ arch/mips/kernel/syscalls/syscall_o32.tbl | 11 +++ arch/powerpc/kernel/syscalls/syscall.tbl | 13 + arch/s390/kernel/syscalls/syscall.tbl | 12 arch/sh/kernel/syscalls/syscall.tbl | 11 +++ arch/sparc/kernel/syscalls/syscall.tbl| 12 arch/x86/entry/syscalls/syscall_32.tbl| 11 +++ 7 files changed, 81 insertions(+) diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl index 85779d6ef935..5354ba02eed2 100644 --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl @@ -388,3 +388,14 @@ 378common pwritev2sys_pwritev2 379common statx sys_statx 380common seccomp sys_seccomp +# room for arch specific calls +393common semget sys_semget +394common semctl sys_semctl +395common shmget sys_shmget +396common shmctl sys_shmctl +397common shmat sys_shmat +398common shmdt sys_shmdt +399common msgget sys_msgget +400common msgsnd sys_msgsnd +401common msgrcv sys_msgrcv +402common msgctl sys_msgctl diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl index 3d5a47b80d2b..fa47ea8cc6ef 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -380,3 +380,14 @@ 366o32 statx sys_statx 367o32 rseqsys_rseq 368o32 io_pgetevents sys_io_pgetevents compat_sys_io_pgetevents +# room for arch specific calls +393o32 semget sys_semget +394o32 semctl sys_semctl compat_sys_semctl +395o32 shmget sys_shmget +396o32 shmctl sys_shmctl compat_sys_shmctl +397o32 shmat sys_shmat compat_sys_shmat +398o32 shmdt sys_shmdt +399o32 msgget sys_msgget +400o32 msgsnd sys_msgsnd compat_sys_msgsnd +401o32 msgrcv sys_msgrcv compat_sys_msgrcv +402o32 msgctl sys_msgctl compat_sys_msgctl diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl index db3bbb8744af..7555874ce39c 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl @@ -414,6 +414,7 @@ 363spu switch_endian sys_ni_syscall 364common userfaultfd sys_userfaultfd 365common membarrier sys_membarrier +# 366-377 originally left for IPC, now unused 378nospu mlock2 sys_mlock2 379nospu copy_file_range sys_copy_file_range 380common preadv2 sys_preadv2