All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: "James E . J . Bottomley" <jejb@linux.ibm.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	DOV MURIK <Dov.Murik1@il.ibm.com>,
	"H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding
Date: Wed, 1 Feb 2023 15:48:28 -0500	[thread overview]
Message-ID: <CAHmME9qy3_TPXoZ4j10JUvGGAbNikb5MdgQRw5DgTmj7nqLujA@mail.gmail.com> (raw)
In-Reply-To: <a2d5634ab624497d7d98569041e76661062f7eaf.camel@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]

Hi James,

On Wed, Feb 1, 2023, 15:39 James Bottomley <jejb@linux.ibm.com> wrote:

> On Wed, 2023-02-01 at 12:51 -0500, Jason A. Donenfeld wrote:
> > It's not a secret, but I have so little internet right now that I
> > can't even load a webpage, and I'm on my phone, hence the short
> > HTMLified emails.
> >
> > In brief, though, it gets rid of all modifications to the kernel
> > image all together, so it should fix your issue.
>
> We've already tested it and established it doesn't because you simply
> added your rng data to the end of a different integrity protected file
> which now fails the integrity check instead of the kernel.
>
> I checked the kernel source as well; I thought you'd have done the
> usual thing and bumped the boot protocol version to steal space in
> __pad9, but you didn't apparently.  To fix this up after the fact, I
> recommend that we still steal space in _pad9[] but we make it have
> enough space for a setup_data header as well as the 32 random bytes, so
> we've officially reserved the space, but in earlier kernels than this
> change gets to you can still use the setup_data_offset method, except
> that it now uses the empty space in _pad9 via the setup_data mechanism.
> That should find you space and get you out of having to expand any
> integrity protected files.  The SEV direct boot will still work because
> there's a check further down that doesn't copy the modified header back
> over the kernel because it is ignored on efi stub boot anyway.


Ahh, it looks like there's now an integrity check on the cmdline file. Darn.

The patch in that PULL is still good and necessary and fixed a *different*
bug, though. So we should still move forward on that.

But it sounds like you might now have a concrete suggestion on something
even better. I'm CCing hpa, as this is his wheelhouse, and maybe you two
can divise the next step while I'm away. Maybe the pad9 thing you mentioned
is the super nice solution we've been searching for this whole time. When
I'm home in 10 days and have internet again, I'll take a look at where
thing's are out and try to figure out how I can be productive again with it.

And sorry again for the short HTML emails. A day ago I was using mosh from
my phone to use mutt on a server to reply to emails downloaded from lore.
But today the cloud cover means the best I can do is queue these up in the
Android gmail client and hope they eventually send.

Jason

[-- Attachment #2: Type: text/html, Size: 3117 bytes --]

  reply	other threads:[~2023-02-01 20:49 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 [this message]
2023-02-02 14:38           ` James Bottomley
2023-02-02 15:03             ` H. Peter Anvin
2023-02-02 15:17               ` James Bottomley
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=CAHmME9qy3_TPXoZ4j10JUvGGAbNikb5MdgQRw5DgTmj7nqLujA@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=Dov.Murik1@il.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jejb@linux.ibm.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.