efi: generalize efi_get_secureboot
Generalize the efi_get_secureboot() function so not only efistub but also other subsystems can use it. Note that the MokSbState handling is not factored out: the variable is boot time only, and so it cannot be parameterized as easily. Also, the IMA code will switch to this version in a future patch, and it does not incorporate the MokSbState exception in the first place. Note that the new efi_get_secureboot_mode() helper treats any failures to read SetupMode as setup mode being disabled. Co-developed-by:Chester Lin <clin@suse.com> Signed-off-by:
Chester Lin <clin@suse.com> Acked-by:
Mimi Zohar <zohar@linux.ibm.com> Signed-off-by:
Ard Biesheuvel <ardb@kernel.org>
Showing
- arch/x86/boot/compressed/Makefile 1 addition, 1 deletionarch/x86/boot/compressed/Makefile
- drivers/firmware/efi/libstub/efistub.h 2 additions, 0 deletionsdrivers/firmware/efi/libstub/efistub.h
- drivers/firmware/efi/libstub/secureboot.c 15 additions, 26 deletionsdrivers/firmware/efi/libstub/secureboot.c
- include/linux/efi.h 22 additions, 1 deletioninclude/linux/efi.h
Loading
Please register or sign in to comment