diff --git a/dracut-early-kdump.sh b/dracut-early-kdump.sh index 044f741..4fd8e90 100755 --- a/dracut-early-kdump.sh +++ b/dracut-early-kdump.sh @@ -45,11 +45,6 @@ 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. diff --git a/kdump-lib.sh b/kdump-lib.sh index 042ac87..ae39c23 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -501,6 +501,15 @@ 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" } diff --git a/kdumpctl b/kdumpctl index 3d5d6dd..b6d5994 100755 --- a/kdumpctl +++ b/kdumpctl @@ -690,14 +690,6 @@ 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 if is_uki "$KDUMP_KERNEL"; then uki=$KDUMP_KERNEL @@ -984,6 +976,12 @@ 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 start_fadump else