Page MenuHomeFreeBSD

Sprinkle the use of freebsd32_uint64_t over compat32
ClosedPublic

Authored by kib on Thu, Feb 5, 8:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 1, 6:45 AM
Unknown Object (File)
Wed, Feb 18, 2:47 AM
Unknown Object (File)
Mon, Feb 16, 7:23 PM
Unknown Object (File)
Sun, Feb 15, 9:44 AM
Unknown Object (File)
Sun, Feb 15, 9:22 AM
Unknown Object (File)
Sun, Feb 15, 7:56 AM
Unknown Object (File)
Sat, Feb 14, 4:35 PM
Unknown Object (File)
Sat, Feb 14, 12:02 PM
Subscribers

Details

Summary
sys/abi_compat.h: normalize include guard name


sys/abi_compat.h: move freebsd32_uint64_t and FU64_CP() there

Use private names for uintXX_t types.
Remove conflicting (but equal) PTR_IN() definition from dev/mfi.c.


sys/abi_compat.h: add Foundation copyright for uint64_t stuff


sys/event.h: use freebsd32_uint64_t for kevent32 64bit members


sys/compat/freebsd32: use freebsd32_uint64_t for struct kinfo_knote32


sys/compat/freebsd32: use freebsd32_uint64_t for struct ffclock_estimate32


sys/compat/freebsd32: use freebsd32_uint64_t for several struct stat's


sys/compat/freebsd32: ki_pd is missing from struct kinfo_proc32

This is missed by the sizeof(struct kinfo_proc32) assert due to another
bug: namely, the use of uint64_t type that has different alignment on
i386 than on amd64 host.

Fixes:  85078b8573332c2c83a79adea8a61b519fb3b6af


sys/compat/freebsd32: use freebsd32_uint64_t for struct kinfo_proc32


sys/user.h: remove XXXSKE markers

openzfs sys/types32.h: use abi_compat.h for time32_t

The time32_t typedef leaks into openzfs compilation environment
through sys/event.h.  Simultaneously, openzfs provides its own
definition that is only correct for amd64 on FreeBSD.

Try to fix it by using sys/abi_compat.h directly.  Since toolchain build
from the make buildworld uses host abi_compat.h, add a preprocessor
symbol __HAVE_TIME32_T to signal consumers that time32_t is typedef'ed.
If not defined, fall back to old and wrong time32_t, which is enough for
bootstraping toolchain.

Diff Detail

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

Event Timeline

kib requested review of this revision.Thu, Feb 5, 8:09 PM
kib edited the summary of this revision. (Show Details)

sys/user.h: remove XXXSKE markers

sys/compat/freebsd32/freebsd32_misc.c
742 ↗(On Diff #171286)

What about knt_vnode.knt_vnode_fileid?

kib marked an inline comment as done.

Add missed FU64_CP for kinfo_knote32.knt_vnode.knt_vnode_fileid

This is a nice improvement over the mix of adhoc versions.

This revision is now accepted and ready to land.Fri, Feb 6, 2:49 PM
kib edited the summary of this revision. (Show Details)

Fixes after tinderbox:

  • openzfs sys/types32.h: use abi_compat.h for time32_t instead of unconditionally use of int32_t
  • kdump used knote32.data{1,2} fields
This revision now requires review to proceed.Sat, Feb 7, 7:28 AM