Bug 216387
Summary: | Boot Loop using 5.19 Kernel and Syslinux on x86-64 UEFI Platform | ||
---|---|---|---|
Product: | Platform Specific/Hardware | Reporter: | watnuss |
Component: | x86-64 | Assignee: | platform_x86_64 (platform_x86_64) |
Status: | RESOLVED CODE_FIX | ||
Severity: | blocking | CC: | artlav, bp, brijesh.singh, michael.roth, ruinairas1992, tglx, thomas.lendacky |
Priority: | P1 | ||
Hardware: | AMD | ||
OS: | Linux | ||
Kernel Version: | 5.19.X | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
watnuss
2022-08-20 22:54:13 UTC
Running the custom kernel build from post https://bbs.archlinux.org/viewtopic.php?pid=2052866#p2052866 allows me to boot into kernel version 5.19.2. If I can give more information or help in testing, please let me know. Already being debugged upstream: https://lore.kernel.org/all/Yvuo2rtootBSlpfQ@jpiotrowski-Surface-Book-3/ This issue seems to be very system-dependent and I'm unable to reproduce on my hardware, but please give this potential fix a try and let me know if it resolves the issue: diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c index 52f989f6acc2..dd6cd0d7c740 100644 --- a/arch/x86/boot/compressed/sev.c +++ b/arch/x86/boot/compressed/sev.c @@ -392,6 +392,13 @@ bool snp_init(struct boot_params *bp) if (!bp) return false; + /* + * bp->cc_blob_address should only be set by boot/compressed kernel. + * Initialize it to 0 to ensure that uninitialized values from + * buggy bootloaders aren't propagated. + */ + bp->cc_blob_address = 0; + cc_info = find_cc_blob(bp); if (!cc_info) return false; The issue can be consistently reproduced in QEMU with OVMF EFI. Place vmlinuz file into an image with a bootloader of your choice, run with "debug ignore_loglevel earlyprintk=efi,keep console=ttyS0". Bad ones will boot loop without printing anything, good ones would print a kernel panic. The arch forum thread linked above also contains a zip file with a ready-to-run QEMU image and scripts. qemu-system-x86_64 \ -nodefaults -m 512 -machine q35 -enable-kvm \ -drive if=pflash,format=raw,readonly=on,file=ovmf_code.fd \ -drive if=pflash,format=raw,file=ovmf_vars-1024x768.fd \ -vga virtio \ -device nvme,drive=nvme0,serial=deadbeaf1,max_ioqpairs=8 -drive file=sdb.qcow2,if=none,id=nvme0 \ -serial stdio (In reply to Michael Roth from comment #3) > This issue seems to be very system-dependent and I'm unable to reproduce on > my hardware, but please give this potential fix a try and let me know if it > resolves the issue: > > diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c > index 52f989f6acc2..dd6cd0d7c740 100644 > --- a/arch/x86/boot/compressed/sev.c > +++ b/arch/x86/boot/compressed/sev.c > @@ -392,6 +392,13 @@ bool snp_init(struct boot_params *bp) > if (!bp) > return false; > > + /* > + * bp->cc_blob_address should only be set by boot/compressed kernel. > + * Initialize it to 0 to ensure that uninitialized values from > + * buggy bootloaders aren't propagated. > + */ > + bp->cc_blob_address = 0; > + > cc_info = find_cc_blob(bp); > if (!cc_info) > return false; Tried that out, it appears to boot fine. I can also confirm that the patch from comment #3 works on my hardware. I'm able to confirm this is an issue with the ChimeraOS project (built using Arch) as well. Syslinux is used to boot the OS and starting with 5.19 the UEFI bios constantly bootloop. I suspect legacy bios may boot fine, but the devices I have are UEFI only. The 5.18.16 kernel boots fine. The issue is resolved in 5.19.6. |