x86/efi: Set securelevel when loaded without efi stub
Orabug:
22364965
With UEFI Secure Boot enabled and securelevel set, after a kernel is loaded
using kexec and booted, securelevel is disabled. With the securelevel patch
set, the state of UEFI Secure Boot is queried when booted via the efi stub, but
kexec does not use the efi stub.
To allow kernels which are not loaded through the efi stub to properly set
securelevel as well, add a new init routine to start_kernel() to query the
state of UEFI Secure Boot and enable securelevel if needed.
Taken from https://bugzilla.redhat.com/attachment.cgi?id=
1052836 .
Signed-off-by: Linn Crosetto <linn@hp.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
(cherry picked from commit
a954f7350658a8fde4b893c7b74de8137864ad12)
Signed-off-by: Dan Duval <dan.duval@oracle.com>