[Bug 1851190] Re: Ubuntu 18.04: kexec-tool shows "kexec: elfcorehdr doesn't fit cells-size" if crashkernel reserved beyond 4GB
dann frazier
dann.frazier at canonical.com
Sat Nov 23 01:31:35 UTC 2019
Verification:
ubuntu at bionic:~$ sudo kexec -p /boot/vmlinuz-`uname -r` --initrd=/boot/initrd.img-`uname -r` --reuse-cmdline
ubuntu at bionic:~$ echo 1 | sudo tee /proc/sys/kernel/sysrq
1
ubuntu at bionic:~$ echo c | sudo tee /proc/sysrq-trigger
c
[ 164.962517] sysrq: SysRq : Trigger a crash
[ 164.968259] Internal error: Accessing user space memory outside uaccess.h routines: 96000044 [#1] SMP
[ 164.980205] Modules linked in: isofs nls_iso8859_1 sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear virtio_blk virtio_net aes_neon_bs aes_neon_blk crypto_simd cryptd aes_arm64
[ 165.027333] Process tee (pid: 995, stack limit = 0x (ptrval))
[ 165.035125] CPU: 0 PID: 995 Comm: tee Not tainted 4.15.0-70-generic #79-Ubuntu
[ 165.043884] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
[ 165.052153] pstate: 00400005 (nzcv daif +PAN -UAO)
[ 165.057891] pc : sysrq_handle_crash+0x24/0x30
[ 165.063361] lr : __handle_sysrq+0xbc/0x1c0
[ 165.068316] sp : ffff00000b993d50
[ 165.072308] x29: ffff00000b993d50 x28: ffff800173b73c00
[ 165.078722] x27: ffff000008b42000 x26: 0000000000000040
[ 165.085075] x25: 0000000000000124 x24: ffff0000095ce000
[ 165.091453] x23: 0000000000000007 x22: 0000000000000002
[ 165.097766] x21: 0000000000000063 x20: ffff000009530000
[ 165.104181] x19: ffff0000095cea80 x18: ffffffffffffffff
[ 165.110614] x17: 0000000000000000 x16: 0000000000000000
[ 165.117007] x15: ffff000009508c08 x14: ffff0000896b6ce7
[ 165.123376] x13: ffff0000096b6cf5 x12: ffff000009530000
[ 165.129697] x11: ffff000009509660 x10: ffff000008715e80
[ 165.136172] x9 : 00000000ffffffd0 x8 : 0000000000000017
[ 165.142496] x7 : 53203a7172737973 x6 : ffff80017fdce2e8
[ 165.148990] x5 : ffff80017fdce2e8 x4 : 0000000000000000
[ 165.155352] x3 : ffff80017fdd66c8 x2 : cc0b9440e8d0c900
[ 165.161663] x1 : 0000000000000000 x0 : 0000000000000001
[ 165.168036] Call trace:
[ 165.171053] sysrq_handle_crash+0x24/0x30
[ 165.175855] __handle_sysrq+0xbc/0x1c0
[ 165.180378] write_sysrq_trigger+0xb8/0x120
[ 165.185223] proc_reg_write+0x80/0xc0
[ 165.189608] __vfs_write+0x48/0x80
[ 165.193883] vfs_write+0xac/0x1b0
[ 165.197962] SyS_write+0x74/0xf0
[ 165.201976] el0_svc_naked+0x30/0x34
[ 165.206719] Code: 52800020 b90ca020 d5033e9f d2800001 (39000020)
[ 165.252678] Starting crashdump kernel...
[ 165.257367] Bye!
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x500f0000]
[ 0.000000] Linux version 4.15.0-70-generic (buildd at bos02-arm64-021) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #79-Ubuntu SMP Tue Nov 12 10:36:10 UTC 2019 (Ubuntu 4.15.0-70.79-generic 4.15.18)
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: EFI v2.70 by EDK II
...
** Tags removed: verification-needed
** Tags added: verification-done
** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2-signed in Ubuntu.
https://bugs.launchpad.net/bugs/1851190
Title:
Ubuntu 18.04: kexec-tool shows "kexec: elfcorehdr doesn't fit cells-
size" if crashkernel reserved beyond 4GB
Status in grub2 package in Ubuntu:
Fix Released
Status in grub2-signed package in Ubuntu:
Fix Released
Status in grub2 source package in Bionic:
Fix Committed
Status in grub2-signed source package in Bionic:
Fix Committed
Status in grub2 source package in Disco:
Fix Released
Status in grub2-signed source package in Disco:
Fix Released
Status in grub2 source package in Eoan:
Fix Released
Status in grub2-signed source package in Eoan:
Fix Released
Status in grub2 source package in Focal:
Fix Released
Status in grub2-signed source package in Focal:
Fix Released
Bug description:
[Impact]
On arm64, kexec throws following errors if crashkernel is reserved beyond 4GB of system memory.
[Test Case]
Create an arm64 guest w/ say 6GiB of memory.
Add crashkernel=1G at 4G to kernel boot args
$ kexec -p /boot/vmlinuz-`uname -r` --initrd=/boot/initrd.img-`uname
-r` --reuse-cmdline
$ kexec: elfcorehdr doesn't fit cells-size.
$ kexec: setup_2nd_dtb failed.
$ kexec: load failed.
$ Cannot load /boot/vmlinuz-5.4.0-rc4+
[Fix]
Backport the following upstream commits:
347210a5d efi/fdt: Set address/size cells to 2 for empty tree
e93fd6b77 fdt: Move prop_entry_size to fdt.h
[Regression Risk]
Changes are restricted to efi/fdt code in GRUB, so regressions would be most likely on ARM platforms, specifically those that boot using ACPI (mostly servers).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1851190/+subscriptions
More information about the foundations-bugs
mailing list