This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types
- From: Arnd Bergmann <arnd at arndb dot de>
- To: libc-alpha at sourceware dot org
- Cc: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Yury Norov <ynorov at caviumnetworks dot com>, Andreas Schwab <schwab at suse dot de>, nd at arm dot com, vapier at gentoo dot org, joseph at codesourcery dot com, cmetcalf at tilera dot com, pinskia at gmail dot com, cmetcalf at mellanox dot com, bamvor dot zhangjian at huawei dot com, catalin dot marinas at arm dot com, fweimer at redhat dot com, Prasun dot Kapoor at cavium dot com, maxim dot kuvyrkov at linaro dot org, Albert ARIBAUD <albert dot aribaud at 3adev dot fr>
- Date: Tue, 28 Jun 2016 13:58:12 +0200
- Subject: Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types
- Authentication-results: sourceware.org; auth=none
- References: <1467103498-24243-1-git-send-email-ynorov at caviumnetworks dot com> <20160628104105 dot GD24025 at yury-N73SV> <57725DE8 dot 80708 at arm dot com>
On Tuesday, June 28, 2016 12:22:16 PM CEST Szabolcs Nagy wrote:
> i don't think kernel names should be involved here.
yup.
> (ideally the on-disk format would be the same on all
> abis not just on the ilp32 and lp64 abi of the same arch,
> since the same rootfs may be mounted on different hosts
> with a proper multiarch setup.. and ideally the public
> struct types would not need any changes to make this work,
> they could be serialized into a portable format.)
>
> i call it a hack because it is non-conforming, the utmpx
> struct is specified by posix.. which is why i originally
> suggested to postpone fixing this in the ilp32 patches.
We should probably add the file format to
https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
That page already documents the need to change the
utmp/utmpx based APIs, but does not mention two points:
- unlike all others, it will overflow on both 32-bit
systems and some important 64-bit architectures that
set __WORDSIZE_TIME64_COMPAT32: mips, powerpc, sparc, tile,
and x86. The other ones (s390, parisc, arm64) are
apparently broken because they are incompatibe between
32-bit and 64-bit user space.
- unlike (AFAICT) all other structures, it is needed in
a persistent file format on disk, so it cannot simply
be handled by adding new symbols. (Note: there are
probably applications that store times in files, and
they will have the same problem: either they are
incompatible between 32/64-bit binaries or they may
overflow in 2038 or 2106 if they use 32-bit types
unconditionally).
Arnd