From: Dragan Simic <dsimic@manjaro.org>
To: Alex ThreeD <alexthreed@gmail.com>
Cc: u-boot@lists.denx.de, Ben Wolsieffer <benwolsieffer@gmail.com>,
Chris Morgan <macromorgan@hotmail.com>,
Jonas Karlman <jonas@kwiboo.se>,
Kever Yang <kever.yang@rock-chips.com>,
Marek Vasut <marex@denx.de>,
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Quentin Schulz <quentin.schulz@cherry.de>,
Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux
Date: Mon, 14 Oct 2024 21:00:12 +0200 [thread overview]
Message-ID: <65bd30e10c687ec5bf19bda34da7df27@manjaro.org> (raw)
In-Reply-To: <CAF4oh-PM8JCymzEbw3ZtYnaF8_fjckHUPUkqv-xS1fZBh5o2cA@mail.gmail.com>
On 2024-10-14 20:50, Alex ThreeD wrote:
> On Mon, Oct 14, 2024 at 9:19 PM Dragan Simic <dsimic@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!
next prev parent reply other threads:[~2024-10-14 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 17:53 [PATCH v2] rockchip: board: Increase rng-seed size to make it sufficient for modern Linux Alex Shumsky
2024-10-14 18:19 ` Dragan Simic
2024-10-14 18:50 ` Alex ThreeD
2024-10-14 19:00 ` Dragan Simic [this message]
2024-10-14 19:17 ` Alex ThreeD
2024-10-14 19:28 ` Dragan Simic
2024-10-14 20:12 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65bd30e10c687ec5bf19bda34da7df27@manjaro.org \
--to=dsimic@manjaro.org \
--cc=alexthreed@gmail.com \
--cc=benwolsieffer@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=macromorgan@hotmail.com \
--cc=marex@denx.de \
--cc=philipp.tomsich@theobroma-systems.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox