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>
This commit is contained in:
Baoquan He 2025-08-15 15:54:26 +08:00
parent bfa3841787
commit 4418ea7f4c
2 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,80 @@
From b061a48965476e5b2e6be59686783c85d0f14b5c Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe@redhat.com>
Date: Mon, 11 Aug 2025 17:02:46 +0800
Subject: [PATCH] sysconfig: disable kfence in kdump kernel
Content-type: text/plain
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>
---
gen-kdump-sysconfig.sh | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gen-kdump-sysconfig.sh b/gen-kdump-sysconfig.sh
index ca2e7610bc59..eb5287bd3d43 100755
--- a/gen-kdump-sysconfig.sh
+++ b/gen-kdump-sysconfig.sh
@@ -29,7 +29,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
-KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices novmcoredd cma=0 hugetlb_cma=0 kfence.sample_interval=0"
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices novmcoredd cma=0 hugetlb_cma=0"
# This variable lets us append arguments to fadump (powerpc) capture kernel,
# further to the parameters passed via the bootloader.
@@ -82,25 +82,25 @@ case "$1" in
aarch64)
update_param KEXEC_ARGS "-s"
update_param KDUMP_COMMANDLINE_APPEND \
- "irqpoll nr_cpus=1 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 swiotlb=noforce novmcoredd cma=0 hugetlb_cma=0"
+ "irqpoll nr_cpus=1 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 swiotlb=noforce novmcoredd cma=0 hugetlb_cma=0 kfence.sample_interval=0"
;;
i386)
update_param KDUMP_COMMANDLINE_APPEND \
- "irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd cma=0 hugetlb_cma=0"
+ "irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd cma=0 hugetlb_cma=0 kfence.sample_interval=0"
;;
ppc64)
update_param KEXEC_ARGS "--dt-no-old-root"
update_param KDUMP_COMMANDLINE_REMOVE \
"hugepages hugepagesz slub_debug quiet log_buf_len swiotlb hugetlb_cma ignition.firstboot"
update_param KDUMP_COMMANDLINE_APPEND \
- "irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
+ "irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0 kfence.sample_interval=0"
;;
ppc64le)
update_param KEXEC_ARGS "-s"
update_param KDUMP_COMMANDLINE_REMOVE \
"hugepages hugepagesz slub_debug quiet log_buf_len swiotlb hugetlb_cma ignition.firstboot"
update_param KDUMP_COMMANDLINE_APPEND \
- "irqpoll nr_cpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
+ "irqpoll nr_cpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0 kfence.sample_interval=0"
update_param FADUMP_COMMANDLINE_APPEND \
"nr_cpus=16 numa=off cgroup_disable=memory cma=0 kvm_cma_resv_ratio=0 hugetlb_cma=0 transparent_hugepage=never novmcoredd udev.children-max=2"
;;
@@ -109,12 +109,12 @@ s390x)
update_param KDUMP_COMMANDLINE_REMOVE \
"hugepages hugepagesz slub_debug quiet log_buf_len swiotlb vmcp_cma cma hugetlb_cma prot_virt ignition.firstboot zfcp.allow_lun_scan"
update_param KDUMP_COMMANDLINE_APPEND \
- "nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd vmcp_cma=0 cma=0 hugetlb_cma=0"
+ "nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd vmcp_cma=0 cma=0 hugetlb_cma=0 kfence.sample_interval=0"
;;
x86_64)
update_param KEXEC_ARGS "-s"
update_param KDUMP_COMMANDLINE_APPEND \
- "irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 acpi_no_memhotplug transparent_hugepage=never nokaslr hest_disable novmcoredd cma=0 hugetlb_cma=0 pcie_ports=compat"
+ "irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 acpi_no_memhotplug transparent_hugepage=never nokaslr hest_disable novmcoredd cma=0 hugetlb_cma=0 pcie_ports=compat kfence.sample_interval=0"
;;
*)
echo "Warning: Unknown architecture '$1', using default sysconfig template." >&2
--
2.41.0

View File

@ -13,6 +13,7 @@ Patch02: 0002-mkdumprd-replace-lz4hc-with-lzma-for-better-compress.patch
Patch03: 0003-Fix-the-way-to-tell-if-there-is-a-need-to-set-up-net.patch
Patch04: 0004-Support-dumping-to-NVMe-TCP-configured-using-NVMe-Bo.patch
Patch05: 0005-sysconfig-disable-kfence-in-kdump-kernel.patch
Patch06: 0006-sysconfig-disable-kfence-in-kdump-kernel.patch
%ifarch ppc64 ppc64le
Requires(post): servicelog