Re: [PATCH] random: add rng-seed= command line option
From: Masami Hiramatsu
Date: Thu Feb 13 2020 - 06:25:03 EST
Hi,
On Fri, 7 Feb 2020 19:53:26 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Fri, 7 Feb 2020 19:49:22 -0500
> "Theodore Y. Ts'o" <tytso@xxxxxxx> wrote:
>
>
> > My preference would be to pass in the random seed *not* on the
> > command-line at all, but as a separate parameter which is passed to
> > the bootloader, just as we pass in the device-tree, the initrd and the
> > command-line as separate things. The problem is that how we pass in
> > extra boot parameters is architecture specific, and how we might do it
> > for x86 is different than for arm64. So yeah, it's a bit more
> > inconvenient to do things that way; but I think it's also much
> > cleaner.
>
> Hmm, if the boot loader could add on to the bootconfig that Masami just
> added, then it could add some "random" seed for each boot! The
> bootconfig is just an appended file at the end of the initrd.
Yeah, it is easy to add bootconfig support to a bootloader. It can add
a entropy number as "rng.seed=XXX" text after initrd image with size
and checksum. That is architecutre independent way to pass such hidden
parameter.
(hidden key must be filtered out when printing out the /proc/bootconfig,
but that is very easy too, just need a strncmp)
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>