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.
This commit is contained in:
parent
d8bdfeb653
commit
9464e1ef97
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365428
@ -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];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user