From 5521a70cc796f9006ad1c8a09fa31ee5c970a5b0 Mon Sep 17 00:00:00 2001 From: Hari Bathini Date: Thu, 9 Jul 2020 20:46:55 +0530 Subject: [PATCH] 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 Acked-by: Pingfan Liu --- kdump-lib.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kdump-lib.sh b/kdump-lib.sh index f78e064..f632f65 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -611,6 +611,12 @@ is_secure_boot_enforced() local secure_boot_file setup_mode_file 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) setup_mode_file=$(find /sys/firmware/efi/efivars -name SetupMode-* 2>/dev/null)