[PATCH] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux

Marek Vasut marex at denx.de
Mon Oct 14 12:34:08 CEST 2024


On 10/14/24 12:26 PM, Alex ThreeD wrote:
> On Mon, Oct 14, 2024 at 12:10 AM Marek Vasut <marex at denx.de> wrote:
>> Let's make this override-able via environment variable, because this
>> might be growing in the future again. Does this work ?
>>
>> size_t len = env_get_ulong("kaslrseed_size", 10, 32);
> 
> Maybe `env_get_hex("rng_seed_size", 32)` would be better? As most other env are
> hexadecimal.

The env vars are a mixed bag, this one is clearly decimal though.

> Actually it seems that entropy required to init pool early has decreased in
> Linux 5.19 from 64 bytes (2 * CHACHA_KEY_SIZE) to 32 bytes
> (BLAKE2S_HASH_SIZE)
> https://elixir.bootlin.com/linux/v5.18/source/drivers/char/random.c#L236
> https://elixir.bootlin.com/linux/v5.19/source/drivers/char/random.c#L551
> Anyway config knob should not harm.

A couple more random numbers would cover all the bases then.


More information about the U-Boot mailing list