Page MenuHomeFreeBSD

sys/compat/freebsd32: FF clock struct: Don't pack, use 'ffcounter32'
ClosedPublic

Authored by olce on Feb 13 2026, 10:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 16, 8:27 AM
Unknown Object (File)
Sun, Jun 14, 9:48 AM
Unknown Object (File)
Sat, Jun 13, 10:41 AM
Unknown Object (File)
Fri, Jun 12, 7:15 PM
Unknown Object (File)
Tue, Jun 9, 8:29 AM
Unknown Object (File)
Sat, May 23, 6:00 PM
Unknown Object (File)
Thu, May 21, 6:09 PM
Unknown Object (File)
Thu, May 21, 5:34 AM
Subscribers

Details

Summary

Packing 'struct ffclock_estimate32', in absence of substitution of
'ffcounter' (some 'uint64_t') by a 32-bit compatible type, was necessary
on amd64 since 'uint64_t' is 8-byte aligned, which leaves a padding gap
of 4-byte between fields 'update_time' and 'update_ffcount'. This gap
does not exist on i386 (or amd64 32-bit mode), as 'uint64_t' there is
only 4-byte aligned.

Change the type of the 'update_ffcount' and 'leapsec_next' fields to the
recently introduced 'freebsd32_uint64_t', and adapt copy-in and copy-out
accordingly. Using CP() previously worked due to the 'packed'
attribute.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable