[PATCH v2] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux
Dragan Simic
dsimic at manjaro.org
Mon Oct 14 21:00:12 CEST 2024
On 2024-10-14 20:50, Alex ThreeD wrote:
> On Mon, Oct 14, 2024 at 9:19 PM Dragan Simic <dsimic at manjaro.org>
> wrote:
>> > + // rng_seed_size should be 32 bytes for Linux 5.19+, or 64 for older
>> > Linux'es
>>
>> Shouldn't it be 8 for older kernels?
>
> Looking into source code I would say Linux 5.17 requires 64 bytes to
> init crng.
> 8 bytes rng_seed should help somehow, but It will not init crng
> instantly.
> Maybe some even Linux required only 8 bytes but I doubt so.
> 8 bytes was too small for cryptographic PRNG yet 20 years ago.
To sum up the replies from Marek, the lower limit should be 64.
>>
>> > + log_warning("Too small rng_seed_size (%lu). It is likely
>> > insufficient to init linux crng\n",
>> > + len);
>>
>> Perhaps this would read better:
>>
>> "Value for rng_seed_size too low (%lu) and likely insufficient
>> for the Linux RNG initialization"
>
> Thanks, I will apply It in v3.
Great, thanks!
More information about the U-Boot
mailing list