All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: "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: Wed, 01 Feb 2023 15:38:53 -0500	[thread overview]
Message-ID: <a2d5634ab624497d7d98569041e76661062f7eaf.camel@linux.ibm.com> (raw)
In-Reply-To: <CAHmME9ps8w8TbC_6Bk8OQbJytR-_CJrcUWT_uXDV+xjL293NHQ@mail.gmail.com>

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.

James



  reply	other threads:[~2023-02-01 20:39 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 [this message]
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
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=a2d5634ab624497d7d98569041e76661062f7eaf.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=Dov.Murik1@il.ibm.com \
    --cc=Jason@zx2c4.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.