git: kernel - Improve basic entropy collector

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Jul 1 10:11:27 PDT 2015


commit ba218aa7a68599ce1b72995641c4bb50fa95788f
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Jul 1 10:07:21 2015 -0700

    kernel - Improve basic entropy collector
    
    * Faster time-buffered period in first 120 seconds after boot to help seed
      the generator.  This helps when other sources such as RDRAND are not available.
    
    * Use a systimer instead of tsleep to make the 'random' loop delay more random.
    
    * Do a better job incorporating interrupt randomness with a combination of
      counter and low TSC bits.
    
    * Get rid of the double-time-buffering restrictions (one in the thread, one in
      NANOUP_EVENT().  Also incorporate the low TSC bits in different bit positions
      to try to avoid XOR deconstruction against tv_nsec.
    
    Reported-by: tuxillo

Summary of changes:
 sys/kern/kern_nrandom.c | 127 +++++++++++++++++++++++++++---------------------
 1 file changed, 72 insertions(+), 55 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ba218aa7a68599ce1b72995641c4bb50fa95788f


-- 
DragonFly BSD source repository



More information about the Commits mailing list