lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5028A7F9.4040304@ladisch.de>
Date:	Mon, 13 Aug 2012 09:08:41 +0200
From:	Clemens Ladisch <clemens@...isch.de>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
CC:	linux1394-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH] firewire: core: feed /dev/random with devices' GUIDs

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@...isch.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);
 	}

 	/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ