summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-02-28 13:14:08 +0100
committerIngo Molnar <mingo@kernel.org>2020-02-29 10:16:57 +0100
commit3e03dca500ca65b37dff0a205893095dca74f054 (patch)
treeafd246f6eef88ad4d41f57cac0cd113586854670 /arch/x86/boot
parentb9676962cd5350a36579ad12dc0760a3f08bcd4a (diff)
downloadlinux-3e03dca500ca65b37dff0a205893095dca74f054.tar.bz2
efi: Mark all EFI runtime services as unsupported on non-EFI boot
Recent changes to the way we deal with EFI runtime services that are marked as unsupported by the firmware resulted in a regression for non-EFI boot. The problem is that all EFI runtime services are marked as available by default, and any non-NULL checks on the EFI service function pointers (which will be non-NULL even for runtime services that are unsupported on an EFI boot) were replaced with checks against the mask stored in efi.runtime_supported_mask. When doing a non-EFI boot, this check against the mask will return a false positive, given the fact that all runtime services are marked as enabled by default. Since we dropped the non-NULL check of the runtime service function pointer in favor of the mask check, we will now unconditionally dereference the function pointer, even if it is NULL, and go boom. So let's ensure that the mask reflects reality on a non-EFI boot, which is that all EFI runtime services are unsupported. Reported-by: David Hildenbrand <david@redhat.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: linux-efi@vger.kernel.org Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20200228121408.9075-7-ardb@kernel.org
Diffstat (limited to 'arch/x86/boot')
0 files changed, 0 insertions, 0 deletions