summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/yarrow.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2001-01-14 17:50:15 +0000
committermarkm <markm@FreeBSD.org>2001-01-14 17:50:15 +0000
commitfde03d4ba0b04f3dc0e504b99bf4b5a12359f122 (patch)
tree4a6216120f3cbda94e9ad852b391b1317252bac6 /sys/dev/random/yarrow.c
parent6ea140035b15c1c3554f6526405c31ec69408c97 (diff)
downloadFreeBSD-src-fde03d4ba0b04f3dc0e504b99bf4b5a12359f122.zip
FreeBSD-src-fde03d4ba0b04f3dc0e504b99bf4b5a12359f122.tar.gz
Remove NOBLOCKRANDOM as a compile-time option. Instead, provide
exactly the same functionality via a sysctl, making this feature a run-time option. The default is 1(ON), which means that /dev/random device will NOT block at startup. setting kern.random.sys.seeded to 0(OFF) will cause /dev/random to block until the next reseed, at which stage the sysctl will be changed back to 1(ON). While I'm here, clean up the sysctls, and make them dynamic. Reviewed by: des Tested on Alpha by: obrien
Diffstat (limited to 'sys/dev/random/yarrow.c')
-rw-r--r--sys/dev/random/yarrow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c
index d50dcfa..c28fc74 100644
--- a/sys/dev/random/yarrow.c
+++ b/sys/dev/random/yarrow.c
@@ -184,6 +184,11 @@ random_init(void)
mtx_exit(&Giant, MTX_DEF);
#endif
+ /* This can be turned off by the very paranoid
+ * a reseed will turn it back on.
+ */
+ random_state.seeded = 1;
+
random_state.gengateinterval = 10;
random_state.bins = 10;
random_state.pool[0].thresh = 100;
OpenPOWER on IntegriCloud