arm64/efi: Disable secure boot if shim is in insecure mode
authorLinn Crosetto <linn@hpe.com>
Mon, 22 Feb 2016 19:54:37 +0000 (12:54 -0700)
committerAurelien Jarno <aurel32@debian.org>
Fri, 2 Mar 2018 07:52:22 +0000 (07:52 +0000)
commite946161ce50b5d80d40bddd251267319a56b7db7
treec71e02e8333a06200caca12c6fb3c444c05a3c3c
parentdfb6aadd30ee107cb6f7768a4f0cf739f8ef9432
arm64/efi: Disable secure boot if shim is in insecure mode

Port to arm64 a patch originally written by Josh Boyer for the x86 EFI
stub.

A user can manually tell the shim boot loader to disable validation of
images it loads.  When a user does this, it creates a UEFI variable called
MokSBState that does not have the runtime attribute set.  Given that the
user explicitly disabled validation, we can honor that and not enable
secure boot mode if that variable is set.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Gbp-Pq: Topic features/all/securelevel
Gbp-Pq: Name arm64-efi-disable-secure-boot-if-shim-is-in-insecure.patch
drivers/firmware/efi/libstub/arm-stub.c