Setgid before running a command as a specified user.  Previously only
initgroups(3) was called, what isn't quite enough.  This brings jail(8)
in line with jexec(8), which was already doing the right thing.

PR:		195984
MFC after:	1 week
Fix building/installing tests when TESTSBASE != /usr/tests

The work in r258233 hardcoded the assumption that tests was the last component
of the tests tree by pushing tests as an explicit prefix for the paths in
BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all
of the mtree calls used in Makefile.inc1. This assumption breaks if/when one
provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests .

One thing that r258233 did properly though was remove "/usr/tests" creation
from BSD.usr.dist -- that should have not been there in the first place. That
was an "oops" on my part for the work that was originally committed in r241823

MFC after: 2 weeks
Phabric: D1301
Reviewed by: imp
Sponsored by: EMC / Isilon Storage Division
Document STRIP_CMD in build(7) and note its importance with LOCAL_ITOOLS

MFC after: 1 week
Phabric: D1335
Reviewed by: brueffer
Sponsored by: EMC / Isilon Storage Division
Don't build full clang toolchain or clang extras in stages 1-3 of buildworld

MFC after: 1 week
Reviewed by: dim (as part of a "larger" diff)
Phabric: D1336
Sponsored by: EMC / Isilon Storage Division
Fix accidental MK_DEBUG_FILES=no addition to NXBMAKE in r275909

X-MFC with: r275909
Sponsored by: EMC / Isilon Storage Division
Include section name in strip warning message
Sync with NetBSD, mainly address NetBSD bug #43355:

Fix valid_format() to be more careful about allowing only valid
printf formats.

Obtained from:	NetBSD
MFC after:	2 weeks
Pass real optimal transfer size supported by backend.

For files and ZVOLs that is 1MB now, not 128K.

MFC after:	1 week
MFV r275914:

As of r270383, the dbuf_compare comparator compares the dbuf
attributes in the following order:

	db_level (indirect level)
	db_blkid (block number)
	db_state (current state)
	the address of the element

Because db_state is being considered before the element's state,
changing of db_state would affect balancedness of the AVL tree,
even when the address of element compares differently.  For
instance, in dbuf_create, db_state may be altered after the
node is inserted into the AVL tree and may break AVL tree
balancedness.

Instead of using db_state as a comparision critera (introduced
in r270383), consider it only when we are doing a lookup, that
is one of the two dbuf pointers contains DB_SEARCH.

Illumos issue:
    5422 preserve AVL invariants in dn_dbufs

MFC after:	2 weeks
Add missing continue: we can't proceed further if the
kernel does not panic with zfs_panic_recover.

Illumos issue:
    5438 zfs_blkptr_verify should continue after zfs_panic_recover

Reported by:	Coverity
CID:		1232014
Slightly polish iSCSI parameters negotiation.

MFC after:	1 week
Make ieee80211_add_ssid() public.

Some drivers use private copies of this.

PR:		kern/196116
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
Remove a private copy of ieee80211_add_ssid().

PR:		kern/196116
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
Plug a memory leak.

Obtained from:	DragonFlyBSD (commit 5119ece)
MFC after:	2 weeks
Fix `make depend` in sys/modules

Differential Revision:	https://reviews.freebsd.org/D1338
Reviewed by:	delphij
Approved by:	delphij
Correct the end address of the memory regions.

Pointed out by:	ian
Add support for empty ranges properties within the tree, some vendor
device trees have these, for example the ARM AArch64 Foundation Model.

Sponsored by:	The FreeBSD Foundation
Bump the largest record we can cope with from 1k to 8k. Other users of
the hints file don't have any real limits, and longer records will
need to be written shortly.
Adjust the test of a KASSERT to better match the intent.

This assertion was added in r246213 as a guard against corrupted mbufs
arriving from drivers, the key distinguishing factor of said mbufs being
that they had a negative length. Given we're in a while loop specifically
designed to skip over zero-length mbufs, panicking on a zero-length mbuf
seems incorrect.

No objection from:	kib
Reduce number of places where global control_softc is used.

At some point we may want to have several CTL instances, and that is not
really impossible.

MFC after:	2 weeks