From owner-freebsd-security@FreeBSD.ORG Tue Oct 2 17:22:43 2012 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69E7E106566C; Tue, 2 Oct 2012 17:22:43 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 203998FC0C; Tue, 2 Oct 2012 17:22:42 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id B3A8C6BD8; Tue, 2 Oct 2012 19:22:41 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 5E77481B8; Tue, 2 Oct 2012 19:22:41 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ben Laurie References: <20120918211422.GA1400@garage.freebsd.pl> <20120919231051.4bc5335b@gumby.homeunix.com> <20120920102104.GA1397@garage.freebsd.pl> <201209200758.51924.jhb@freebsd.org> <20120922080323.GA1454@garage.freebsd.pl> <20120922195325.GH1454@garage.freebsd.pl> <505E59DC.7090505@gmail.com> <20120923151706.GN1454@garage.freebsd.pl> <5060D723.6020305@gmail.com> <86r4pqqwnm.fsf@ds4.des.no> <86ipat6n0o.fsf@ds4.des.no> Date: Tue, 02 Oct 2012 19:22:40 +0200 In-Reply-To: <86ipat6n0o.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Tue, 02 Oct 2012 15:07:03 +0200") Message-ID: <86y5joiyan.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Jonathan Anderson , Pawel Jakub Dawidek , John Baldwin , freebsd-security@freebsd.org, RW , Mariusz Gromada 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: Tue, 02 Oct 2012 17:22:43 -0000 Dag-Erling Sm=C3=B8rgrav writes: > http://people.freebsd.org/~des/attachtimes-text.txz 1) There is a bug in the program - I made a couple of changes which I didn't like but didn't fully revert. The (argc !=3D 0) in main() should actually be (argc =3D=3D 0). 2) I modified the program to create a histogram of the lower bits and looked at that in gnuplot. It was immediately obvious that the distribution is extremely non-uniform. I suspect that this is - at least in part - due to the weird way get_cyclecount() computes the value it returns. We should either rewrite it to return something sensible or nuke it and use binuptime() instead. I uploaded a new tarball with the improved program and the histogram: http://people.freebsd.org/~des/attachtimes-total.txz DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no