Kairui Song
b8c82bd0cc
x86/kexec: Don't setup EFI info if EFI runtime is not enabled
...
[ Upstream commit 2aa958c99c7fd3162b089a1a56a34a0cdb778de1 ]
Kexec-ing a kernel with "efi=noruntime" on the first kernel's command
line causes the following null pointer dereference:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
#PF error: [normal kernel read fault]
Call Trace:
efi_runtime_map_copy+0x28/0x30
bzImage64_load+0x688/0x872
arch_kexec_kernel_image_load+0x6d/0x70
kimage_file_alloc_init+0x13e/0x220
__x64_sys_kexec_file_load+0x144/0x290
do_syscall_64+0x55/0x1a0
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Just skip the EFI info setup if EFI runtime services are not enabled.
[ bp: Massage commit message. ]
Suggested-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Kairui Song <kasong@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dave Young <dyoung@redhat.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: bhe@redhat.com
Cc: David Howells <dhowells@redhat.com>
Cc: erik.schmauss@intel.com
Cc: fanc.fnst@cn.fujitsu.com
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: kexec@lists.infradead.org
Cc: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org
Cc: Philipp Rudo <prudo@linux.vnet.ibm.com>
Cc: rafael.j.wysocki@intel.com
Cc: robert.moore@intel.com
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Cc: Yannik Sembritzki <yannik@sembritzki.me>
Link: https://lkml.kernel.org/r/20190118111310.29589-2-kasong@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-23 08:44:26 +01:00
..
2019-02-20 10:13:22 +01:00
2019-03-23 08:44:19 +01:00
2019-03-23 08:44:20 +01:00
2019-02-20 10:13:07 +01:00
2016-10-07 15:23:45 +02:00
2017-12-20 10:05:00 +01:00
2017-03-31 09:49:53 +02:00
2018-12-17 21:55:16 +01:00
2018-05-26 08:48:50 +02:00
2017-03-31 09:49:53 +02:00
2018-10-10 08:52:12 +02:00
2018-12-17 21:55:16 +01:00
2016-09-24 10:07:43 +02:00
2018-08-24 13:26:57 +02:00
2017-05-25 14:30:16 +02:00
2018-08-06 16:24:39 +02:00
2019-03-23 08:44:23 +01:00
2018-02-16 20:09:47 +01:00
2017-04-12 12:38:34 +02:00
2018-09-19 22:48:55 +02:00
2018-11-21 09:27:30 +01:00
2019-03-23 08:44:21 +01:00
2019-02-06 19:43:05 +01:00
2016-09-24 10:07:44 +02:00
2018-12-17 21:55:16 +01:00
2018-12-17 21:55:16 +01:00
2018-05-26 08:48:50 +02:00
2019-02-20 10:13:13 +01:00
2015-11-11 09:16:10 -08:00
2019-03-23 08:44:26 +01:00
2019-03-23 08:44:25 +01:00