Lines Matching refs:seed
53 * efi_random_get_seed() - provide random seed as configuration table
70 struct linux_efi_random_seed *prev_seed, *seed = NULL;
88 * Check whether a seed was provided by a prior boot stage. In that
91 * Note that we should read the seed size with caution, in case the
102 * allocation will survive a kexec reboot (although we refresh the seed
106 struct_size(seed, bits, seed_size),
107 (void **)&seed);
109 efi_warn("Failed to allocate memory for RNG seed.\n");
115 EFI_RANDOM_SEED_SIZE, seed->bits);
123 EFI_RANDOM_SEED_SIZE, seed->bits);
131 &nv_seed_size, seed->bits + offset);
135 * We delete the seed here, and /hope/ that this causes
140 * instead, and write a new seed.
148 memzero_explicit(seed->bits + offset, nv_seed_size);
155 memcpy(seed->bits + offset, prev_seed->bits, prev_seed_size);
159 seed->size = offset;
160 status = efi_bs_call(install_configuration_table, &rng_table_guid, seed);
165 /* wipe and free the old seed if we managed to install the new one */
172 memzero_explicit(seed, struct_size(seed, bits, seed_size));
173 efi_bs_call(free_pool, seed);
174 efi_warn("Failed to obtain seed from EFI_RNG_PROTOCOL or EFI variable\n");
177 efi_warn("Retaining bootloader-supplied seed only");