Compare commits

..

33 Commits

Author SHA1 Message Date
Lichen Liu
9cb5b5989d
Rebase to upstream 1.0.61
Resolves: RHEL-83890, RHEL-120738, RHEL-137603, RHEL-145107, RHEL-152452
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2026-04-02 12:20:07 +08:00
Philipp Rudo
70f3c44226 kdump-lib: use EFI var to find UKI
Resolves: RHEL-116406
Upstream: kdump-utils
Confilicts: None

commit edb8363d7efedfdc964576e4e30bc67c8fbeb941
Author: Li Tian <litian@redhat.com>
Date:   Wed Sep 24 17:29:56 2025 +0800

    kdump-lib: use EFI var to find UKI

    The UKI in ESP is not guaranteed to be named after machine ID.
    Machine ID is unknown at the time image is built. Thus
    builders like Image Builder names UKI 'fff...f-$(uname -r).efi'.
    The StubImageIdentifier points the true loaded UKI.

    Signed-off-by: Li Tian <litian@redhat.com>

Signed-off-by: Philipp Rudo <prudo@redhat.com>
2026-02-02 11:58:03 +01:00
Coiby Xu
d084f628fa spec: Add the missing 20th patch
Resolves: RHEL-138697

Add the patch backported in commit 00b7393 ("kdump-lib: always
disable systemd-gpt-auto-generator") to spec file.

Signed-off-by: Coiby Xu <coxu@redhat.com>
2026-01-30 11:24:44 +08:00
Coiby Xu
00b73935f8 kdump-lib: always disable systemd-gpt-auto-generator
Resolves: RHEL-138697
Conflict: None

Currently, is_uki has been removed in commit d2f21f3 ("spec: drop
dependency for binutils") but there is still one place calling is_uki.

commit 3985d49be06faca6120c6fc10687dc295a46f201
Author: Philipp Rudo <prudo@redhat.com>
Date:   Tue Sep 2 16:15:02 2025 +0200

    kdump-lib: always disable systemd-gpt-auto-generator

    Resolves: KEX-330

    The systemd-gpt-auto-generator automatically discovers and mounts
    various partitions, e.g. the root partition, based on the GPT partition
    type GUIDs. So far anaconda hasn't set the GUIDs during an installation
    and users relying on it, e.g. for UKIs where the root= parameter cannot
    be passed on the kernel command line, had to set them manually. This
    seems to have changed and causes the kdump kernel to hang. In addition
    we know which disk/partition shall be used as dump target and add it
    explicitly to the kdump initrd. So it is save to always disable the
    gpt-auto-generator for the kdump kernel.

    Signed-off-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2026-01-29 17:00:30 +08:00
Coiby Xu
41c4feb1ef spec: drop dependency for binutils
Resolves: RHEL-138697

Previous commit d2f21f3 ("spec: drop dependency for binutils") doesn't
work possibly because it removes binutils dependency when applying the
0019-spec-drop-dependency-for-binutils.patch. We should remove the
dependency from repo's kdump-utils.spec directly.

Signed-off-by: Coiby Xu <coxu@redhat.com>
2026-01-29 08:56:26 +08:00
Coiby Xu
d2f21f374d spec: drop dependency for binutils
Resolves: https://issues.redhat.com/browse/RHEL-138697
Conflict: None

commit 48dd252bf8cc75c696d5d7e9a07efc838e3aad66
Author: Philipp Rudo <prudo@redhat.com>
Date:   Tue Sep 2 13:28:32 2025 +0200

    spec: drop dependency for binutils

    The binutils were added as dependency to support UKIs. With the main
    part of the UKI support been moved to kexec-tools only one spot remains
    in prepare_kdump_bootinfo where they are used. Refractor
    prepare_kdump_bootinfo to get rid of the dependency.

    This slightly changes the behavior for UKIs. In particular the kdump
    initrd is moved from /boot to /var/lib/kdump.

    While at it also simplify the logic in prepare_kdump_bootinfo as it is
    unnecessarily complex and can lead to weird corner cases. For example if
    the default initrd is located at /boot/$machine_id/$kernel_version/initrd
    and the directory is not writable, then the kdump initrd would be stored
    at /var/lib/kdump/initrdkdump without any information about the kernel
    version. This can lead to all sorts of problems when multiple kernel
    versions are installed. Thus always use
    initramfs-${kernel_version}kdump.img when the initrd is stored at
    /var/lib/kdump. Update 60-kdump.install accordingly.

    Signed-off-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2026-01-21 13:31:54 +08:00
Lichen Liu
3aa4c426cd
sysconfig: use initramfs_options to reduce memory usage
Resolves: RHEL-105198
Upstream: kdump-utils
Conflict: yes, the gen-kdump-sysconfig.sh was refactored, so we need
to manually modify the KDUMP_COMMANDLINE_APPEND= options.

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2026-01-21 11:33:08 +08:00
Philipp Rudo
24edf00fb8 kdump-lib-initramfs: Fix performance regression in kdump_get_conf_val
Resolves: https://issues.redhat.com/browse/RHEL-137945
Upstream: kdump-utils
Conflict: None

commit b43908c20f5a028c60b0096006a26a6e52a01279
Author: Philipp Rudo <prudo@redhat.com>
Date:   Wed Jan 14 15:54:25 2026 +0100

    kdump-lib-initramfs: Fix performance regression in kdump_get_conf_val

    Rewriting kdump_get_conf_val in Bash lead to a massive performance
    regression. On my test system starting the kdump service took

    $ time kdumpctl start
    real    0m13.134s
    user    0m8.828s
    sys     0m7.450s

    which is ~20 times slower compared to kdump-utils-1.0.59-1.fc44 with

    $ time kdumpctl start
    real    0m0.641s
    user    0m0.208s
    sys     0m0.538s

    Looking at the traces shows that this is caused because Bash now has to
    handle the whole kdump.conf, including the extensive comment at the
    start, every time kdump_get_conf_val is called. This is done multiple
    times when starting the kdump service and is often cloaked by other
    functions, e.g. is_ssh_dump_target() or get_save_path().

    To fix the issue remove comments and empty lines in a regex again so
    that the Bash code only has to handle valid config entries. With this
    change alone the performance is almost as good as the original version
    with

    $ time kdumpctl start
    real    0m0.780s
    user    0m0.330s
    sys     0m0.604s

    In the long run it would make sense to also reduce the number of calls
    to kdump_get_conf_val.

    This patch also fixes the issue that subsequent blanks are replaced by a
    single space. Usually this is not an issue but there are corner cases,
    e.g. in printf-like format strings passed as an argument, where the new
    behaviour is undesirable.

    Fixes: d81109c ("kdump-lib-initramfs: rewrite kdump_get_conf_val")
    Signed-off-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Philipp Rudo <prudo@redhat.com>
2026-01-20 13:44:29 +01:00
Baoquan He
29785765ac kexec-kdump-howto.txt: update paragraphs related to disable_cpu_apicid
Resolves: https://issues.redhat.com/browse/RHEL-128042
Upstream: kdump-utils
Conflict: None

commit e22ca9248de44a71cdd51e0630456e53fe2554c1
Author: Baoquan He <bhe@redhat.com>
Date:   Thu Dec 11 16:56:15 2025 +0800

    kexec-kdump-howto.txt: update paragraphs related to disable_cpu_apicid

    Long before, to support multiple CPUs on x86_64, 'disable_cpu_apicid='
    was introduced. It's to avoid the case when nr_cpus=xx is added, while
    crashed cpu is not BSP cpu, then the crashed CPU will send INIT to BSP
    cpu in kdump kernel. While the BSP cpu being reinitialized when
    receiving INIT in the 2nd time will cause kdump kernel collapsing.

    Now, in kernel commit 5c5682b9f87a ("x86/cpu: Detect real BSP on crash
    kernels"), the requirement of disable_cpu_apicid has been taken off by
    detecting real BSP on crashed kernel and not sending INIT to it.
    Now testing passed on x86_64 system w/ or w/o disable_cpu_apicid and the
    kernel message can be seen as below.

    ===============
    CPU topo: Boot CPU APIC ID not the first enumerated APIC ID: 1e != 0
    CPU topo: Crash kernel detected. Disabling real BSP to prevent machine INIT
    ===============

    However, sometime older kernels which don't contain commit 5c5682b9f87a
    are still loaded in newer OS. To keep good back compatibility, still
    adding disable_cpu_apicid to capture kernel. It's not harmful on newer
    kernels containing commit 5c5682b9f87a.

    Signed-off-by: Baoquan He <bhe@redhat.com>

Signed-off-by: Baoquan He <bhe@redhat.com>
2025-12-31 11:38:08 +08:00
Pingfan Liu
0241584fd0 powerpc: Set nr_cpus=16 for kdump kernel
Resolves: https://issues.redhat.com/browse/RHEL-77197
Upstream: kdump-utils
Conflict: manually apply [Patch 2/2]

The back port contains two upstream patches:
  0d38985 powerpc: consider CPU count while calculating crashkernel value
  4f7970e powerpc: Set nr_cpus=16 for kdump kernel
to implement:
    Configure the kdump kernel with nr_cpus=16 to enable multi-threading in
    the makedumpfile core collector, allowing faster dump collection.

The commit 4f7970e (powerpc: Set nr_cpus=16 for kdump kernel) can not be
applied directly due to the big re-fractor of gen-kdump-sysconfig.sh.
But the change is simple, just increase nr_cpus=1 to nr_cpus=16, so I
modify it manually.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2025-12-17 10:47:32 +08:00
Pingfan Liu
1ff2f4ddb7 Skip num-threads when -E and -F option is present
Resolves: https://issues.redhat.com/browse/RHEL-75537
Upstream: kdump-utils
Conflict: None

Back porting a series patches in kdump-utils to Fix the --num-threads
and -E option issules
  9a51c4b kdump.sh: Skip num-threads when -E and -F option is present
  23bbb11 kdump.sh: Centralize the num-threads sub-option handling
  837f1c9 kdump.sh: Centralize the -F suboption handling

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2025-12-17 08:49:42 +08:00
Coiby Xu
4663e6f293 Add persisent device if FIPS is enabled
Resolves: https://issues.redhat.com/browse/RHEL-127439
Conflict: None

commit 2de96daa10a7e30a7b1a6bb4331e831a8f794c4a
Author: Harshvardhan Jha <harshvardhan.j.jha@oracle.com>
Date:   Thu Oct 30 00:59:17 2025 -0700

    Add persisent device if FIPS is enabled

    mkdumprd has a code to add a disk to kdump initramfs, in case FIPS is
    enabled and /boot is on a separate partition. This code used to work,
    since dracut was not force checking that added disk is in fact
    available. Since dracut commit c79fc8f dracut in fact checks for added
    device, and since disk name could have been changed between live system
    and kdump initramfs, kdump can fail.
    To resolve this problem we re-use get_persistent_dev from
    dracut-functions.sh which will be sourced by mkdrumpd to get persistent
    device name.

    Signed-off-by: Alex Burmashev <alexander.burmashev@oracle.com>
    Signed-off-by: Harshvardhan Jha <harshvardhan.j.jha@oracle.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-12-15 16:54:42 +08:00
Lichen Liu
0c8b5b9614
Rewrite kdump_get_conf_val
Resolves: RHEL-117011
    Upstream: kdump-utils
    Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-12-09 11:34:44 +08:00
Coiby Xu
a9643ff732 A few fixes on kdump LUKS support
Resolves: https://issues.redhat.com/browse/RHEL-124989
Upstream: kdump-utils
Conflict: none

Fixes three situations where kdump can fail by,
- adding "KeyringMode=shared" to the kdump.service unit file so it can access the LUKS volume keys
- fixing the SELinux label of crypttab file
- allowing users to use "sudo kdumpctl"

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-11-10 11:53:57 +08:00
Lichen Liu
9cecd7eb47
Strip surrounding quotes from configuration values
Resolves: RHEL-117011
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-11-03 15:16:24 +08:00
Lichen Liu
c1a7e254e5
Rebase to v1.0.58
Resolves: RHEL-113402,RHEL-93334,RHEL-113405,RHEL-29037,RHEL-103590
Upstream: kdump-utils
Conflict: none

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-09-29 14:27:08 +08:00
Baoquan He
dfc087bedd sysconfig: disable kfence in kdump kernel
Resolves: RHEL-103425
Upstream: kdump-utils
Conflict: Need manually edit patch 0006.

QA found a regression on powerpc arch when verifying disabling kfence.
And further tests shows only powerpc has the issue, all other
architectures all works well with disabling kfence by pass in the
parameter 'kfence.sample_interval=0' to kdump kernel.

Hence only revert the change on powerpc for now, will check what's going
on on powerpc later.

commit b061a48965476e5b2e6be59686783c85d0f14b5c
Author: Baoquan He <bhe@redhat.com>
Date:   Mon Aug 11 17:02:46 2025 +0800

    sysconfig: disable kfence in kdump kernel

    In commit ddb0bab1f7e1, I mistakenly added the 'kfence.sample_interval=0'
    into KDUMP_COMMANDLINE_APPEND which is taken as default parameters added
    into kdump kernel. The KDUMP_COMMANDLINE_APPEND value is for unsupported
    architecuture. We should append wanted kernel parameter to each
    supported architecture in "update_param KDUMP_COMMANDLINE_APPEND" place.

    Fix it now.

    Signed-off-by: Baoquan He <bhe@redhat.com>

Signed-off-by: Baoquan He <bhe@redhat.com>
2025-08-20 10:28:02 +08:00
Baoquan He
4418ea7f4c sysconfig: disable kfence in kdump kernel
Resolves: RHEL-103425
Upstream: kdump-utils
Conflict: None

commit b061a48965476e5b2e6be59686783c85d0f14b5c
Author: Baoquan He <bhe@redhat.com>
Date:   Mon Aug 11 17:02:46 2025 +0800

    sysconfig: disable kfence in kdump kernel

    In commit ddb0bab1f7e1, I mistakenly added the 'kfence.sample_interval=0'
    into KDUMP_COMMANDLINE_APPEND which is taken as default parameters added
    into kdump kernel. The KDUMP_COMMANDLINE_APPEND value is for unsupported
    architecuture. We should append wanted kernel parameter to each
    supported architecture in "update_param KDUMP_COMMANDLINE_APPEND" place.

    Fix it now.

    Signed-off-by: Baoquan He <bhe@redhat.com>

Signed-off-by: Baoquan He <bhe@redhat.com>
2025-08-18 10:01:03 +08:00
Baoquan He
bfa3841787 sysconfig: disable kfence in kdump kernel
Resolves: RHEL-103425
Upstream: kdump-utils
Conflict: None

Signed-off-by: Baoquan He <bhe@redhat.com>
2025-08-06 11:54:32 +08:00
Coiby Xu
647ca6bdfa Support dumping to NVMe/TCP configured using NVMe Boot Firmware Table
Resolves: RHEL-100907
Upstream: kdump-utils
Conflict: None

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-07-28 17:13:58 +08:00
Lichen Liu
0dd40477c8
mkdumprd: replace lz4hc with lzma for better compression in squash image
Resolves: RHEL-88649
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-06-04 14:07:55 +08:00
Lichen Liu
535d27bfdb
kdumpctl: check and generate /etc/vconsole.conf
Resolves: RHEL-91468
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-06-04 14:05:56 +08:00
Lichen Liu
0f7139c853
Rebase to upstream 1.0.54
Upstream: https://github.com/rhkdump/kdump-utils/
Resolves: RHEL-75547
Resolves: RHEL-78724
Resolves: RHEL-58654

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-05-08 13:54:04 +08:00
Coiby Xu
8d091c5eb1
kdump-lib.sh: Fix all 1G boundry to 2G
Resolves: https://issues.redhat.com/browse/RHEL-75539
Conflict: None

Upstream Status: git@github.com:rhkdump/kdump-utils.git

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-03-06 17:19:22 +08:00
Lichen Liu
6f4a4d8fa4
Bump release for RHEL-75539
Resolves: RHEL-75539

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-03-06 17:19:18 +08:00
Coiby Xu
94d8d77674
kdump-lib.sh: Adjust default crashkernel reservation for x86_64 and s390x
Resolves: https://issues.redhat.com/browse/RHEL-75539
Conflict: None

Upstream Status: git@github.com:rhkdump/kdump-utils.git

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-03-06 17:19:13 +08:00
Coiby Xu
1498d2c8a3
Check /proc/sys/crypto/fips_enabled to tell if FIPS has been enabled
Resolves: https://issues.redhat.com/browse/RHEL-75539
Conflict: None

Upstream Status: git@github.com:rhkdump/kdump-utils.git

Signed-off-by: Coiby Xu <coxu@redhat.com>
2025-03-06 17:19:03 +08:00
Lichen Liu
092e2fa936
Let %post scriptlet always exit successfully
Resolves: RHEL-71253
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-02-11 08:47:00 +08:00
Lichen Liu
e9d22f4e59
99-kdump.conf: Omit hwdb dracut module
Resolves: RHEL-57731
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-01-21 16:20:38 +08:00
Lichen Liu
be96a24f13
99-kdump.conf: Omit nouveau and amdgpu module
Resolves: RHEL-52478
Upstream: kdump-utils
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-01-21 11:07:51 +08:00
Lichen Liu
f261f90231
Release kdump-utils-1.0.51-3
Resolves: RHEL-24543

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2025-01-13 10:36:06 +08:00
Pingfan Liu
b0d6e9f357 powerpc: fix early exit from udev on hotplug event for fadump
Resolves: https://issues.redhat.com/browse/RHEL-24543
Upstream: kdump-utils

Author: Sourabh Jain <sourabhjain@linux.ibm.com>
Date:   Wed Jan 8 12:11:10 2025 +0530

    powerpc: fix early exit from udev on hotplug event for fadump

    Sysfs /sys/kernel/fadump/hotplug_ready contains 1 if hotplug is
    supported by fadump.

    Now to exit early the RUN command should grep 0 from
    /sys/kernel/fadump/hotplug_ready instead of 1.

    Fix it by updating RUN command.

    Fixes: b4e3d3724cf3 ("fadump/udev: do not re-register fadump if kernel hotplug ready")
    Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2025-01-13 10:01:22 +08:00
Lichen Liu
d83c41c768
Rebase to upstream 1.0.51
Upstream: https://github.com/rhkdump/kdump-utils/
Resolves: RHEL-50736
Resolves: RHEL-50738
Resolves: RHEL-62350
Resolves: RHEL-69929

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2024-12-11 10:26:02 +08:00
11 changed files with 23 additions and 390 deletions

9
.gitignore vendored
View File

@ -1 +1,8 @@
kdump-utils-1.0.51.tar.gz /kdump-utils-1.0.42.tar.gz
/kdump-utils-1.0.43.tar.gz
/kdump-utils-1.0.45.tar.gz
/kdump-utils-1.0.51.tar.gz
/kdump-utils-1.0.54.tar.gz
/kdump-utils-1.0.58.tar.gz
/kdump-utils-1.0.60.tar.gz
/kdump-utils-1.0.61.tar.gz

View File

@ -1,35 +0,0 @@
From 679a1c5a96e4b5fac06f2045db97db21e6a62ff8 Mon Sep 17 00:00:00 2001
From: Sourabh Jain <sourabhjain@linux.ibm.com>
Date: Wed, 8 Jan 2025 12:11:10 +0530
Subject: [PATCH] powerpc: fix early exit from udev on hotplug event for fadump
Sysfs /sys/kernel/fadump/hotplug_ready contains 1 if hotplug is
supported by fadump.
Now to exit early the RUN command should grep 0 from
/sys/kernel/fadump/hotplug_ready instead of 1.
Fix it by updating RUN command.
Fixes: b4e3d3724cf3 ("fadump/udev: do not re-register fadump if kernel hotplug ready")
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
98-kexec.rules.ppc64 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64
index 85fe0b1..ac6d42a 100644
--- a/98-kexec.rules.ppc64
+++ b/98-kexec.rules.ppc64
@@ -17,7 +17,7 @@ LABEL="kdump_reload_mem"
# Don't re-register fadump if /sys/kernel/fadump/hotplug_ready sysfs is set to 1.
-RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump/hotplug_ready || cat /sys/kernel/fadump/hotplug_ready | grep 1 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
+RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump/hotplug_ready || cat /sys/kernel/fadump/hotplug_ready | grep 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
GOTO="kdump_reload_end"
--
2.41.0

View File

@ -1,34 +0,0 @@
From 77a0246cde3505777cfa1f9c2a1a834e76b7eed6 Mon Sep 17 00:00:00 2001
From: Lichen Liu <lichliu@redhat.com>
Date: Mon, 13 Jan 2025 17:39:56 +0800
Subject: [PATCH] 99-kdump.conf: Omit nouveau and amdgpu module
Resolves: https://issues.redhat.com/browse/RHEL-52304
The GPU module provides no significant utility in second kernel, and it
introduces firmware that occupies lots of memory, which is critical in
the constrained environment of kdump. Omit it helps reduce memory usage
and optimize the crash recovery process.
See also:
https://access.redhat.com/solutions/6977793
https://access.redhat.com/solutions/7100186
Signed-off-by: Lichen Liu <lichliu@redhat.com>
---
99-kdump.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/99-kdump.conf b/99-kdump.conf
index 80d6e43..696c7ac 100644
--- a/99-kdump.conf
+++ b/99-kdump.conf
@@ -1,3 +1,4 @@
dracutmodules=''
add_dracutmodules=' kdumpbase '
omit_dracutmodules=' rdma plymouth resume ifcfg earlykdump '
+omit_drivers+=' nouveau amdgpu '
\ No newline at end of file
--
2.47.0

View File

@ -1,43 +0,0 @@
From 966dc0845980d2150a6614387ce6a05c79e1eb80 Mon Sep 17 00:00:00 2001
From: Lichen Liu <lichliu@redhat.com>
Date: Tue, 21 Jan 2025 14:04:28 +0800
Subject: [PATCH] 99-kdump.conf: Omit hwdb dracut module
The hwdb (udev hardware database) file `/etc/udev/hwdb.bin` is currently
included in the initramfs, taking up approximately 13MB of space. This is
a significant size for kdump initramfs, which may lead more OOM issues.
Certain advanced device initializations that rely on hwdb (e.g., custom
keyboard mappings, specific touchpad configurations) may not work in the
kdump environment.
However, kdump do not require hwdb in the most cases, as critical devices
like storage, network, and basic input devices are typically handled by
standard udev rules and kernel drivers.
This change prioritizes reducing initramfs size over retaining hardware
database functionality, as the latter is rarely critical in the kdump
environment.
Resolves: https://issues.redhat.com/browse/RHEL-57731
Signed-off-by: Lichen Liu <lichliu@redhat.com>
---
99-kdump.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/99-kdump.conf b/99-kdump.conf
index 696c7ac..1301c44 100644
--- a/99-kdump.conf
+++ b/99-kdump.conf
@@ -1,4 +1,4 @@
dracutmodules=''
add_dracutmodules=' kdumpbase '
-omit_dracutmodules=' rdma plymouth resume ifcfg earlykdump '
-omit_drivers+=' nouveau amdgpu '
\ No newline at end of file
+omit_dracutmodules=' hwdb rdma plymouth resume ifcfg earlykdump '
+omit_drivers+=' nouveau amdgpu '
--
2.47.0

View File

@ -1,36 +0,0 @@
From 722b45982e954d47e507d4aa33fbe8003da34d91 Mon Sep 17 00:00:00 2001
From: Coiby Xu <coxu@redhat.com>
Date: Mon, 17 Feb 2025 11:02:05 +0800
Subject: [PATCH] Check /proc/sys/crypto/fips_enabled to tell if FIPS has been
enabled
Resolves: https://issues.redhat.com/browse/RHEL-75539
A proposal [1] has been submitted to remove fips-mode-setup from Fedora
42. And we are suggested to tell if FIPS has been enabled by check if
/proc/sys/crypto/fips_enabled has 1.
[1] https://fedoraproject.org/wiki/Changes/RemoveFipsModeSetup#Feedback
[2] https://developers.redhat.com/articles/2024/02/27/handling-fips-mode-upstream-projects-rhel#
Signed-off-by: Coiby Xu <coxu@redhat.com>
---
mkdumprd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd
index c51d28f4..047a32ea 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -424,7 +424,7 @@ if ! is_fadump_capable; then
dracut_args+=(--no-hostonly-default-device)
- if fips-mode-setup --is-enabled 2> /dev/null; then
+ if [[ $(cat /proc/sys/crypto/fips_enabled) == 1 ]]; then
dracut_args+=(--add-device "$(findmnt -n -o SOURCE --target /boot)")
fi
fi
--
2.48.1

View File

@ -1,64 +0,0 @@
From fe18f933baed9eaa18e0c2427aaca4640d8f6fa1 Mon Sep 17 00:00:00 2001
From: Lichen Liu <lichliu@redhat.com>
Date: Thu, 6 Mar 2025 10:21:43 +0800
Subject: [PATCH] kdump-lib.sh: Adjust default crashkernel reservation for
x86_64 and s390x
With new kernel features being added, both the kernel itself and the initramfs
have gradually increased in size.
Previously, we used squashfs to package and reduce the initramfs size. However,
since squashfs will be replaced by erofs, we have transitioned to erofs. The
compression algorithms supported by erofs differ from those used in squashfs.
In previous squashfs implementations, we used zstd compression, but in RHEL-10,
the erofs implementation in the kernel does not yet support zstd decompression.
As a result, we had to switch to other compression algorithms, leading to
changes in the initramfs size.
In some scenarios, the previous 192M crashkernel reservation is no longer
sufficient. Recent NFS testing has shown that at least 238M is required to
successfully capture a vmcore. Given this, we have updated the default
crashkernel reservation to start from 2G, with 256M allocated for crash
recovery.
Since 256M is a significant portion of memory on smaller systems, we have
decided not to reserve crashkernel memory by default on systems with less
than 2G of RAM. However, users can still manually adjust the `crashkernel=`
setting via tools like `grubby` if needed.
Signed-off-by: Lichen Liu <lichliu@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
---
crashkernel-howto.txt | 2 +-
kdump-lib.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crashkernel-howto.txt b/crashkernel-howto.txt
index 2e99a34e..bd369cb8 100644
--- a/crashkernel-howto.txt
+++ b/crashkernel-howto.txt
@@ -17,7 +17,7 @@ Latest kexec-tools provides "kdumpctl get-default-crashkernel" to retrieve
the default crashkernel value,
$ echo $(kdumpctl get-default-crashkernel)
- 1G-4G:192M,4G-64G:256M,64G-:512M
+ 2G-64G:256M,64G-:512M
It will be taken as the default value of 'crashkernel=', you can use
this value as a reference for setting crashkernel value manually.
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 5bdc4929..143f5056 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -1005,7 +1005,7 @@ kdump_get_arch_recommend_crashkernel()
_arch=$(uname -m)
if [[ $_arch == "x86_64" ]] || [[ $_arch == "s390x" ]]; then
- _ck_cmdline="1G-4G:192M,4G-64G:256M,64G-:512M"
+ _ck_cmdline="2G-64G:256M,64G-:512M"
is_sme_or_sev_active && ((_delta += 64))
elif [[ $_arch == "aarch64" ]]; then
local _running_kernel
--
2.48.1

View File

@ -1,96 +0,0 @@
From ca42bd690ae5e15ac5c026c646aad18fb74d0836 Mon Sep 17 00:00:00 2001
From: Lichen Liu <lichliu@redhat.com>
Date: Thu, 6 Mar 2025 13:58:02 +0800
Subject: [PATCH] kdump-lib.sh: Fix all 1G boundry to 2G
According to the current system requirements of Fedora[1] and RHEL[2], at least
2G physical memory is required to install the operating system, so it is not
meaningful to reserve crashkernel from 1G.
This patch updates the default value of crashkernel for aarch64 architecture to
reserve from 2G.
Also updated the testing part.
See Also:
[1] Fedora Minimum System Configuration: https://docs.fedoraproject.org/en-US/fedora/latest/release-notes/hardware_overview/#hardware_overview-specs
[2] Prerequisites for enabling virtualization on RHEL: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_virtualization/assembly_enabling-virtualization-in-rhel-9_configuring-and-managing-virtualization#proc_enabling-virtualization-in-rhel-9_assembly_enabling-virtualization-in-rhel-9
Signed-off-by: Lichen Liu <lichliu@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
---
kdump-lib.sh | 4 ++--
spec/kdump-lib_spec.sh | 12 ++++++------
spec/kdumpctl_manage_crashkernel_spec.sh | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 143f5056..0961f469 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -1011,7 +1011,7 @@ kdump_get_arch_recommend_crashkernel()
local _running_kernel
# Base line for 4K variant kernel. The formula is based on x86 plus extra = 64M
- _ck_cmdline="1G-4G:256M,4G-64G:320M,64G-:576M"
+ _ck_cmdline="2G-4G:256M,4G-64G:320M,64G-:576M"
if [[ -z "$2" ]]; then
_running_kernel=$(_get_kdump_kernel_version)
else
@@ -1021,7 +1021,7 @@ kdump_get_arch_recommend_crashkernel()
# the naming convention of 64k variant suffixes with +64k, e.g. "vmlinuz-5.14.0-312.el9.aarch64+64k"
if echo "$_running_kernel" | grep -q 64k; then
# Without smmu, the diff of MemFree between 4K and 64K measured on a high end aarch64 machine is 82M.
- # Picking up 100M to cover this diff. And finally, we have "1G-4G:356M;4G-64G:420M;64G-:676M"
+ # Picking up 100M to cover this diff. And finally, we have "2G-4G:356M;4G-64G:420M;64G-:676M"
((_delta += 100))
# On a 64K system, the extra 384MB is calculated by: cmdq_num * 16 bytes + evtq_num * 32B + priq_num * 16B
# While on a 4K system, it is negligible
diff --git a/spec/kdump-lib_spec.sh b/spec/kdump-lib_spec.sh
index f13372c7..daacb797 100644
--- a/spec/kdump-lib_spec.sh
+++ b/spec/kdump-lib_spec.sh
@@ -51,11 +51,11 @@ Describe 'kdump-lib'
Describe "_crashkernel_add()"
Context "For valid input values"
Parameters
- "1G-4G:256M,4G-64G:320M,64G-:576M" "100M" "1G-4G:356M,4G-64G:420M,64G-:676M"
- "1G-4G:256M" "100" "1G-4G:268435556" # avoids any rounding when size % 1024 != 0
- "1G-4G:256M,4G-64G:320M,64G-:576M@4G" "100M" "1G-4G:356M,4G-64G:420M,64G-:676M@4G"
- "1G-4G:1G,4G-64G:2G,64G-:3G@4G" "100M" "1G-4G:1124M,4G-64G:2148M,64G-:3172M@4G"
- "1G-4G:10000K,4G-64G:20000K,64G-:40000K@4G" "100M" "1G-4G:112400K,4G-64G:122400K,64G-:142400K@4G"
+ "2G-4G:256M,4G-64G:320M,64G-:576M" "100M" "2G-4G:356M,4G-64G:420M,64G-:676M"
+ "2G-4G:256M" "100" "2G-4G:268435556" # avoids any rounding when size % 1024 != 0
+ "2G-4G:256M,4G-64G:320M,64G-:576M@4G" "100M" "2G-4G:356M,4G-64G:420M,64G-:676M@4G"
+ "2G-4G:1G,4G-64G:2G,64G-:3G@4G" "100M" "2G-4G:1124M,4G-64G:2148M,64G-:3172M@4G"
+ "2G-4G:10000K,4G-64G:20000K,64G-:40000K@4G" "100M" "2G-4G:112400K,4G-64G:122400K,64G-:142400K@4G"
"1,high" "1" "2,high"
"1K,low" "1" "1025,low"
"128G-1T:4G" "0" "128G-1T:4G"
@@ -74,7 +74,7 @@ Describe 'kdump-lib'
End
Context "For invalid input values"
Parameters
- "1G-4G:256M.4G-64G:320M" "100M"
+ "2G-4G:256M.4G-64G:320M" "100M"
"foo" "1"
"1" "bar"
End
diff --git a/spec/kdumpctl_manage_crashkernel_spec.sh b/spec/kdumpctl_manage_crashkernel_spec.sh
index 3255d9aa..5817b519 100644
--- a/spec/kdumpctl_manage_crashkernel_spec.sh
+++ b/spec/kdumpctl_manage_crashkernel_spec.sh
@@ -4,8 +4,8 @@ Describe 'Management of the kernel crashkernel parameter.'
Include ./kdumpctl
kernel1=/boot/vmlinuz-5.15.6-100.fc34.x86_64
kernel2=/boot/vmlinuz-5.14.14-200.fc34.x86_64
- old_ck=1G-4G:162M,4G-64G:256M,64G-:512M
- new_ck=1G-4G:196M,4G-64G:256M,64G-:512M
+ old_ck=2G-4G:162M,4G-64G:256M,64G-:512M
+ new_ck=2G-4G:196M,4G-64G:256M,64G-:512M
KDUMP_SPEC_TEST_RUN_DIR=$(mktemp -u /tmp/spec_test.XXXXXXXXXX)
GRUB_CFG="$KDUMP_SPEC_TEST_RUN_DIR/grub.cfg"
--
2.48.1

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# kdump-utils
The kdump-utils package

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: kernel-qe.kernel-ci.general-kdump.tier0.functional}

View File

@ -1,29 +1,13 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 10;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# kdump-utils has no debug source # kdump-utils has no debug source
%global debug_package %{nil} %global debug_package %{nil}
Name: kdump-utils Name: kdump-utils
Version:1.0.51 Version:1.0.61
Release: %autorelease -b 1 Release: %autorelease -b 1
Summary: Kernel crash dump collection utilities Summary: Kernel crash dump collection utilities
License: GPL-2.0-only License: GPL-2.0-only
URL: https://github.com/rhkdump/kdump-utils URL: https://github.com/rhkdump/kdump-utils
Source0: https://github.com/rhkdump/kdump-utils/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/rhkdump/kdump-utils/archive/v%{version}/%{name}-%{version}.tar.gz
Patch01: 0001-powerpc-fix-early-exit-from-udev-on-hotplug-event-fo.patch
Patch02: 0002-99-kdump.conf-Omit-nouveau-and-amdgpu-module.patch
Patch03: 0003-99-kdump.conf-Omit-hwdb-dracut-module.patch
Patch04: 0004-Check-proc-sys-crypto-fips_enabled-to-tell-if-FIPS-h.patch
Patch05: 0005-kdump-lib.sh-Adjust-default-crashkernel-reservation-.patch
Patch06: 0006-kdump-lib.sh-Fix-all-1G-boundry-to-2G.patch
%ifarch ppc64 ppc64le %ifarch ppc64 ppc64le
Requires(post): servicelog Requires(post): servicelog
@ -38,8 +22,6 @@ Requires: dracut-network >= 058
Requires: dracut-squash >= 058 Requires: dracut-squash >= 058
Requires: ethtool Requires: ethtool
Requires: util-linux Requires: util-linux
# Needed for UKI support
Recommends: binutils
Recommends: grubby Recommends: grubby
Recommends: hostname Recommends: hostname
BuildRequires: make BuildRequires: make
@ -136,64 +118,4 @@ fi
%doc supported-kdump-targets.txt %doc supported-kdump-targets.txt
%changelog %changelog
## START: Generated by rpmautospec %autochangelog
* Thu Mar 06 2025 Coiby Xu <coxu@redhat.com> - 1.0.51-10
- kdump-lib.sh: Fix all 1G boundry to 2G
* Thu Mar 06 2025 Lichen Liu <lichliu@redhat.com> - 1.0.51-9
- Bump release for RHEL-75539
* Thu Mar 06 2025 Coiby Xu <coxu@redhat.com> - 1.0.51-8
- kdump-lib.sh: Adjust default crashkernel reservation for x86_64 and s390x
* Thu Mar 06 2025 Coiby Xu <coxu@redhat.com> - 1.0.51-7
- Check /proc/sys/crypto/fips_enabled to tell if FIPS has been enabled
* Tue Feb 11 2025 Lichen Liu <lichliu@redhat.com> - 1.0.51-6
- Let %%post scriptlet always exit successfully
* Tue Jan 21 2025 Lichen Liu <lichliu@redhat.com> - 1.0.51-5
- 99-kdump.conf: Omit hwdb dracut module
* Tue Jan 21 2025 Lichen Liu <lichliu@redhat.com> - 1.0.51-4
- 99-kdump.conf: Omit nouveau and amdgpu module
* Mon Jan 13 2025 Lichen Liu <lichliu@redhat.com> - 1.0.51-3
- Release kdump-utils-1.0.51-3
* Mon Jan 13 2025 Pingfan Liu <piliu@redhat.com> - 1.0.51-2
- powerpc: fix early exit from udev on hotplug event for fadump
* Wed Dec 11 2024 Lichen Liu <lichliu@redhat.com> - 1.0.51-1
- Rebase to upstream 1.0.51
* Fri Nov 15 2024 Philipp Rudo <prudo@redhat.com> - 1.0.45-5
- Allow ssh opts to be processed correctly
* Fri Nov 01 2024 Coiby Xu <coxu@redhat.com> - 1.0.45-4
- Set up crashkernel value for osbuild
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.0.45-3
- Bump release for October 2024 mass rebuild:
* Sun Oct 20 2024 Tao Liu <ltao@redhat.com> - 1.0.45-2
- Return the correct exit code of rebuild initrd
* Fri Oct 11 2024 Lichen Liu <lichliu@redhat.com> - 1.0.45-1
- Rebase to upstream v1.0.45
* Mon Sep 30 2024 Lichen Liu <lichliu@redhat.com> - 1.0.43-3
- Release 1.0.43-2
* Fri Sep 27 2024 Philipp Rudo <prudo@redhat.com> - 1.0.43-2
- Enable erofs support for the kdump initrd
* Mon Jul 15 2024 Lichen Liu <lichliu@redhat.com> - 1.0.43-1
- Release 1.0.43-1
* Wed Jul 10 2024 Lichen Liu <lichliu@redhat.com> - 1.0.42-2
- Enable gating test
* Wed Jul 10 2024 Lichen Liu <lichliu@redhat.com> - 1.0.42-1
- Initial import for CentOS Stream 10
## END: Generated by rpmautospec

View File

@ -1 +1,4 @@
SHA512 (kdump-utils-1.0.51.tar.gz) = 4dcad4cfa8f4434e93d712675de296a49791e430b4f697c8dcfbaddbe148b53f5ef5a77d022cf7175a7650d907346def77139370ffd27ef2f6a0f6b8c9dbfa12 SHA512 (kdump-utils-1.0.54.tar.gz) = 8eb5b105c5614d2d206151a2261e639fa74958602fb741a725e114f7be87e866910ee530786f6e39988b15b47c477f53d22a7b563ed0aa1a09b9e96f4bb8744c
SHA512 (kdump-utils-1.0.58.tar.gz) = b464ff17211eee6b1af795ddcd3497d72653665a888b1905830121a6226fd441ff7ad88336ac08db29453deedb7567d64e447d7ed9c5cdc615a8e85e0e1b46af
SHA512 (kdump-utils-1.0.60.tar.gz) = cd14479d798a6e81dda7ea2ccf6f3078ad920146b60c3d5240e95323b54bb5c2423365d1d2d7ba00480319abdc123aa955bacbb0c5c5526aac221b25e48ce3dd
SHA512 (kdump-utils-1.0.61.tar.gz) = 9d77084026fb7226ec51d2706c5d944026b17dec8d852d239095a43f192e29c591f111727d72f1cdb2e186c25789616806e0abbc8eda377abb32d09589338ea3