Copy secure_boot flag in boot params across kexec reboot
authorDave Young <dyoung@redhat.com>
Wed, 8 Nov 2017 15:11:32 +0000 (15:11 +0000)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 20 Mar 2018 08:31:07 +0000 (08:31 +0000)
commita36325a1ad4bde9fad13addb9eac9f163e2be025
tree018c7a3b984bf56c34a02d87117ecd849a2a4abf
parentfd094314f2039f9e14421785734dfb50e8b6ec97
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