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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -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 64U | 1225 | #define EFI_RANDOM_SEED_SIZE 32U // BLAKE2S_HASH_SIZE |
| 1226 | 1226 | ||
| 1227 | struct linux_efi_random_seed { | 1227 | struct linux_efi_random_seed { |
| 1228 | u32 size; | 1228 | u32 size; |