This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v6] y2038: Introduce __ASSUME_TIME64_SYSCALLS define
On Mon, 10 Jun 2019, Lukasz Majewski wrote:
> > Whether or not there is consensus on it, it should be clear that a
> > detailed review will be needed to establish whether every syscall
> > listed was indeed present in 3.2 (or the first kernel version
> > supported by glibc for an architecture, if later)
>
> If I understood you correctly - the "syscall" - for example
> clock_settime (with either 32 or 64 bit ABI) needs to be defined in
> kernel 3.2 (the oldest supported kernel).
Yes.
> If it is not defined (or has different implementation), then it is
> excluded from the list of syscalls eligible to __ASSUME_TIME64_SYSCALLS?
Yes.
> > for all glibc architectures.
>
> I'm a bit puzzled with the above sentence. We now focus on Linux
> implementation - for example __ASSUME_TIME64_SYSCALLS is defined in:
> sysdeps/unix/sysv/linux/kernel-features.h
>
> Do you mean by "all glibc architectures" - all the architectures
> supported by Linux kernel?
All architectures supported by both glibc and the Linux kernel. We're not
concerned with the various architectures supported by the Linux kernel but
not by glibc; when a new glibc port is added that has been around so long
in the Linux kernel that it doesn't use the generic syscall interface,
that's when we'd need to check for such architectures whether the generic
kernel-features.h is accurate for them. (Architectures using the
asm-generic syscall interface aren't such a problem as they all get new
syscalls at once, only needing to be defined in a single place, except for
the compat syscall table case.)
We're also not concerned with syscall ABIs not supported by glibc for
architectures that are supported by glibc. For example, we don't care
whether some syscall was supported in the 64-bit hppa ABI, because the
glibc hppa port is 32-bit only. Likewise for 64-bit sh.
Note that when checking for syscall support in old kernels you need to
check *both* the syscall table for the architecture (arranged in a
different way for every architecture, in old kernels) *and* the
asm/unistd.h header - only very recently has the kernel moved to a uniform
format for syscall tables. In addition, you need to check any relevant
compat syscall tables.
--
Joseph S. Myers
joseph@codesourcery.com