]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/kexec: update get_secureboot_mode
authorMimi Zohar <zohar@linux.ibm.com>
Mon, 1 Apr 2019 17:39:44 +0000 (13:39 -0400)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 17 Apr 2019 21:32:44 +0000 (15:32 -0600)
commit77fe3c1f80882c3686dd27ead3f41d907242a5dd
tree1956c2d9916ef1e0698426828a770db82651c1ad
parent0d79c7b295c110c166ad272bb052205fa4ff21d9
selftests/kexec: update get_secureboot_mode

The get_secureboot_mode() function unnecessarily requires both
CONFIG_EFIVAR_FS and CONFIG_EFI_VARS to be enabled to determine if the
system is booted in secure boot mode.  On some systems the old EFI
variable support is not enabled or, possibly, even implemented.

This patch first checks the efivars filesystem for the SecureBoot and
SetupMode flags, but falls back to using the old EFI variable support.

The "secure_boot_file" and "setup_mode_file" couldn't be quoted due to
globbing.  This patch also removes the globbing.

Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kexec/kexec_common_lib.sh