Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OvmfPkg: secure boot support for direct kernel boot (via shim) #6211

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kraxel
Copy link
Member

@kraxel kraxel commented Sep 17, 2024

  • OvmfPkg/QemuKernelLoaderFsDxe: fetch kernel from etc/boot/kernel if present
  • OvmfPkg/QemuKernelLoaderFsDxe: fetch shim.efi from etc/boot/shim if present
  • OvmfPkg/X86QemuLoadImageLib: support booting via shim
  • OvmfPkg/GenericQemuLoadImageLib: support booting via shim

@kraxel kraxel force-pushed the devel/direct-secure-boot branch 2 times, most recently from 20dc0da to df3ff92 Compare September 17, 2024 12:12
…resent

Add support for loading blobs from fw_cfg files.  For the kernel check
whenever 'etc/boot/kernel' is present, should that be the case prefer it
over the traditional kernel fw_cfg items.

Newer qemu versions expose the kernel without setup header patches that
way.  Patching the setup header breaks secure boot verification, so
avoiding that allows to use direct kernel boot with secure boot enabled.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
…resent

In case the 'etc/boot/shim' fw_cfg file is present fetch that and store
it as 'shim' in the kernel loader file system.  Newer qemu versions
allow to upload shim that way (via 'qemu -shim /path/to/shim.efi').

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Try load shim first.  In case that succeeded update the command line to
list 'kernel' first so shim will fetch the kernel from the kernel loader
file system.

This allows to use direct kernel boot with distro kernels and secure
boot enabled.  Usually distro kernels can only be verified by distro
shim using the distro keys compiled into the shim binary.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Try load shim first.  In case that succeeded update the command line to
list 'kernel' first so shim will fetch the kernel from the kernel loader
file system.

This allows to use direct kernel boot with distro kernels and secure
boot enabled.  Usually distro kernels can only be verified by distro
shim using the distro keys compiled into the shim binary.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant