]> git.hungrycats.org Git - linux/commitdiff
dmi: Feed DMI table to /dev/random driver
authorTony Luck <tony.luck@intel.com>
Fri, 20 Jul 2012 20:15:20 +0000 (13:15 -0700)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Oct 2012 21:41:23 +0000 (23:41 +0200)
commit d114a33387472555188f142ed8e98acdb8181c6d upstream.

Send the entire DMI (SMBIOS) table to the /dev/random driver to
help seed its pools.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/firmware/dmi_scan.c

index 3a2ccb09e2f85d0cb6c9344dc92d8579e34df590..10a4246c7a6a0fd4b8af3f233c9398b395f47048 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/efi.h>
 #include <linux/bootmem.h>
 #include <linux/slab.h>
+#include <linux/random.h>
 #include <asm/dmi.h>
 
 /*
@@ -111,6 +112,8 @@ static int __init dmi_walk_early(void (*decode)(const struct dmi_header *,
 
        dmi_table(buf, dmi_len, dmi_num, decode, NULL);
 
+       add_device_randomness(buf, dmi_len);
+
        dmi_iounmap(buf, dmi_len);
        return 0;
 }