If a buildroot enviornment does not provide libzstd and kexec_file_load a
zstd compressed kernel, it will suffer from coredump.
The following is observed from the coredump
Core was generated by `/sbin/kexec -s -p --command-line=BOOT_IMAGE=\(hd0,gpt2\)/vmlinuz-6.15.0-0.rc5.250509g9c69f8884904.47.fc43.aarch64\ ro\ rootflags=subvol=root\ irqpoll\ nr_cpus=1\ reset_devices\ cgroup_disable=memory\ udev.children-max=2\ panic=10\ swiotlb=noforce\ novmcoredd\ cma=0\ hugetlb_cma=0\ sbsa_gwdt.pretimeout=0 --initrd=/boot/initramfs-6.15.0-0.rc5.250509g9c69f8884904.47.fc43.aarch64kdump.img /boot/vmlinuz-6.15.0-0.rc5.250509g9c69f8884904.47.fc43.aarch64'.
Program terminated with signal SIGSEGV, Segmentation fault.
143 if (!!memcmp(buf, "PE\0\0", 4)) {
(gdb)
Besides providing some C code to fix the segfault issue in upstream.
There should be explicit requirement in the spec to ask the buildroot
enviorment to provide libzstd. So it can work with the zstd compressed
linux kernel.
With this patch, the following can be observed in the configuration
process of kexec-tools
,,,
checking for zstd.h... yes
checking for ZSTD_decompress in -lzstd... yes
,,,
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
kexec-tools.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index f9a1327..2125323 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -14,6 +14,7 @@ BuildRequires: libtool
BuildRequires: gcc
BuildRequires: xz-devel
BuildRequires: zlib-devel
+BuildRequires: libzstd-devel
#START INSERT
--
2.49.0