History

efi: random: reduce seed size to 32 bytes

We no longer need at least 64 bytes of random seed to permit the early crng init to complete. The RNG is now based on Blake2s, so reduce the EFI seed size to the Blake2s hash size, which is sufficient for our purposes. While at it, drop the READ_ONCE(), which was supposed to prevent size from being evaluated after seed was unmapped. However, this cannot actually happen, so READ_ONCE() is unnecessary here.

Ard Biesheuvel committed 4 years ago

Commit 161a4381 parent f4cd18c2 files · +2 −2Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/efi.h+1−1
@@ -1222,7 +1222,7 @@ efi_status_t efi_random_get_seed(void); · 1221 unmodified lines
1222 arch_efi_call_virt_teardown(); \1222 arch_efi_call_virt_teardown(); \
1223})1223})
1224 1224
1225#define EFI_RANDOM_SEED_SIZE 64U1225#define EFI_RANDOM_SEED_SIZE 32U // BLAKE2S_HASH_SIZE
1226 1226
1227struct linux_efi_random_seed {1227struct linux_efi_random_seed {
1228 u32 size;1228 u32 size;