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: Update kernel-features.h files for Linux 5.1



On 16/05/2019 05:08, Arnd Bergmann wrote:
> On Fri, May 10, 2019 at 5:07 PM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>> On 10/05/2019 07:27, Stepan Golosunov wrote:
>>> 09.05.2019 в 23:00:37 +0000 Joseph Myers написал:
>>>> Linux 5.1 adds missing syscalls to the syscall table for many Linux
>>>> kernel architectures.  This patch updates the kernel-features.h
>>>> headers accordingly.  I believe the statfs64 structure used by alpha
>>>> matches what the new kernel syscalls use, but that should be reviewed
>>>> carefully.
>>>>
>>>> Tested with build-many-glibcs.py.
>>>
>>> The newly added direct ipc syscalls are different from the old ones:
>>>
>>> 1. They do not accept IPC_64.  This means that __IPC_64 should be set
>>> to zero when new syscalls are used.  And new syscalls can not be used
>>> for compat functions like __old_semctl.
>>
>> So it seems we will need to conditionally set __IPC_64 based on kernel
>> version.
> 
> How so? I did not expect to see any libc change here at all, unless
> you mean after you stop using sys_ipc().

The idea is if user configure a minimum kernel version of v5.1,
sysvipc would use wire-up syscalls.  So for sys_ipc the affected
architectures calls with required IPC_64, and for wire-up syscalls
IPC_64 is redefined accordingly. 

> 
>> It also seems that our default value on generic ipc_priv.h
>> is not really expressing the kernel ABI.
> 
> Right, it should only be set for historic ABIs.
> 
>>> 2. semtimedop does not exist on 32-bit ABIs.  They have
>>> semtimedop_time64 instead.
>>> (I also think that ipc with IPCOP_semtimedop was accidentally made to
>>> behave like semtimedop_time64 in 32-bit builds of linux 5.1.  But that
>>> would be a kernel bug.)
>>
>> So it seems we would need to either add an __ASSUME specific for semtimedop
>> to just enable wire-up calls if time64 is defined or add another pre-processor
>> check to see if __NR_semtimeop is defined as well.
> 
> The implementation I expected to see here is to have the
> 64-bit time_t version of semtimedop() to call the direct semtimedop_time64()
> system call, and fall back to the existing implementation if that
> returns -ENOSYS and the libc is built to support old kernels.

I am not taking in consideration 64-bit time_t adjustments here. 


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