This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH] AARCH64/ILP32: introduce kernel time types


On 28/06/16 11:58, Yury Norov wrote:
> On Tue, Jun 28, 2016 at 12:27:34PM +0200, Andreas Schwab wrote:
>> Yury Norov <ynorov@caviumnetworks.com> writes:
>>
>>> Utmp does not deal with kernel, that's true. But this is time types by
>>> nature, and native ABI keeps it synced with kernel. And ILP ABI has to
>>> be compatible with navive ABI, and so has to have it synced with
>>> kernel as well.
>>
>> Since it is an on-disk format it needs to be handled specially, to avoid
>> the difficulties we have now on aarch64 to resurface for future ports.
>>
>> Andreas.
> 
> I still think this is correct way. We have single, kernel-synced type
> for communicating with kernel and native ABI (disk), and convert it to
> user type where needed (currently for aarch64/stat only). It also
> helps to move to 64-bit time types smoothly, as we can make time_t
> deprecated and force new APIs use __ktime_t.
> 
> What sort of difficulties you see with this approach?
> 

i agree with andreas.

i don't think kernel names should be involved here.

the hack is to make the on-disk format compatible across
abis, there is no guarantee that the kernel types will
be always the same, using fixed sized types makes the
intent clear.

(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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]