diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2013-07-29 20:58:09 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2013-07-29 20:58:09 +0000 |
commit | 4e368a0f8f25647bfefb6f1aa8e12c07c1e4b05c (patch) | |
tree | 2042dbc500e145cd25ccbabef89c64560740d59e /sys/modules/rdrand_rng | |
parent | c183dc95190a9e57fecfce0883699df10a23084c (diff) | |
download | src-4e368a0f8f25647bfefb6f1aa8e12c07c1e4b05c.tar.gz src-4e368a0f8f25647bfefb6f1aa8e12c07c1e4b05c.zip |
Decouple yarrow from random(4) device.
* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.
* random(4) device doesn't really depend on rijndael-*. Yarrow, however, does.
* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
random_adaptor is basically an adapter that plugs in to random(4).
random_adaptor can only be plugged in to random(4) very early in bootup.
Unplugging random_adaptor from random(4) is not supported, and is probably a
bad idea anyway, due to potential loss of entropy pools.
We currently have 3 random_adaptors:
+ yarrow
+ rdrand (ivy.c)
+ nehemeiah
* Remove platform dependent logic from probe.c, and move it into
corresponding registration routines of each random_adaptor provider.
probe.c doesn't do anything other than picking a specific random_adaptor
from a list of registered ones.
* If the kernel doesn't have any random_adaptor adapters present then the
creation of /dev/random is postponed until next random_adaptor is kldload'ed.
* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
system wide one.
Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien
Notes
Notes:
svn path=/head/; revision=253786
Diffstat (limited to 'sys/modules/rdrand_rng')
-rw-r--r-- | sys/modules/rdrand_rng/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/modules/rdrand_rng/Makefile b/sys/modules/rdrand_rng/Makefile new file mode 100644 index 000000000000..2cfd3fde599c --- /dev/null +++ b/sys/modules/rdrand_rng/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/random + +KMOD= rdrand_rng + +SRCS+= \ + ivy.c + +.include <bsd.kmod.mk> |