Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690Ab2HMHIo (ORCPT ); Mon, 13 Aug 2012 03:08:44 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:54160 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250Ab2HMHIn (ORCPT ); Mon, 13 Aug 2012 03:08:43 -0400 X-Sasl-enc: 75AczJedSVvWSBAXTnk6J3HJUVvcuPc2Jt1SmsxpGJpA 1344841722 Message-ID: <5028A7F9.4040304@ladisch.de> Date: Mon, 13 Aug 2012 09:08:41 +0200 From: Clemens Ladisch User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Stefan Richter CC: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, "Theodore Ts'o" Subject: Re: [PATCH] firewire: core: feed /dev/random with devices' GUIDs References: <5027CFA7.9000100@ladisch.de> <20120812235856.65e2c7d5@stein> In-Reply-To: <20120812235856.65e2c7d5@stein> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1538 Lines: 46 Stefan Richter wrote: > On Aug 12 Clemens Ladisch wrote: >> Send the GUIDs of newly registered controllers and devices >> to the /dev/random driver to help seed its pools. > > This looks good to me, almost. Isn't the call in fw_card_add redundant? > The local node's fw_device instance initializer feeds the same GUID, > although a little bit later. Oops, indeed. Just drop that hunk: --8<---------------------------------------------------------------->8-- firewire: core: feed /dev/random with devices' GUIDs Send the GUIDs of newly registered controllers and devices to the /dev/random driver to help seed its pools. Signed-off-by: Clemens Ladisch --- drivers/firewire/core-device.c | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -1066,6 +1067,8 @@ static void fw_device_init(struct work_struct *work) device->config_rom_retries = 0; set_broadcast_channel(device, device->generation); + + add_device_randomness(&device->config_rom[3], 8); } /* -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/