[PATCH] mkdumprd: add --aggressive-strip as default dracut args
by Kairui Song
From: Kairui Song <kasong(a)tencent.com>
The new aggressive strip option was added in dracut 058, which tell
dracut to build the initramfs stripping more sections of the ELF
binaries (basically strip .symtab, .strtab).
These section are only useful for debugging runtime failures, but in
kdump kernel, neccessary tools for debug any runtime failure are
absent, there is no point keeping these sections.
Stripping these section can help save some memory with almost no side
effect. So let enable --aggressive-strip by default.
Comparison of unpacked initramfs before / after enabling aggressive strip:
du -hs image image.aggressive-strip
31M image
29M image.aggressive-strip
Signed-off-by: Kairui Song <kasong(a)tencent.com>
---
kexec-tools.spec | 6 +++---
mkdumprd | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index d2a8aca..d55b163 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -61,9 +61,9 @@ Requires(post): servicelog
Recommends: keyutils
%endif
Requires(pre): coreutils sed zlib
-Requires: dracut >= 050
-Requires: dracut-network >= 050
-Requires: dracut-squash >= 050
+Requires: dracut >= 058
+Requires: dracut-network >= 058
+Requires: dracut-squash >= 058
Requires: ethtool
Requires: util-linux
Recommends: grubby
diff --git a/mkdumprd b/mkdumprd
index a3e5938..63a37a7 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -27,7 +27,7 @@ SAVE_PATH=$(get_save_path)
OVERRIDE_RESETTABLE=0
extra_modules=""
-dracut_args=(--add kdumpbase --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode strict --hostonly-nics '' -o "plymouth resume ifcfg earlykdump")
+dracut_args=(--add kdumpbase --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode strict --hostonly-nics '' --aggressive-strip -o "plymouth resume ifcfg earlykdump")
MKDUMPRD_TMPDIR="$(mktemp -d -t mkdumprd.XXXXXX)"
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t dracut.XXXXXX failed."
--
2.39.1
11 months, 2 weeks
[PATCH v1 0/3] kdumpctl: Add basic UKI support
by Philipp Rudo
Hi everybody,
This short series adds basic support for UKIs as they are currently implemented
in RHEL. There's still the issue on Azure which causes the crash kernel to hang
when reading from /proc/vmcore. But I'm confident that it is not connected to
the implementation in kdumpctl. At least all test on my local VM without AMD
SEV-SNP work perfectly fine.
Furthermore, while the MR for the new naming convention for kernel-ark to
rename the installed UKI has been merged the one for rhel9 is still open.
Nevertheless I've switched to the new naming convention in v1 now.
Thanks
Philipp
rfc -> v1:
* rebased to latest rawhide
* use new naming convention suggested by BLS
* fix quoting issues found by shellcheck
* change is_uki to look at the file content rather than relying on the naming
convention. This is mostly done to allow developers to use their own UKI that
does not comply with the naming convention. This change also required small
changes to prepare_kdump_kernel. (Thanks to Pingfan)
Philipp Rudo (3):
kdumpctl: Move get_kernel_size to kdumpctl
kdumpctl: Move temp file in get_kernel_size to global temp dir
kdumpctl: Add basic UKI support
kdump-lib.sh | 98 ++++++++++++------------------------------------
kdump.service | 1 +
kdumpctl | 90 +++++++++++++++++++++++++++++++++++++++++++-
kexec-tools.spec | 1 +
4 files changed, 115 insertions(+), 75 deletions(-)
--
2.40.1
11 months, 2 weeks
[PATCH 0/3] add crashkernel=auto support for aarch64-64k
by Pingfan Liu
The aarch64-64k has significantly higher memory consumption than 4k and
requires an independent formula to calculate the reserved memory size.
Since the two main obstacles have been addressed:
1. The leaping upgrade issue has been resolved by forcing auto_reset_crashkernel=yes.
2. The estimation of LUKS2-encrypted memory consumption will be resolved by using “kdumpctl estimate --reboot”.
This series focuses on estimating crashkernel memory on a 64k kernel.
The "crashkernel="formula is no longer static; instead, it is determined
by the runtime hardware environment.
To: kexec(a)lists.fedoraproject.org
Cc: Coiby Xu <coxu(a)redhat.com>
Pingfan Liu (3):
kdump-lib: add support for 64K aarch64
kdump-lib: evaluate the memory consumption by smmu separately
kdump-lib: evaluate the memory consumption by mlx5 separately
kdump-lib.sh | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++--
kdumpctl | 22 +++++++++++++
2 files changed, 109 insertions(+), 2 deletions(-)
--
2.31.1
11 months, 3 weeks
[PATCH v3] Output memstrack report after do_kdump_post()
by Tao Liu
We will output memstrack analysis report in kexec-tools side during kdump.
Becasue kdump will use 'reboot -f' to reboot 2nd kernel by default,
which leaves no stable hook target to terminate memstrack and output its
analysis report in dracut side. However it is easy to implement in
kexec-tools side.
In this patch, we will place the memstrack report after do_kdump_post(),
so the whole kdump process can be recorded by memstrack and analyzed.
Note this will make memstrack share memory with kdump in 2nd kernel, so
a larger possibility of memory shortage is expected. A bigger
crashkernel value will help if it is truly a problem.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
v1 -> v2: move memstrack report from do_kdump_pre to do_kdump_post.
v2 -> v3: remove pkill/pgrep way of kill memstrack, only keep systemctl
stop way of kill memstrack. Since systemctl is always available
in kdump case.
---
dracut-kdump.sh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index 4eec70b..9971e2c 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -574,6 +574,21 @@ fence_kdump_notify()
fi
}
+handle_memstrack_report()
+{
+ MEMSTRACK_LOG="/.memstrack"
+
+ if [ "$DEBUG_MEM_LEVEL" -lt 4 ]; then
+ return
+ fi
+
+ systemctl stop memstrack.service
+
+ if [ -e "$MEMSTRACK_LOG" ]; then
+ IFS= dinfo < "$MEMSTRACK_LOG"
+ fi
+}
+
if [ "$1" = "--error-handler" ]; then
get_kdump_confs
do_failure_action
@@ -615,6 +630,8 @@ fi
save_log
+handle_memstrack_report
+
if [ $DUMP_RETVAL -ne 0 ]; then
exit 1
fi
--
2.33.1
11 months, 3 weeks
[PATCH] kdumpctl: Add support for systemd-boot paths
by Jeremy Linton
The default systemd-boot installed kernels on fedora end up in the form:
/boot/efi/36b54597c46383/6.4.0-0.rc0.20230427git6e98b09da931.5.fc39.aarch64/linux
Where the kernel version is a directory containing the kernel (linux)
and the initrd. Thus _find_kernel_path_by release needs to be a bit less
strict and allow some futher characters on the grubby (really bootctl)
output.
Signed-off-by: Jeremy Linton <jeremy.linton(a)arm.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 2c647d6..2dd1cb2 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1318,7 +1318,7 @@ _filter_grubby_kernel_str()
_find_kernel_path_by_release()
{
local _release="$1" _grubby_kernel_str _kernel_path
- _grubby_kernel_str=$(grubby --info ALL | grep "^kernel=.*$_release\"$")
+ _grubby_kernel_str=$(grubby --info ALL | grep "^kernel=.*$_release.*\"$")
_kernel_path=$(_filter_grubby_kernel_str "$_grubby_kernel_str")
if [[ -z $_kernel_path ]]; then
ddebug "kernel $_release doesn't exist"
--
2.40.1
11 months, 3 weeks
[PATCH] kdumpctl: Add support for systemd-boot paths
by Jeremy Linton
The default systemd-boot installed kernels on fedora end up in the form:
/boot/efi/36b54597c46383/6.4.0-0.rc0.20230427git6e98b09da931.5.fc39.aarch64/linux
Where the kernel version is a directory containing the kernel (linux)
and the initrd. Thus _find_kernel_path_by release needs to be a bit less
strict and allow some futher characters on the grubby (really bootctl)
output.
Signed-off-by: Jeremy Linton <jeremy.linton(a)arm.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 2c647d6..2dd1cb2 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1318,7 +1318,7 @@ _filter_grubby_kernel_str()
_find_kernel_path_by_release()
{
local _release="$1" _grubby_kernel_str _kernel_path
- _grubby_kernel_str=$(grubby --info ALL | grep "^kernel=.*$_release\"$")
+ _grubby_kernel_str=$(grubby --info ALL | grep "^kernel=.*$_release.*\"$")
_kernel_path=$(_filter_grubby_kernel_str "$_grubby_kernel_str")
if [[ -z $_kernel_path ]]; then
ddebug "kernel $_release doesn't exist"
--
2.40.1
11 months, 4 weeks