This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [powerpc] Use DIRECT_SYSVIPC_SYSCALLS
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Paul A. Clarke" <pc at us dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, tuliom at ascii dot art dot br
- Date: Thu, 10 Oct 2019 08:07:19 +0200
- Subject: Re: [PATCH] [powerpc] Use DIRECT_SYSVIPC_SYSCALLS
- References: <1570663013-10269-1-git-send-email-pc@us.ibm.com>
* Paul A. Clarke:
> diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c
> index 687fdcb..e15bd5e 100644
> --- a/sysdeps/unix/sysv/linux/semop.c
> +++ b/sysdeps/unix/sysv/linux/semop.c
> @@ -26,7 +26,7 @@
> int
> semop (int semid, struct sembuf *sops, size_t nsops)
> {
> -#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#if defined (__ASSUME_DIRECT_SYSVIPC_SYSCALLS) && defined (__NR_semop)
> return INLINE_SYSCALL_CALL (semop, semid, sops, nsops);
> #else
> return INLINE_SYSCALL_CALL (ipc, IPCOP_semop, semid, nsops, 0, sops);
Sorry, but I think this is wrong: If a future kernel version defines
__NR_semop, we suddenly build glibc in such a way that it is
incompatible with kernel 5.0 on POWER (assuming that the user requests
the 5.0 baseline).
I think the best way forward here is to fix the kernel to provide the
semop system call on POWER, and change __ASSUME_DIRECT_SYSVIPC_SYSCALLS
so that it requires that kernel version as the minimum on POWER.
If you do not want to do that, maybe the right solution is a sysdeps
override for POWER, unconditionally using IPCOP_semop for now, with a
comment why this is necessary.
Thanks,
Florian