[PATCH 0/2] arm64: efi: Robustify EFI runtime wrapper code

Ard Biesheuvel ardb at kernel.org
Mon Dec 5 12:12:08 PST 2022


Make the EFI runtime wrapper code more robust, by switching to a
dedicated stack and dealing with sync exceptions occurring in firmware
by unwinding it. While at it, move the backup copy of register X18 onto
the base of that stack too so we can can restore it if needed without
reloading it from the ordinary stack.

Patch #2 is a v2 of a patch that got merged and reverted again in
v6.1-rc.

This supersedes 'arm64: efi: Move runtime services asm wrapper out of
.text'

Cc: Sami Tolvanen <samitolvanen at google.com>
Cc: Kees Cook <keescook at chromium.org>

Ard Biesheuvel (2):
  arm64: efi: Execute runtime services from a dedicated stack
  arm64: efi: Recover from synchronous exceptions occurring in firmware

 arch/arm64/include/asm/efi.h            | 11 +++++
 arch/arm64/kernel/efi-rt-wrapper.S      | 38 ++++++++++++++--
 arch/arm64/kernel/efi.c                 | 47 ++++++++++++++++++++
 arch/arm64/mm/fault.c                   |  4 ++
 drivers/firmware/efi/runtime-wrappers.c |  1 +
 5 files changed, 98 insertions(+), 3 deletions(-)

-- 
2.35.1




More information about the linux-arm-kernel mailing list