[PATCH] Y2038: provide kernel support indication

Florian Weimer fweimer@redhat.com
Wed Sep 26 08:19:00 GMT 2018


* Albert ARIBAUD:

> Hi Florian,
>
> On Tue, 25 Sep 2018 12:58:25 +0200, Florian Weimer <fweimer@redhat.com>
> wrote :
>
>> * Albert ARIBAUD:
>> 
>> > - one new boolean for every new feature, which libc can read/write.
>> >   Reading happens every time the feature is used.
>> >   Writing happens very rarely, once when first first using / testing for
>> >   the feature (e.g. at application start), once if using the feature
>> >   fails (e.g. a syscall returns ENOSYS).
>> >
>> > - two accessors (getter/setter) for every new feature if it must be
>> >   read/set from another glibc library than libc (e.g. librt).  
>> 
>> I'm still surprised that this is needed.  Why can't applications call
>> the function in question and react to a well-documented error code?
>
> These features are for glibc rather than for applications; they are
> here for glibc to remember whether a Y2038 feature is available in the
> kernel over which it currently runs.

Okay, that makes sense.

> Applications, on the other hand, would call the 64-bit-time interface
> regardless of the feature state. Whether this call would translate
> into 64-bit-time or 32-bit-time syscalls would be invisible to them. 

Presumably, there's still the matter of ioctl and ancillary messages on
sockets.

Thanks,
Florian



More information about the Libc-alpha mailing list