Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
539a6cd7b9 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
SOURCES/1.7.2.tar.gz
|
||||
SOURCES/1.7.1.tar.gz
|
||||
SOURCES/eppic_050615.tar.gz
|
||||
SOURCES/kexec-tools-2.0.26.tar.xz
|
||||
SOURCES/kexec-tools-2.0.25.tar.xz
|
||||
|
@ -1,3 +1,3 @@
|
||||
24bce02cd42cdbb960ada4d9e733355582e35784 SOURCES/1.7.2.tar.gz
|
||||
8f8485c2a1edbc730f4fa1b96ae3ec8d8f1f9761 SOURCES/1.7.1.tar.gz
|
||||
a096c8e0892b559f40b01916aae240652f75b68a SOURCES/eppic_050615.tar.gz
|
||||
27cea5d032ec1e93506b8110222420abf754df2d SOURCES/kexec-tools-2.0.26.tar.xz
|
||||
78d5d4f7e9d358ca234db9c84a551d9d411eb0b5 SOURCES/kexec-tools-2.0.25.tar.xz
|
||||
|
@ -49,6 +49,11 @@ early_kdump_load()
|
||||
|
||||
EARLY_KEXEC_ARGS=$(prepare_kexec_args "${KEXEC_ARGS}")
|
||||
|
||||
if is_secure_boot_enforced; then
|
||||
dinfo "Secure Boot is enabled. Using kexec file based syscall."
|
||||
EARLY_KEXEC_ARGS="$EARLY_KEXEC_ARGS -s"
|
||||
fi
|
||||
|
||||
# Here, only output the messages, but do not save these messages
|
||||
# to a file because the target disk may not be mounted yet, the
|
||||
# earlykdump is too early.
|
||||
|
@ -108,17 +108,6 @@ source_ifcfg_file() {
|
||||
fi
|
||||
}
|
||||
|
||||
add_dns_netdev() {
|
||||
local _server _route
|
||||
|
||||
_server=$1
|
||||
_route=`/sbin/ip -o route get to $_server 2>&1`
|
||||
[ $? != 0 ] && echo "DNS server $_server unreachable"
|
||||
|
||||
_netdev=$(get_ip_route_field "$_route" "dev")
|
||||
_save_kdump_netifs "$_netdev" "$(kdump_setup_ifname $_netdev)"
|
||||
}
|
||||
|
||||
# $1: netdev name
|
||||
kdump_setup_dns() {
|
||||
local _nameserver _dns
|
||||
@ -126,8 +115,8 @@ kdump_setup_dns() {
|
||||
|
||||
source_ifcfg_file $1
|
||||
|
||||
[ -n "$DNS1" ] && echo "nameserver=$DNS1" > "$_dnsfile" && add_dns_netdev "$DNS1"
|
||||
[ -n "$DNS2" ] && echo "nameserver=$DNS2" >> "$_dnsfile" && add_dns_netdev "$DNS2"
|
||||
[ -n "$DNS1" ] && echo "nameserver=$DNS1" > "$_dnsfile"
|
||||
[ -n "$DNS2" ] && echo "nameserver=$DNS2" >> "$_dnsfile"
|
||||
|
||||
while read content;
|
||||
do
|
||||
@ -139,7 +128,6 @@ kdump_setup_dns() {
|
||||
|
||||
if [ ! -f $_dnsfile ] || [ ! $(cat $_dnsfile | grep -q $_dns) ]; then
|
||||
echo "nameserver=$_dns" >> "$_dnsfile"
|
||||
add_dns_netdev "$_dns"
|
||||
fi
|
||||
done < "/etc/resolv.conf"
|
||||
}
|
||||
@ -326,7 +314,7 @@ kdump_setup_ifname() {
|
||||
# fadump to kdump. Skip prefixing 'kdump-' in this case as adding
|
||||
# another prefix may truncate the ifname. Since an ifname with
|
||||
# 'kdump-' is already persistent, this should be fine.
|
||||
if [[ $1 =~ ^eth.* ]] && [[ ! $1 =~ ^kdump-* ]]; then
|
||||
if [[ $1 =~ eth* ]] && [[ ! $1 =~ ^kdump-* ]]; then
|
||||
_ifname="kdump-$1"
|
||||
else
|
||||
_ifname="$1"
|
||||
@ -359,51 +347,6 @@ EOF
|
||||
rm -f "$_netif_allowlist_nm_conf"
|
||||
}
|
||||
|
||||
_get_nic_driver() {
|
||||
ethtool -i "$1" | sed -n -E "s/driver: (.*)/\1/p"
|
||||
}
|
||||
|
||||
_get_hpyerv_physical_driver() {
|
||||
local _physical_nic
|
||||
|
||||
_physical_nic=$(find /sys/class/net/"$1"/ -name 'lower_*' | sed -En "s/\/.*lower_(.*)/\1/p")
|
||||
[[ -n $_physical_nic ]] || return
|
||||
_get_nic_driver "$_physical_nic"
|
||||
}
|
||||
|
||||
kdump_install_nic_driver() {
|
||||
local _netif _driver _drivers
|
||||
|
||||
_drivers=()
|
||||
|
||||
for _netif in $1; do
|
||||
[[ $_netif == lo ]] && continue
|
||||
_driver=$(_get_nic_driver "$_netif")
|
||||
if [[ -z $_driver ]]; then
|
||||
derror "Failed to get the driver of $_netif"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $_driver == "802.1Q VLAN Support" ]]; then
|
||||
# ethtool somehow doesn't return the driver name for a VLAN NIC
|
||||
_driver=8021q
|
||||
elif [[ $_driver == "team" ]]; then
|
||||
# install the team mode drivers like team_mode_roundrobin.ko as well
|
||||
_driver='=drivers/net/team'
|
||||
elif [[ $_driver == "hv_netvsc" ]]; then
|
||||
# A Hyper-V VM may have accelerated networking
|
||||
# https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-overview
|
||||
# Install the driver of physical NIC as well
|
||||
_drivers+=("$(_get_hpyerv_physical_driver "$_netif")")
|
||||
fi
|
||||
|
||||
_drivers+=("$_driver")
|
||||
done
|
||||
|
||||
[[ -n ${_drivers[*]} ]] || return
|
||||
instmods "${_drivers[@]}"
|
||||
}
|
||||
|
||||
kdump_setup_bridge() {
|
||||
local _netdev=$1
|
||||
local _brif _dev _mac _kdumpdev
|
||||
@ -538,18 +481,6 @@ kdump_setup_znet() {
|
||||
echo rd.znet=${NETTYPE},${SUBCHANNELS}${_options} rd.znet_ifname=$(kdump_setup_ifname $_netdev):${SUBCHANNELS} > ${initdir}/etc/cmdline.d/30znet.conf
|
||||
}
|
||||
|
||||
_get_nic_driver() {
|
||||
ethtool -i "$1" | sed -n -E "s/driver: (.*)/\1/p"
|
||||
}
|
||||
|
||||
_rename_hypver_netdev() {
|
||||
local _udev_rule_dir
|
||||
|
||||
_udev_rule_dir=${initdir}/etc/udev/rules.d
|
||||
mkdir -p "$_udev_rule_dir"
|
||||
printf 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="hv_netvsc", ATTR{address}=="%s", ATTR{type}=="1", NAME="%s"\n' "$2" "$1" > "${_udev_rule_dir}/80-hv_netvsc-ifname.rules"
|
||||
}
|
||||
|
||||
# Setup dracut to bringup a given network interface
|
||||
kdump_setup_netdev() {
|
||||
local _netdev=$1 _srcaddr=$2
|
||||
@ -598,12 +529,8 @@ kdump_setup_netdev() {
|
||||
elif kdump_is_vlan "$_netdev"; then
|
||||
kdump_setup_vlan "$_netdev"
|
||||
else
|
||||
if [[ $(_get_nic_driver "$1") != hv_netvsc ]]; then
|
||||
_ifname_opts=" ifname=$kdumpnic:$_netmac"
|
||||
echo "$_ifname_opts" >> $_ip_conf
|
||||
else
|
||||
_rename_hypver_netdev "$kdumpnic" "$_netmac"
|
||||
fi
|
||||
_ifname_opts=" ifname=$kdumpnic:$_netmac"
|
||||
echo "$_ifname_opts" >> $_ip_conf
|
||||
fi
|
||||
_save_kdump_netifs "$_netdev" "$_kdumpdev"
|
||||
|
||||
@ -1126,7 +1053,6 @@ install() {
|
||||
_netifs=$(_get_kdump_netifs)
|
||||
if [[ -n "$_netifs" ]]; then
|
||||
kdump_install_nm_netif_allowlist "$_netifs"
|
||||
kdump_install_nic_driver "$_netifs"
|
||||
fi
|
||||
|
||||
kdump_install_systemd_conf
|
||||
@ -1140,15 +1066,6 @@ install() {
|
||||
's/\(^[[:space:]]*reserved_memory[[:space:]]*=\)[[:space:]]*[[:digit:]]*/\1 1024/' \
|
||||
${initdir}/etc/lvm/lvm.conf &>/dev/null
|
||||
|
||||
# Skip initrd-cleanup.service and initrd-parse-etc.service becasue we don't
|
||||
# need to switch root. Instead of removing them, we use ConditionPathExists
|
||||
# to check if /proc/vmcore exists to determine if we are in kdump.
|
||||
sed -i '/\[Unit\]/a ConditionPathExists=!\/proc\/vmcore' \
|
||||
"${initdir}/${systemdsystemunitdir}/initrd-cleanup.service" &> /dev/null
|
||||
|
||||
sed -i '/\[Unit\]/a ConditionPathExists=!\/proc\/vmcore' \
|
||||
"${initdir}/${systemdsystemunitdir}/initrd-parse-etc.service" &> /dev/null
|
||||
|
||||
# Save more memory by dropping switch root capability
|
||||
dracut_no_switch_root
|
||||
}
|
||||
|
@ -529,24 +529,11 @@ get_dracut_args_target()
|
||||
echo $1 | grep "\-\-mount" | sed "s/.*--mount .\(.*\)/\1/" | cut -d' ' -f1
|
||||
}
|
||||
|
||||
get_reserved_mem_size()
|
||||
{
|
||||
local reserved_mem_size=0
|
||||
|
||||
if is_fadump_capable; then
|
||||
reserved_mem_size=$(< /sys/kernel/fadump/mem_reserved)
|
||||
else
|
||||
reserved_mem_size=$(< /sys/kernel/kexec_crash_size)
|
||||
fi
|
||||
|
||||
echo "$reserved_mem_size"
|
||||
}
|
||||
|
||||
check_crash_mem_reserved()
|
||||
{
|
||||
local mem_reserved
|
||||
|
||||
mem_reserved=$(get_reserved_mem_size)
|
||||
mem_reserved=$(cat /sys/kernel/kexec_crash_size)
|
||||
if [ $mem_reserved -eq 0 ]; then
|
||||
derror "No memory reserved for crash kernel"
|
||||
return 1
|
||||
@ -713,15 +700,6 @@ prepare_kexec_args()
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# For secureboot enabled machines, use new kexec file based syscall.
|
||||
# Old syscall will always fail as it does not have capability to do
|
||||
# kernel signature verification.
|
||||
if is_secure_boot_enforced; then
|
||||
dinfo "Secure Boot is enabled. Using kexec file based syscall."
|
||||
kexec_args="$kexec_args -s"
|
||||
fi
|
||||
|
||||
echo $kexec_args
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ KDUMP_COMMANDLINE=""
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb prot_virt ignition.firstboot zfcp.allow_lun_scan"
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb prot_virt ignition.firstboot"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
|
@ -538,22 +538,28 @@ check_fs_modified()
|
||||
check_system_modified()
|
||||
{
|
||||
local ret
|
||||
local CONF_ERROR=2
|
||||
local CONF_MODIFY=1
|
||||
local CONF_NO_MODIFY=0
|
||||
local conf_status=$CONF_NO_MODIFY
|
||||
|
||||
[[ -f $TARGET_INITRD ]] || return 1
|
||||
|
||||
for _func in check_files_modified check_fs_modified check_drivers_modified; do
|
||||
$_func
|
||||
ret=$?
|
||||
# return immediately if an error occurred.
|
||||
[[ $ret -eq "$CONF_ERROR" ]] && return "$ret"
|
||||
[[ $ret -eq "$CONF_MODIFY" ]] && { conf_status="$CONF_MODIFY"; }
|
||||
done
|
||||
check_files_modified
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
return $ret
|
||||
fi
|
||||
|
||||
return $conf_status
|
||||
check_fs_modified
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
return $ret
|
||||
fi
|
||||
|
||||
check_drivers_modified
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
return $ret
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
check_rebuild()
|
||||
@ -647,7 +653,20 @@ function load_kdump_kernel_key()
|
||||
return
|
||||
fi
|
||||
|
||||
keyctl padd asymmetric "" %:.ima < "/usr/share/doc/kernel-keys/$KDUMP_KERNELVER/kernel-signing-ppc.cer"
|
||||
KDUMP_KEY_ID=$(cat /usr/share/doc/kernel-keys/$KDUMP_KERNELVER/kernel-signing-ppc.cer |
|
||||
keyctl padd asymmetric kernelkey-$RANDOM %:.ima)
|
||||
}
|
||||
|
||||
# remove a previously loaded key. There's no real security implication
|
||||
# to leaving it around, we choose to do this because it makes it easier
|
||||
# to be idempotent and so as to reduce the potential for confusion.
|
||||
function remove_kdump_kernel_key()
|
||||
{
|
||||
if [ -z "$KDUMP_KEY_ID" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
keyctl unlink $KDUMP_KEY_ID %:.ima
|
||||
}
|
||||
|
||||
# Load the kdump kernel specified in /etc/sysconfig/kdump
|
||||
@ -660,6 +679,15 @@ load_kdump()
|
||||
KEXEC_ARGS=$(prepare_kexec_args "${KEXEC_ARGS}")
|
||||
KDUMP_COMMANDLINE=$(prepare_cmdline "${KDUMP_COMMANDLINE}" "${KDUMP_COMMANDLINE_REMOVE}" "${KDUMP_COMMANDLINE_APPEND}")
|
||||
|
||||
# For secureboot enabled machines, use new kexec file based syscall.
|
||||
# Old syscall will always fail as it does not have capability to
|
||||
# to kernel signature verification.
|
||||
if is_secure_boot_enforced; then
|
||||
dinfo "Secure Boot is enabled. Using kexec file based syscall."
|
||||
KEXEC_ARGS="$KEXEC_ARGS -s"
|
||||
load_kdump_kernel_key
|
||||
fi
|
||||
|
||||
ddebug "$KEXEC $KEXEC_ARGS $standard_kexec_args --command-line=$KDUMP_COMMANDLINE --initrd=$TARGET_INITRD $KDUMP_KERNEL"
|
||||
|
||||
# The '12' represents an intermediate temporary file descriptor
|
||||
@ -680,7 +708,9 @@ load_kdump()
|
||||
set +x
|
||||
exec 2>&12 12>&-
|
||||
|
||||
if [[ $ret == 0 ]]; then
|
||||
remove_kdump_kernel_key
|
||||
|
||||
if [ $ret == 0 ]; then
|
||||
dinfo "kexec: loaded kdump kernel"
|
||||
return 0
|
||||
else
|
||||
@ -818,7 +848,7 @@ propagate_ssh_key()
|
||||
|
||||
show_reserved_mem()
|
||||
{
|
||||
local mem=$(get_reserved_mem_size)
|
||||
local mem=$(cat /sys/kernel/kexec_crash_size)
|
||||
local mem_mb=$(expr $mem / 1024 / 1024)
|
||||
|
||||
dinfo "Reserved "$mem_mb"MB memory for crash kernel"
|
||||
@ -979,13 +1009,7 @@ start_fadump()
|
||||
|
||||
start_dump()
|
||||
{
|
||||
# On secure boot enabled Power systems, load kernel signing key on .ima for signature
|
||||
# verification using kexec file based syscall.
|
||||
if [[ "$(uname -m)" == ppc64le ]] && is_secure_boot_enforced; then
|
||||
load_kdump_kernel_key
|
||||
fi
|
||||
|
||||
if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then
|
||||
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
|
||||
start_fadump
|
||||
else
|
||||
load_kdump
|
||||
@ -1246,7 +1270,7 @@ do_estimate() {
|
||||
# The default value when using crashkernel=auto
|
||||
baseline_size=$((baseline * size_mb))
|
||||
# Current reserved crashkernel size
|
||||
reserved_size=$(get_reserved_mem_size)
|
||||
reserved_size=$(cat /sys/kernel/kexec_crash_size)
|
||||
# A pre-estimated value for userspace usage and kernel
|
||||
# runtime allocation, 64M should good for most cases
|
||||
runtime_size=$((64 * size_mb))
|
||||
|
@ -0,0 +1,76 @@
|
||||
commit 6d0d95ecc04a70f8448d562ff0fbbae237f5c929
|
||||
Author: Kazuhito Hagio <k-hagio-ab@nec.com>
|
||||
Date: Thu Apr 21 08:58:29 2022 +0900
|
||||
|
||||
[PATCH] Avoid false-positive mem_section validation with vmlinux
|
||||
|
||||
Currently get_mem_section() validates if SYMBOL(mem_section) is the address
|
||||
of the mem_section array first. But there was a report that the first
|
||||
validation wrongly returned TRUE with -x vmlinux and SPARSEMEM_EXTREME
|
||||
(4.15+) on s390x. This leads to crash failing statup with the following
|
||||
seek error:
|
||||
|
||||
crash: seek error: kernel virtual address: 67fffc2800 type: "memory section root table"
|
||||
|
||||
Skip the first validation when satisfying the conditions.
|
||||
|
||||
Reported-by: Dave Wysochanski <dwysocha@redhat.com>
|
||||
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
|
||||
Reviewed-and-Tested-by: Philipp Rudo <prudo@redhat.com>
|
||||
Reviewed-by: Pingfan Liu <piliu@redhat.com>
|
||||
|
||||
diff --git a/makedumpfile-1.7.1/makedumpfile.c b/makedumpfile-1.7.1/makedumpfile.c
|
||||
index a2f45c84cee3ba57ce3d3cf3f1905e6a03f4fd09..65d1c7c2f02c9ae8ead9de0f0217235fe72b3ca7 100644
|
||||
--- a/makedumpfile-1.7.1/makedumpfile.c
|
||||
+++ b/makedumpfile-1.7.1/makedumpfile.c
|
||||
@@ -3698,6 +3698,22 @@ validate_mem_section(unsigned long *mem_sec,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * SYMBOL(mem_section) varies with the combination of memory model and
|
||||
+ * its source:
|
||||
+ *
|
||||
+ * SPARSEMEM
|
||||
+ * vmcoreinfo: address of mem_section root array
|
||||
+ * -x vmlinux: address of mem_section root array
|
||||
+ *
|
||||
+ * SPARSEMEM_EXTREME v1
|
||||
+ * vmcoreinfo: address of mem_section root array
|
||||
+ * -x vmlinux: address of mem_section root array
|
||||
+ *
|
||||
+ * SPARSEMEM_EXTREME v2 (with 83e3c48729d9 and a0b1280368d1) 4.15+
|
||||
+ * vmcoreinfo: address of mem_section root array
|
||||
+ * -x vmlinux: address of pointer to mem_section root array
|
||||
+ */
|
||||
static int
|
||||
get_mem_section(unsigned int mem_section_size, unsigned long *mem_maps,
|
||||
unsigned int num_section)
|
||||
@@ -3710,12 +3726,27 @@ get_mem_section(unsigned int mem_section_size, unsigned long *mem_maps,
|
||||
strerror(errno));
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
+ /*
|
||||
+ * There was a report that the first validation wrongly returned TRUE
|
||||
+ * with -x vmlinux and SPARSEMEM_EXTREME v2 on s390x, so skip it.
|
||||
+ * Howerver, leave the fallback validation as it is for the -i option.
|
||||
+ */
|
||||
+ if (is_sparsemem_extreme() && info->name_vmlinux) {
|
||||
+ unsigned long flag = 0;
|
||||
+ if (get_symbol_type_name("mem_section", DWARF_INFO_GET_SYMBOL_TYPE,
|
||||
+ NULL, &flag)
|
||||
+ && !(flag & TYPE_ARRAY))
|
||||
+ goto skip_1st_validation;
|
||||
+ }
|
||||
+
|
||||
ret = validate_mem_section(mem_sec, SYMBOL(mem_section),
|
||||
mem_section_size, mem_maps, num_section);
|
||||
|
||||
if (!ret && is_sparsemem_extreme()) {
|
||||
unsigned long mem_section_ptr;
|
||||
|
||||
+skip_1st_validation:
|
||||
if (!readmem(VADDR, SYMBOL(mem_section), &mem_section_ptr,
|
||||
sizeof(mem_section_ptr)))
|
||||
goto out;
|
@ -38,10 +38,10 @@ Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
|
||||
sadump_info.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/makedumpfile-1.7.2/sadump_info.c b/makedumpfile-1.7.2/sadump_info.c
|
||||
diff --git a/makedumpfile-1.7.1/sadump_info.c b/makedumpfile-1.7.1/sadump_info.c
|
||||
index adfa8dc..2c44068 100644
|
||||
--- a/makedumpfile-1.7.2/sadump_info.c
|
||||
+++ b/makedumpfile-1.7.2/sadump_info.c
|
||||
--- a/makedumpfile-1.7.1/sadump_info.c
|
||||
+++ b/makedumpfile-1.7.1/sadump_info.c
|
||||
@@ -1362,6 +1362,7 @@ static int linux_banner_sanity_check(ulong cr3)
|
||||
#define PTI_USER_PGTABLE_BIT (info->page_shift)
|
||||
#define PTI_USER_PGTABLE_MASK (1 << PTI_USER_PGTABLE_BIT)
|
@ -29,7 +29,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 dash resume ifcfg earlykdump\" --compress=xz"
|
||||
dracut_args="--add kdumpbase --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode strict -o \"plymouth dash resume ifcfg earlykdump\" --compress=xz"
|
||||
|
||||
readonly MKDUMPRD_TMPDIR="$(mktemp -d -t mkdumprd.XXXXXX)"
|
||||
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t dracut.XXXXXX failed."
|
||||
@ -240,7 +240,7 @@ check_user_configured_target()
|
||||
# $1: core_collector config value
|
||||
verify_core_collector() {
|
||||
local _cmd="${1%% *}"
|
||||
local _params="${1#${_cmd}}"
|
||||
local _params="${1#* }"
|
||||
|
||||
if [ "$_cmd" != "makedumpfile" ]; then
|
||||
if is_raw_dump_target; then
|
||||
@ -442,11 +442,7 @@ if ! is_fadump_capable; then
|
||||
# so it doesn't affect the logic of check_dump_fs_modified().
|
||||
is_dump_to_rootfs && add_mount "$(to_dev_name $(get_root_fs_device))"
|
||||
|
||||
add_dracut_arg "--no-hostonly-default-device"
|
||||
|
||||
if fips-mode-setup --is-enabled 2> /dev/null; then
|
||||
add_dracut_arg --add-device "$(findmnt -n -o SOURCE --target /boot)"
|
||||
fi
|
||||
add_dracut_arg "--no-hostonly-default-device"
|
||||
fi
|
||||
|
||||
echo "$dracut_args $@" | xargs dracut
|
||||
|
@ -12,10 +12,10 @@ Signed-off-by: Pingfan Liu <piliu@redhat.com>
|
||||
makedumpfile.h | 1 +
|
||||
3 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/makedumpfile-1.7.2/arch/arm64.c b/makedumpfile-1.7.2/arch/arm64.c
|
||||
diff --git a/makedumpfile-1.7.1/arch/arm64.c b/makedumpfile-1.7.1/arch/arm64.c
|
||||
index 1072178..95beae6 100644
|
||||
--- a/makedumpfile-1.7.2/arch/arm64.c
|
||||
+++ b/makedumpfile-1.7.2/arch/arm64.c
|
||||
--- a/makedumpfile-1.7.1/arch/arm64.c
|
||||
+++ b/makedumpfile-1.7.1/arch/arm64.c
|
||||
@@ -50,6 +50,7 @@ static int va_bits;
|
||||
static int vabits_actual;
|
||||
static int flipped_va;
|
||||
@ -51,10 +51,10 @@ index 1072178..95beae6 100644
|
||||
|
||||
kimage_voffset = NUMBER(kimage_voffset);
|
||||
info->section_size_bits = SECTIONS_SIZE_BITS;
|
||||
diff --git a/makedumpfile-1.7.2/makedumpfile.c b/makedumpfile-1.7.2/makedumpfile.c
|
||||
diff --git a/makedumpfile-1.7.1/makedumpfile.c b/makedumpfile-1.7.1/makedumpfile.c
|
||||
index 3ad4443..018ea4c 100644
|
||||
--- a/makedumpfile-1.7.2/makedumpfile.c
|
||||
+++ b/makedumpfile-1.7.2/makedumpfile.c
|
||||
--- a/makedumpfile-1.7.1/makedumpfile.c
|
||||
+++ b/makedumpfile-1.7.1/makedumpfile.c
|
||||
@@ -2417,6 +2417,7 @@ write_vmcoreinfo_data(void)
|
||||
|
||||
WRITE_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
||||
@ -71,10 +71,10 @@ index 3ad4443..018ea4c 100644
|
||||
READ_NUMBER("VA_BITS", VA_BITS);
|
||||
READ_NUMBER("TCR_EL1_T1SZ", TCR_EL1_T1SZ);
|
||||
READ_NUMBER_UNSIGNED("PHYS_OFFSET", PHYS_OFFSET);
|
||||
diff --git a/makedumpfile-1.7.2/makedumpfile.h b/makedumpfile-1.7.2/makedumpfile.h
|
||||
diff --git a/makedumpfile-1.7.1/makedumpfile.h b/makedumpfile-1.7.1/makedumpfile.h
|
||||
index e59239d..b6236dd 100644
|
||||
--- a/makedumpfile-1.7.2/makedumpfile.h
|
||||
+++ b/makedumpfile-1.7.2/makedumpfile.h
|
||||
--- a/makedumpfile-1.7.1/makedumpfile.h
|
||||
+++ b/makedumpfile-1.7.1/makedumpfile.h
|
||||
@@ -2064,6 +2064,7 @@ struct number_table {
|
||||
long phys_base;
|
||||
long KERNEL_IMAGE_SIZE;
|
||||
|
@ -35,8 +35,7 @@ updating lists accordingly.
|
||||
Supported Dump targets
|
||||
----------------------
|
||||
storage:
|
||||
LVM volume
|
||||
Thin provisioning volume
|
||||
LVM volume (no thinp)
|
||||
FC disks (qla2xxx, lpfc, bnx2fc, bfa)
|
||||
software initiator based iSCSI
|
||||
software RAID (mdraid)
|
||||
@ -80,6 +79,7 @@ Unsupported Dump targets
|
||||
------------------------
|
||||
storage:
|
||||
BIOS RAID
|
||||
Thin provisioning volume
|
||||
Software iSCSI with iBFT (bnx2i, cxgb3i, cxgb4i)
|
||||
Software iSCSI with hybrid (be2iscsi)
|
||||
FCoE
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: kexec-tools
|
||||
Version: 2.0.26
|
||||
Release: 14%{?dist}.2
|
||||
Version: 2.0.25
|
||||
Release: 5%{?dist}.1.alma
|
||||
License: GPLv2
|
||||
Group: Applications/System
|
||||
Summary: The kexec/kdump userspace component
|
||||
@ -13,7 +13,7 @@ Source4: kdump.sysconfig.i386
|
||||
Source5: kdump.sysconfig.ppc64
|
||||
Source7: mkdumprd
|
||||
Source8: gen-kdump-conf.sh
|
||||
Source9: https://github.com/makedumpfile/makedumpfile/archive/1.7.2.tar.gz
|
||||
Source9: https://github.com/makedumpfile/makedumpfile/archive/1.7.1.tar.gz
|
||||
Source10: kexec-kdump-howto.txt
|
||||
Source12: mkdumprd.8
|
||||
Source13: 98-kexec.rules
|
||||
@ -111,7 +111,10 @@ Patch602: rhelonly-kexec-tools-2.0.18-eppic-fix-issues-with-hardening-flags.patc
|
||||
|
||||
# Patches 701 onward for makedumpfile
|
||||
Patch701: rhelonly-kexec-tools-2.0.20-makedumpfile-arm64-Add-support-for-ARMv8.2-LVA-52-bi.patch
|
||||
Patch702: kexec-tools-2.0.26-makedumpfile-sadump-fix-failure-of-reading-memory-when-5-le.patch
|
||||
Patch702: kexec-tools-2.0.24-makedumpfile-Avoid_false_positive_mem_section_validation_with_vmlinux.patch
|
||||
# Patch taken from https://gitlab.com/redhat/centos-stream/rpms/kexec-tools/-/raw/57382b3d12ab714d41dc899428913f7d154100d6/kexec-tools-2.0.26-makedumpfile-sadump-fix-failure-of-reading-memory-when-5-le.patch
|
||||
# and updated for 2.0.25
|
||||
Patch703: kexec-tools-2.0.25-makedumpfile-sadump-fix-failure-of-reading-memory-when-5-le.patch
|
||||
|
||||
%description
|
||||
kexec-tools provides /usr/sbin/kexec binary that facilitates a new
|
||||
@ -132,6 +135,7 @@ tar -z -x -v -f %{SOURCE19}
|
||||
|
||||
%patch701 -p1
|
||||
%patch702 -p1
|
||||
%patch703 -p1
|
||||
|
||||
%ifarch ppc
|
||||
%define archdef ARCH=ppc
|
||||
@ -164,8 +168,8 @@ cp %{SOURCE31} .
|
||||
make
|
||||
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
|
||||
make -C eppic/libeppic
|
||||
make -C makedumpfile-1.7.2 LINKTYPE=dynamic USELZO=on USESNAPPY=on USEZSTD=on
|
||||
make -C makedumpfile-1.7.2 LDFLAGS="$LDFLAGS -I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
|
||||
make -C makedumpfile-1.7.1 LINKTYPE=dynamic USELZO=on USESNAPPY=on USEZSTD=on
|
||||
make -C makedumpfile-1.7.1 LDFLAGS="$LDFLAGS -I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
|
||||
%endif
|
||||
|
||||
%install
|
||||
@ -226,13 +230,13 @@ install -m 755 -D %{SOURCE32} $RPM_BUILD_ROOT%{_prefix}/lib/kernel/install.d/60-
|
||||
|
||||
|
||||
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
|
||||
install -m 755 makedumpfile-1.7.2/makedumpfile $RPM_BUILD_ROOT/usr/sbin/makedumpfile
|
||||
install -m 644 makedumpfile-1.7.2/makedumpfile.8 $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8
|
||||
install -m 644 makedumpfile-1.7.2/makedumpfile.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5
|
||||
install -m 644 makedumpfile-1.7.2/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample
|
||||
install -m 755 makedumpfile-1.7.2/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so
|
||||
install -m 755 makedumpfile-1.7.1/makedumpfile $RPM_BUILD_ROOT/usr/sbin/makedumpfile
|
||||
install -m 644 makedumpfile-1.7.1/makedumpfile.8 $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8
|
||||
install -m 644 makedumpfile-1.7.1/makedumpfile.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5
|
||||
install -m 644 makedumpfile-1.7.1/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample
|
||||
install -m 755 makedumpfile-1.7.1/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
|
||||
install -m 644 makedumpfile-1.7.2/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
|
||||
install -m 644 makedumpfile-1.7.1/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
|
||||
%endif
|
||||
|
||||
%define remove_dracut_prefix() %(echo -n %1|sed 's/.*dracut-//g')
|
||||
@ -396,64 +400,12 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 30 2024 Pingfan Liu <piliu@redhat.com> - 2.0.26-14.2
|
||||
- Use the correct regex to match eth.*
|
||||
|
||||
* Tue Jun 18 2024 Pingfan Liu <piliu@redhat.com> - 2.0.26-14.1
|
||||
- mkdumprd: Fix makedumpfile parameter check
|
||||
|
||||
* Wed Feb 21 2024 Pingfan Liu <piliu@redhat.com> - 2.0.26-14
|
||||
- dracut-module-setup: Skip initrd-cleanup and initrd-parse-etc in kdump
|
||||
|
||||
* Fri Feb 2 2024 Pingfan Liu <piliu@redhat.com> - 2.0.26-13
|
||||
- dracut-module-setup.sh: also install the driver of physical NIC for Hyper-V VM with accelerated networking
|
||||
|
||||
* Wed Nov 22 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-12
|
||||
- kdumpctl: Only returns immediately after an error occurs in check_*_modified
|
||||
|
||||
* Thu Nov 9 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-11
|
||||
- powerpc: update kdumpctl to load kernel signing key for fadump
|
||||
- powerpc: update kdumpctl to remove deletion of kernel signing key once loaded
|
||||
|
||||
* Tue Sep 26 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-10
|
||||
- Introduce a function to get reserved memory size
|
||||
|
||||
* Tue Sep 19 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-9
|
||||
- Add lvm thin provision to kdump supported-kdump-targets.txt
|
||||
|
||||
* Thu Aug 10 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-8
|
||||
- mkdumprd: Use the correct syntax to redirect the stderr to null
|
||||
- mkdumprd: call dracut with --add-device to install the drivers needed by /boot partition automatically for FIPS
|
||||
- Add NICs that handle DNS queries to the allowlist
|
||||
|
||||
* Wed Jul 12 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-7
|
||||
- Revert "Revert "Append both nofail and x-systemd.before to kdump mount target"
|
||||
|
||||
* Thu Jun 29 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-6
|
||||
- dracut-module-setup.sh: skip installing driver for the loopback interface
|
||||
- Reduce kdump memory consumption by only installing needed NIC drivers
|
||||
|
||||
* Tue Jun 13 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-5
|
||||
- Revert "Append both nofail and x-systemd.before to kdump mount target"
|
||||
|
||||
* Wed May 31 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-4
|
||||
- Only rename the virtual Azure Hyper-V network interface
|
||||
|
||||
* Tue May 16 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-3
|
||||
- Don't rename Azure Hyper-V network interface
|
||||
|
||||
* Thu Apr 20 2023 Pingfan Liu <piliu@redhat.com> - 2.0.26-2
|
||||
* Thu Jul 13 2023 Andrew Lukoshko <alukoshko@almalinux.org> - 2.0.25-5.1.alma
|
||||
- sadump: fix failure of reading memory when 5-level paging is enabled
|
||||
|
||||
* Tue Apr 4 2023 Pingfan Liu <piliu@redhat.com> - 2.0.25-7
|
||||
- Rebase makedumpfile to 1.7.2
|
||||
|
||||
* Tue Mar 14 2023 Pingfan Liu <piliu@redhat.com> - 2.0.25-6
|
||||
- sysconfig: add zfcp.allow_lun_scan to KDUMP_COMMANDLINE_REMOVE on s390
|
||||
|
||||
* Wed Jan 18 2023 Pingfan Liu <piliu@redhat.com> - 2.0.25-5
|
||||
- dracut-module-setup: Fix invalid rd.znet command line entry
|
||||
- dracut-module-setup: Fix persistent nic name on s390
|
||||
dracut-module-setup: Fix invalid rd.znet command line entry
|
||||
dracut-module-setup: Fix persistent nic name on s390
|
||||
|
||||
* Mon Jan 9 2023 Pingfan Liu <piliu@redhat.com> - 2.0.25-4
|
||||
- Don't check fs modified when dump target is lvm2 thinp
|
||||
|
Loading…
Reference in New Issue
Block a user