summaryrefslogtreecommitdiffstats
path: root/tools/tools
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2013-07-29 20:26:27 +0000
committerobrien <obrien@FreeBSD.org>2013-07-29 20:26:27 +0000
commit721ce839c7c49ecca90b66a4523be0e6e29c057e (patch)
tree7321ee5c53e41f64a4e3a37d1e501321672bb5af /tools/tools
parentf6b004c36a12554e599bc79d3f4efc2047574d1b (diff)
downloadFreeBSD-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 'tools/tools')
-rw-r--r--tools/tools/sysdoc/sysdoc.sh12
-rw-r--r--tools/tools/sysdoc/tunables.mdoc7
2 files changed, 15 insertions, 4 deletions
diff --git a/tools/tools/sysdoc/sysdoc.sh b/tools/tools/sysdoc/sysdoc.sh
index c428174..b07c53d 100644
--- a/tools/tools/sysdoc/sysdoc.sh
+++ b/tools/tools/sysdoc/sysdoc.sh
@@ -88,7 +88,7 @@ EOF
# tunables in our tunables.mdoc file and generate
# the final 'inner circle' of our manual page.
markup_create() {
- sort < _names | \
+ sort -u < _names | \
xargs -n 1 /bin/sh ./sysctl.sh \
> markup.file \
2> tunables.TODO
@@ -238,9 +238,13 @@ if [ -z "$LOCATION" ] ;
&& for x in `find $LOCATION -name '*.kld'` \
$LOCATION/kernel; \
do nm $x | \
- grep ' sysctl___' | uniq | \
- sed 's/sysctl___//g' | sed 's/_/./g' | \
- awk {'print $3'} > _names;
+ sed -n '/sysctl___/ {
+ 's/[\.a-z_]*sysctl___//g'
+ 's/_/./g'
+ p
+ }' | \
+ awk {'print $3'} | \
+ sort -u > _names;
done;
markup_create
page_create
diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc
index 8b426e6..4702ea3 100644
--- a/tools/tools/sysdoc/tunables.mdoc
+++ b/tools/tools/sysdoc/tunables.mdoc
@@ -1093,6 +1093,13 @@ line programs.
kern.quantum
---
+kern.random.adaptors
+str
+
+Displays registered PRNG adaptors (sources).
+This is a read-only variable.
+
+---
kern.random.sys.burst
---
OpenPOWER on IntegriCloud