From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: michal.zygowski@3mdeb.com,
Bobby Eshleman <bobbyeshleman@gmail.com>,
olivier.lambert@vates.fr, krystian.hebel@3mdeb.com,
xen-devel@lists.xenproject.org, piotr.krol@3mdeb.com
Subject: Re: [RFC] UEFI Secure Boot on Xen Hosts
Date: Fri, 1 May 2020 14:42:01 +0200 [thread overview]
Message-ID: <20200501124201.GJ1178@mail-itl> (raw)
In-Reply-To: <20200501115959.m5pwm735mxbrs66a@tomti.i.net-space.pl>
[-- Attachment #1: Type: text/plain, Size: 3639 bytes --]
On Fri, May 01, 2020 at 01:59:59PM +0200, Daniel Kiper wrote:
> On Fri, May 01, 2020 at 12:27:17AM +0200, Marek Marczykowski-Górecki wrote:
> > On Wed, Apr 29, 2020 at 05:51:08PM -0500, Bobby Eshleman wrote:
> > > # Option #3: Lean on Grub2's LoadFile2() Verification
> > >
> > > Grub2 will provide a LoadFile2() method to subsequent programs that supports
> > > signature verification of arbitrary files. Linux is moving in the
> > > direction of using LoadFile2() for loading the initrd [2], and Grub2 will
> > > support verifying the signatures of files loaded via LoadFile2().
> >
> > This description gives me flashbacks to how xen.efi loads dom0
> > kernel+initramfs (Loaded Image Protocol). Practical issues encountered:
> >
> > 1. It works only when xen.efi is loaded via appropriate EFI boot
> > service directly. If xen.efi is loaded by a filesystem driver in
> > grub/other bootloader, it can't load dom0 kernel+initramfs.
> >
> > 2. Given variety of UEFI implementations and boot medias, it was almost
> > impossible to force bootloader to use the right file loading method
> > (cases like the same file accessible both via UEFI fs0: and via grub's
> > filesystem driver). Which means loading xen.efi via a bootloader (as
> > opposed to directly from UEFI) was hit or miss (mostly miss).
> >
> > 3. To avoid the above issue, one was forced to load xen.efi directly
> > from EFI. This gave up any possibility to manipulate xen cmdline, or
> > even choose system to boot in case of some EFI implementations.
>
> Are you talking about GRUB chainloader command? If yes then use "set root=..."
> to select ESP before running the chainloader.
This exactly resulted in issues in point 2. In many cases it ended up
accessing ESP via grub's own FAT driver.
> Of course the xen.cfg,
> kernel and initramfs have to live on ESP then.
Which is another issue - ESP on ISO9660 is limited to 32MB. Which is a
very tight limit for initramfs of an installer image.
> Xen uses UEFI file system
> calls which understand FAT only. And if GRUB root points to non-FAT
> partition than Xen cannot read anything from it...
>
> > 4. Even if one is lucky to boot xen.efi via grub2-efi, then still only
> > xen options could be modified. But not those for dom0.
> >
> > 5. It was impossible to load xen/kernel/initrd using fancy grub/ipxe
> > features like HTTP.
>
> Why cannot you use multiboot2/module2 to load Xen from GRUB on x86 UEFI
> machines? It does not have issues discussed above. Additionally, the
> Multiboot2 protocol works on legacy BIOS machines too.
Yes, multiboot2 (now supported with UEFI too) solves all the above. I
want to avoid situation where we'd go back to the (subset of) state from
before multiboot2 on UEFI.
>
> > In practice the above points mean:
> >
> > * To get a usable product, one is forced to enable all kind of
> > workarounds (not only related to EFI) _in default configuration_,
> > because otherwise there is very little chance to enable them only when
> > needed.
> >
> > * If something goes wrong, in most cases you need to boot from
> > alternative media (to edit xen.cfg, or efi variables). If you happen
> > to forget your rescue usb stick, you are out of luck.
> >
> > So, please, can someone confirm the LoadFile2() approach wouldn't have
> > any of the above issues?
>
> If it is done properly it should not.
>
> Daniel
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-05-01 12:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 22:51 [RFC] UEFI Secure Boot on Xen Hosts Bobby Eshleman
2020-04-30 7:01 ` Jan Beulich
2020-04-30 11:15 ` Daniel Kiper
2020-04-30 11:41 ` Ard Biesheuvel
2020-05-05 21:58 ` Bobby Eshleman
2020-05-06 6:58 ` Ard Biesheuvel
2020-04-30 22:27 ` Marek Marczykowski-Górecki
2020-04-30 22:42 ` Christopher Clark
2020-05-01 11:59 ` Daniel Kiper
2020-05-01 12:42 ` Marek Marczykowski-Górecki [this message]
2020-05-19 23:39 ` Bobby Eshleman
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=20200501124201.GJ1178@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=bobbyeshleman@gmail.com \
--cc=daniel.kiper@oracle.com \
--cc=krystian.hebel@3mdeb.com \
--cc=michal.zygowski@3mdeb.com \
--cc=olivier.lambert@vates.fr \
--cc=piotr.krol@3mdeb.com \
--cc=xen-devel@lists.xenproject.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.