efi/libstub: Treat missing SecureBoot variable as Secure Boot disabled
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 1 Mar 2017 19:04:35 +0000 (19:04 +0000)
committerIngo Molnar <mingo@kernel.org>
Thu, 2 Mar 2017 07:11:18 +0000 (08:11 +0100)
commit52e51f16407b7b34e26affb500a21e250d9fce0b
tree657dbdb683203334bcbaf0d024528249aa376645
parent4977ab6e92e267afe9d8f78438c3db330ca8434c
efi/libstub: Treat missing SecureBoot variable as Secure Boot disabled

The newly refactored code that infers the firmware's Secure Boot state
prints the following error when the EFI variable 'SecureBoot' does not
exist:

  EFI stub: ERROR: Could not determine UEFI Secure Boot status.

However, this variable is only guaranteed to be defined on a system that
is Secure Boot capable to begin with, and so it is not an error if it is
missing. So report Secure Boot as being disabled in this case, without
printing any error messages.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1488395076-29712-2-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/libstub/secureboot.c