qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/3] SEV: fixes for -kernel launch with incompatible OVMF


From: Dov Murik
Subject: [PATCH 0/3] SEV: fixes for -kernel launch with incompatible OVMF
Date: Mon, 1 Nov 2021 10:21:33 +0000

Tom Lendacky and Brijesh Singh reported two issues with launching SEV
guests with the -kernel QEMU option when an old [1] or wrongly configured [2]
OVMF images are used.

The fixes in patches 1 and 2 allow such guests to boot by skipping the
kernel/initrd/cmdline hashes addition to the initial guest memory (and
warning the user).

Patch 3 is a refactoring of parts of the same function
sev_add_kernel_loader_hashes() to calculate all padding sizes at
compile-time.  This patch is not required to fix the issues above, but
is suggested as an improvement (no functional change intended).

Note that launch measurement security is not harmed by these fixes: a
Guest Owner that wants to use measured Linux boot with -kernel, must use
(and measure) an OVMF image that designates a proper hashes table area,
and that verifies those hashes when loading the binaries from QEMU via
fw_cfg.

The old OVMFs which don't publish the hashes table GUID or don't reserve
a valid area for it in MEMFD cannot support these hashes verification in
any case (for measured boot with -kernel).


[1] 
https://lore.kernel.org/qemu-devel/3b9d10d9-5d9c-da52-f18c-cd93c1931706@amd.com/
[2] 
https://lore.kernel.org/qemu-devel/001dd81a-282d-c307-a657-e228480d4af3@amd.com/

Dov Murik (3):
  sev/i386: Allow launching with -kernel if no OVMF hashes table found
  sev/i386: Warn if using -kernel with invalid OVMF hashes table area
  sev/i386: Perform padding calculations at compile-time

 target/i386/sev.c | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)


base-commit: af531756d25541a1b3b3d9a14e72e7fedd941a2e
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]