This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls
- From: Michael Ellerman <mpe at ellerman dot id dot au>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Arnd Bergmann <arnd at arndb dot de>, libc-alpha at sourceware dot org, "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, Sam Bobroff <sam dot bobroff at au1 dot ibm dot com>
- Date: Wed, 16 Dec 2015 21:26:11 +1100
- Subject: Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls
- Authentication-results: sourceware.org; auth=none
- References: <5660A8D0 dot 5090003 at linux dot vnet dot ibm dot com> <1450253328 dot 19757 dot 2 dot camel at ellerman dot id dot au> <mvmy4cu6aya dot fsf at hawking dot suse dot de> <2535039 dot fp0alOV0kv at wuerfel> <1450257707 dot 4370 dot 2 dot camel at ellerman dot id dot au> <mvmr3im67e8 dot fsf at hawking dot suse dot de>
On Wed, 2015-12-16 at 10:59 +0100, Andreas Schwab wrote:
> Michael Ellerman <mpe@ellerman.id.au> writes:
> > So the only complication with reverting the patch is that we've since added
> > sys_mlock2 after the IPC calls, as NR 378.
> >
> > I guess because we haven't released a kernel with mlock2 using that number I'll
> > just renumber it, as if the IPC calls were never there.
>
> There is no need to renumber, a gap doesn't pose any difficulties.
> Syscall numbers can be reserved any time, the important part is that you
> get ENOSYS when trying to call the new ipc syscalls until the final ABI
> is implemented.
OK.
I think it's also important not to #define __NR_semop etc. right? Otherwise
userspace code might be doing #ifdef __NR_semop to detect whether that syscall
is implemented.
So the kernel revert patch becomes:
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index f2b0b1b0c72a..5654ece02c0d 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -370,16 +370,16 @@ COMPAT_SYS(execveat)
PPC64ONLY(switch_endian)
SYSCALL_SPU(userfaultfd)
SYSCALL_SPU(membarrier)
-SYSCALL(semop)
-SYSCALL(semget)
-COMPAT_SYS(semctl)
-COMPAT_SYS(semtimedop)
-COMPAT_SYS(msgsnd)
-COMPAT_SYS(msgrcv)
-SYSCALL(msgget)
-COMPAT_SYS(msgctl)
-COMPAT_SYS(shmat)
-SYSCALL(shmdt)
-SYSCALL(shmget)
-COMPAT_SYS(shmctl)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
+SYSCALL(ni_syscall)
SYSCALL(mlock2)
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
index 1effea5193d6..12a05652377a 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -388,18 +388,6 @@
#define __NR_switch_endian 363
#define __NR_userfaultfd 364
#define __NR_membarrier 365
-#define __NR_semop 366
-#define __NR_semget 367
-#define __NR_semctl 368
-#define __NR_semtimedop 369
-#define __NR_msgsnd 370
-#define __NR_msgrcv 371
-#define __NR_msgget 372
-#define __NR_msgctl 373
-#define __NR_shmat 374
-#define __NR_shmdt 375
-#define __NR_shmget 376
-#define __NR_shmctl 377
#define __NR_mlock2 378
#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */