All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/efi: skip bgrt init for kexec reboot
@ 2016-01-27 11:20 ` Dave Young
  0 siblings, 0 replies; 25+ messages in thread
From: Dave Young @ 2016-01-27 11:20 UTC (permalink / raw)
  To: linux-efi; +Cc: kexec, linux-kernel

For kexec reboot the bgrt image address could contains random data because
we have freed boot service areas in 1st kernel boot phase. One possible
result is kmalloc fail in efi_bgrt_init due to large random image size.

So change efi_late_init to avoid efi_bgrt_init in case kexec boot.

Signed-off-by: Dave Young <dyoung@redhat.com>
---
 arch/x86/platform/efi/efi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-x86.orig/arch/x86/platform/efi/efi.c
+++ linux-x86/arch/x86/platform/efi/efi.c
@@ -531,7 +531,8 @@ void __init efi_init(void)
 
 void __init efi_late_init(void)
 {
-	efi_bgrt_init();
+	if (!efi_setup)
+		efi_bgrt_init();
 }
 
 void __init efi_set_executable(efi_memory_desc_t *md, bool executable)

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2016-02-16 14:48 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 11:20 [PATCH] x86/efi: skip bgrt init for kexec reboot Dave Young
2016-01-27 11:20 ` Dave Young
2016-01-27 11:20 ` Dave Young
2016-02-03 21:42 ` Dave Young
2016-02-03 21:42   ` Dave Young
2016-02-03 21:42   ` Dave Young
2016-02-03 22:53   ` Matt Fleming
2016-02-03 22:53     ` Matt Fleming
2016-02-03 22:53     ` Matt Fleming
2016-02-04 10:03     ` Matt Fleming
2016-02-04 10:03       ` Matt Fleming
2016-02-04 10:03       ` Matt Fleming
2016-02-04 11:09       ` Dave Young
2016-02-04 11:09         ` Dave Young
2016-02-04 11:56         ` Matt Fleming
2016-02-04 11:56           ` Matt Fleming
2016-02-04 11:56           ` Matt Fleming
2016-02-05  0:41           ` Dave Young
2016-02-05  0:41             ` Dave Young
2016-02-11 16:09             ` Matt Fleming
2016-02-11 16:09               ` Matt Fleming
2016-02-12 12:45               ` Dave Young
2016-02-12 12:45                 ` Dave Young
2016-02-16 14:48                 ` Matt Fleming
2016-02-16 14:48                   ` Matt Fleming

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.