Re: kexec reboot failed due to commit 75d090fd167ac

From: Kirill A. Shutemov
Date: Thu Sep 07 2023 - 13:58:45 EST


On Tue, Aug 29, 2023 at 10:04:51PM +0800, Aaron Lu wrote:
> > Could you show dmesg of the first kernel before kexec?
>
> Attached.
>
> BTW, kexec is invoked like this:
> kver=6.4.0-rc5-00009-g75d090fd167a
> kdir=$HOME/kernels/$kver
> sudo kexec -l $kdir/vmlinuz-$kver --initrd=$kdir/initramfs-$kver.img --append="root=UUID=4381321e-e01e-455a-9d46-5e8c4c5b2d02 ro net.ifnames=0 acpi_rsdp=0x728e8014 no_hash_pointers sched_verbose selinux=0"

I don't understand why it happens.

Could you check if this patch changes anything:

diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index 94b7abcf624b..172c476ff6f3 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -456,10 +456,12 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,

debug_putstr("\nDecompressing Linux... ");

+#if 0
if (init_unaccepted_memory()) {
debug_putstr("Accepting memory... ");
accept_memory(__pa(output), __pa(output) + needed_size);
}
+#endif

__decompress(input_data, input_len, NULL, NULL, output, output_len,
NULL, error);
--
Kiryl Shutsemau / Kirill A. Shutemov