Go to file
Thomas Gleixner a5a0081ae5 x86/efi: Make efi_set_virtual_address_map IBT safe
[ Upstream commit 0303c9729a ]

Niklāvs reported a boot regression on an Alderlake machine and bisected it
to commit 9df9d2f047 ("init: Invoke arch_cpu_finalize_init() earlier").

By moving the invocation of arch_cpu_finalize_init() further down he
identified that efi_enter_virtual_mode() is the function which causes the
boot hang.

The main difference of the earlier invocation is that the boot CPU is
already fully initialized and mitigations and alternatives are applied.

But the only really interesting change turned out to be IBT, which is now
enabled before efi_enter_virtual_mode(). "ibt=off" on the kernel command
line cured the problem.

Inspection of the involved calls in efi_enter_virtual_mode() unearthed that
efi_set_virtual_address_map() is the only place in the kernel which invokes
an EFI call without the IBT safe wrapper. This went obviously unnoticed so
far as IBT was enabled later.

Use arch_efi_call_virt() instead of efi_call() to cure that.

Fixes: fe379fa4d1 ("x86/ibt: Disable IBT around firmware")
Fixes: 9df9d2f047 ("init: Invoke arch_cpu_finalize_init() earlier")
Reported-by: Niklāvs Koļesņikovs <pinkflames.linux@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217602
Link: https://lore.kernel.org/r/87jzvm12q0.ffs@tglx
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-11 19:39:51 +02:00
Documentation ASoC: dt-bindings: mediatek,mt8188-afe: correct clock name 2023-07-11 19:39:34 +02:00
LICENSES
arch x86/efi: Make efi_set_virtual_address_map IBT safe 2023-07-11 19:39:51 +02:00
block block: fix blktrace debugfs entries leakage 2023-07-11 19:39:22 +02:00
certs Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00
crypto crypto: jitter - correct health test during initialization 2023-07-11 19:39:49 +02:00
drivers efi/libstub: Disable PCI DMA before grabbing the EFI memory map 2023-07-11 19:39:51 +02:00
fs ksmbd: avoid field overflow warning 2023-07-11 19:39:51 +02:00
include scsi: ufs: core: mcq: Fix the incorrect OCS value for the device command 2023-07-11 19:39:48 +02:00
init kbuild: Fix CFI failures with GCOV 2023-07-11 19:39:50 +02:00
io_uring io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr 2023-06-28 11:14:16 +02:00
ipc Merge branch 'work.namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2023-02-24 19:20:07 -08:00
kernel kcsan: Don't expect 64 bits atomic builtins from 32 bits architectures 2023-07-11 19:39:47 +02:00
lib lib/ts_bm: reset initial match offset for every block of text 2023-07-11 19:39:31 +02:00
mm splice: Fix filemap_splice_read() to use the correct inode 2023-07-11 19:39:21 +02:00
net netlink: Add __sock_i_ino() for __netlink_diag_dump(). 2023-07-11 19:39:32 +02:00
rust rust: allow to use INIT_STACK_ALL_ZERO 2023-04-19 19:34:43 +02:00
samples samples/bpf: xdp1 and xdp2 reduce XDPBUFSIZE to 60 2023-07-11 19:39:28 +02:00
scripts kbuild: deb-pkg: remove the CONFIG_MODULES check in buildeb 2023-07-11 19:39:51 +02:00
security ima: Fix build warnings 2023-07-11 19:39:26 +02:00
sound ASoC: amd: acp: clear pdm dma interrupt mask 2023-07-11 19:39:44 +02:00
tools perf test: Set PERF_EXEC_PATH for script execution 2023-07-11 19:39:49 +02:00
usr initramfs: Check negative timestamp to prevent broken cpio archive 2023-04-16 17:37:01 +09:00
virt KVM: Avoid illegal stage2 mapping on invalid memory slot 2023-06-28 11:14:05 +02:00
.clang-format cpumask: re-introduce constant-sized cpumask optimizations 2023-03-05 14:30:34 -08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: use 'dts' diff driver for *.dtso files 2023-02-26 15:28:23 +09:00
.gitignore kbuild: rpm-pkg: move source components to rpmbuild/SOURCES 2023-03-16 22:45:56 +09:00
.mailmap Networking fixes for 6.3-rc8, including fixes from netfilter and bpf 2023-04-20 11:03:51 -07:00
.rustfmt.toml
COPYING
CREDITS There is no particular theme here - mainly quick hits all over the tree. 2023-02-23 17:55:40 -08:00
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Resume MPTCP co-maintainer role 2023-04-19 18:10:24 -07:00
Makefile Linux 6.3.12 2023-07-05 18:29:23 +01:00
README

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.