]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
efi/x86: Don't panic or BUG() on non-critical error conditions
authorArd Biesheuvel <ardb@kernel.org>
Fri, 3 Jan 2020 11:39:46 +0000 (12:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:38:25 +0000 (08:38 +0100)
commit5650aaa1c72b8bf0f26d251d724b624ebdbb5ea7
treebcb6a88157a7522fd568f58186d26b9b8762ed98
parent2a0a4875ca2734ee60b2b8020028b63d728da312
efi/x86: Don't panic or BUG() on non-critical error conditions

[ Upstream commit e2d68a955e49d61fd0384f23e92058dc9b79be5e ]

The logic in __efi_enter_virtual_mode() does a number of steps in
sequence, all of which may fail in one way or the other. In most
cases, we simply print an error and disable EFI runtime services
support, but in some cases, we BUG() or panic() and bring down the
system when encountering conditions that we could easily handle in
the same way.

While at it, replace a pointless page-to-virt-phys conversion with
one that goes straight from struct page to physical.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Matthew Garrett <mjg59@google.com>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20200103113953.9571-14-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/platform/efi/efi.c
arch/x86/platform/efi/efi_64.c