Copy secure_boot flag in boot params across kexec reboot
authorDave Young <dyoung@redhat.com>
Mon, 18 Feb 2019 12:44:58 +0000 (12:44 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 21 Aug 2019 12:48:11 +0000 (13:48 +0100)
commit1997b205a73e0967f6bb7cddb251729a8d33fe11
treea6352b43221df53aa20611308b2972d327f20778
parentdf7c4220b17afa133a474dfb6cce60d44c971e68
Copy secure_boot flag in boot params across kexec reboot

Kexec reboot in case secure boot being enabled does not keep the secure
boot mode in new kernel, so later one can load unsigned kernel via legacy
kexec_load.  In this state, the system is missing the protections provided
by secure boot.

Adding a patch to fix this by retain the secure_boot flag in original
kernel.

secure_boot flag in boot_params is set in EFI stub, but kexec bypasses the
stub.  Fixing this issue by copying secure_boot flag across kexec reboot.

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: "Lee, Chun-Yi" <jlee@suse.com>
cc: kexec@lists.infradead.org

Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0007-Copy-secure_boot-flag-in-boot-params-across-kexec-re.patch
arch/x86/kernel/kexec-bzimage64.c