From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753259Ab1KPTll (ORCPT ); Wed, 16 Nov 2011 14:41:41 -0500 Received: from www.linutronix.de ([62.245.132.108]:60228 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831Ab1KPTlk (ORCPT ); Wed, 16 Nov 2011 14:41:40 -0500 Date: Wed, 16 Nov 2011 20:41:15 +0100 (CET) From: Thomas Gleixner To: "H. Peter Anvin" cc: "Luck, Tony" , Linus Torvalds , Ingo Molnar , Fenghua Yu , Matt Mackall , Herbert Xu , "Theodore Ts'o" , Jeff Garzik , Arjan van de Ven , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fix typo/thinko in get_random_bytes() In-Reply-To: <4EC41060.2040501@zytor.com> Message-ID: References: <4ec4061010261a4cb0@agluck-desktop.sc.intel.com> <4EC41060.2040501@zytor.com> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Nov 2011, H. Peter Anvin wrote: > On 11/16/2011 10:50 AM, Luck, Tony wrote: > > If there is an architecture-specific random number generator we use > > it to acquire randomness one "long" at a time. We should put these > > random words into consecutive words in the result buffer - not just > > overwrite the first word again and again. > > > > Signed-off-by: Tony Luck > > Ouch. Good catch. This, I guess, is the downside of doing this only on > the kernel paths... made this kind of errors harder to catch. > > Acked-by: H. Peter Anvin Acked-by: Thomas Gleixner