ppc64/kdump: use kexec_file_load when secureboot is enabled

In secure boot mode, kexec_load syscall is disabled. So, if in secure
boot mode, load kdump kernel with kexec_file_load syscall instead.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Acked-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
Hari Bathini 2020-07-09 20:46:55 +05:30 committed by Kairui Song
parent 070d362846
commit 5521a70cc7

View File

@ -611,6 +611,12 @@ is_secure_boot_enforced()
local secure_boot_file setup_mode_file local secure_boot_file setup_mode_file
local secure_boot_byte setup_mode_byte local secure_boot_byte setup_mode_byte
# On powerpc, os-secureboot-enforcing DT property indicates whether secureboot
# is enforced. Return success, if it is found.
if [ -f /proc/device-tree/ibm,secureboot/os-secureboot-enforcing ]; then
return 0
fi
secure_boot_file=$(find /sys/firmware/efi/efivars -name SecureBoot-* 2>/dev/null) secure_boot_file=$(find /sys/firmware/efi/efivars -name SecureBoot-* 2>/dev/null)
setup_mode_file=$(find /sys/firmware/efi/efivars -name SetupMode-* 2>/dev/null) setup_mode_file=$(find /sys/firmware/efi/efivars -name SetupMode-* 2>/dev/null)