DragonFly BSD
DragonFly commits List (threaded) for 2006-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/kern kern_random.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Apr 2006 11:20:54 -0700 (PDT)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]