summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDing Hui <dinghui@sangfor.com.cn>2022-12-27 23:09:36 +0800
committerArd Biesheuvel <ardb@kernel.org>2023-01-03 10:52:16 +0100
commite006ac3003080177cf0b673441a4241f77aaecce (patch)
tree0100241ea7389968a2b5ebdb158b06f904923abb /arch
parent703c13fe3c9af557d312f5895ed6a5fda2711104 (diff)
downloadlinux-stable-e006ac3003080177cf0b673441a4241f77aaecce.tar.gz
linux-stable-e006ac3003080177cf0b673441a4241f77aaecce.tar.bz2
linux-stable-e006ac3003080177cf0b673441a4241f77aaecce.zip
efi: fix userspace infinite retry read efivars after EFI runtime services page fault
After [1][2], if we catch exceptions due to EFI runtime service, we will clear EFI_RUNTIME_SERVICES bit to disable EFI runtime service, then the subsequent routine which invoke the EFI runtime service should fail. But the userspace cat efivars through /sys/firmware/efi/efivars/ will stuck and infinite loop calling read() due to efivarfs_file_read() return -EINTR. The -EINTR is converted from EFI_ABORTED by efi_status_to_err(), and is an improper return value in this situation, so let virt_efi_xxx() return EFI_DEVICE_ERROR and converted to -EIO to invoker. Cc: <stable@vger.kernel.org> Fixes: 3425d934fc03 ("efi/x86: Handle page faults occurring while running EFI runtime services") Fixes: 23715a26c8d8 ("arm64: efi: Recover from synchronous exceptions occurring in firmware") Signed-off-by: Ding Hui <dinghui@sangfor.com.cn> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions