Fix vdso compat32 timekeeping on !=x86.
authorBrandon Bergren <bdragon@FreeBSD.org>
Mon, 7 Sep 2020 20:05:18 +0000 (20:05 +0000)
committerBrandon Bergren <bdragon@FreeBSD.org>
Mon, 7 Sep 2020 20:05:18 +0000 (20:05 +0000)
commit9464e1ef97fc5d233c65bf1256b18ab223d8ffbf
treef809bc7db9330f572cf7491d7a5bf6b3dca3e7c7
parentd8bdfeb6539008f230c4c8830d2127bc4591a5d7
Fix vdso compat32 timekeeping on !=x86.

Since x86 is the only 32-bit arch that has a 32-bit time_t, adjust the
private bintime32 struct in vdso to only use a 32 bit sec on amd64.

This matches the existing behavior in the compat code.

Noticed while implementing vdso timekeeping on powerpc.

This should also theoretically fix vdso timekeeping for arm binaries on
aarch64.

See tools attached to https://reviews.freebsd.org/D26347 for testing.

Reviewed by: kib (in irc)
Sponsored by: Tag1 Consulting, Inc.
sys/sys/vdso.h