• Chester Lin's avatar
    efi: generalize efi_get_secureboot · e1ac4b24
    Chester Lin authored
    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: default avatarChester Lin <clin@suse.com>
    Signed-off-by: default avatarChester Lin <clin@suse.com>
    Acked-by: default avatarMimi Zohar <zohar@linux.ibm.com>
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    e1ac4b24
efi.h 41.9 KB