From: Jarod Wilson Subject: Re: [PATCH 4/5] tsc: wire up entropy generation function Date: Mon, 13 Jun 2011 18:35:10 -0400 Message-ID: <4DF6909E.60103@redhat.com> References: <1308002818-27802-1-git-send-email-jarod@redhat.com> <1308002818-27802-5-git-send-email-jarod@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-crypto@vger.kernel.org, Matt Mackall , Thomas Gleixner , Ingo Molnar , John Stultz , Herbert Xu , "David S. Miller" , "H. Peter Anvin" , Suresh Siddha To: Venkatesh Pallipadi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34627 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755165Ab1FMWfd (ORCPT ); Mon, 13 Jun 2011 18:35:33 -0400 In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: Venkatesh Pallipadi wrote: > On Mon, Jun 13, 2011 at 3:06 PM, Jarod Wilson wrote: >> TSC is high enough resolution that we can use its low-order byte to >> stir new data into the random number generator entropy pool. > > From what I vaguely remember from years past, rdtsc, especially last > few bits of it are not very good as random number source. As they are > based on lower bus frequency and a multiplier. May be things have > changed these days. Adding Peter and Suresh for comments. Ah, that would definitely be good to know. I *have* enabled debug spew on my primary test rig though, and the randomness appears to be quite good in the low byte using tsc as the primary clocksource. Its a ~3+ year old core 2 duo 2.67GHz system though, so things could easily be better or worse with more current systems, and I can't say that I've tried it out exhaustively with the cpu at full-bore, which could affect things (system is mostly idle, so acpi-cpufreq had the cpu dialed back). -- Jarod Wilson jarod@redhat.com