Set target->sbp field to valid value when sbp device is created.

The sbp_cam_detach_target can be called from sbp_post_explore function
on the first target that is not really attached and it was written with
the corresponding safety check in place to tolerate that. Unfortunately
the recent locking cleanup did add a locking assertion that tries to
dereference the target->sbp pointer unconditionally, which causes less
than desirable outcome. Since the assertion is useful, just initialize
the target sbp pointer once when sbp device is being initialized instead
of when the target is being attached. This makes assertion work in all
cases and fixes the crash on boot.
Remove an unnecessary kick of the host at the end of transmitting

MFC after:	1 week
Handle multiple calls to rxq_eof for single packet completion

This requires the VMware vmxnet3 device to flip the start of packet
descriptor's generation before the rest of the packet's descriptors
have been loaded into the Rx ring. I've never observed this behavior,
and it seems to make the most sense not to do it this way. But it is
not a lot of work for the driver to handle this situation just in case.

MFC after:	1 week
Increment the pending packets more aggressively for TSO

Assume the number of description used is reasonable value to
increment this otherwise opaque field by.

While here, reduce a minor difference between the legacy and
multiqueue transmit paths.

MFC after:	1 week
Assert that the new entry is inserted into the right location in the
map entries list, and that it does not overlap with the previous and
next entries.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
use .Mt to mark up email addresses consistently (part1)

PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
use .Mt to mark up email addresses consistently (part2)

PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
Removed compatibility with pre FreeBSD 2.2 pw_mkdb command
Fix some broken indentattion

PR:		189173
Submitted by:	fullermd@over-yonder.net
MFC after:	1 week
Fix changing the username

PR:		189172
Submitted by:	fullermd@over-yonder.net
MFC after:	1 week
Stop creating /etc/gnats
Remove /etc/gnats from here, too.
Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID, use
separate argument structure with added level_type field for
CPUID_CPUID_COUNT request.

Reviewed by:	attilio (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Honor jails for unbound SCTP sockets when selecting source addresses,
reporting IP-addresses to the peer during the handshake, adding
addresses to the host, reporting the addresses via the sysctl
interface (used by netstat, for example) and reporting the
addresses to the application via socket options.
This issue was reported by Bernd Walter.

MFC after: 3 days
regex: Make use of reallocf().

Use of reallocf is useful in libraries as we are not certain the
application will exit after NULL.

This somewhat reduces portability but if since you are building
this as part of libc it is likely you have our non-standard
reallocf(3) already.

Reviewed by:	ache
MFC after:	5 days
Add the LD_LIBRARY_PATH_FDS environmental variable.

This variable allows the loading of shared libraries via directory descriptors
rather than via library paths.  If LD_LIBRARY_PATH_FDS=3:4:12, the directories
represented by file descriptors 3, 4 and 12 will searched for shared libraries
before the normal path-based mechanisms are used.  This allows us to execute
unprivileged binaries from within a Capsicum sandbox even if they require
shared libraries.

Approved by:	rwatson (mentor)
Reviewed by:	kib
MFC after:	3 weeks
Sponsored by:	DARPA/AFRL
Test RTLD's new LD_LIBRARY_PATH_FDS variable.

Test LD_LIBRARY_PATH_FDS by linking a binary that requires a shared
library that isn't in any of the usual search paths.  Ensure this fails
when we don't supply LD_LIBRARY_PATH_FDS or we pass invalid information
in it.  Ensure it works when we pass the correct directory in various
places in the variable.

Approved by:	rwatson (mentor)
MFC after:	3 weeks
Sponsored by:	DARPA/AFRL
Fix a code typo that prevented mkdir from firing (unnoticed
usually because another part of the code succeeded in making
the same directory).

MFC after:      3 days
Fix a bug in the setsockopt()-handling of the SCTP
specific option SCTP_PEER_ADDR_THLDS: Use the
provided address as intended.

MFC after: 3 days
Cap the percent CPU of individual threads at 100% to fix some of the
more obvious imprecision in the previous top changes.

Specifically, top uses a delta of clock_gettime() calls right after
invoking the kern.proc sysctl to fetch the process/thread list to
compute the time delta between the fetches.  However, the kern.proc
sysctl handler does not run in constant time.  It can spin on locks,
be preempted by an interrupt handler, etc.  As a result, the time
between the gathering of stats for individual processes or threads
between subsequent kern.proc handlers can vary.  If a "slow" kern.proc
run is followed by a "fast" kern.proc run, then the threads/processes
at the start of the "slow" run will have a longer time delta than the
threads/processes at the end.  If the clock_gettime() time delta is
not itself skewed by preemption, then the delta may be too short for
a given thread/process resulting in a higher percent CPU than actual.
However, there is no good way to calculate the exact amount of overage,
nor to know which threads to subtract the overage from.  Instead, just
punt and fix the definitely-wrong case of an individual thread having
more than 100% CPU.

Discussed with:	zonk
Fix a bug which incorrectly allowed two listening SCTP sockets on
the same port bound to the wildcard address.

MFC after: 3 days