]> git.karo-electronics.de Git - karo-tx-linux.git/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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:36:11 +0000 (15:36 -0400)
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>
drivers/firmware/dmi_scan.c

index d46467271349d79adbabd04a76bb55a7b7cff19f..1816d928f74128641ef9a2d16183800168a46ae4 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/dmi.h>
 #include <linux/efi.h>
 #include <linux/bootmem.h>
+#include <linux/random.h>
 #include <asm/dmi.h>
 
 /*
@@ -110,6 +111,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;
 }