Date: Mon, 7 Sep 2020 20:05:18 +0000 (UTC) From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365428 - head/sys/sys Message-ID: <202009072005.087K5Iic047506@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdragon Date: Mon Sep 7 20:05:18 2020 New Revision: 365428 URL: https://svnweb.freebsd.org/changeset/base/365428 Log: 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. Modified: head/sys/sys/vdso.h Modified: head/sys/sys/vdso.h ============================================================================== --- head/sys/sys/vdso.h Mon Sep 7 19:35:30 2020 (r365427) +++ head/sys/sys/vdso.h Mon Sep 7 20:05:18 2020 (r365428) @@ -102,8 +102,16 @@ struct vdso_sv_tk *alloc_sv_tk(void); #define VDSO_TH_NUM 4 #ifdef COMPAT_FREEBSD32 + +/* + * i386 is the only arch with a 32 bit time_t. + */ struct bintime32 { +#if defined(__amd64__) uint32_t sec; +#else + uint64_t sec; +#endif uint32_t frac[2]; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009072005.087K5Iic047506>