efi: Disable secure boot if shim is in insecure mode
authorJosh Boyer <jwboyer@fedoraproject.org>
Wed, 6 Feb 2013 00:25:05 +0000 (19:25 -0500)
committerAurelien Jarno <aurel32@debian.org>
Fri, 2 Mar 2018 07:52:22 +0000 (07:52 +0000)
commitf156b916893ac594dca357f28cbaf2ed4733d4f9
treef65cb324e6d0b31b9c2351b45313525b5b640efa
parent1c5a8aae2462e8ab71402b6fa7de9010bc3628bd
efi: Disable secure boot if shim is in insecure mode

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: Josh Boyer <jwboyer@fedoraproject.org>
Gbp-Pq: Topic features/all/securelevel
Gbp-Pq: Name efi-disable-secure-boot-if-shim-is-in-insecure-mode.patch
arch/x86/boot/compressed/eboot.c
include/linux/efi.h