MFC - tracking update.
MFC - tracking update.
MFC - tracking commit
Snapshot. This passes the build test, but has not yet been finished or debugged.

Contains:

* Refactor the hardware RNG CPU instruction sources to feed into
the software mixer. This is unfinished. The actual harvesting needs
to be sorted out. Modified by me (see below).

* Remove 'frac' parameter from random_harvest(). This was never
used and adds extra code for no good reason.

* Remove device write entropy harvesting. This provided a weak
attack vector, was not very good at bootstrapping the device. To
follow will be a replacement explicit reseed knob.

* Separate out all the RANDOM_PURE sources into separate harvest
entities. This adds some secuity in the case where more than one
is present.

* Review all the code and fix anything obviously messy or inconsistent.
Address som review concerns while I'm here, like rename the pseudo-rng
to 'dummy'.

Submitted by:	Arthur Mesh <arthurmesh@gmail.com> (the first item)
MFC - tracking commit.
MFC- tracking commit.
Remove the uipc_cow.c file, which is not used since the zero copy
sockets removal.

Noted by:	alc
Sponsored by:	The FreeBSD Foundation
Approved by:	re (delphij)
MFC - tracking commit
SNAPSHOT.

Simplify the malloc pools; We only need one for this device.

Simplify the harvest queue.

Marginally improve the entropy pool hashing, making it a bit faster in the process.

Connect up the hardware "live" source harvesting. This is simplistic for now, and will need to be made rate-adaptive.

All of the above passes a compile test but needs to be debugged.
ename internal function test() to avoid name clashes with
common macros. This fixes ports like mysql 5.6 which has an
internal macro called test.

Approved by:	re (gjb)
Discussed with:	theraven
MFC - tracking commit
Don't use the "real" assembler mnemonics; older compilers may not
understand them (like when building CURRENT on 9.x).

Submitted by:	Konstantin Belousov <kostikbel@gmail.com>
Debug run. This now works, except that the "live" sources haven't
been tested. With all sources turned on, this unlocks itself in
a couple of seconds! That is no my box, and there is no guarantee
that this will be the case everywhere.

* Cut debug prints.

* Use the same locks/mutexes all the way through.

* Be a tad more conservative about entropy estimates.
As userland writing to /dev/random is no more, remove the "better than nothing" bootstrap mode.

Add SWI harvesting to the mix.

My box seeds Yarrow by itself in a few seconds! YMMV; more to follow.
Fix up the man page for random(4). This mainly removes no-longer-relevant details about HW RNGs, reseeding explicitly and user-supplied entropy.
Document LK_TRYUPGRADE.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Approved by:	re (marius)
Pull in r192064 from upstream llvm trunk:

  X86: Don't fold spills into SSE operations if the stack is unaligned.

  Regalloc can emit unaligned spills nowadays, but we can't fold the
  spills into SSE ops if we can't guarantee alignment. PR12250.

This fixes unaligned SSE accesses (leading to a SIGBUS) which could
occur in the ffmpeg ports.

Approved by:	re (kib)
Reported by:	tijl
MFC after:	3 days
MFC - tracking commit.
Update head/ to 10.0-ALPHA5.

Approved by:	re (implicit)
Snapshot.

Looking pretty good; this mostly works now. New code includes:

* Read cached entropy at startup, both from files and from loader(8) preloaded entropy. Failures are soft, but announced. Untested.

* Use EVENTHANDLER to do above just before we go multiuser. Untested.