From: Clemens Ladisch <clemens@ladisch.de>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux1394-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH] firewire: core: feed /dev/random with devices' GUIDs
Date: Mon, 13 Aug 2012 09:08:41 +0200 [thread overview]
Message-ID: <5028A7F9.4040304@ladisch.de> (raw)
In-Reply-To: <20120812235856.65e2c7d5@stein>
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 <clemens@ladisch.de>
---
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 <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/random.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -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);
}
/*
prev parent reply other threads:[~2012-08-13 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5027CFA7.9000100@ladisch.de>
2012-08-12 21:58 ` [PATCH] firewire: core: feed /dev/random with devices' GUIDs Stefan Richter
2012-08-13 7:08 ` Clemens Ladisch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5028A7F9.4040304@ladisch.de \
--to=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox