This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v4 1/2] y2038: linux: Provide __timerfd_gettime64 implementation
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Joseph Myers <joseph at codesourcery dot com>, Paul Eggert <eggert at cs dot ucla dot edu>, Andreas Schwab <schwab at suse dot de>, Alistair Francis <alistair23 at gmail dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at gotplt dot org>, Florian Weimer <fweimer at redhat dot com>, Florian Weimer <fw at deneb dot enyo dot de>, Zack Weinberg <zackw at panix dot com>, "Carlos O'Donell" <carlos at redhat dot com>
- Date: Tue, 7 Jan 2020 16:26:14 +0100
- Subject: Re: [PATCH v4 1/2] y2038: linux: Provide __timerfd_gettime64 implementation
- References: <20200106121742.1628-1-lukma@denx.de> <ea1ea005-6dee-f8dd-f205-d0a47a952904@linaro.org> <20200107102752.396f7f6f@jawa> <b09ec981-7cf4-19e8-74b9-74c558ba0e75@linaro.org> <20200107152521.7416d5f3@jawa>
On Tue, Jan 7, 2020 at 3:25 PM Lukasz Majewski <lukma@denx.de> wrote:
> > On 07/01/2020 06:27, Lukasz Majewski wrote:
> >
> > >> As a side note, now that arch-syscall patch is upstream should we
> > >> assume that for !__ASSUME_TIME64_SYSCALLS the
> > >> __NR_timerfd_gettime64 should be defined (meaning that Linux
> > >> supports time64 for all 32-bit architectures)?
> > >
> > > Only Linux version >= 5.1 supports 64 bit time on archs with
> > > __WORDSIZE = 32. I do guess (but I may be wrong here) that the
> > > arch-syscall is supposed to reflect the exact syscalls provided by
> > > kernel headers used for building (to help with validation of Y2038
> > > patches).
> >
> > The arch-syscall is now autogenerated from the latest kernel release
> > defined in build-many-glibcs.py. So the question is whether Linux
> > support and enforces time64 support on all and future 32-bit
> > architectures or if there is still some missing ones (as it has
> > happen on some syscall additions, where some architecture lag
> > behind some releases).
>
> This question would be best answered by Arnd (CC'ed) IMHO. From what I
> know all 32 bit architectures gained syscalls covered by
> __ASSUME_TIME64_SYSCALLS from Linux 5.1+.
Yes, we intentionally converted all architectures at the same time to
have a reliable baseline, i.e. once a future glibc requires linux-5.1 as
the minimum kernel all the backwards-compatibility support for
old kernels can be dropped.
New 32-bit architectures (if any) will only support the time64 syscalls
and not time time32 ones.
For some ioctl interfaces, you also need to use the latest kernel
headers, e.g. sound/asound.h from kernels before 5.6 has some
bugs with time64. For the ioctl implementation I hope to wrap
up the final bits in linux-5.6 as well, earlier kernels may return
-EINVAL on some of the ioctls that pass a time_t.
Arnd