summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2013-09-06 17:51:52 +0000
committermarkm <markm@FreeBSD.org>2013-09-06 17:51:52 +0000
commitd3a8919edc9a8e3635968a76db07078a44c2ead2 (patch)
tree95fc4f3c6e930dc97a3bb9eb8e0d624d9cd9335d /sys/mips
parent9d67aa8bffecbac35da57b6e638e6ae76f81a4be (diff)
downloadFreeBSD-src-d3a8919edc9a8e3635968a76db07078a44c2ead2.zip
FreeBSD-src-d3a8919edc9a8e3635968a76db07078a44c2ead2.tar.gz
Yarrow wants entropy estimations to be conservative; the usual idea
is that if you are certain you have N bits of entropy, you declare N/2.
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/cavium/octeon_rnd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/mips/cavium/octeon_rnd.c b/sys/mips/cavium/octeon_rnd.c
index 634a4fa..298f06a 100644
--- a/sys/mips/cavium/octeon_rnd.c
+++ b/sys/mips/cavium/octeon_rnd.c
@@ -131,7 +131,7 @@ octeon_rnd_harvest(void *arg)
for (i = 0; i < OCTEON_RND_WORDS; i++)
sc->sc_entropy[i] = cvmx_rng_get_random64();
random_harvest(sc->sc_entropy, sizeof sc->sc_entropy,
- sizeof sc->sc_entropy * 8, 0, RANDOM_PURE);
+ (sizeof(sc->sc_entropy)*8)/2, 0, RANDOM_PURE);
callout_reset(&sc->sc_callout, hz * 5, octeon_rnd_harvest, sc);
}
OpenPOWER on IntegriCloud