From owner-freebsd-security@FreeBSD.ORG Wed Sep 19 18:28:42 2012 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AE41106566B for ; Wed, 19 Sep 2012 18:28:42 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 03EED8FC14 for ; Wed, 19 Sep 2012 18:28:41 +0000 (UTC) Received: by eeke52 with SMTP id e52so619712eek.13 for ; Wed, 19 Sep 2012 11:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=7KW2F8nmc0QnRurwotE64VSvtOlYsc7Jk9rBwwABqbQ=; b=YMSLzNduVORm+4iU5GegCD626+PJTs2g1l9u7wOeZ6QkMgNP7bjnIKw0PnqFGhMDEO zTprV3vHhQgUUKELaNkqHqksC6CgVYWH0BLItNLKnNzDs+msrKCdJt+MZfFQICuP5beU RRUctGzLiN82u98QdpU0gY22pFDfdFpTDbr3wx6Gfk8U2Zr89tVquL99DmZ9sFqAnfEK 1Pn9FXHU4jbiiCpzYSz9UGxGOcg5hbQlWxL+SrCSV5xCvh4eERsk5ieSLNX+uKDcEA7W euEf9teIZpJFqQsC/e24YswgrqLGBQGiEKKbuSg+KeaQmp1BxxZrvG7Rn5srY3RkV0Js j3ZA== Received: by 10.14.199.67 with SMTP id w43mr4597719een.33.1348079320877; Wed, 19 Sep 2012 11:28:40 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPS id z3sm9208154eel.15.2012.09.19.11.28.37 (version=SSLv3 cipher=OTHER); Wed, 19 Sep 2012 11:28:39 -0700 (PDT) Date: Wed, 19 Sep 2012 19:28:36 +0100 From: RW To: freebsd-security@freebsd.org Message-ID: <20120919192836.3a60cdfd@gumby.homeunix.com> In-Reply-To: <20120918211422.GA1400@garage.freebsd.pl> References: <20120918211422.GA1400@garage.freebsd.pl> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: Collecting entropy from device_attach() times. X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 18:28:42 -0000 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