diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2022-02-17 21:01:11 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2022-02-17 21:01:11 +0000 |
| commit | 5c73b3e0a3db79a3d8b96b3b4c8bc4fb7fee35f2 (patch) | |
| tree | 17344b6529cefa5018858a228f007bb662594fcb /sys | |
| parent | c44160d8ad32b5415fda13c56352424f9d56e949 (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/random/random_harvestq.c | 8 | ||||
| -rw-r--r-- | sys/sys/random.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index aae8ec9172d7..6d3e9534e15b 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -488,6 +488,14 @@ random_harvestq_prime(void *unused __unused) else printf("random: no preloaded entropy cache\n"); } + size = random_prime_loader_file(RANDOM_PLATFORM_BOOT_ENTROPY_MODULE); + if (bootverbose) { + if (size > 0) + printf("random: read %zu bytes from platform bootloader\n", + size); + else + printf("random: no platform bootloader entropy\n"); + } } SYSINIT(random_device_prime, SI_SUB_RANDOM, SI_ORDER_MIDDLE, random_harvestq_prime, NULL); diff --git a/sys/sys/random.h b/sys/sys/random.h index 6f4f90c9de98..81d2a40c72dd 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -110,6 +110,7 @@ _Static_assert(ENTROPYSOURCE <= 32, "hardcoded assumption that values fit in a typical word-sized bitset"); #define RANDOM_CACHED_BOOT_ENTROPY_MODULE "boot_entropy_cache" +#define RANDOM_PLATFORM_BOOT_ENTROPY_MODULE "boot_entropy_platform" extern u_int hc_source_mask; void random_harvest_queue_(const void *, u_int, enum random_entropy_source); |
