summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-07-11 18:35:33 +0000
committermarkm <markm@FreeBSD.org>2000-07-11 18:35:33 +0000
commite07f67dda2fbeb6e3f85ab6998185af42b897135 (patch)
treecd0c41a7a40708cac1f00a11bbf876177bcdf01a /sys/dev/random
parentce80758a3f072152727fc8315fc11cc9c6b29073 (diff)
downloadFreeBSD-src-e07f67dda2fbeb6e3f85ab6998185af42b897135.zip
FreeBSD-src-e07f67dda2fbeb6e3f85ab6998185af42b897135.tar.gz
I think I need to move the newly static variables to the random_state
structure; remind myself in the cooments. Also regroup all the Yarrow variables at the top of the variable list; they are "special". (no functional change).
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/yarrow.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c
index 75bcf6c..99453f6 100644
--- a/sys/dev/random/yarrow.c
+++ b/sys/dev/random/yarrow.c
@@ -101,13 +101,12 @@ random_deinit(void)
static void
reseed(int fastslow)
{
- /*
- * Allocate the huge variables statically. They _will_ run you
- * out of interrupt-context stack otherwise!
- */
- static BF_KEY hashkey;
+ /* Interrupt-context stack is a limited resource; make static */
+ /* large structures; XXX Revisit - needs to move to the large */
+ /* random_state structure. */
static unsigned char v[TIMEBIN][KEYSIZE]; /* v[i] */
- unsigned char hash[KEYSIZE]; /* h' */
+ unsigned char hash[KEYSIZE]; /* h' */
+ static BF_KEY hashkey;
unsigned char ivec[8];
unsigned char temp[KEYSIZE];
struct entropy *bucket;
OpenPOWER on IntegriCloud