Kairui Song
21b202b7ca
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-13 14:03:17 -07:00
..
2019-02-20 10:20:53 +01:00
2019-03-05 17:57:59 +01:00
2019-02-27 10:08:01 +01:00
2019-03-13 14:03:16 -07:00
2017-12-20 10:10:34 +01:00
2017-11-02 11:20:11 +01:00
2018-05-30 07:52:00 +02:00
2017-11-02 11:20:11 +01:00
2018-03-28 18:24:38 +02:00
2018-10-10 08:54:25 +02:00
2018-05-30 07:52:11 +02:00
2018-02-28 10:19:44 +01:00
2018-08-24 13:09:11 +02:00
2018-02-13 10:19:46 +01:00
2018-08-03 07:50:40 +02:00
2019-03-13 14:03:10 -07:00
2018-02-16 20:23:11 +01:00
2018-02-13 10:19:46 +01:00
2018-08-24 13:09:11 +02:00
2019-02-27 10:08:07 +01:00
2019-03-05 17:58:02 +01:00
2019-02-12 19:46:01 +01:00
2017-11-02 11:19:54 +01:00
2018-06-21 04:02:54 +09:00
2018-11-13 11:14:50 -08:00
2017-12-17 15:07:59 +01:00
2019-02-12 19:46:08 +01:00
2018-02-22 15:42:23 +01:00
2019-03-13 14:03:17 -07:00
2019-03-13 14:03:12 -07:00
2018-11-04 14:52:46 +01:00