Kernel Tree For Xiaomi 11 Lite NE 5G
Go to file
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
arch arm64: cmpxchg_double*: hazard against entire exchange variable 2023-01-18 11:42:05 +01:00
block blk-mq: fix possible memleak when register 'hctx' failed 2023-01-18 11:41:38 +01:00
certs
crypto crypto: tcrypt - Fix multibuffer skcipher speed test mem leak 2023-01-18 11:41:19 +01:00
Documentation docs: Fix the docs build with Sphinx 6.0 2023-01-18 11:42:01 +01:00
drivers efi: fix userspace infinite retry read efivars after EFI runtime services page fault 2023-01-24 07:17:59 +01:00
fs nilfs2: fix general protection fault in nilfs_btree_insert() 2023-01-24 07:17:58 +01:00
include quota: Factor out setup of quota inode 2023-01-18 11:42:02 +01:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2022-12-08 11:22:59 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:23:06 +01:00
kernel tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line 2023-01-18 11:41:48 +01:00
lib mm/highmem: Lift memcpy_[to|from]_page to core 2023-01-18 11:41:55 +01:00
LICENSES
mm mm: Always release pages to the buddy allocator in memblock_free_late(). 2023-01-18 11:42:06 +01:00
net net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats 2023-01-24 07:17:58 +01:00
samples samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2023-01-18 11:41:26 +01:00
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:23:02 +01:00
security device_cgroup: Roll back to original exceptions after copy failure 2023-01-18 11:41:50 +01:00
sound ALSA: hda/hdmi: Add a HP device 0x8715 to force connect list 2023-01-18 11:42:01 +01:00
tools selftests/bpf: check null propagation only neither reg is PTR_TO_BTF_ID 2023-01-24 07:17:58 +01:00
usr
virt KVM: arm64: vgic: Fix exit condition in scan_its_table() 2022-10-29 10:20:35 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add Chandan as xfs maintainer for 5.4.y 2022-09-28 11:03:58 +02:00
Makefile Linux 5.4.229 2023-01-18 11:42:07 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.