[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var
From: |
Jason A. Donenfeld |
Subject: |
Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var |
Date: |
Tue, 4 Oct 2022 12:56:25 +0200 |
On Tue, Oct 4, 2022 at 12:53 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 4 Oct 2022 at 11:40, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> >
> > And just to give you some idea that this truly is possible from firmware
> > and I'm not just making it up, consider this patch to U-Boot:
> >
> > u-boot:
> > diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
> > index cab8da4860..27f3ee68c0 100644
> > --- a/arch/mips/lib/bootm.c
> > +++ b/arch/mips/lib/bootm.c
> > @@ -211,6 +211,8 @@ static void linux_env_legacy(bootm_headers_t *images)
> > sprintf(env_buf, "%un8r", gd->baudrate);
> > linux_env_set("modetty0", env_buf);
> > }
> > +
> > + linux_env_set("rngseed",
> > "4142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60");
> > }
> >
>
> >
> > So, as you can see, it works perfectly. Thus, setting this in QEMU
> > follows *exactly* *the* *same* *pattern* as every other architecture
> > that allows for this kind of mechanism. There's nothing weird or unusual
> > or out of place happening here.
>
> I think the unusual thing here is that this patch isn't
> "this facility is implemented by u-boot [commit whatever,
> docs whatever], and here is the patch adding it to QEMU's
> handling of the same interface". That is, for boards like
> Malta the general expectation is that we're emulating
> a piece of real hardware and the firmware/bootloader
> that it would be running, so "this is a patch that
> implements an interface that the real bootloader doesn't
> have" is a bit odd.
Except it's not different from other platforms that get bootloader
seeds as such. A bootloader can easily pass this; QEMU most certainly
should pass this. (I sincerely hope you're not arguing in favor of
holding back progress in this area for yet another decade.)
Jason
- Re: [PATCH qemu] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/01
- Re: [PATCH qemu] mips/malta: pass RNG seed to to kernel via env var, Bernhard Reutner-Fischer, 2022/10/01
- [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/03
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/03
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Philippe Mathieu-Daudé, 2022/10/03
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/03
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Peter Maydell, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var,
Jason A. Donenfeld <=
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Peter Maydell, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, BALATON Zoltan, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Jason A. Donenfeld, 2022/10/04
- Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var, Daniel P . Berrangé, 2022/10/04