[RFC PATCH] AARCH64/ILP32: introduce kernel time types
Arnd Bergmann
arnd@arndb.de
Tue Jun 28 11:56:00 GMT 2016
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
More information about the Libc-alpha
mailing list