/* Carve out DT reserved memory ranges */
void efi_carve_out_dt_rsv(void *fdt);
/* Purge unused kaslr-seed */
-void efi_try_purge_kaslr_seed(void *fdt);
+void efi_try_purge_rng_seed(void *fdt);
/* Called by bootefi to make console interface available */
efi_status_t efi_console_register(void);
/* Called by efi_init_obj_list() to proble all block devices */
}
/**
- * efi_try_purge_kaslr_seed() - Remove unused kaslr-seed
+ * efi_try_purge_rng_seed() - Remove unused kaslr-seed, rng-seed
*
* Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization
* and completely ignores the kaslr-seed for its own randomness needs
*
* @fdt: Pointer to device tree
*/
-void efi_try_purge_kaslr_seed(void *fdt)
+void efi_try_purge_rng_seed(void *fdt)
{
+ const char * const prop[] = {"kaslr-seed", "rng-seed"};
const efi_guid_t efi_guid_rng_protocol = EFI_RNG_PROTOCOL_GUID;
struct efi_handler *handler;
efi_status_t ret;
if (nodeoff < 0)
return;
- err = fdt_delprop(fdt, nodeoff, "kaslr-seed");
- if (err < 0 && err != -FDT_ERR_NOTFOUND)
- log_err("Error deleting kaslr-seed\n");
+ for (size_t i = 0; i < ARRAY_SIZE(prop); ++i) {
+ err = fdt_delprop(fdt, nodeoff, prop[i]);
+ if (err < 0 && err != -FDT_ERR_NOTFOUND)
+ log_err("Error deleting %s\n", prop[i]);
+ else
+ log_debug("Deleted /chosen/%s\n", prop[i]);
+ }
}
/**
/* Create memory reservations as indicated by the device tree */
efi_carve_out_dt_rsv(fdt);
- efi_try_purge_kaslr_seed(fdt);
+ efi_try_purge_rng_seed(fdt);
if (CONFIG_IS_ENABLED(EFI_TCG2_PROTOCOL_MEASURE_DTB)) {
ret = efi_tcg2_measure_dtb(fdt);