Avoid buffer overflow if there were too many arguments, also adjust lenp
to contain actually consumed space on truncation.

bootarg_list can be static again, it's not referenced from outside.

ok deraadt@
Do not KASSERT an unsigned value being >= 0 after decrementing it; instead,
KASSERT it being > 0 before decrementing.
ok dlg@
fix remote fwding with same listen port but different listen address
with gerhard@, ok djm@
Update list of .S depencies over assym.h.
Move to a smaller rbytes buffer and skip a random part. Not to
improve the random stream itself (it doesn't), but to introduce
noise in the arc4random calling pattern. Thanks to matthew@ who
pointed out bias in a previous diff, ok deraadt@ matthew@
Standardize xfer byte counts to ssize_t rather than a mix of size_t and int
(we need to make them signed to spot controller overruns), and fix format
strings accordingly.

While there, make sure every runtime printf is prefixed by either the complete
target information, if available, or at least the driver name with the
proper instance number - supported systems with > 1 wdsc are quite common.
extra evil spaces snuck in over the last while
fix loading of private keys
Revise wording to reflect that callers should always specify (exactly)
one of MAP_PRIVATE or MAP_SHARED, as required by POSIX.  However, also
caveat that currently OpenBSD doesn't strictly enforce this behavior.
Split out mmap's compatibility flags into a separate section, so users
aren't misled into thinking they're useful on OpenBSD.
Avoid buffer overflow on max line length by ending string with just one \0.

ok deraadt@
OpenBSD supports mmap() on block special files too.
Cleanup support for legacy mmap flags

Move all legacy MAP_FOO values behind #ifndef _KERNEL and redefine
them to either be aliases for existing flags (e.g., MAP_COPY ->
MAP_PRIVATE) or 0.

Also, add MAP_OLDFOO defines (behind #ifndef _KERNEL) so the kernel
and kdump can remain compatible with current OpenBSD binaries.

ok deraadt
Cleanup ioctl.2 slightly:

- Markup ioctl argument types with Fa
- Be clearer that ioctl arguments are pointers to ints.

Similar changes to follow for manual pages that describe
device-specific ioctl commands.

Discussed with jmc and schwarze.
re-init and init code paths are now more shared, so the getpid()-based
portable code path must handle that; with brent cook
When building a BN on the stack in BN_div(), make sure to initialize all its
fields (i.e. the flags field) before using it. This is currently harmless,
but might not be if we end up invoking other BN functions checking for
constant-time processing requirement in the future.
zap unneccessary punctuation;
Fix mmap() flag usage: explicitly specify MAP_PRIVATE and drop useless
MAP_FILE and MAP_HASSEMAPHORE flags.

Discussed with deraadt, tedu, and kettenis
Use strtonum() instead of atoi(), and then impose what are we think
are the current range checks.  Help from millert and lteo.  Please test
now that it is deployed and let us know if any numbers are off..
ok lteo
Add the userland facing drm header for nouveau.

This is required by the generic loader code in newer versions of Mesa
even when we aren't building any nouveau drivers.

The way these headers are used on Linux is with a kernel version
and a libdrm version which are largely identical with the *_drm.h
headers always installed by libdrm when libdrm is built with autoconf.

In OpenBSD we have a single version of the _drm.h headers that
are shared by the kernel and userspace and have our own simple
Makefile for the libdrm build.