android_kernel_motorola_sm6375/drivers/firmware
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ding Hui 2e3e2649ea efi: fix userspace infinite retry read efivars after EFI runtime services page fault
[ Upstream commit e006ac3003080177cf0b673441a4241f77aaecce ]

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: 3425d934fc ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-24 07:17:59 +01:00
..
arm_scmi firmware: arm_scmi: Add SCMI PM driver remove routine 2022-10-15 07:54:37 +02:00
broadcom
efi efi: fix userspace infinite retry read efivars after EFI runtime services page fault 2023-01-24 07:17:59 +01:00
google firmware: coreboot: Register bus in module init 2022-12-08 11:23:00 +01:00
imx
meson
psci arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() 2022-03-11 11:22:37 +01:00
tegra
xilinx
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-08-25 11:18:15 +02:00
arm_sdei.c
dmi-id.c
dmi-sysfs.c firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-06-14 18:11:54 +02:00
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
Kconfig
Makefile
memmap.c
pcdp.c
pcdp.h
qcom_scm-32.c
qcom_scm-64.c
qcom_scm.c
qcom_scm.h
qemu_fw_cfg.c firmware: qemu_fw_cfg: fix kobject leak in probe error path 2022-01-20 09:19:18 +01:00
raspberrypi.c
scpi_pm_domain.c
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-06-14 18:11:52 +02:00
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c