summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/nehemiah.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2013-10-08 22:14:07 +0000
committermarkm <markm@FreeBSD.org>2013-10-08 22:14:07 +0000
commit96f5566b8ee5cc7af6b65612eb13e6c52d7c6f2d (patch)
tree9a54587031c0869dab8a48ecf0c7bcf4ba6bcc0d /sys/dev/random/nehemiah.c
parent7334895900372a7f012c15ba12cfd3a9875ea182 (diff)
downloadFreeBSD-src-96f5566b8ee5cc7af6b65612eb13e6c52d7c6f2d.zip
FreeBSD-src-96f5566b8ee5cc7af6b65612eb13e6c52d7c6f2d.tar.gz
Fix some just-noticed problems:
o Allow this to work with "nodevice random" by fixing where the MALLOC pool is defined. o Fix the explicit reseed code. This was correct as submitted, but in the project branch doesn't need to set the "seeded" bit as this is done correctly in the "unblock" function. o Remove some debug ifdeffing. o Adjust comments.
Diffstat (limited to 'sys/dev/random/nehemiah.c')
-rw-r--r--sys/dev/random/nehemiah.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/random/nehemiah.c b/sys/dev/random/nehemiah.c
index 133fe9d..e134ad0 100644
--- a/sys/dev/random/nehemiah.c
+++ b/sys/dev/random/nehemiah.c
@@ -57,10 +57,13 @@ struct random_hardware_source random_nehemiah = {
.read = random_nehemiah_read
};
-/* This H/W RNG never stores more than 8 bytes in one go */
-
+/* TODO: now that the Davies-Meyer hash is gone and we only use
+ * the 'xstore' instruction, do we still need to preserve the
+ * FPU state with fpu_kern_(enter|leave)() ?
+ */
static struct fpu_kern_ctx *fpu_ctx_save;
+/* This H/W source never stores more than 8 bytes in one go */
/* ARGSUSED */
static __inline size_t
VIA_RNG_store(void *buf)
OpenPOWER on IntegriCloud