1) POSIX requires rand(3) return values to be in the [0, RAND_MAX]
range, but ACM formula we use have internal state (and return value) in
the [1, 0x7ffffffe] range, so our RAND_MAX (0x7fffffff) is never reached
because it is off by one, zero is not reached too.

Correct both RAND_MAX and rand(3) return value, shifting last one
to the 0 by 1 subtracted, resulting POSIXed [0, 0x7ffffffd(=new
RAND_MAX)] range.

2) Add a checks for not overflowing on too big seeds. It may happens on
the machines, where sizeof(unsigned int) > 32 bits.

This change is binary compatible because range is reduced, not expanded,
so no bump is needed.

Reviewed by:    bde
Approved by:    re (glebius)
MFC: r253506
The NFSv4 server incorrectly assumed that the high order words of
the attribute bitmap argument would be non-zero. This caused an
interoperability problem for a recent patch to the Linux NFSv4 client.
The Linux folks have changed their patch to avoid this, but this
patch fixes the problem on the server.

Reported and tested by:	a.heider@gmail.com (Andre Heider)
Approved by:	re (Xin Li)
MFC r253380,253413: name passed into __setenv is not necessarily NUL-terminated

Approved by:	re (kib)
Modernize the package list for 9.2-RELEASE cycle:

 o Update the perl package version to 5.14.

 o Add devel/subversion and devel/subversion-static so we provide
   a package for source-based users to check out the various trees,
   both with and without extra dependencies.

This is a direct commit to stable/9.

Approved by:	kib (mentor)
Approved by:	re (glebius)
MFC:	r253439

Reload font when syscons(4) is resuming without switching mode.

Approved by:	re (delphij)
MFC:	r253455

Decode PCIe ASPM capability and status.

Approved by:	re (delphij)
MFC r253393:

  Do not throw an error if the user requests to activate the image from
  an empty firmware slot, as long as the user has specified a firmware
  image to download into the empty firmware slot.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253436, r253458:

  Simplify open_dev() by returning errno values rather than just 0 or 1.

  Also remove stat() call and just rely on errno from open() call to discern
  whether dev node exists or not.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253437:

  Define constants for the lengths of the serial number, model number
  and firmware revision in the controller's identify structure.

  Also modify consumers of these fields to ensure they only use the
  specified number of bytes for their respective fields.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253438:

  Use pause() instead of DELAY() when polling for completion of admin
  commands during controller initialization.

  DELAY() does not work here during config_intrhook context - we need to
  explicitly relinquish the CPU for the admin command completion to
  get processed.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253459:

  Use _PATH_DEV (from paths.h) for the "/dev/" string, rather than
  hard-coding it.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253473:

  Do not call disk_create() until we have completed all initialization of our
  internal disk structure.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253474:

  Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.

  Recent testing with QEMU that has variable sector size support for
  NVMe uncovered some of these issues.  Chatham prototype boards supported
  only 512 byte sectors.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253476:

  Add message when nvd disks are attached and detached.

  As part of this commit, add an nvme_strvis() function which borrows
  heavily from cam_strvis().  This will allow stripping of
  leading/trailing whitespace and also handle unprintable characters
  in model/serial numbers.  This function goes into a new nvme_util.c
  file which is used by both the driver and nvmecontrol.

Approved by:	re (kib)
Sponsored by:	Intel
MFC r253513, r253542:

r253513:
 Create memstick images with the '.img' filename extension.

r253542:
 For consistency with previous releases, name the cdrom install
 cd 'disc1.iso'.

Approved by:	kib (mentor)
Approved by:	re (marius)
MFC r253541:
  Remove weirdly-named autofoo file.  This is not needed for the (FreeBSD)
  build, and freebsd-update chokes on it.

Approved by:	re (delphij)
Merge remote-tracking branch 'upstream-github/stable/9' into stable/9