Fix up some session-related races in devfs.

One was introduced with r272596, the rest was there to begin with.

Noted by: jhb
filedesc: create a dedicated zone for struct filedesc0

Currently sizeof(struct filedesc0) is 1096 bytes, which means allocations from
malloc use 2048 bytes.

There is no easy way to shrink the structure <= 1024 an it is likely to grow in
the future.
Don't assert random_adaptors_lock in random_adaptor_read_rate().

Reported by:	many
Pointy hat to:	delphij (for not testing the commit with WITNESS)
Approved by:	so
filedesc: plug unnecessary fdp NULL checks in fdescfreee and fdcopy

Anything reaching these functions has fd table.
Integrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test

- Suffix useradd/userdel commands with pw
- Remove the atf_expect_fail for bin/39546

Phabric: D921
Reviewed by: brd
Sponsored by: EMC / Isilon Storage Division
filedesc: plus sys/kdb.h include which crept in with r274007
Integrate pjdfstest test suite execution into kyua

pjdfstest execution is opt-in and must be done as root due to some of the
assumptions made by the test suite and lack of error checking in the non-root
case

A description of how to execute pjdfstest with kyua is provided in
share/pjdfstest/README

Phabric: D824 (an earlier prototype patch)
MFC after: 1 month
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Provide an on-stack temporary buffer for small ioctl requests.
Reduce boot verbosity.

MFC:		3 days
Remove explicit KYUAFILE=yes from tests/sys/Makefile

This causes the directory traversing Kyuafile to be installed, which in turn
causes tests/sys/pjdfstest to always be run from /usr/tests/sys

Let KYUAFILE default to auto, so the file generated by suite.test.mk gets
installed instead

MFC after: 1 week
Require root when running the pw_delete and pw_modify test programs (pw(8)
requires it)
When other end of the pipe closed during the write, but some bytes
were written, return short write instead of EPIPE.

Update comment.

Discussed with:	bde (long time ago)
MFC after:	2 weeks
drm: Take vt(4) default mode from loader tunables

By default, vt(4) gets the "preferred mode" from DRM, when using a DRM
video driver as its backend. The preferred mode is usually the native
screen resolution.

Now, if this mode isn't appropriate, a user can use loader tunables to
select a mode. The tunables are read in the following order:
    1. kern.vt.fb.modes.$connector_name
    2. kern.vt.fb.default_mode

For example, to set a 1024x768 mode, no matter the connector:
    kern.vt.fb.default_mode="1024x768"

To set a 800x600 mode only on the laptop builtin screen:
    kern.vt.fb.modes.LVDS-1="800x600"

MFC after:	1 week
s/icl_pdu_new/icl_pdu_new_empty/g; no functional changes.

Sponsored by:	The FreeBSD Foundation
Remove check for obsolete FreeBSD versions

PR:		194517
Submitted by:	François Tigeot <ftigeot@wolfpond.org>
s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
nicer code.

Sponsored by:	The FreeBSD Foundation
Clean up confusing comment.  Move it to the place of code which is
talked about.  Explain where the mentioned trampoline located
(usermode), and the fact that attempt to exit last thread is denied in
kernel (by delegating the work to usermode).

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
agp_intel.c provides support for AGP on Intel chipsets from 440/BX to
875.  This intersects with the agp_i810.c, which supports all Intels
from i810 to Core i5/7.  Both agp_intel.c and agp_i810.c are compiled
into kernel when device agp is specified in config, and agp_i810
attach seems to be selected by chance due to linking order.

Strip support for 810 and later from agp_intel.c.  Since 440-class
chipsets do not support any long-mode capable CPUs, remove agp_intel.c
from amd64 kernel file list.  Note that agp_intel.c is not compiled
into agp.ko on amd64 already.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0.

Reviewed by:	grehan
Restore spares used in "struct tcpcb" and bump "__FreeBSD_version" to
indicate need for kernel module re-compilation.

Sponsored by:	Mellanox Technologies