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/mips | |
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/mips')
-rw-r--r-- | sys/mips/conf/AR71XX_BASE | 3 | ||||
-rw-r--r-- | sys/mips/conf/AR724X_BASE | 2 | ||||
-rw-r--r-- | sys/mips/conf/AR91XX_BASE | 3 | ||||
-rw-r--r-- | sys/mips/conf/AR933X_BASE | 3 | ||||
-rw-r--r-- | sys/mips/conf/BERI_TEMPLATE | 1 | ||||
-rw-r--r-- | sys/mips/conf/DIR-825 | 1 | ||||
-rw-r--r-- | sys/mips/conf/GXEMUL | 1 | ||||
-rw-r--r-- | sys/mips/conf/OCTEON1 | 1 | ||||
-rw-r--r-- | sys/mips/conf/PB92 | 2 | ||||
-rw-r--r-- | sys/mips/conf/RT305X | 3 | ||||
-rw-r--r-- | sys/mips/conf/XLR64 | 1 | ||||
-rw-r--r-- | sys/mips/conf/XLRN32 | 1 | ||||
-rw-r--r-- | sys/mips/conf/std.SWARM | 1 | ||||
-rw-r--r-- | sys/mips/conf/std.XLP | 1 |
14 files changed, 18 insertions, 6 deletions
diff --git a/sys/mips/conf/AR71XX_BASE b/sys/mips/conf/AR71XX_BASE index 69b10a2..a5d4bbf 100644 --- a/sys/mips/conf/AR71XX_BASE +++ b/sys/mips/conf/AR71XX_BASE @@ -24,7 +24,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Build these as modules so small platform builds will have the # modules already built. -makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" +makeoptions MODULES_OVERRIDE="random yarrow_rng gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" options DDB options KDB @@ -115,6 +115,7 @@ device ether device md device bpf device random +options YARROW_RNG # Yarrow software RNG device if_bridge device gif # ip[46] in ip[46] tunneling protocol device gre # generic encapsulation - only for IPv4 in IPv4 though atm diff --git a/sys/mips/conf/AR724X_BASE b/sys/mips/conf/AR724X_BASE index 7ffadb1..f74a693 100644 --- a/sys/mips/conf/AR724X_BASE +++ b/sys/mips/conf/AR724X_BASE @@ -25,7 +25,7 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Build these as modules so small platform builds will have the # modules already built. -makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc cam" +makeoptions MODULES_OVERRIDE="random yarrow_rng gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc cam" options DDB options KDB diff --git a/sys/mips/conf/AR91XX_BASE b/sys/mips/conf/AR91XX_BASE index a84474d..ad81bee 100644 --- a/sys/mips/conf/AR91XX_BASE +++ b/sys/mips/conf/AR91XX_BASE @@ -20,7 +20,7 @@ files "../atheros/files.ar71xx" hints "AR91XX_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" +makeoptions MODULES_OVERRIDE="random yarrow_rng gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" options DDB options KDB @@ -113,6 +113,7 @@ device ether device md device bpf device random +options YARROW_RNG # Yarrow software RNG device if_bridge device gpio device gpioled diff --git a/sys/mips/conf/AR933X_BASE b/sys/mips/conf/AR933X_BASE index 282f3b3..8de1a47 100644 --- a/sys/mips/conf/AR933X_BASE +++ b/sys/mips/conf/AR933X_BASE @@ -20,7 +20,7 @@ files "../atheros/files.ar71xx" hints "AR933X_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -# makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" +# makeoptions MODULES_OVERRIDE="random yarrow_rng gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" makeoptions MODULES_OVERRIDE="" options DDB @@ -119,6 +119,7 @@ device ether device md device bpf device random +options YARROW_RNG # Yarrow software RNG device if_bridge device gpio device gpioled diff --git a/sys/mips/conf/BERI_TEMPLATE b/sys/mips/conf/BERI_TEMPLATE index f4d53ca..46f61f1 100644 --- a/sys/mips/conf/BERI_TEMPLATE +++ b/sys/mips/conf/BERI_TEMPLATE @@ -55,4 +55,5 @@ device md device ether device loop device random +options YARROW_RNG # Yarrow software RNG device snp diff --git a/sys/mips/conf/DIR-825 b/sys/mips/conf/DIR-825 index 3609d76..9050c0f 100644 --- a/sys/mips/conf/DIR-825 +++ b/sys/mips/conf/DIR-825 @@ -20,6 +20,7 @@ hints "DIR-825.hints" # Since the kernel image must fit inside 1024KiB, we have to build almost # everything as modules. nodevice random +nooptions YARROW_RNG nodevice gpio nodevice gpioled nodevice gif diff --git a/sys/mips/conf/GXEMUL b/sys/mips/conf/GXEMUL index ea58622..0d91d3ac 100644 --- a/sys/mips/conf/GXEMUL +++ b/sys/mips/conf/GXEMUL @@ -51,6 +51,7 @@ device gxemul_ether # 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/mips/conf/OCTEON1 b/sys/mips/conf/OCTEON1 index dfe5208..6227fa8 100644 --- a/sys/mips/conf/OCTEON1 +++ b/sys/mips/conf/OCTEON1 @@ -256,6 +256,7 @@ device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. diff --git a/sys/mips/conf/PB92 b/sys/mips/conf/PB92 index 2ca7cfe..f7d5e91 100644 --- a/sys/mips/conf/PB92 +++ b/sys/mips/conf/PB92 @@ -22,7 +22,7 @@ options AR71XX_ENV_UBOOT # who already are using it without modifying the default flash layout) # we need to cut down on a lot of things. -makeoptions MODULES_OVERRIDE="ath ath_pci ath_ahb bridgestp if_bridge if_gif if_gre random wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" +makeoptions MODULES_OVERRIDE="ath ath_pci ath_ahb bridgestp if_bridge if_gif if_gre random yarrow_rng wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth usb ar71xx" hints "PB92.hints" include "../atheros/std.ar71xx" diff --git a/sys/mips/conf/RT305X b/sys/mips/conf/RT305X index 6527782..8471690 100644 --- a/sys/mips/conf/RT305X +++ b/sys/mips/conf/RT305X @@ -24,7 +24,7 @@ makeoptions MIPS_LITTLE_ENDIAN=defined makeoptions KERNLOADADDR=0x80001000 # Don't build any modules yet. -makeoptions MODULES_OVERRIDE="wlan_xauth wlan_wep wlan_tkip wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt random if_bridge bridgestp msdosfs md ipfw dummynet libalias geom/geom_label ufs usb/uplcom usb/u3g usb/umodem usb/umass usb/ucom cam zlib" +makeoptions MODULES_OVERRIDE="wlan_xauth wlan_wep wlan_tkip wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt random yarrow_rng if_bridge bridgestp msdosfs md ipfw dummynet libalias geom/geom_label ufs usb/uplcom usb/u3g usb/umodem usb/umass usb/ucom cam zlib" makeoptions RT3052F include "../rt305x/std.rt305x" @@ -90,6 +90,7 @@ options MROUTING # Multicast routing options IPFIREWALL_DEFAULT_TO_ACCEPT device random +options YARROW_RNG # Yarrow software RNG device loop # RT3050F, RT3052F have only pseudo PHYs, so mii not required device rt diff --git a/sys/mips/conf/XLR64 b/sys/mips/conf/XLR64 index 1db8d85..486ce77 100644 --- a/sys/mips/conf/XLR64 +++ b/sys/mips/conf/XLR64 @@ -84,6 +84,7 @@ device uart # Pseudo device loop device random +options YARROW_RNG # Yarrow software RNG device md device bpf diff --git a/sys/mips/conf/XLRN32 b/sys/mips/conf/XLRN32 index d81eaf9..5ad65bd 100644 --- a/sys/mips/conf/XLRN32 +++ b/sys/mips/conf/XLRN32 @@ -85,6 +85,7 @@ device uart # Pseudo device loop device random +options YARROW_RNG # Yarrow software RNG device md device bpf diff --git a/sys/mips/conf/std.SWARM b/sys/mips/conf/std.SWARM index 0405b0a..5edd5a2 100644 --- a/sys/mips/conf/std.SWARM +++ b/sys/mips/conf/std.SWARM @@ -42,6 +42,7 @@ device loop device ether device md device random +options YARROW_RNG # Yarrow software RNG options USB_DEBUG device usb diff --git a/sys/mips/conf/std.XLP b/sys/mips/conf/std.XLP index bf5fbe8..aa1042d 100644 --- a/sys/mips/conf/std.XLP +++ b/sys/mips/conf/std.XLP @@ -65,6 +65,7 @@ makeoptions FDT_DTS_FILE=xlp-basic.dts # Pseudo device loop device random +options YARROW_RNG # Yarrow software RNG device md device bpf |