From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH resend v3] hw/i386: pass RNG seed via setup_data entry
Date: Wed, 20 Jul 2022 15:03:37 +0200 [thread overview]
Message-ID: <Ytf9KVQNOZBI5u8f@zx2c4.com> (raw)
In-Reply-To: <20220719115300.104095-1-Jason@zx2c4.com>
Hi Paolo,
On Tue, Jul 19, 2022 at 01:53:00PM +0200, Jason A. Donenfeld wrote:
> Tiny machines optimized for fast boot time generally don't use EFI,
> which means a random seed has to be supplied some other way. For this
> purpose, Linux (≥5.20) supports passing a seed in the setup_data table
> with SETUP_RNG_SEED, specially intended for hypervisors, kexec, and
> specialized bootloaders. The linked commit shows the upstream kernel
> implementation.
Having received your message in the other thread hinting, "I think
there are some issues with migration compatibility of setup_data and
they snowball a bit, so I'll reply there," and being a bit eager to get
this moving, I thought I'd preempt that discussion by trying to guess
what you have in mind and replying to it. Speculative email execution...
The SETUP_RNG_SEED parameter is used only during boot, and Linux takes
pains to zero out its content after using. If a VM is migrated or
copied, the RNG state is also migrated, just as is the case before
SETUP_RNG_SEED. For that reason, Linux also has a "vmgenid" driver,
which QEMU supports via `-device vmgenid,guid=auto`, which is an ACPI
mechanism for telling the RNG to reseed under various migration
circumstances. But this is merely complementary to SETUP_RNG_SEED, which
is intended as a very simple mechanism for passing a seed at the
earliest moment in boot, akin to DT's "rng-seed" node.
Hopefully this answers what I think you were going to ask, and sorry if
it's a total non-sequitur.
Regards,
Jason
next prev parent reply other threads:[~2022-07-20 13:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 14:54 [PATCH v3] hw/i386: pass RNG seed via setup_data entry Jason A. Donenfeld
2022-07-19 11:53 ` [PATCH resend " Jason A. Donenfeld
2022-07-20 13:03 ` Jason A. Donenfeld [this message]
2022-07-21 9:19 ` Paolo Bonzini
2022-07-21 9:47 ` Jason A. Donenfeld
2022-07-21 9:56 ` Jason A. Donenfeld
2022-07-21 10:09 ` [PATCH v4] " Jason A. Donenfeld
2022-07-21 10:35 ` Michael S. Tsirkin
2022-07-21 10:42 ` Jason A. Donenfeld
2022-07-21 10:47 ` [PATCH v5] " Jason A. Donenfeld
2022-07-21 10:49 ` [PATCH v6] " Jason A. Donenfeld
2022-07-21 11:00 ` Michael S. Tsirkin
2022-07-21 11:00 ` Jason A. Donenfeld
2022-07-21 11:47 ` Paolo Bonzini
2022-07-21 12:16 ` Jason A. Donenfeld
2022-07-21 12:27 ` Daniel P. Berrangé
2022-07-21 12:41 ` Paolo Bonzini
2022-07-21 12:52 ` Jason A. Donenfeld
2022-07-21 12:56 ` [PATCH v7] " Jason A. Donenfeld
2022-07-21 13:00 ` Paolo Bonzini
2022-07-21 13:00 ` Paolo Bonzini
2022-07-21 13:04 ` Jason A. Donenfeld
2022-07-22 6:10 ` Paolo Bonzini
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=Ytf9KVQNOZBI5u8f@zx2c4.com \
--to=jason@zx2c4.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.