MFC r246397:
Make sure that all mouse buttons are released when clients
using /dev/consolectl close. This fixes a problem where if
a USB mouse is detached while a button is pressed, that
button is never released.
MFC r246421 and r246454:
Add support for buttons on USB audio devices,
like Volume Up, Volume Down and Mute.

Reviewed by:  mav @
MFC r246557:

In the setfacl(1) manual page, make it clear that for NFSv4 ACLs,
one should really use -a and -x instead of -m.

MFC r246558:

Improve description of the "-m" option to setfacl(1).

MFC r246559:

Fix NFSv4 permission description in setfacl(1) manual page: the 'D'
means delete_child, not delete.
partial MFC of rev=245362:
enable building virtio devices into static kernels.

I think the 'files.*' entries should be improved (also in HEAD) because
bringing up a vtnet device now requires 3 entries in your kernel config:
"device virtio, device virtio_pci, device vtnet"

but i'll leave the fix to a future commit.

This is also the reason not to enable the device in GENERIC kernels now.
MFC	r240355, r239372, r246258;

ext2fs:	general cleanups.

- Remove unused extern declarations in fs.h
- Correct comments in ext2_dir.h
- Several panic() messages showed wrong function names.
- Remove commented out stray line in ext2_alloc.c.
- Remove the unused macro EXT2_BLOCK_SIZE_BITS() and the then
  write-only member e2fs_blocksize_bits from struct m_ext2fs.
- Remove the unused macro EXT2_FIRST_INO() and the then write-only
  member e2fs_first_inode from struct m_ext2fs.
- Remove EXT2_DESC_PER_BLOCK() and the member e2fs_descpb from
  struct m_ext2fs.
- Remove the unused members e2fs_bmask, e2fs_dbpg and
  e2fs_mount_opt from struct m_ext2fs
- Correct harmless off-by-one error for fspath in ext2_vfsops.c.
- Remove the unused and broken macros EXT2_ADDR_PER_BLOCK_BITS()
  and EXT2_DESC_PER_BLOCK_BITS().
- Remove the !_KERNEL versions of the EXT2_* macros.

Submitted by:	Christoph Mallon

To ease the ease bringing this change I also brought this changes:
- Fix typo.
- Fix style nit.
MFC	r246296, r246298, r246346;

crunchide: support non-custom elf object layout.
crunchgen: Permit use of alternative linkers.
crunchide: Put e_shnum into a local variable.	[1]

Submitted by:	Pete Chou
Reviewed by:	Christoph Mallon [1]
MFC r246636:
Remove the ia64-specific code fragment, which effect is more cleanly
done by the call to trans_prot() function a line before.
MFC r244734: test(1): Document == alias for =.
MFC r245961 r245962 r245963.

MFC r245961:
  When the 'R' flag is used with a newsyslog.conf entry, some fields of
  the corresponding struct sigwork_entry were left uninitialized,
  potentially causing an early return from do_sigwork(). Ensure that these
  fields are initialized, and handle the 'R' flag properly in
  do_sigwork().

MFC r245962:
  Ensure that newsyslog -n prints the correct message for a rotation rule
  that uses the 'R' flag.

MFC r245963:
  Rename the run_cmd field to sw_runcmd to make it consistent with the
  other fields in struct sigwork_entry.

Approved by:	emaste (co-mentor)
MFC r245075:
  Fix a segfault when bsdgrep -i is given an empty pattern string.

Approved by:	emaste (co-mentor)
MFC r246715:
Eliminate the PC_CURTHREAD symbol and load the current thread's
thread structure pointer atomically from r13 (the pcpu pointer)
for the current CPU/core.
MFC r246630:
  Add bootcamp support to the loader.
MFC r246658: Cross-reference vfs_unbusy(9).
MFC r246860:

Fix undefined behaviour in usr.bin/mail/util.c.

Reported by:	deeptech71@gmail.com
MFC r246873:

In contrib/opie/opiekey.c, use the correct length to zero the secret.

Found by:	clang ToT
Reviewed by:	delphij
MFC r246874:

Fix two instances of undefined behaviour in contrib/nvi.

Found by:	clang ToT
Obtained from:	NetBSD
Reviewed by:	jh
MFC r246875:

Import change 40eebf235370b6fe6353784ccf01ab92eed062a5 from upstream wpa:

  From: Jouni Malinen <j@w1.fi>
  Date: Fri, 15 Jul 2011 13:42:06 +0300
  Subject: [PATCH] MD5: Fix clearing of temporary stack memory to use correct length

  sizeof of the structure instead of the pointer was supposed to be used
  here. Fix this to clear the full structure at the end of MD5Final().

Found by:	clang ToT
Reviewed by:	rpaulo
MFC r239672 (by rrs):
  This small change takes care of a race condition
  that can occur when both sides close at the same time.
  If that occurs, without this fix the connection enters
  FIN1 on both sides and they will forever send FIN|ACK at
  each other until the connection times out. This is because
  we stopped processing the FIN|ACK and thus did not advance
  the sequence and so never ACK'd each others FIN. This
  fix adjusts it so we *do* process the FIN properly and
  the race goes away ;-)

Approved by:	rrs
Approved by:	emaste (co-mentor)
MFC r232977 and r233945:

  Make init(8) slightly more robust when /dev/console is missing.

  If the environment doesn't offer a working /dev/console, the existing
  version of init(8) will simply refuse running rc(8) scripts. This means
  you'll only have a system running init(8) and nothing else.

  Change the code to do the following:

  - Open /dev/console like we used to do, but make it more robust to use
    O_NONBLOCK to prevent blocking on a carrier.
  - If this fails, use /dev/null as stdin and /var/log/init.log as stdout
    and stderr.
  - If even this fails, use /dev/null as stdin, stdout and stderr.

  So why us this useful? Well, if you remove the `getpid() == 1' check in
  main(), you can now use init(8) inside jails to properly execute rc(8).
  It still requires some polishing, as existing tools assume init(8) has
  PID 1.

  Also it is now possible to use use init(8) on `headless' devices that
  don't even have a serial boot console.
MFC r246890:
Close a race relating to setting the PCPU pointer (r13).