summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/randomdev.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-07-17 12:23:04 +0000
committermarkm <markm@FreeBSD.org>2000-07-17 12:23:04 +0000
commit8d7820758595ec235d4238e286c63546a533f9d3 (patch)
tree340bfc3b8cc0e99ad95e3e127e973e17127f38fb /sys/dev/random/randomdev.c
parent542bea8cf0b0bdbb6b61e4bb41cce819a51347da (diff)
downloadFreeBSD-src-8d7820758595ec235d4238e286c63546a533f9d3.zip
FreeBSD-src-8d7820758595ec235d4238e286c63546a533f9d3.tar.gz
Add randomness write functionality. This does absolutely nothing for
entropy estimation, but causes an immediate reseed after the input (read in sizeof(u_int64_t) chunks) is "harvested". This will be used in the reboot "reseeder", coming in another commit. This can be used very effectively at any time you think your randomness is compromised; something like # (ps -gauxwww; netstat -an; dmesg; vmstat -c10 1) > /dev/random will give the attacker something to think about.
Diffstat (limited to 'sys/dev/random/randomdev.c')
-rw-r--r--sys/dev/random/randomdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index ff5e481..c84f4bd 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -117,7 +117,7 @@ random_write(dev_t dev, struct uio *uio, int flag)
error = uiomove(random_buf, c, uio);
if (error)
break;
- /* write_random(random_buf, c); */
+ write_random(random_buf, c);
}
free(random_buf, M_TEMP);
return error;
OpenPOWER on IntegriCloud