Commit b920ecc8 authored by Grant Likely's avatar Grant Likely

Revert "of: Feed entire flattened device tree into the random pool"

This reverts commit 109b6236.

Tim Bird expressed concern that this will have a bad effect on boot
time, and while simple tests have shown it to be okay with simple tree,
a device tree blob can potentially be quite large and
add_device_randomness() is not a fast function. Rather than do this for
all platforms unconditionally, I'm reverting this patch and would like
to see it revisited. Instead of feeding the entire tree into the random
pool, it would probably be appropriate to hash the tree and feed the
hash result into the pool. There really isn't a lot of randomness in a
device tree anyway. In the majority of cases only a handful of
properties are going to be different between machines with the same
baseboard.
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 444c91e5
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/random.h>
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */ #include <asm/setup.h> /* for COMMAND_LINE_SIZE */
#ifdef CONFIG_PPC #ifdef CONFIG_PPC
...@@ -803,14 +802,3 @@ void __init unflatten_device_tree(void) ...@@ -803,14 +802,3 @@ void __init unflatten_device_tree(void)
} }
#endif /* CONFIG_OF_EARLY_FLATTREE */ #endif /* CONFIG_OF_EARLY_FLATTREE */
/* Feed entire flattened device tree into the random pool */
static int __init add_fdt_randomness(void)
{
if (initial_boot_params)
add_device_randomness(initial_boot_params,
be32_to_cpu(initial_boot_params->totalsize));
return 0;
}
core_initcall(add_fdt_randomness);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment