Commit 0289b1ba authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Aubrey Li
Browse files

ACPI: PRM: Check whether EFI runtime is available

mainline inclusion
from mainline-v6.2
commit 182da6f2
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6HNB8


CVE: N/A

Intel-SIG: commit 182da6f2 ACPI: PRM: Check whether EFI runtime is
available.
ACPI Platform Runtime Mechanism feature backport.

--------------------------------

The ACPI PRM address space handler calls efi_call_virt_pointer() to
execute PRM firmware code, but doing so is only permitted when the EFI
runtime environment is available. Otherwise, such calls are guaranteed
to result in a crash, and must therefore be avoided.

Given that the EFI runtime services may become unavailable after a crash
occurring in the firmware, we need to check this each time the PRM
address space handler is invoked. If the EFI runtime services were not
available at registration time to being with, don't install the address
space handler at all.

Fixes: cefc7ca4 ("ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype")
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarAubrey Li <aubrey.li@linux.intel.com>
parent cfa7172f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment