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: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Thu, 3 Dec 2015 17:10:51 -0600
- 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> <8737vjkwqt dot fsf at igel dot home>
On 12/03/2015 04:12 PM, Andreas Schwab wrote:
> "Paul E. Murphy" <murphyp@linux.vnet.ibm.com> writes:
>
>> diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c
>> index a24dc38..86f34a2 100644
>> --- a/sysdeps/unix/sysv/linux/msgctl.c
>> +++ b/sysdeps/unix/sysv/linux/msgctl.c
>> @@ -56,7 +56,11 @@ int
>> attribute_compat_text_section
>> __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
>> {
>> +#ifdef __ASSUME_MSGCTL_SYSCALL
>> + return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf);
>> +#else
>> return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf);
>> +#endif
>> }
>> compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);
>
> There should be no need for a compat code to use a new syscall.
Can you elaborate? I suspect I'm missing something subtle. This appears
functionally identical.
>
>> #endif
>> @@ -64,7 +68,12 @@ compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);
>> int
>> __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
>> {
>> +#ifdef __ASSUME_MSGCTL_SYSCALL
>> + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
>
> Why does a brand new syscall need IPC_64?
Looking at the kernel source, it would still appear it is required for
correct behavior. The muxer just calls the new syscall, so I guess
it simplifies things.
>
> Andreas.
>