Re: [PATCH 0/3] random: add random.rng_seed to bootconfig entry
From: Masami Hiramatsu
Date: Fri Feb 14 2020 - 19:17:28 EST
Hi Rob,
On Fri, 14 Feb 2020 12:14:53 -0600
Rob Herring <robh@xxxxxxxxxx> wrote:
> To clarify my question: Why do we need random seed in bootconfig
> rather than just the kernel command line? I'm not understanding why
> things changed from your original patch.
I recommended to use it in the previous thread, because of simplicity.
Since it has to hide from userspace and modules, it needs to modify
kernel command line. But the bootconfig can make it simple, and it
also architecture independent.
> > In addition, 2B Android devices on the planet, especially in light of
> > the Android GKI distribution were everything that is vendor created is
> > in a module, needs a way to collect early entropy prior to module load
> > and pass it to the kernel. Yes, they do have access to the recently
> > added Device Tree approach, and we expect them to use it, as I have an
> > active backport for the mechanism into the Android 4.19 and 5.4 kernels.
FYI, I backported bootconfig with boot-time tracer for 4.19 stable kernel
recently.
https://github.com/mhiramat/linux/commits/ftrace-boottrace-4.19
You can check what commits are related.
> > There may also be some benefit to allowing the 13000 different
> > bootloaders an option to use bootconfig as a way of propagating the much
> > needed entropy to their kernels. I could make a case to also allow them
> > command line as another option to relieve their development stress to
> > deliver product, but we can stop there. Regardless, this early entropy
> > has the benefit of greatly improving security and precious boot time.
>
> We're going to update 13000 bootloaders to understand bootconfig
> rather than use the infrastructure already in place (DT and/or command
> line)?
>
> bootconfig is an ftrace feature only IMO. If it's more than that, I
> imagine there will be some opinions about that. Adding new
> bootloader-kernel interfaces is painful and not something to just add
> without much review.
The bootconfig itself is designed as a generic feature. I had tried to use
devicetree, but that was rejected. Thus I made it as a "software
configuration tree" (but far simpler.)
If you have any review comment on the bootconfig, always welcome!
Seriously, I would like to have more comments. I want to make it better.
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>