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.
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.
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.
MFC - tracking commit.
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.
With r253139, firmware for urtwn(4) is in base system. Correct the man page to
reflect that.

Approved by:	re (blackend)
Add _atf and unbound and move smmsp and mailnull to where they belong.

Approved by:	re (kib)
MFC - tracking commit
Add the definition of DF_1_INTERPOSE flag.

Reviewed by:	kan
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Approved by:	re (glebius)
Implement support for the interpose dso flag.

Requested by:	bf
Reviewed by:	kan
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Approved by:	re (glebius)