Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2012 19:28:36 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-security@freebsd.org
Subject:   Re: Collecting entropy from device_attach() times.
Message-ID:  <20120919192836.3a60cdfd@gumby.homeunix.com>
In-Reply-To: <20120918211422.GA1400@garage.freebsd.pl>
References:  <20120918211422.GA1400@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Sep 2012 23:14:22 +0200
Pawel Jakub Dawidek wrote:

> Hi.
>=20

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

+	attachtime =3D 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=F8rgrav 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.=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120919192836.3a60cdfd>