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 15/15] linux: Remove INTERNAL_SYSCALL_DECL



On 11/02/2020 09:36, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> diff --git a/sysdeps/unix/sysv/linux/personality.c b/sysdeps/unix/sysv/linux/personality.c
>> index 970bd7becd..d0c597b6a0 100644
>> --- a/sysdeps/unix/sysv/linux/personality.c
>> +++ b/sysdeps/unix/sysv/linux/personality.c
>> @@ -35,15 +35,14 @@ __personality (unsigned long persona)
>>    persona = (unsigned int) persona;
>>  #endif
>>  
>> -  INTERNAL_SYSCALL_DECL (err);
>> -  long ret = INTERNAL_SYSCALL (personality, err, 1, persona);
>> +  long ret = INTERNAL_SYSCALL_CALL (personality, persona);
>>  
>>    /* Starting with kernel commit v2.6.29-6609-g11d06b2, the personality syscall
>>       never fails.  However, 32-bit kernels might flag valid values as errors, so
>>       we need to reverse the error setting.  We can't use the raw result as some
>>       arches split the return/error values.  */
>> -  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret, err)))
>> -    ret = -INTERNAL_SYSCALL_ERRNO (ret, err);
>> +  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (ret)))
>> +    ret = -INTERNAL_SYSCALL_ERRNO (ret);
>>    return ret;
>>  }
>>  weak_alias (__personality, personality)
> 
> The comment is now outdated, I think, and the code should be simplified
> in this change (maybe as a separate commit).  You could also use long
> int instead of long here.
> 

I will check which is current kernel behaviour and check if this comment
still holds.  I fixed the long use internally.


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