cvs commit: src/sys/kern kern_random.c
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Apr 12 11:29:10 PDT 2006
dillon 2006/04/12 11:20:54 PDT
DragonFly src repository
Modified files:
sys/kern kern_random.c
Log:
/dev/random was almost always returning 0 bytes. This was due to several
factors, primarily the fact that the stack smash handler reads 32 bytes from
/dev/urandom every time a program is exec'd, and because /dev/random and
/dev/urandom share the same pool.
involved: (1) The stack smash handler reads 32 bytes from /dev/urandom every
time a program is exec'd. This exhausts the pool almost immediately.
(2) /dev/random and /dev/urandom share the same pool, and /dev/urandom is
called so often that there is never any entropy available for /dev/random.
Give /dev/random and /dev/urandom separate entropy pools and make the entropy
loss calculation less conservative.
Reported-by: David Rhodus
Revision Changes Path
1.13 +45 -18 src/sys/kern/kern_random.c
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_random.c.diff?r1=1.12&r2=1.13&f=u
More information about the Commits
mailing list