freebsd-dev/sys/dev/random
Conrad Meyer f8e8a06d23 random(4) FenestrasX: Push root seed version to arc4random(3)
Push the root seed version to userspace through the VDSO page, if
the RANDOM_FENESTRASX algorithm is enabled.  Otherwise, there is no
functional change.  The mechanism can be disabled with
debug.fxrng_vdso_enable=0.

arc4random(3) obtains a pointer to the root seed version published by
the kernel in the shared page at allocation time.  Like arc4random(9),
it maintains its own per-process copy of the seed version corresponding
to the root seed version at the time it last rekeyed.  On read requests,
the process seed version is compared with the version published in the
shared page; if they do not match, arc4random(3) reseeds from the
kernel before providing generated output.

This change does not implement the FenestrasX concept of PCPU userspace
generators seeded from a per-process base generator.  That change is
left for future discussion/work.

Reviewed by:	kib (previous version)
Approved by:	csprng (me -- only touching FXRNG here)
Differential Revision:	https://reviews.freebsd.org/D22839
2020-10-10 21:52:00 +00:00
..
fenestrasX random(4) FenestrasX: Push root seed version to arc4random(3) 2020-10-10 21:52:00 +00:00
build.sh
darn.c random(4): Reorder configuration of random source modules 2019-08-18 16:04:01 +00:00
fortuna.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) 2020-02-27 13:12:14 +00:00
fortuna.h random(4): Fortuna: allow increased concurrency 2019-06-17 20:29:13 +00:00
hash.c random(4): Flip default Fortuna generator over to Chacha20 2019-12-20 21:11:00 +00:00
hash.h random(4): Fortuna: allow increased concurrency 2019-06-17 20:29:13 +00:00
ivy.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) 2020-02-27 13:12:14 +00:00
nehemiah.c random(4): Reorder configuration of random source modules 2019-08-18 16:04:01 +00:00
other_algorithm.c random(4): Simplify RANDOM_LOADABLE 2019-12-26 19:32:11 +00:00
other_algorithm.h
random_harvestq.c Remove ubsec(4). 2020-05-11 20:30:28 +00:00
random_harvestq.h
random_infra.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (18 of many) 2020-02-27 13:12:14 +00:00
randomdev.c arc4random(9): Integrate with RANDOM_FENESTRASX push-reseed 2020-10-10 21:48:06 +00:00
randomdev.h random(4): Simplify RANDOM_LOADABLE 2019-12-26 19:32:11 +00:00
uint128.h random(4): Fortuna: allow increased concurrency 2019-06-17 20:29:13 +00:00
unit_test.c
unit_test.h