This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls



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.
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]