Currently, kernel enabled the kexec_file_load() syscall on x86_64 by default, so lets align it for kexec tools.
Signed-off-by: Lianbo Jiang lijiang@redhat.com --- kdump-lib.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index f393c76b9cbb..89cb08850924 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -598,10 +598,18 @@ need_64bit_headers() # is 1 and SetupMode is 0, then secure boot is being enforced. # # Assume efivars is mounted at /sys/firmware/efi/efivars. +# +# Currently, kernel enabled the kexec_file_load on x86_64 by default, so +# lets align it. is_secure_boot_enforced() { local secure_boot_file setup_mode_file local secure_boot_byte setup_mode_byte + local arch_name=`uname -m` + + if [ "$arch_name" == "x86_64" ]; 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)