All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: "H. Peter Anvin" <hpa@zytor.com>, "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	DOV MURIK <Dov.Murik1@il.ibm.com>
Subject: Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding
Date: Thu, 02 Feb 2023 10:17:01 -0500	[thread overview]
Message-ID: <352eb28a1d913db62421064fe50ec9c8f8afd050.camel@linux.ibm.com> (raw)
In-Reply-To: <4396778A-6520-4FB5-9227-1E8850753036@zytor.com>

On Thu, 2023-02-02 at 07:03 -0800, H. Peter Anvin wrote:
[...]
> NAK. We need to fix the actual problem of the kernel stomping on
> memory it shouldn't, not paper around it.

This is a first boot situation, not kexec (I just updated kexec because
it should use any new mechanism we propose).  Unlike kexec, for first
boot we're very constrained by the amount of extra space QEMU has to do
this.  The boot_params are the first page of the kernel load, but the
kernel proper begins directly after it, so we can't expand it.  The two
schemes tried: loading after the kernel and loading after the command
line both tamper with integrity protected files, so we shouldn't use
this mechanism.  This is the essence of the problem: If we add this
area at boot, it has to go in an existing memory location; we can't
steal random guest areas.  All current config parameters are passed
through as fw_config files, so we can only use that mechanism *if* we
know where the area ends up in the loaded kernel *and* the file isn't
integrity protected (this latter is expanding over time).

If we could wind back time, I'd have added the 32 byte random seed to
boot_params properly not coded it as a setup_data addition, but now
we're stuck with coping with existing behaviour, which is why I thought
the retro fit to boot_params would be the better path forward, but if
you have any alternatives, I'm sure we could look at them.

James



  reply	other threads:[~2023-02-02 15:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 13:57 [PATCH] x86: fix q35 kernel measurements broken due to rng seeding James Bottomley
2023-02-01 14:35 ` Daniel P. Berrangé
2023-02-01 14:56   ` James Bottomley
2023-02-01 15:12     ` Jason A. Donenfeld
2023-02-01 15:14     ` Daniel P. Berrangé
2023-02-01 15:10 ` Jason A. Donenfeld
2023-02-01 15:24   ` James Bottomley
2023-02-01 16:41     ` Dov Murik
2023-02-01 16:50     ` Peter Maydell
2023-02-01 19:35       ` James Bottomley
2023-02-01 17:51     ` Jason A. Donenfeld
2023-02-01 20:38       ` James Bottomley
2023-02-01 20:48         ` Jason A. Donenfeld
2023-02-02 14:38           ` James Bottomley
2023-02-02 15:03             ` H. Peter Anvin
2023-02-02 15:17               ` James Bottomley [this message]
2023-02-02 18:56                 ` H. Peter Anvin
2023-02-02 19:02                 ` H. Peter Anvin
2023-02-02 19:13                 ` H. Peter Anvin

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=352eb28a1d913db62421064fe50ec9c8f8afd050.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=Dov.Murik1@il.ibm.com \
    --cc=Jason@zx2c4.com \
    --cc=hpa@zytor.com \
    --cc=kraxel@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.