diff options
author | obrien <obrien@FreeBSD.org> | 2013-07-29 20:26:27 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2013-07-29 20:26:27 +0000 |
commit | 721ce839c7c49ecca90b66a4523be0e6e29c057e (patch) | |
tree | 7321ee5c53e41f64a4e3a37d1e501321672bb5af /sys/i386 | |
parent | f6b004c36a12554e599bc79d3f4efc2047574d1b (diff) | |
download | FreeBSD-src-721ce839c7c49ecca90b66a4523be0e6e29c057e.zip FreeBSD-src-721ce839c7c49ecca90b66a4523be0e6e29c057e.tar.gz |
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
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/conf/GENERIC | 1 | ||||
-rw-r--r-- | sys/i386/conf/XBOX | 1 | ||||
-rw-r--r-- | sys/i386/conf/XEN | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index 93f23db..643c085 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -309,6 +309,7 @@ device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG options RDRAND_RNG # Intel Bull Mountain RNG +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. diff --git a/sys/i386/conf/XBOX b/sys/i386/conf/XBOX index fb6a5c1..d10fcd4 100644 --- a/sys/i386/conf/XBOX +++ b/sys/i386/conf/XBOX @@ -62,6 +62,7 @@ device pass # Passthrough device (direct ATA/SCSI access) # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device tun # Packet tunnel. #device md # Memory "disks" diff --git a/sys/i386/conf/XEN b/sys/i386/conf/XEN index bcc9f19..f90dd81 100644 --- a/sys/i386/conf/XEN +++ b/sys/i386/conf/XEN @@ -76,6 +76,7 @@ device pci # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device tun # Packet tunnel. device md # Memory "disks" @@ -90,4 +91,3 @@ options AH_SUPPORT_AR5416 # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter - |