Revert "of: Feed entire flattened device tree into the random pool"
This reverts commit 109b623629
.
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: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
444c91e572
commit
b920ecc826
|
@ -18,7 +18,6 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/random.h>
|
||||
|
||||
#include <asm/setup.h> /* for COMMAND_LINE_SIZE */
|
||||
#ifdef CONFIG_PPC
|
||||
|
@ -803,14 +802,3 @@ void __init unflatten_device_tree(void)
|
|||
}
|
||||
|
||||
#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);
|
||||
|
|
Loading…
Reference in New Issue