Page MenuHomeFreeBSD

Sprinkle the use of freebsd32_uint64_t over compat32
Needs ReviewPublic

Authored by kib on Thu, Feb 5, 8:09 PM.

Details

Reviewers
brooks
des
emaste
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 Skipped
Unit
Tests Skipped

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–743

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