Update userland arc4random() with OpenBSD's Chacha20
based arc4random().
crypto/heimdal/lib/roken/rand.c:
crypto/openssh/config.h:
Eliminate in-tree usage of arc4random_stir().
include/stdlib.h:
Remove arc4random_stir() and arc4random_addrandom() prototypes
provide temporary shims for transistion period. The plan is
to get rid of these before 12.0-RELEASE, after a exp-run is
performed.
lib/libc/gen/arc4random.c:
Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes.
lib/libc/gen/arc4random.h:
Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of
our own.
lib/libc/gen/arc4random.3:
Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r118247
and r114444.
lib/libc/gen/arc4random-compat.c:
Compatibility shims for arc4random_stir and arc4random_addrandom
functions to preserve ABI. Log once when called but do nothing
otherwise
lib/libc/gen/arc4random_uniform.c:
Copied from lib/libc/gen/arc4random.c with arc4random_uniform()
only.
lib/libc/gen/chacha_private.h:
OpenBSD chacha_private.h,v 1.2.
lib/libc/gen/getentropy.c:
Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl)
and remove from ib/libc/include/libc_private.h.
PR: 182610
Note that the intention is to get our arc4random() updated to OpenBSD's
version first; we will revisit and explore other possible optimizations
at a later time.