Collecting entropy from device_attach() times.

RW rwmaillists at googlemail.com
Wed Sep 19 18:28:42 UTC 2012


On Tue, 18 Sep 2012 23:14:22 +0200
Pawel Jakub Dawidek wrote:

> Hi.
> 

> The patch is here:
> 
> 	http://people.freebsd.org/~pjd/patches/harvest_device_attach.patch
> 
> Comments?
> 

+	attachtime = get_cyclecount() - attachtime;

the above line is redundant since random_harvest() already contains a
call to get_cyclecount().



On Wed, 19 Sep 2012 17:28:46 +0200
Dag-Erling Smørgrav wrote:

> You can't rely on the existence of a TSC.  I would suggest using the
> fractional part of binuptime instead.

get_cyclecount() is supposed to be platform independent and should
fall-back to nanotime(9) if TSC or equivalent is absent. 


More information about the freebsd-security mailing list