aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2000-07-11 18:35:33 +0000
committerMark Murray <markm@FreeBSD.org>2000-07-11 18:35:33 +0000
commit7978f67e28e01f88526fe3fb37716e4788800fd6 (patch)
tree010b7cb1f293d7bdbfb41ff651abdc61d9746287
parentbc2a5e683a64a8750ba4ece7c3a27ff988492370 (diff)
downloadsrc-7978f67e28e01f88526fe3fb37716e4788800fd6.tar.gz
src-7978f67e28e01f88526fe3fb37716e4788800fd6.zip
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).
Notes
Notes: svn path=/head/; revision=62967
-rw-r--r--sys/dev/random/yarrow.c11
-rw-r--r--sys/dev/randomdev/yarrow.c11
2 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c
index 75bcf6c44159..99453f6a3e91 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;
diff --git a/sys/dev/randomdev/yarrow.c b/sys/dev/randomdev/yarrow.c
index 75bcf6c44159..99453f6a3e91 100644
--- a/sys/dev/randomdev/yarrow.c
+++ b/sys/dev/randomdev/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;