This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v5] y2038: Introduce __ASSUME_TIME64_SYSCALLS define
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Stepan Golosunov <stepan at golosunov dot pp dot ru>
- Cc: Lukasz Majewski <lukma at denx dot de>, <libc-alpha at sourceware dot org>, Arnd Bergmann <arnd at arndb dot de>, Paul Eggert <eggert at cs dot ucla dot edu>
- Date: Thu, 23 May 2019 21:17:56 +0000
- Subject: Re: [PATCH v5] y2038: Introduce __ASSUME_TIME64_SYSCALLS define
- References: <20190414220841.20243-1-lukma@denx.de> <20190515142723.20182-1-lukma@denx.de> <20190523073448.2kf5wwrhf3iqlyty@sghpc.golosunov.pp.ru>
On Thu, 23 May 2019, Stepan Golosunov wrote:
> This seems too complicated and potentially buggy. Why not just
> define __ASSUME_TIME64_SYSCALLS for this case too and then use
There are multiple reasonable choices that could be made for the semantics
of __ASSUME_TIME64_SYSCALLS.
One is the choice in this patch series at present, that it relates to the
new syscalls *with their given names*. Another possible choice would be
the one you suggest, that it relates to *any syscalls whose semantics
match those of the new syscalls, possibly under different names*.
If we use the latter choice, I think it would be best also to have
#defines of the new to the old names (such as #define __NR_clock_settime64
__NR_clock_settime) so the various places that use
__ASSUME_TIME64_SYSCALLS don't all need their own conditionals.
Also, if we use the latter choice, we need to be very careful about
ensuring the old syscalls really do have the right semantics, and really
do exist on all kernels with at least the configured minimum version. For
example, we must not claim that semtimedop_time64 is available simply
because a platform's syscall interface always had 64-bit time, if there
wasn't an equivalent older syscall, or the equivalent older syscall had
different semantics or was introduced more recently than the minimum
kernel version for that glibc build. This might well mean defining the
macro to relate to a smaller set of syscalls for which this property can
be more readily verified.
--
Joseph S. Myers
joseph@codesourcery.com