When running with the -d option, instrument fsck_ffs to track the number,
data type, and running time of its I/O operations.

No functional changes.


git-svn-id: svn://svn.freebsd.org/base/head@247212 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge part of r1712 from elftoolchain, making it possible to resize ELF
sections and indirectly change the layout of an ELF file when
ELF_F_LAYOUT is not set.

PR:		bin/167103
Approved by:	rstone (co-mentor)
Obtained from:	elftoolchain
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@247221 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Catch up with internal API changes for initbarea() and getdatablk()
of fsck_ffs introduced with r247212.

Submitted by:	David Wolfskill <david@catwhisker.org>


git-svn-id: svn://svn.freebsd.org/base/head@247234 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libc/opendir: Improve behaviour of union uniquifier:

* Reopen the directory using openat(fd, ".", ...) instead of opening the
  pathname again. This fixes a race condition where the meaning of the
  pathname changes and allows a reopen with fdopendir().
* Always reopen the directory for union stacks, not only when DTF_REWIND
  is passed. Applications should be able to fchdir(dirfd(dir)) and
  *at(dirfd(dir), ...). DTF_REWIND now does nothing.


git-svn-id: svn://svn.freebsd.org/base/head@247236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the bug I introduced in r247045.
After digging through more carefully, it looks like there's
no real need to have the DTB in the module directory.
So we can simplify a lot:  Just copy DTB into local heap
for "fdt addr" and U-Boot integration, drop all the extra
COPYIN() calls.

I've left one final COPYIN() to update the in-kernel DTB
for consistency with how this code used to work, but I'm
no longer convinced it's appropriate here.

I've also remove the mem_load_raw() utility that I added
to boot/common/module.c with r247045 since it's no longer
necessary.


git-svn-id: svn://svn.freebsd.org/base/head@247250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
kernacc() expects all KVAs to be covered in the kernel map. With the
introduction of the PBVM, this stopped being the case. Redefine the
VM parameters so that the PBVM is included in the kernel map. In
particular this introduces VM_INIT_KERNEL_ADDRESS to point to the base
of region 5 now that VM_MIN_KERNEL_ADDRESS points to the base of
region 4 to include the PBVM.
While here define KERNBASE to the actual link address of the kernel as
is intended.

PR:		169926


git-svn-id: svn://svn.freebsd.org/base/head@247251 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'