Date: Mon, 1 Aug 2022 15:41:15 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, keescook@chromium.org, Ard Biesheuvel Subject: [GIT PULL 0/2] EFI pull requests for v5.20 Hello Linus, I am sending this cycle's EFI changes as two separate pull requests: - the first one covers the normal updates accumulated this cycle, including some cleanup of the 'efivars' layer; - the second one removes the obsolete 'efivars' sysfs driver, and consolidates the remaining code related to manipulating arbitrary EFI variables from user space into the efivarfs pseudo-filesystem driver. The 'efivars' sysfs interface and the 'efivarfs' (note the 'f') pseudo-filesystem are both based on an abstraction which is also called 'efivars' that caches EFI variables, and permits the backend to be swapped out, for backing the EFI variable store by, e.g., SMI calls or other secure firmware calls. (only used by Google SMI at the moment, but new uses are being proposed). Using two cached views of the same variable store leads to the problems you might expect, and other users also exist that (ab)use the efivars layer for non-obvious reasons. Most of the quirks are being cleaned up in 1/2 of this PR series. However, to really address this thoroughly, we should get rid of the obsolete sysfs based EFI variable interface for user space, and only keep the efivarfs pseudo-filesystem. This is what is implemented by 2/2 of this PR series, which also moves the remaining efivars logic that efivarfs relies on into the efivarfs driver, and no longer exports it to other parts of the kernel. Obviously, removing the sysfs interface could potentially break someone's workflow somewhere, and so it is not without risk. However, as far as I can infer from things like Debian code search etc, all support libraries that are in use to access EFI variables will prefer the efivarfs pseudo-filesystem, and fall back to the sysfs interface otherwise. The efivarfs pseudo-FS is 'default m' when CONFIG_EFI=y, and all the distros have switched to it a very long time ago. But individual cases might exist where a script accesses /sys/firmware/efi/vars/... directly, and this will no longer work after merging PR 2/2 of this series. In summary, I am leaving it up to you to pull the trigger on PR 2/2 - if you prefer to deal with this in a different way, please feel free to disregard the second PR, and make a suggestion how to address this instead. Note that the 2/2 changes were put at the end so reverting this should be quite straight-forward, in case we do decide to merge them and they turn out to be causing problems. Thanks, Ard. . Date: Thu, 8 Sep 2022 12:43:59 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, gregkh@linuxfoundation.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.0 #1 The following changes since commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868: Linux 6.0-rc1 (2022-08-14 15:50:18 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent-for-v6.0-1 for you to fetch changes up to 9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95: efi: capsule-loader: Fix use-after-free in efi_capsule_write (2022-09-07 18:23:56 +0200) ---------------------------------------------------------------- A couple of low-priority EFI fixes - prevent the randstruct plugin from re-ordering EFI protocol definitions; - fix a use-after-free in the capsule loader - drop unused variable ---------------------------------------------------------------- Ard Biesheuvel (1): efi: libstub: Disable struct randomization Hyunwoo Kim (1): efi: capsule-loader: Fix use-after-free in efi_capsule_write chen zhang (1): efi/x86: libstub: remove unused variable drivers/firmware/efi/capsule-loader.c | 31 +++++++------------------------ drivers/firmware/efi/libstub/Makefile | 7 +++++++ drivers/firmware/efi/libstub/x86-stub.c | 1 - 3 files changed, 14 insertions(+), 25 deletions(-) . Date: Thu, 22 Sep 2022 16:21:22 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.0 (#2) The following changes since commit 9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95: efi: capsule-loader: Fix use-after-free in efi_capsule_write (2022-09-07 18:23:56 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent-for-v6.0-2 for you to fetch changes up to 5f56a74cc0a6d9b9f8ba89cea29cd7c4774cb2b1: efi: libstub: check Shim mode using MokSBStateRT (2022-09-22 10:15:44 +0200) ---------------------------------------------------------------- EFI fixes (take #2) - Use the right variable to check for shim insecure mode - Wipe setup_data field when booting via EFI - Add missing error check to efibc driver ---------------------------------------------------------------- Ard Biesheuvel (2): efi: x86: Wipe setup_data on pure EFI boot efi: libstub: check Shim mode using MokSBStateRT Guilherme G. Piccoli (1): efi: efibc: Guard against allocation failure drivers/firmware/efi/efibc.c | 3 +++ drivers/firmware/efi/libstub/secureboot.c | 8 ++++---- drivers/firmware/efi/libstub/x86-stub.c | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) . Date: Mon, 3 Oct 2022 13:59:10 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel , Huacai Chen , Ilias Apalodimas Subject: [GIT PULL] EFI updates for v6.1 Hello Linus, A bit more going on than usual in the EFI subsystem. The main driver for this has been the introduction of the LoonArch architecture last cycle, which inspired some cleanup and refactoring of the EFI code. Another driver for EFI changes this cycle and in the future is confidential compute. The LoongArch architecture does not use either struct bootparams or DT natively [yet], and so passing information between the EFI stub and the core kernel using either of those is undesirable. And in general, overloading DT has been a source of issues on arm64, so using DT for this on new architectures is a to avoid for the time being (even if we might converge on something DT based for non-x86 architectures in the future). For this reason, in addition to the patch that enables EFI boot for LoongArch, there are a number of refactoring patches applied on top of which separate the DT bits from the generic EFI stub bits. These changes are on a separate topich branch that has been shared with the LoongArch maintainers, who will include it in their pull request as well. This is not ideal, but the best way to manage the conflicts without stalling LoongArch for another cycle. Another development inspired by LoongArch is the newly added support for EFI based decompressors. Instead of adding yet another arch-specific incarnation of this pattern for LoongArch, we are introducing a EFI app based on the existing EFI libstub infrastructure that encapulates the decompression code we use on other architectures, but in a way that is fully generic. This has been developed and tested in collaboration with distro and systemd folks, who are eager to start using this for systemd-boot and also for arm64 secure boot on Fedora. Note that the EFI zimage files this introduces can also be decompressed by non-EFI bootloaders if needed, as the image header describes the location of the payload inside the image, and the type of compression that was used. (Note that Fedora's arm64 GRUB is buggy [0] so you'll need a recent version or switch to systemd-boot in order to use this.) Finally, we are adding TPM measurement of the kernel command line provided by EFI. There is an oversight in the TCG spec which results in a blind spot for command line arguments passed to loaded images, which means that either the loader or the stub needs to take the measurement. Given the combinatorial explosion I am anticipating when it comes to firmware/bootloader stacks and firmware based attestation protocols (SEV-SNP, TDX, DICE, DRTM), it is good to set a baseline now when it comes to EFI measured boot, which is that the kernel measures the initrd and command line. Intermediate loaders can measure additional assets if needed, but with the baseline in place, we can deploy measured boot in a meaningful way even if you boot into Linux straight from the EFI firmware. Please pull the changes below. -- Ard. The following changes since commit 568035b01cfb107af8d2e4bd2fb9aea22cf5b868: Linux 6.0-rc1 (2022-08-14 15:50:18 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.1 for you to fetch changes up to d3549a938b73f203ef522562ae9f2d38aa43d234: efi/arm64: libstub: avoid SetVirtualAddressMap() when possible (2022-09-27 13:26:16 +0200) Cc: Huacai Chen Cc: Ilias Apalodimas [0] https://github.com/rhboot/grub2/commit/7710c05ea38995f558a84a27ae0cb89968383420 ---------------------------------------------------------------- EFI updates for v6.1 - implement EFI boot support for LoongArch - implement generic EFI compressed boot support for arm64, RISC-V and LoongArch, none of which implement a decompressor today - measure the kernel command line into the TPM if measured boot is in effect - refactor the EFI stub code in order to isolate DT dependencies for architectures other than x86 - avoid calling SetVirtualAddressMap() on arm64 if the configured size of the VA space guarantees that doing so is unnecessary - move some ARM specific code out of the generic EFI source files - unmap kernel code from the x86 mixed mode 1:1 page tables ---------------------------------------------------------------- Ard Biesheuvel (23): efi/x86-mixed: move unmitigated RET into .rodata Merge tag 'efi-loongarch-for-v6.1' into efi/next efi/libstub: add some missing EFI prototypes efi/libstub: use EFI provided memcpy/memset routines efi/libstub: move efi_system_table global var into separate object efi/libstub: implement generic EFI zboot riscv: efi: enable generic EFI compressed boot loongarch: efi: enable generic EFI compressed boot arm64: efi: enable generic EFI compressed boot efi: libstub: fix type confusion for load_options_size efi: libstub: drop pointless get_memory_map() call efi: libstub: avoid efi_get_memory_map() for allocating the virt map efi: libstub: simplify efi_get_memory_map() and struct efi_boot_memmap efi: libstub: remove pointless goto kludge efi: libstub: unify initrd loading between architectures efi: libstub: remove DT dependency from generic stub efi: libstub: install boot-time memory map as config table efi/loongarch: libstub: remove dependency on flattened DT Merge tag 'efi-loongarch-for-v6.1-2' into HEAD efi/arm: libstub: move ARM specific code out of generic routines efi: libstub: fix up the last remaining open coded boot service call efi: zboot: create MemoryMapped() device path for the parent if needed efi/arm64: libstub: avoid SetVirtualAddressMap() when possible Huacai Chen (1): efi/loongarch: Add efistub booting support Ilias Apalodimas (2): efi/libstub: refactor the initrd measuring functions efi/libstub: measure EFI LoadOptions Documentation/arm/uefi.rst | 4 - arch/arm/include/asm/efi.h | 3 +- arch/arm/kernel/efi.c | 79 +++++++ arch/arm/kernel/setup.c | 2 +- arch/arm64/Makefile | 9 +- arch/arm64/boot/.gitignore | 1 + arch/arm64/boot/Makefile | 6 + arch/arm64/kernel/image-vars.h | 13 -- arch/loongarch/Kconfig | 12 +- arch/loongarch/Makefile | 18 +- arch/loongarch/boot/.gitignore | 1 + arch/loongarch/boot/Makefile | 14 +- arch/loongarch/include/asm/bootinfo.h | 2 +- arch/loongarch/include/asm/efi.h | 11 +- arch/loongarch/kernel/efi-header.S | 99 ++++++++ arch/loongarch/kernel/efi.c | 33 ++- arch/loongarch/kernel/env.c | 13 +- arch/loongarch/kernel/head.S | 22 ++ arch/loongarch/kernel/image-vars.h | 27 +++ arch/loongarch/kernel/setup.c | 15 +- arch/loongarch/kernel/vmlinux.lds.S | 1 + arch/riscv/Makefile | 6 +- arch/riscv/boot/.gitignore | 1 + arch/riscv/boot/Makefile | 6 + arch/riscv/kernel/image-vars.h | 9 - arch/x86/platform/efi/efi_64.c | 18 +- arch/x86/platform/efi/efi_thunk_64.S | 13 +- drivers/firmware/efi/Kconfig | 45 +++- drivers/firmware/efi/efi-init.c | 61 +---- drivers/firmware/efi/efi.c | 15 ++ drivers/firmware/efi/libstub/Makefile | 32 ++- drivers/firmware/efi/libstub/Makefile.zboot | 70 ++++++ drivers/firmware/efi/libstub/arm64-stub.c | 27 ++- drivers/firmware/efi/libstub/efi-stub-helper.c | 290 ++++++++++++++---------- drivers/firmware/efi/libstub/efi-stub.c | 118 ++++------ drivers/firmware/efi/libstub/efistub.h | 69 +++--- drivers/firmware/efi/libstub/fdt.c | 175 +++++++------- drivers/firmware/efi/libstub/file.c | 23 +- drivers/firmware/efi/libstub/intrinsics.c | 30 +++ drivers/firmware/efi/libstub/loongarch-stub.c | 102 +++++++++ drivers/firmware/efi/libstub/mem.c | 93 ++++---- drivers/firmware/efi/libstub/randomalloc.c | 25 +- drivers/firmware/efi/libstub/relocate.c | 21 +- drivers/firmware/efi/libstub/systable.c | 8 + drivers/firmware/efi/libstub/x86-stub.c | 33 +-- drivers/firmware/efi/libstub/zboot-header.S | 143 ++++++++++++ drivers/firmware/efi/libstub/zboot.c | 302 +++++++++++++++++++++++++ drivers/firmware/efi/libstub/zboot.lds | 44 ++++ include/linux/efi.h | 35 +++ include/linux/pe.h | 2 + 50 files changed, 1638 insertions(+), 563 deletions(-) create mode 100644 arch/loongarch/kernel/efi-header.S create mode 100644 arch/loongarch/kernel/image-vars.h create mode 100644 drivers/firmware/efi/libstub/Makefile.zboot create mode 100644 drivers/firmware/efi/libstub/intrinsics.c create mode 100644 drivers/firmware/efi/libstub/loongarch-stub.c create mode 100644 drivers/firmware/efi/libstub/systable.c create mode 100644 drivers/firmware/efi/libstub/zboot-header.S create mode 100644 drivers/firmware/efi/libstub/zboot.c create mode 100644 drivers/firmware/efi/libstub/zboot.lds . Date: Fri, 21 Oct 2022 17:40:45 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.1 #1 The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780: Linux 6.1-rc1 (2022-10-16 15:36:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.1-1 for you to fetch changes up to 37926f96302d8b6c2bc97990d33e316a3ed6d67f: efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 (2022-10-21 11:09:41 +0200) ---------------------------------------------------------------- First batch of EFI fixes for v6.1 - A pair of fixes for the EFI variable store refactor that landed in v6.0 - A couple of fixes for issue that were introduced during the merge window - Back out some changes related to EFI zboot signing - we'll add a better solution for this during the next cycle ---------------------------------------------------------------- Ard Biesheuvel (6): efi: libstub: Remove zboot signing from build options efi: ssdt: Don't free memory if ACPI table was loaded successfully efi: efivars: Fix variable writes without query_variable_store() efi: libstub: Give efi_main() asmlinkage qualification efi: libstub: Fix incorrect payload size in zboot header efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 drivers/firmware/efi/Kconfig | 22 ---------------------- drivers/firmware/efi/arm-runtime.c | 2 +- drivers/firmware/efi/efi.c | 2 ++ drivers/firmware/efi/libstub/Makefile.zboot | 29 ++++------------------------- drivers/firmware/efi/libstub/fdt.c | 8 ++++---- drivers/firmware/efi/libstub/x86-stub.c | 6 +++--- drivers/firmware/efi/libstub/zboot.lds | 3 ++- drivers/firmware/efi/riscv-runtime.c | 2 +- drivers/firmware/efi/vars.c | 10 +++++----- fs/efivarfs/vars.c | 16 ---------------- include/linux/efi.h | 3 --- 11 files changed, 22 insertions(+), 81 deletions(-) . Date: Fri, 4 Nov 2022 17:51:49 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.1 (#2) Hello Linus, Please pull the EFI fixes below. The arm64 exception recovery is not a real fix, but it will be useful to have in v6.1 going forward, so I've incorporated it here. I hope that's alright. The following changes since commit 37926f96302d8b6c2bc97990d33e316a3ed6d67f: efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 (2022-10-21 11:09:41 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.1-2 for you to fetch changes up to 23715a26c8d812912a70c6ac1ce67af649b95914: arm64: efi: Recover from synchronous exceptions occurring in firmware (2022-11-03 18:01:15 +0100) ---------------------------------------------------------------- Second batch of EFI fixes for v6.1 - A pair of tweaks to the EFI random seed code so that externally provided version of this config table are handled more robustly - Another fix for the v6.0 EFI variable refactor that turned out to break Apple machines which don't provide QueryVariableInfo() - Add some guard rails to the EFI runtime service call wrapper so we can recover from synchronous exceptions caused by firmware ---------------------------------------------------------------- Ard Biesheuvel (4): efi: random: reduce seed size to 32 bytes efi: random: Use 'ACPI reclaim' memory for random seed efi: efivars: Fix variable writes with unsupported query_variable_store() arm64: efi: Recover from synchronous exceptions occurring in firmware Jerry Snitselaar (1): efi/tpm: Pass correct address to memblock_reserve arch/arm64/include/asm/efi.h | 8 +++++ arch/arm64/kernel/efi-rt-wrapper.S | 33 +++++++++++++++-- arch/arm64/kernel/efi.c | 26 ++++++++++++++ arch/arm64/mm/fault.c | 4 +++ drivers/firmware/efi/efi.c | 2 +- drivers/firmware/efi/libstub/random.c | 7 +++- drivers/firmware/efi/tpm.c | 2 +- drivers/firmware/efi/vars.c | 68 +++++++++++------------------------ include/linux/efi.h | 2 +- 9 files changed, 98 insertions(+), 54 deletions(-) . Date: Sun, 13 Nov 2022 00:00:30 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.1 (#3) Hello Linus, Here's the PR with the patch that gets rid of the misalignment WARN(). The other patch adds an SMBIOS based quirk for Ampere Altra machines. This is the first time we've added such a quirk on arm64, but fortunately, we can just call a EFI protocol to grab the type #1 SMBIOS record when running in the stub, so we don't need all the machinery we have in the kernel proper to parse SMBIOS data. Please pull. The following changes since commit 23715a26c8d812912a70c6ac1ce67af649b95914: arm64: efi: Recover from synchronous exceptions occurring in firmware (2022-11-03 18:01:15 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.1-3 for you to fetch changes up to 9b9eaee9828fe98b030cf43ac50065a54a2f5d52: arm64: efi: Fix handling of misaligned runtime regions and drop warning (2022-11-10 23:14:15 +0100) ---------------------------------------------------------------- Third batch of EFI fixes for v6.1 - Force the use of SetVirtualAddressMap() on Ampera Altra arm64 machines, which crash in SetTime() if no virtual remapping is used - Drop a spurious warning on misaligned runtime regions when using 16k or 64k pages on arm64 ---------------------------------------------------------------- Ard Biesheuvel (2): arm64: efi: Force the use of SetVirtualAddressMap() on Altra machines arm64: efi: Fix handling of misaligned runtime regions and drop warning arch/arm64/kernel/efi.c | 52 ++++++++++++++++++++----------- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/arm64-stub.c | 17 +++++++++- drivers/firmware/efi/libstub/efistub.h | 28 +++++++++++++++++ drivers/firmware/efi/libstub/smbios.c | 48 ++++++++++++++++++++++++++++ include/linux/efi.h | 1 + 6 files changed, 128 insertions(+), 20 deletions(-) create mode 100644 drivers/firmware/efi/libstub/smbios.c . Date: Thu, 1 Dec 2022 19:07:25 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fix for v6.1 (#4) Hello Linus, Please pull the below, which is a single revert for some code that I added during this cycle. The code is not wrong, but it should be a bit more careful about how to handle the shadow call stack pointer, so it is better to revert it for now and bring it back later in improved form. -- Ard. The following changes since commit 9b9eaee9828fe98b030cf43ac50065a54a2f5d52: arm64: efi: Fix handling of misaligned runtime regions and drop warning (2022-11-10 23:14:15 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.1-4 for you to fetch changes up to 7572ac3c979d4d0fb42d73a72d2608656516ff4f: arm64: efi: Revert "Recover from synchronous exceptions ..." (2022-12-01 14:48:26 +0100) ---------------------------------------------------------------- Final EFI fix for v6.1 - Revert runtime service sync exception recovery on arm64 ---------------------------------------------------------------- Ard Biesheuvel (1): arm64: efi: Revert "Recover from synchronous exceptions ..." arch/arm64/include/asm/efi.h | 8 -------- arch/arm64/kernel/efi-rt-wrapper.S | 33 ++------------------------------- arch/arm64/kernel/efi.c | 26 -------------------------- arch/arm64/mm/fault.c | 4 ---- 4 files changed, 2 insertions(+), 69 deletions(-) . Date: Tue, 13 Dec 2022 17:46:22 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.2 Hello Linus, Another fairly sizable PR for v6.2 this time, by EFI subsystem standards. Most of the work was done by me, some of it in collaboration with the distro and bootloader folks (GRUB, systemd-boot), where the main focus has been on removing pointless per-arch differences in the way EFI boots a Linux kernel. There were a few conflicts reported, with the arm64 and tip trees, but nothing too hairy. Some of the conflicts were with some of my own work landing via a different tree, but in those cases, the changes in question were mostly unrelated, had been on the list for a while and simply happened to land now so I don't think there is much I could have done about that. Please pull. The following changes since commit 76dcd734eca23168cb008912c0f69ff408905235: Linux 6.1-rc8 (2022-12-04 14:48:12 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.2 for you to fetch changes up to e8dfdf3162eb549d064b8c10b1564f7e8ee82591: arm64: efi: Recover from synchronous exceptions occurring in firmware (2022-12-08 18:33:34 +0100) ---------------------------------------------------------------- EFI updates for v6.2: - Refactor the zboot code so that it incorporates all the EFI stub logic, rather than calling the decompressed kernel as a EFI app. - Add support for initrd= command line option to x86 mixed mode. - Allow initrd= to be used with arbitrary EFI accessible file systems instead of just the one the kernel itself was loaded from. - Move some x86-only handling and manipulation of the EFI memory map into arch/x86, as it is not used anywhere else. - More flexible handling of any random seeds provided by the boot environment (i.e., systemd-boot) so that it becomes available much earlier during the boot. - Allow improved arch-agnostic EFI support in loaders, by setting a uniform baseline of supported features, and adding a generic magic number to the DOS/PE header. This should allow loaders such as GRUB or systemd-boot to reduce the amount of arch-specific handling substantially. - (arm64) Run EFI runtime services from a dedicated stack, and use it to recover from synchronous exceptions that might occur in the firmware code. - (arm64) Ensure that we don't allocate memory outside of the 48-bit addressable physical range. - Make EFI pstore record size configurable - Add support for decoding CXL specific CPER records ---------------------------------------------------------------- Ard Biesheuvel (38): efi: libstub: Drop randomization of runtime memory map efi: libstub: Drop handling of EFI properties table efi: libstub: Deduplicate ftrace command line argument filtering arm64: efi: Move dcache cleaning of loaded image out of efi_enter_kernel() arm64: efi: Avoid dcache_clean_poc() altogether in efi_enter_kernel() arm64: efi: Move efi-entry.S into the libstub source directory efi: libstub: Use local strncmp() implementation unconditionally efi: libstub: Clone memcmp() into the stub efi: libstub: Enable efi_printk() in zboot decompressor efi: loongarch: Drop exports of unused string routines efi: libstub: Move screen_info handling to common code efi: libstub: Provide local implementations of strrchr() and memchr() efi: libstub: Factor out EFI stub entrypoint into separate file efi: libstub: Add image code and data size to the zimage metadata efi: libstub: Factor out min alignment and preferred kernel load address efi/riscv: libstub: Split off kernel image relocation for builtin stub efi/arm64: libstub: Split off kernel image relocation for builtin stub efi/loongarch: Don't jump to kernel entry via the old image efi/loongarch: libstub: Split off kernel image relocation for builtin stub efi: libstub: Merge zboot decompressor with the ordinary stub Merge tag 'efi-zboot-direct-for-v6.2' into efi/next efi: libstub: use EFI_LOADER_CODE region when moving the kernel in memory efi: libstub: Implement devicepath support for initrd commandline loader efi: libstub: Permit mixed mode return types other than efi_status_t efi: libstub: Add mixed mode support to command line initrd loader efi: libstub: Undeprecate the command line initrd loader efi: memmap: Move EFI fake memmap support into x86 arch tree efi: memmap: Move manipulation routines into x86 arch tree efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures efi: runtime-maps: Clarify purpose and enable by default for kexec efi: x86: Move EFI runtime map sysfs code to arch/x86 efi: random: combine bootloader provided RNG seed with RNG protocol output efi: libstub: Always enable initrd command line loader and bump version efi: Put Linux specific magic number in the DOS header Merge tag 'v6.1-rc8' into efi/next arm64: efi: Limit allocations to 48-bit addressable physical region arm64: efi: Execute runtime services from a dedicated stack arm64: efi: Recover from synchronous exceptions occurring in firmware Guilherme G. Piccoli (1): efi: pstore: Add module parameter for setting the record size Jason A. Donenfeld (2): efi: vars: prohibit reading random seed variables efi: stub: use random seed from EFI variable Jialin Zhang (1): efi: libstub: fix efi_load_initrd_dev_path() kernel-doc comment Lukas Bulwahn (1): MAINTAINERS: adjust entry after arm64 efi-entry.S file movement Smita Koralahalli (2): efi/cper, cxl: Decode CXL Protocol Error Section efi/cper, cxl: Decode CXL Error Log MAINTAINERS | 1 - arch/arm/include/asm/efi.h | 3 - arch/arm/kernel/efi.c | 31 +-- arch/arm64/include/asm/efi.h | 27 +- arch/arm64/kernel/Makefile | 9 +- arch/arm64/kernel/efi-entry.S | 69 ----- arch/arm64/kernel/efi-rt-wrapper.S | 39 ++- arch/arm64/kernel/efi.c | 49 ++++ arch/arm64/kernel/image-vars.h | 8 - arch/arm64/mm/fault.c | 4 + arch/loongarch/include/asm/efi.h | 14 +- arch/loongarch/kernel/efi.c | 24 +- arch/loongarch/kernel/head.S | 3 +- arch/loongarch/kernel/image-vars.h | 8 - arch/riscv/include/asm/efi.h | 13 +- arch/riscv/kernel/image-vars.h | 6 - arch/x86/Kconfig | 31 +++ arch/x86/boot/compressed/efi_thunk_64.S | 6 - arch/x86/boot/header.S | 3 +- arch/x86/include/asm/efi.h | 109 +++++--- arch/x86/kernel/setup.c | 1 + arch/x86/platform/efi/Makefile | 5 +- arch/x86/platform/efi/efi.c | 8 +- .../firmware => arch/x86/platform}/efi/fake_mem.c | 79 +++++- arch/x86/platform/efi/memmap.c | 239 ++++++++++++++++ .../x86/platform}/efi/runtime-map.c | 7 +- drivers/firmware/efi/Kconfig | 45 --- drivers/firmware/efi/Makefile | 7 +- drivers/firmware/efi/cper.c | 9 + drivers/firmware/efi/cper_cxl.c | 179 ++++++++++++ drivers/firmware/efi/cper_cxl.h | 66 +++++ drivers/firmware/efi/efi-init.c | 21 +- drivers/firmware/efi/efi-pstore.c | 23 +- drivers/firmware/efi/efi.c | 14 +- drivers/firmware/efi/fake_mem.h | 10 - drivers/firmware/efi/fdtparams.c | 4 + drivers/firmware/efi/libstub/Makefile | 34 ++- drivers/firmware/efi/libstub/Makefile.zboot | 22 +- drivers/firmware/efi/libstub/alignedmem.c | 7 +- drivers/firmware/efi/libstub/arm32-stub.c | 37 --- drivers/firmware/efi/libstub/arm64-entry.S | 67 +++++ drivers/firmware/efi/libstub/arm64-stub.c | 75 ++--- drivers/firmware/efi/libstub/arm64.c | 76 +++++ drivers/firmware/efi/libstub/efi-stub-entry.c | 65 +++++ drivers/firmware/efi/libstub/efi-stub-helper.c | 150 +--------- drivers/firmware/efi/libstub/efi-stub.c | 140 +++------- drivers/firmware/efi/libstub/efistub.h | 143 +++++++--- drivers/firmware/efi/libstub/file.c | 122 +++++--- drivers/firmware/efi/libstub/intrinsics.c | 18 ++ drivers/firmware/efi/libstub/loongarch-stub.c | 89 ++---- drivers/firmware/efi/libstub/loongarch.c | 80 ++++++ drivers/firmware/efi/libstub/mem.c | 5 +- drivers/firmware/efi/libstub/printk.c | 154 +++++++++++ drivers/firmware/efi/libstub/random.c | 96 ++++++- drivers/firmware/efi/libstub/randomalloc.c | 7 +- drivers/firmware/efi/libstub/riscv-stub.c | 96 +------ drivers/firmware/efi/libstub/riscv.c | 98 +++++++ drivers/firmware/efi/libstub/screen_info.c | 56 ++++ drivers/firmware/efi/libstub/string.c | 95 ++++++- drivers/firmware/efi/libstub/zboot-header.S | 5 +- drivers/firmware/efi/libstub/zboot.c | 307 +++++---------------- drivers/firmware/efi/memmap.c | 243 +--------------- drivers/firmware/efi/runtime-wrappers.c | 1 + drivers/firmware/efi/x86_fake_mem.c | 75 ----- fs/efivarfs/inode.c | 4 + fs/efivarfs/super.c | 3 + include/linux/cxl_err.h | 22 ++ include/linux/efi.h | 55 +--- include/linux/pe.h | 9 +- 69 files changed, 2138 insertions(+), 1492 deletions(-) delete mode 100644 arch/arm64/kernel/efi-entry.S rename {drivers/firmware => arch/x86/platform}/efi/fake_mem.c (58%) create mode 100644 arch/x86/platform/efi/memmap.c rename {drivers/firmware => arch/x86/platform}/efi/runtime-map.c (96%) create mode 100644 drivers/firmware/efi/cper_cxl.c create mode 100644 drivers/firmware/efi/cper_cxl.h delete mode 100644 drivers/firmware/efi/fake_mem.h create mode 100644 drivers/firmware/efi/libstub/arm64-entry.S create mode 100644 drivers/firmware/efi/libstub/arm64.c create mode 100644 drivers/firmware/efi/libstub/efi-stub-entry.c create mode 100644 drivers/firmware/efi/libstub/loongarch.c create mode 100644 drivers/firmware/efi/libstub/printk.c create mode 100644 drivers/firmware/efi/libstub/riscv.c create mode 100644 drivers/firmware/efi/libstub/screen_info.c delete mode 100644 drivers/firmware/efi/x86_fake_mem.c create mode 100644 include/linux/cxl_err.h . Date: Fri, 13 Jan 2023 17:31:33 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.2 #1 Hi Linus, Please pull the changes below. Explanation in the tag. The following changes since commit 88603b6dc419445847923fcb7fe5080067a30f98: Linux 6.2-rc2 (2023-01-01 13:53:16 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.2-1 for you to fetch changes up to d3f450533bbcb6dd4d7d59cadc9b61b7321e4ac1: efi: tpm: Avoid READ_ONCE() for accessing the event log (2023-01-13 17:15:17 +0100) ---------------------------------------------------------------- First batch of EFI fixes for v6.2: - avoid a potential crash on the efi_subsys_init() error path - use more appropriate error code for runtime services calls issued after a crash in the firmware occurred - avoid READ_ONCE() for accessing firmware tables that may appear misaligned in memory ---------------------------------------------------------------- Ard Biesheuvel (2): efi: rt-wrapper: Add missing include efi: tpm: Avoid READ_ONCE() for accessing the event log Ding Hui (1): efi: fix userspace infinite retry read efivars after EFI runtime services page fault Johan Hovold (1): efi: fix NULL-deref in init error path arch/arm64/kernel/efi-rt-wrapper.S | 1 + drivers/firmware/efi/efi.c | 9 ++++++--- drivers/firmware/efi/runtime-wrappers.c | 1 + include/linux/tpm_eventlog.h | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) . Date: Mon, 23 Jan 2023 17:45:18 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.2 #2 Hello Linus, Another couple of EFI fixes, of which the first two were already in -next when I sent out the previous PR, but they caused some issues on non-EFI boots so I let them simmer for a bit longer. Please pull. The following changes since commit d3f450533bbcb6dd4d7d59cadc9b61b7321e4ac1: efi: tpm: Avoid READ_ONCE() for accessing the event log (2023-01-13 17:15:17 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.2-2 for you to fetch changes up to e1fabbc83cb1dd4ba63932faa86c9cacb8bf791e: efi: Remove Matthew Garrett as efivarfs maintainer (2023-01-18 09:24:48 +0100) ---------------------------------------------------------------- Some more EFI fixes for v6.2: - ensure the EFI ResetSystem and ACPI PRM calls are recognized as users of the EFI runtime, and therefore protected against exceptions - account for the EFI runtime stack in the stacktrace code - remove Matt Garrett's MAINTAINERS entry for efivarfs ---------------------------------------------------------------- Ard Biesheuvel (3): arm64: efi: Avoid workqueue to check whether EFI runtime is live arm64: efi: Account for the EFI runtime stack in stack unwinder efi: Remove Matthew Garrett as efivarfs maintainer MAINTAINERS | 1 - arch/arm64/include/asm/efi.h | 9 +++++++++ arch/arm64/include/asm/stacktrace.h | 15 +++++++++++++++ arch/arm64/kernel/efi-rt-wrapper.S | 6 ++++++ arch/arm64/kernel/efi.c | 3 ++- arch/arm64/kernel/stacktrace.c | 12 ++++++++++++ 6 files changed, 44 insertions(+), 2 deletions(-) . Date: Fri, 3 Feb 2023 18:55:37 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.2 batch #3 Hello Linus, Just a pair of tiny fixes, both cc'ed to stable@. Please pull. The following changes since commit e1fabbc83cb1dd4ba63932faa86c9cacb8bf791e: efi: Remove Matthew Garrett as efivarfs maintainer (2023-01-18 09:24:48 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.2-3 for you to fetch changes up to 966d47e1f27c45507c5df82b2a2157e5a4fd3909: efi: fix potential NULL deref in efi_mem_reserve_persistent (2023-02-03 14:52:10 +0100) ---------------------------------------------------------------- Batch #3 of EFI fixes for v6.2 - handle potential mremap() failure gracefully - don't reject EFI memory attributes table version 2 ---------------------------------------------------------------- Anton Gusev (1): efi: fix potential NULL deref in efi_mem_reserve_persistent Ard Biesheuvel (1): efi: Accept version 2 of memory attributes table drivers/firmware/efi/efi.c | 2 ++ drivers/firmware/efi/memattr.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) . Date: Sun, 12 Feb 2023 13:19:33 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, darren@os.amperecomputing.com, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.2 #4 Hello Linus, A final fix for Ampere Altra systems which is cc'ed to v6.1 stable. This is getting a bit kludgy but we are collaborating with the Ampere firmware engineers now to come up with a proper workaround. Please pull. The following changes since commit 966d47e1f27c45507c5df82b2a2157e5a4fd3909: efi: fix potential NULL deref in efi_mem_reserve_persistent (2023-02-03 14:52:10 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.2-4 for you to fetch changes up to 190233164cd77115f8dea718cbac561f557092c6: arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines (2023-02-09 12:38:35 +0100) ---------------------------------------------------------------- Final EFI fix for v6.2 A fix from Darren to widen the SMBIOS match for detecting Ampere Altra machines with problematic firmware. In the mean time, we are working on a more precise check, but this is still work in progress. ---------------------------------------------------------------- Darren Hart (1): arm64: efi: Force the use of SetVirtualAddressMap() on eMAG and Altra Max machines drivers/firmware/efi/libstub/arm64.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) . Date: Mon, 20 Feb 2023 19:47:29 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.3 Hello Linus, Please pull the EFI updates below. There is one minor conflict [0] in arch/arm64/include/asm/efi.h against a fix that went into -rc8, but not worth the hassle of merging back the EFI fixes branch, so you'll have to fix that up (if you don't mind). Thanks, Ard. The following changes since commit 1b929c02afd37871d5afb9d498426f83432e71c2: Linux 6.2-rc1 (2022-12-25 13:41:39 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.3 for you to fetch changes up to e1d447157f232c650e6f32c9fb89ff3d0207c69a: firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3 (2023-02-19 14:41:33 +0100) [0] https://lore.kernel.org/all/20230220135844.73e9dcae@canb.auug.org.au/ ---------------------------------------------------------------- A healthy mix of EFI contributions this time: - Performance tweaks for efifb earlycon by Andy - Preparatory refactoring and cleanup work in the efivar layer by Johan, which is needed to accommodate the Snapdragon arm64 laptops that expose their EFI variable store via a TEE secure world API. - Enhancements to the EFI memory map handling so that Xen dom0 can safely access EFI configuration tables (Demi Marie) - Wire up the newly introduced IBT/BTI flag in the EFI memory attributes table, so that firmware that is generated with ENDBR/BTI landing pads will be mapped with enforcement enabled. - Clean up how we check and print the EFI revision exposed by the firmware. - Incorporate EFI memory attributes protocol definition contributed by Evgeniy and wire it up in the EFI zboot code. This ensures that these images can execute under new and stricter rules regarding the default memory permissions for EFI page allocations. (More work is in progress here) - CPER header cleanup by Dan Williams - Use a raw spinlock to protect the EFI runtime services stack on arm64 to ensure the correct semantics under -rt. (Pierre) - EFI framebuffer quirk for Lenovo Ideapad by Darrell. ---------------------------------------------------------------- Andy Shevchenko (2): efi/earlycon: Replace open coded strnchrnul() efi/earlycon: Speed up scrolling by disregarding empty space Ard Biesheuvel (7): efi: zboot: Use EFI protocol to remap code/data with the right attributes efi: Drop minimum EFI version check at boot efi: Use standard format for printing the EFI revision efi: Discover BTI support in runtime services regions efi: arm64: Wire up BTI annotation in memory attributes table efi: x86: Wire up IBT annotation in memory attributes table efi: Add mixed-mode thunk recipe for GetMemoryAttributes Dan Williams (1): efi/cper, cxl: Remove cxl_err.h Darrell Kavanagh (1): firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3 Demi Marie Obenour (5): efi: memmap: Disregard bogus entries instead of returning them efi: xen: Implement memory descriptor lookup based on hypercall efi: Apply allowlist to EFI configuration tables when running under Xen efi: Actually enable the ESRT under Xen efi: Warn if trying to reserve memory under Xen Evgeniy Baskov (1): efi/libstub: Add memory attribute protocol definitions Johan Hovold (6): efi: efivars: drop kobject from efivars_register() efi: efivars: make efivar_supports_writes() return bool efi: efivars: add efivars printk prefix efivarfs: always register filesystem efi: verify that variable services are supported efi: efivars: prevent double registration Pierre Gondois (1): arm64: efi: Make efi_rt_lock a raw_spinlock arch/arm/include/asm/efi.h | 2 +- arch/arm/kernel/efi.c | 5 +- arch/arm64/include/asm/efi.h | 9 ++-- arch/arm64/kernel/efi.c | 20 +++++-- arch/arm64/kernel/traps.c | 6 +++ arch/ia64/kernel/efi.c | 2 +- arch/riscv/include/asm/efi.h | 2 +- arch/riscv/kernel/efi.c | 3 +- arch/x86/include/asm/efi.h | 14 ++++- arch/x86/include/asm/ibt.h | 4 +- arch/x86/kernel/apm_32.c | 4 +- arch/x86/kernel/cpu/common.c | 5 +- arch/x86/platform/efi/efi.c | 2 +- arch/x86/platform/efi/efi_64.c | 8 ++- drivers/firmware/efi/cper_cxl.c | 12 ++++- drivers/firmware/efi/earlycon.c | 41 ++++++++++---- drivers/firmware/efi/efi-init.c | 2 +- drivers/firmware/efi/efi.c | 74 ++++++++++++++++++++------ drivers/firmware/efi/esrt.c | 15 ++---- drivers/firmware/efi/libstub/efi-stub-helper.c | 67 +++++++++++++++++++++++ drivers/firmware/efi/libstub/efistub.h | 23 ++++++++ drivers/firmware/efi/libstub/zboot.c | 2 + drivers/firmware/efi/memattr.c | 7 ++- drivers/firmware/efi/sysfb_efi.c | 8 +++ drivers/firmware/efi/vars.c | 38 +++++++------ drivers/firmware/google/gsmi.c | 2 +- drivers/xen/efi.c | 61 +++++++++++++++++++++ fs/efivarfs/super.c | 9 ++-- include/linux/cxl_err.h | 22 -------- include/linux/efi.h | 36 +++++++++---- 30 files changed, 389 insertions(+), 116 deletions(-) delete mode 100644 include/linux/cxl_err.h . Date: Fri, 24 Mar 2023 17:33:19 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.3 #1 Hello Linus, Please pull the EFI changes below - description in the tag. Note that I recently rotated my signing subkey, so you may need to sync up with the pgpkeys git repo, or refresh F43D03328115A198C90016883D200E9CA6329909 from a key server. Thanks, Ard. The following changes since commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6: Linux 6.3-rc1 (2023-03-05 14:52:03 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.3-1 for you to fetch changes up to 0b1d9debe30304f35c1211e6dcdca1935ce67240: efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure (2023-03-23 15:15:45 +0100) ---------------------------------------------------------------- First batch of EFI fixes for v6.3: - Set the NX compat flag for arm64 and zboot, to ensure compatibility with EFI firmware that complies with tightening requirements imposed across the ecosystem. - Improve identification of Ampere Altra systems based on SMBIOS data. - Fix some issues related to the EFI framebuffer that were introduced as a result from some refactoring related to zboot and the merge with sysfb. - Makefile tweak to avoid rebuilding vmlinuz unnecessarily. - Fix efi_random_alloc() return value on out of memory condition. ---------------------------------------------------------------- Ard Biesheuvel (10): efi/libstub: zboot: Mark zboot EFI application as NX compatible efi/libstub: arm64: Remap relocated image with strict permissions arm64: efi: Set NX compat flag in PE/COFF header efi: earlycon: Reprobe after parsing config tables efi/libstub: smbios: Use length member instead of record struct size arm64: efi: Use SMBIOS processor version to key off Ampere quirk efi/libstub: smbios: Drop unused 'recsize' parameter efi/libstub: zboot: Add compressed image to make targets efi/libstub: Use relocated version of kernel's struct screen_info efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure Hans de Goede (2): efi: sysfb_efi: Fix DMI quirks not working for simpledrm efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L arch/arm64/kernel/efi-header.S | 2 +- drivers/firmware/efi/earlycon.c | 16 ++++++++-- drivers/firmware/efi/efi-init.c | 3 ++ drivers/firmware/efi/libstub/Makefile.zboot | 2 +- drivers/firmware/efi/libstub/arm64-stub.c | 5 +++- drivers/firmware/efi/libstub/arm64.c | 39 +++++++++++++++++++----- drivers/firmware/efi/libstub/efi-stub-entry.c | 11 +++++++ drivers/firmware/efi/libstub/efi-stub.c | 5 ---- drivers/firmware/efi/libstub/efistub.h | 43 ++++++++++++++++++++++++--- drivers/firmware/efi/libstub/randomalloc.c | 1 + drivers/firmware/efi/libstub/screen_info.c | 9 +----- drivers/firmware/efi/libstub/smbios.c | 15 ++++++++-- drivers/firmware/efi/libstub/zboot-header.S | 2 +- drivers/firmware/efi/libstub/zboot.c | 5 ++++ drivers/firmware/efi/sysfb_efi.c | 13 +++++++- drivers/firmware/sysfb.c | 4 ++- drivers/firmware/sysfb_simplefb.c | 2 +- include/linux/efi.h | 1 + include/linux/sysfb.h | 9 ++++-- 19 files changed, 147 insertions(+), 40 deletions(-) . Date: Fri, 28 Apr 2023 22:17:41 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.4 Hello Linus, Not a lot going on this time - details in the tag. Please pull. -- Ard. The following changes since commit 197b6b60ae7bc51dd0814953c562833143b292aa: Linux 6.3-rc4 (2023-03-26 14:40:20 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.4 for you to fetch changes up to 026b85796ab4d52af56f8a1c60d2613983ecd845: efi/zboot: arm64: Grab code size from ELF symbol in payload (2023-04-26 23:06:48 +0200) ---------------------------------------------------------------- EFI updates for v6.4: - relocate the LoongArch kernel if the preferred address is already occupied; - implement BTI annotations for arm64 EFI stub and zboot images; - clean up arm64 zboot Kbuild rules for injecting the kernel code size. ---------------------------------------------------------------- Ard Biesheuvel (6): efi/pe: Import new BTI/IBT header flags from the spec arm64: efi: Enable BTI codegen and add PE/COFF annotation efi/zboot: Add BSS padding before compression efi/zboot: Set forward edge CFI compat header flag if supported efi/zboot: arm64: Inject kernel code size symbol into the zboot payload efi/zboot: arm64: Grab code size from ELF symbol in payload Huacai Chen (1): efi/loongarch: Reintroduce efi_relocate_kernel() to relocate kernel arch/arm64/boot/Makefile | 4 ++ arch/arm64/kernel/efi-header.S | 71 ++++++++++++++++----------- arch/arm64/kernel/image-vars.h | 4 ++ drivers/firmware/efi/libstub/Makefile | 3 +- drivers/firmware/efi/libstub/Makefile.zboot | 43 ++++++++++------ drivers/firmware/efi/libstub/arm64.c | 19 ++++--- drivers/firmware/efi/libstub/efistub.h | 3 +- drivers/firmware/efi/libstub/loongarch-stub.c | 24 +++------ drivers/firmware/efi/libstub/zboot-header.S | 51 ++++++++++++------- drivers/firmware/efi/libstub/zboot.c | 13 ++--- drivers/firmware/efi/libstub/zboot.lds | 7 +++ include/linux/pe.h | 4 ++ 12 files changed, 149 insertions(+), 97 deletions(-) . Date: Thu, 1 Jun 2023 22:47:15 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.4 #1 Hello Linus, A few minor fixes for EFI, one of which fixes the reported boot regression when booting x86 kernels using the BIOS based loader built into the hypervisor framework on macOS. Please pull. The following changes since commit ac9a78681b921877518763ba0e89202254349d1b: Linux 6.4-rc1 (2023-05-07 13:34:35 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.4-1 for you to fetch changes up to 36e4fc57fc1619f462e669e939209c45763bc8f5: efi: Bump stub image version for macOS HVF compatibility (2023-05-28 20:45:46 +0200) ---------------------------------------------------------------- First batch of EFI fixes for v6.4: - fix harmless warning in zboot code on 'make clean' - add some missing prototypes - fix boot regressions triggered by PE/COFF header image minor version bump ---------------------------------------------------------------- Akihiro Suda (1): efi: Bump stub image version for macOS HVF compatibility Ard Biesheuvel (1): efi/libstub: zboot: Avoid eager evaluation of objcopy flags Arnd Bergmann (1): efi: fix missing prototype warnings drivers/acpi/apei/apei-internal.h | 6 ------ drivers/acpi/apei/bert.c | 1 + drivers/firmware/efi/libstub/Makefile.zboot | 3 ++- drivers/firmware/efi/libstub/efistub.h | 3 +++ include/linux/cper.h | 6 ++++++ include/linux/efi.h | 2 ++ include/linux/pe.h | 25 +++++++++++++------------ 7 files changed, 27 insertions(+), 19 deletions(-) . Date: Fri, 30 Jun 2023 01:27:30 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.5 Hello Linus, Please pull - notes are in the tag. Thanks, Ard. The following changes since commit ac9a78681b921877518763ba0e89202254349d1b: Linux 6.4-rc1 (2023-05-07 13:34:35 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.5 for you to fetch changes up to 2e28a798c3092ea42b968fa16ac835969d124898: efi/libstub: Disable PCI DMA before grabbing the EFI memory map (2023-06-27 12:27:06 +0200) ---------------------------------------------------------------- EFI updates for v6.5 Although some more stuff is brewing, the EFI changes that are ready for mainline are few, so not a lot to pull this cycle: - improve the PCI DMA paranoia logic in the EFI stub - some constification changes - add statfs support to efivarfs - allow user space to enumerate updatable firmware resources without CAP_SYS_ADMIN ---------------------------------------------------------------- Anisse Astier (1): efivarfs: expose used and total size Ard Biesheuvel (1): efi/libstub: Disable PCI DMA before grabbing the EFI memory map Nicholas Bishop (1): efi/esrt: Allow ESRT access without CAP_SYS_ADMIN Thomas Weißschuh (2): efi: x86: make kobj_type structure constant efi: make kobj_type structure constant arch/x86/platform/efi/quirks.c | 8 ++++++ arch/x86/platform/efi/runtime-map.c | 2 +- drivers/firmware/efi/efi.c | 1 + drivers/firmware/efi/esrt.c | 6 +--- drivers/firmware/efi/libstub/efi-stub-helper.c | 6 ++-- drivers/firmware/efi/vars.c | 12 ++++++++ fs/efivarfs/super.c | 39 +++++++++++++++++++++++++- include/linux/efi.h | 11 ++++++++ 8 files changed, 75 insertions(+), 10 deletions(-) . Date: Mon, 28 Aug 2023 13:12:29 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.6 Hello Linus, Most of the EFI work this cycle will be arriving via the -tip tree, given that it is closely tied to the x86 decompressor. This PR primarily covers some cleanup work on the EFI runtime wrappers, which are shared between all EFI architectures except Itanium, and which provide some level of isolation to prevent faults occurring in the firmware code (which runs at the same privilege level as the kernel) from bringing down the system. Beyond that, there is a fix that did not make it into v6.5, and some doc fixes and dead code cleanup. Please pull. The following changes since commit 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5: Linux 6.5-rc1 (2023-07-09 13:53:13 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.6 for you to fetch changes up to b691118f2c44d16b84fc65b8147b33620eb18cac: Merge remote-tracking branch 'linux-efi/urgent' into efi/next (2023-08-28 12:57:05 +0200) ---------------------------------------------------------------- EFI updates for v6.6 - one bugfix for x86 mixed mode that did not make it into v6.5 - first pass of cleanup for the EFI runtime wrappers - some cosmetic touchups ---------------------------------------------------------------- Ard Biesheuvel (9): efi/arm64: Move EFI runtime call setup/teardown helpers out of line efi/riscv: Move EFI runtime call setup/teardown helpers out of line efi/runtime-wrappers: Use type safe encapsulation of call arguments efi/runtime-wrapper: Move workqueue manipulation out of line efi/runtime-wrappers: Remove duplicated macro for service returning void efi/runtime-wrappers: Don't duplicate setup/teardown code acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers efi/runtime-wrappers: Clean up white space and add __init annotation Merge remote-tracking branch 'linux-efi/urgent' into efi/next Mikel Rychliski (1): x86/efistub: Fix PCI ROM preservation in mixed mode Xiao Wang (1): efi/riscv: libstub: Fix comment about absolute relocation YueHaibing (1): efi: Remove unused extern declaration efi_lookup_mapped_addr() Zhu Wang (1): efi: memmap: Remove kernel-doc warnings arch/arm64/include/asm/efi.h | 18 +- arch/arm64/kernel/efi.c | 16 +- arch/riscv/include/asm/efi.h | 10 +- arch/x86/include/asm/uv/bios.h | 4 +- arch/x86/platform/efi/memmap.c | 2 +- drivers/acpi/Kconfig | 2 +- drivers/acpi/prmt.c | 8 +- drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 2 +- drivers/firmware/efi/riscv-runtime.c | 15 +- drivers/firmware/efi/runtime-wrappers.c | 358 +++++++++++++++++++++----------- include/linux/efi.h | 53 ++--- 12 files changed, 299 insertions(+), 191 deletions(-) . Date: Thu, 14 Sep 2023 20:01:27 +0000 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.6 (#1) From: Ard Biesheuvel Hello Linus, Just a couple of EFI fixes before I disappear on vacation for a couple of weeks. Another fix is pending but the reporter has not bothered to test it yet, so I'll leave that for another -rc. The first patch was intended to be part of the merge window batch but due to a conflict with -tip, I decided to defer it until after -rc1. Please pull. The following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d: Linux 6.6-rc1 (2023-09-10 16:28:41 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.6-1 for you to fetch changes up to 79b83606abc778aa3cbee535b362ce905d0b9448: efivarfs: fix statfs() on efivarfs (2023-09-11 09:10:02 +0000) ---------------------------------------------------------------- First set of EFI fixes for v6.6: - Missing x86 patch for the runtime cleanup that was merged in -rc1 - Kconfig tweak for kexec on x86 so EFI support does not get disabled inadvertently - Use the right EFI memory type for the unaccepted memory table so kexec/kdump exposes it to the crash kernel as well - Work around EFI implementations which do not implement QueryVariableInfo, which is now called by statfs() on efivarfs ---------------------------------------------------------------- Ard Biesheuvel (3): efi/x86: Move EFI runtime call setup/teardown helpers out of line efi/x86: Ensure that EFI_RUNTIME_MAP is enabled for kexec efi/unaccepted: Use ACPI reclaim memory for unaccepted memory table Heinrich Schuchardt (1): efivarfs: fix statfs() on efivarfs arch/x86/Kconfig | 2 +- arch/x86/include/asm/efi.h | 32 ++---------------------- arch/x86/platform/efi/efi_32.c | 12 +++++++++ arch/x86/platform/efi/efi_64.c | 19 ++++++++++++-- drivers/firmware/efi/libstub/unaccepted_memory.c | 2 +- fs/efivarfs/super.c | 14 ++++++++--- 6 files changed, 43 insertions(+), 38 deletions(-) . Date: Fri, 22 Sep 2023 09:40:27 +0000 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.6 (#2) Hello Linus, Please pull this follow-up fix for the unaccepted memory fix merged last week as part of the first EFI fixes batch. The unaccepted memory table needs to be accessible very early, even in cases (such as crashkernels) where the direct map does not cover all of DRAM, and so it is added to memblock explicitly, and subsequently memblock_reserve()'d as before. The following changes since commit 79b83606abc778aa3cbee535b362ce905d0b9448: efivarfs: fix statfs() on efivarfs (2023-09-11 09:10:02 +0000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.6-2 for you to fetch changes up to 8dbe33956d96c9d066ef15ca933ede30748198b2: efi/unaccepted: Make sure unaccepted table is mapped (2023-09-19 16:11:36 +0000) ---------------------------------------------------------------- EFI fixes for v6.6 take 2: - fix boot regression on SEV-SNP (and TDX) caused by a fix in the preceding batch ---------------------------------------------------------------- Kirill A. Shutemov (1): efi/unaccepted: Make sure unaccepted table is mapped drivers/firmware/efi/efi.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) . Date: Sun, 22 Oct 2023 18:18:46 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: mingo@kernel.org, linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.6 #3 Hello Linus, Please pull the fixes below. The boot_params pointer fix uses a somewhat ugly extern struct declaration but this will be cleaned up the next cycle. The following changes since commit 8dbe33956d96c9d066ef15ca933ede30748198b2: efi/unaccepted: Make sure unaccepted table is mapped (2023-09-19 16:11:36 +0000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.6-3 for you to fetch changes up to c03d21f05e76b25f907684bdf874308dcefab385: Merge 3rd batch of EFI fixes into efi/urgent (2023-10-20 18:11:06 +0200) ---------------------------------------------------------------- Final set of EFI tweaks for v6.6: - don't try to print warnings to the console when it is no longer available - fix theoretical memory leak in SSDT override handling - make sure that the boot_params global variable is set before the KASLR code attempts to hash it for 'randomness' - avoid soft lockups in the memory acceptance code ---------------------------------------------------------------- Ard Biesheuvel (2): x86/boot: efistub: Assign global boot_params variable Merge 3rd batch of EFI fixes into efi/urgent Kirill A. Shutemov (1): efi/unaccepted: Fix soft lockups caused by parallel memory acceptance Kuan-Wei Chiu (1): efi: fix memory leak in krealloc failure handling Nikolay Borisov (1): x86/efistub: Don't try to print after ExitBootService() drivers/firmware/efi/efi.c | 8 +++- drivers/firmware/efi/libstub/x86-stub.c | 7 ++-- drivers/firmware/efi/libstub/x86-stub.h | 2 + drivers/firmware/efi/unaccepted_memory.c | 64 ++++++++++++++++++++++++++++++-- 4 files changed, 71 insertions(+), 10 deletions(-) . Date: Fri, 3 Nov 2023 23:58:28 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI update for v6.7 Hello Linus, Please pull the EFI update below. This is the only remaining EFI change, as everything else was taken via -tip this cycle. The following changes since commit 0bb80ecc33a8fb5a682236443c1e740d5c917d1d: Linux 6.6-rc1 (2023-09-10 16:28:41 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.7 for you to fetch changes up to 5329aa5101f73c451bcd48deaf3f296685849d9c: efivarfs: Add uid/gid mount options (2023-10-20 00:47:18 +0200) ---------------------------------------------------------------- EFI update for v6.7 - implement uid/gid mount options for efivarfs ---------------------------------------------------------------- Jiao Zhou (1): efivarfs: Add uid/gid mount options fs/efivarfs/inode.c | 4 +++ fs/efivarfs/internal.h | 9 +++++++ fs/efivarfs/super.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+) . Date: Thu, 30 Nov 2023 10:57:19 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fix for v6.7 (#1) From: Ard Biesheuvel Hi Linus, Please pull the EFI fix below. The following changes since commit 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab: Linux 6.7-rc3 (2023-11-26 19:59:33 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent-for-v6.7-1 for you to fetch changes up to 01b1e3ca0e5ce47bbae8217d47376ad01b331b07: efi/unaccepted: Fix off-by-one when checking for overlapping ranges (2023-11-28 12:49:21 +0100) ---------------------------------------------------------------- EFI fix for v6.7 #1 - Fix for EFI unaccepted memory handling ---------------------------------------------------------------- Michael Roth (1): efi/unaccepted: Fix off-by-one when checking for overlapping ranges drivers/firmware/efi/unaccepted_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) . Date: Wed, 13 Dec 2023 15:51:22 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.7 #2 From: Ard Biesheuvel Hi Linus, Please pull the EFI fixes below. The following changes since commit 01b1e3ca0e5ce47bbae8217d47376ad01b331b07: efi/unaccepted: Fix off-by-one when checking for overlapping ranges (2023-11-28 12:49:21 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent-for-v6.7-2 for you to fetch changes up to 50d7cdf7a9b1ab6f4f74a69c84e974d5dc0c1bf1: efi/x86: Avoid physical KASLR on older Dell systems (2023-12-11 17:57:42 +0100) ---------------------------------------------------------------- EFI fixes for v6.7 #2 - Deal with a regression in the recently refactored x86 EFI stub code on older Dell systems by disabling randomization of the physical load address - Use the correct load address for relocatable Loongarch kernels ---------------------------------------------------------------- Ard Biesheuvel (1): efi/x86: Avoid physical KASLR on older Dell systems Wang Yao (1): efi/loongarch: Use load address to calculate kernel entry address arch/loongarch/include/asm/efi.h | 2 +- drivers/firmware/efi/libstub/loongarch-stub.c | 4 ++-- drivers/firmware/efi/libstub/loongarch.c | 6 +++--- drivers/firmware/efi/libstub/x86-stub.c | 31 +++++++++++++++++++++------ 4 files changed, 30 insertions(+), 13 deletions(-) . Date: Wed, 3 Jan 2024 15:11:21 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fix for v6.7 #3 From: Ard Biesheuvel Hello Linus, Please pull this final EFI fix for v6.7, which addresses another minor issue caused by the EFI stub overhaul in v6.6. The following changes since commit 50d7cdf7a9b1ab6f4f74a69c84e974d5dc0c1bf1: efi/x86: Avoid physical KASLR on older Dell systems (2023-12-11 17:57:42 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent-for-v6.7-3 for you to fetch changes up to 01638431c465741e071ab34acf3bef3c2570f878: efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags (2024-01-02 16:51:28 +0100) ---------------------------------------------------------------- EFI fix for v6.7 #3 - Ensure that the KASLR load flag is set in boot_params when loading the kernel randomized directly from the EFI stub ---------------------------------------------------------------- Yuntao Wang (1): efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags drivers/firmware/efi/libstub/x86-stub.c | 2 ++ 1 file changed, 2 insertions(+) . Date: Sun, 7 Jan 2024 12:43:45 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.8 From: Ard Biesheuvel Hi Linus, Please consider the EFI pull request below. There is some new stuff as well as some low-urgency fixes, which may be backported later. The following changes since commit 50d7cdf7a9b1ab6f4f74a69c84e974d5dc0c1bf1: efi/x86: Avoid physical KASLR on older Dell systems (2023-12-11 17:57:42 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.8 for you to fetch changes up to 4afa688d7141ae7a166d32224abbfd536acccfca: efi: memmap: fix kernel-doc warnings (2023-12-22 10:42:06 +0100) ---------------------------------------------------------------- EFI updates for v6.8 - Fix a syzbot reported issue in efivarfs where concurrent accesses to the file system resulted in list corruption - Add support for accessing EFI variables via the TEE subsystem (and a trusted application in the secure world) instead of via EFI runtime firmware running in the OS's execution context - Avoid linker tricks to discover the image base on LoongArch ---------------------------------------------------------------- Ard Biesheuvel (4): efivarfs: Move efivar availability check into FS context init efivarfs: Free s_fs_info on unmount efivarfs: Move efivarfs list into superblock s_fs_info Merge branch 'efi/urgent' into efi/next Ilias Apalodimas (1): efivarfs: force RO when remounting if SetVariable is not supported Masahisa Kojima (4): efi: expose efivar generic ops register function efi: Add EFI_ACCESS_DENIED status code efi: Add tee-based EFI variable driver efivarfs: automatically update super block flag Randy Dunlap (1): efi: memmap: fix kernel-doc warnings Wang Yao (1): efi/loongarch: Directly position the loaded image file arch/loongarch/include/asm/efi.h | 2 - arch/loongarch/kernel/head.S | 1 - arch/loongarch/kernel/image-vars.h | 1 - arch/loongarch/kernel/vmlinux.lds.S | 1 - drivers/firmware/efi/Kconfig | 15 + drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/efi.c | 18 + drivers/firmware/efi/libstub/loongarch-stub.c | 9 +- drivers/firmware/efi/libstub/loongarch-stub.h | 4 + drivers/firmware/efi/libstub/loongarch.c | 6 +- drivers/firmware/efi/memmap.c | 8 +- drivers/firmware/efi/stmm/mm_communication.h | 236 ++++++++++ drivers/firmware/efi/stmm/tee_stmm_efi.c | 616 ++++++++++++++++++++++++++ drivers/firmware/efi/vars.c | 8 + fs/efivarfs/inode.c | 3 +- fs/efivarfs/internal.h | 8 +- fs/efivarfs/super.c | 66 ++- fs/efivarfs/vars.c | 5 +- include/linux/efi.h | 12 + 19 files changed, 987 insertions(+), 33 deletions(-) create mode 100644 drivers/firmware/efi/libstub/loongarch-stub.h create mode 100644 drivers/firmware/efi/stmm/mm_communication.h create mode 100644 drivers/firmware/efi/stmm/tee_stmm_efi.c . Date: Fri, 9 Feb 2024 13:18:55 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.8 #1 From: Ard Biesheuvel Hello Linus, Please consider the changes below for v6.8. Only notable change here is the patch that changes the way we deal with spurious errors from the EFI memory attribute protocol. This will be backported to v6.6, and is intended to ensure that we will not paint ourselves into a corner when we tighten this further in order to comply with MS requirements on signed EFI code. Note that this protocol does not currently exist in x86 production systems in the field, only in Microsoft's fork of OVMF, but it will be mandatory for Windows logo certification for x86 PCs in the future. The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d: Linux 6.8-rc1 (2024-01-21 14:11:32 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.8-1 for you to fetch changes up to 1ad55cecf22f05f1c884adf63cc09d3c3e609ebf: x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section (2024-02-05 10:24:51 +0000) ---------------------------------------------------------------- EFI fixes for v6.8 #1 - Tighten ELF relocation checks on the RISC-V EFI stub - Give up if the new EFI memory attributes protocol fails spuriously on x86 - Take care not to place the kernel in the lowest 16 MB of DRAM on x86 - Omit special purpose EFI memory from memblock - Some fixes for the CXL CPER reporting code - Make the PE/COFF layout of mixed-mode capable images comply with a strict interpretation of the spec ---------------------------------------------------------------- Andrew Bresticker (2): efi: runtime: Fix potential overflow of soft-reserved region size efi: Don't add memblocks for soft-reserved memory Ard Biesheuvel (4): riscv/efistub: Tighten ELF relocation check x86/efistub: Give up if memory attribute protocol returns an error x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section Ira Weiny (2): cxl/cper: Fix errant CPER prints for CXL events cxl/trace: Remove unnecessary memcpy's Jan Kiszka (1): riscv/efistub: Ensure GP-relative addressing is not used Yang Li (1): efi/libstub: Add one kernel-doc comment arch/x86/boot/header.S | 14 ++++++-------- arch/x86/boot/setup.ld | 6 +++--- drivers/acpi/apei/ghes.c | 26 -------------------------- drivers/cxl/core/trace.h | 6 +++--- drivers/firmware/efi/arm-runtime.c | 2 +- drivers/firmware/efi/cper.c | 19 +++++++++++++++++++ drivers/firmware/efi/efi-init.c | 19 ++++++++++--------- drivers/firmware/efi/libstub/Makefile | 4 ++-- drivers/firmware/efi/libstub/alignedmem.c | 1 + drivers/firmware/efi/libstub/efistub.h | 3 ++- drivers/firmware/efi/libstub/kaslr.c | 2 +- drivers/firmware/efi/libstub/randomalloc.c | 12 +++++++----- drivers/firmware/efi/libstub/x86-stub.c | 25 +++++++++++++++---------- drivers/firmware/efi/libstub/x86-stub.h | 4 ++-- drivers/firmware/efi/libstub/zboot.c | 2 +- drivers/firmware/efi/riscv-runtime.c | 2 +- include/linux/cper.h | 23 +++++++++++++++++++++++ 17 files changed, 97 insertions(+), 73 deletions(-) . Date: Fri, 1 Mar 2024 10:51:27 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.8 #2 From: Ard Biesheuvel Hello Linus, Please pull the EFI fixes below. Only the EFI variable name size change is significant, and will be backported once it lands. The others are cleanup. The following changes since commit 1ad55cecf22f05f1c884adf63cc09d3c3e609ebf: x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section (2024-02-05 10:24:51 +0000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.8-2 for you to fetch changes up to 2ce507f57ba9c78c080d4a050ebdc97263239de8: efivarfs: Drop 'duplicates' bool parameter on efivar_init() (2024-02-25 09:43:39 +0100) ---------------------------------------------------------------- EFI fixes for v6.8 #2 - Fix phys_addr_t size confusion in 32-bit capsule loader - Reduce maximum EFI variable name size to 512 to work around buggy firmware - Drop some redundant code from efivarfs while at it ---------------------------------------------------------------- Ard Biesheuvel (2): efivarfs: Drop redundant cleanup on fill_super() failure efivarfs: Drop 'duplicates' bool parameter on efivar_init() Arnd Bergmann (1): efi/capsule-loader: fix incorrect allocation size Tim Schumacher (1): efivarfs: Request at most 512 bytes for variable names drivers/firmware/efi/capsule-loader.c | 2 +- fs/efivarfs/internal.h | 2 +- fs/efivarfs/super.c | 7 +------ fs/efivarfs/vars.c | 23 +++++++++++++---------- 4 files changed, 16 insertions(+), 18 deletions(-) . Date: Tue, 12 Mar 2024 18:51:32 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.9 From: Ard Biesheuvel Hello Linus, Please pull the EFI changes below. The following changes since commit 841c35169323cd833294798e58b9bf63fa4fa1de= : Linux 6.8-rc4 (2024-02-11 12:18:13 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-f= or-v6.9 for you to fetch changes up to 021bc4b9d7ed8dcc90dc288e59f120fa6e3087dc: virt: efi_secret: Convert to platform remove callback returning void (202= 4-03-09 11:37:18 +0100) ---------------------------------------------------------------- EFI updates for v6.9: - Measure initrd and command line using the CC protocol if the ordinary TCG2 protocol is not implemented, typically on TDX confidential VMs - Avoid creating mappings that are both writable and executable while running in the EFI boot services. This is a prerequisite for getting the x86 shim loader signed by MicroSoft again, which allows the distros to install on x86 PCs that ship with EFI secure boot enabled. - API update for struct platform_driver::remove() ---------------------------------------------------------------- Ard Biesheuvel (4): efi/libstub: Use TPM event typedefs from the TCG PC Client spec efi/tpm: Use symbolic GUID name from spec for final events table efi/libstub: Measure into CC protocol if TCG2 protocol is absent x86/efistub: Remap kernel text read-only before dropping NX attribute Kuppuswamy Sathyanarayanan (2): efi/libstub: Add Confidential Computing (CC) measurement typedefs efi/libstub: Add get_event_log() support for CC platforms Uwe Kleine-K=C3=B6nig (1): virt: efi_secret: Convert to platform remove callback returning void arch/x86/boot/compressed/Makefile | 2 +- arch/x86/boot/compressed/misc.c | 1 + arch/x86/include/asm/boot.h | 1 + drivers/firmware/efi/efi.c | 3 +- drivers/firmware/efi/libstub/efi-stub-helper.c | 98 ++++++++++++++++++----= ---- drivers/firmware/efi/libstub/efi-stub.c | 2 +- drivers/firmware/efi/libstub/efistub.h | 95 ++++++++++++++++++++++= +-- drivers/firmware/efi/libstub/tpm.c | 82 +++++++++++++-------- drivers/firmware/efi/libstub/x86-stub.c | 13 +++- drivers/virt/coco/efi_secret/efi_secret.c | 5 +- include/linux/efi.h | 4 +- 11 files changed, 234 insertions(+), 72 deletions(-) . Date: Sun, 17 Mar 2024 14:58:05 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.9 #1 From: Ard Biesheuvel Hello Linus, Please pull the EFI fix below. It fixes an oversight on my part in the recent EFI stub rework for x86, which is needed to get Linux/x86 distro builds signed again for secure boot by MicroSoft. For this reason, most of this work is being backported to v6.1, which is therefore also affected by this regression. Thanks, Ard. The following changes since commit 021bc4b9d7ed8dcc90dc288e59f120fa6e3087dc: virt: efi_secret: Convert to platform remove callback returning void (2024-03-09 11:37:18 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.9-1 for you to fetch changes up to b3810c5a2cc4a6665f7a65bed5393c75ce3f3aa2: x86/efistub: Clear decompressor BSS in native EFI entrypoint (2024-03-15 19:47:09 +0100) ---------------------------------------------------------------- EFI fixes for v6.9 #1 - Explicitly wipe BSS in the native EFI entrypoint, so that globals shared with the legacy decompressor are zero-initialized correctly. ---------------------------------------------------------------- Ard Biesheuvel (1): x86/efistub: Clear decompressor BSS in native EFI entrypoint drivers/firmware/efi/libstub/x86-stub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) . Date: Sun, 24 Mar 2024 21:52:35 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.9 #2 From: Ard Biesheuvel Hi Linus, A steady trickle of EFI fixes this cycle - this is due to the backports hit= ting kernels that are more widely used. There are a few more issues under investigation, but these fixes are straight-forward and important, so no ne= ed to delay them. Please pull. The following changes since commit b3810c5a2cc4a6665f7a65bed5393c75ce3f3aa2= : x86/efistub: Clear decompressor BSS in native EFI entrypoint (2024-03-15 = 19:47:09 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-= for-v6.9-2 for you to fetch changes up to 62b71cd73d41ddac6b1760402bbe8c4932e23531: efi: fix panic in kdump kernel (2024-03-24 09:28:33 +0100) ---------------------------------------------------------------- EFI fixes for v6.9 #2 - Fix logic that is supposed to prevent placement of the kernel image below LOAD_PHYSICAL_ADDR - Use the firmware stack in the EFI stub when running in mixed mode - Clear BSS only once when using mixed mode - Check efi.get_variable() function pointer for NULL before trying to call it ---------------------------------------------------------------- Ard Biesheuvel (2): x86/efistub: Call mixed mode boot services on the firmware's stack x86/efistub: Don't clear BSS twice in mixed mode KONDO KAZUMA(=E8=BF=91=E8=97=A4=E3=80=80=E5=92=8C=E7=9C=9F) (1): efi/libstub: fix efi_random_alloc() to allocate memory at alloc_min o= r higher address Oleksandr Tymoshenko (1): efi: fix panic in kdump kernel arch/x86/boot/compressed/efi_mixed.S | 9 +++++++++ drivers/firmware/efi/efi.c | 2 ++ drivers/firmware/efi/libstub/randomalloc.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) . Date: Fri, 29 Mar 2024 17:17:13 +0100 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.9 #3 From: Ard Biesheuvel Hello Linus, Please pull the EFI fixes below. These address all the outstanding EFI/x86 boot related regressions. The following changes since commit 4cece764965020c22cff7665b18a012006359095: Linux 6.9-rc1 (2024-03-24 14:10:05 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.9-3 for you to fetch changes up to decd347c2a75d32984beb8807d470b763a53b542: x86/efistub: Reinstate soft limit for initrd loading (2024-03-28 16:19:46 +0100) ---------------------------------------------------------------- EFI fixes for v6.9 #3 - Revert to the old initrd memory allocation soft limit of INT_MAX, which was dropped inadvertently - Ensure that startup_32() is entered with a valid boot_params pointer when using the new EFI mixed mode protocol - Fix a compiler warning introduced by a fix from the previous PR ---------------------------------------------------------------- Ard Biesheuvel (3): x86/efistub: Add missing boot_params for mixed mode compat entry efi/libstub: Cast away type warning in use of max() x86/efistub: Reinstate soft limit for initrd loading arch/x86/boot/compressed/efi_mixed.S | 20 +++++++++++++++----- drivers/firmware/efi/libstub/randomalloc.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 1 + 3 files changed, 17 insertions(+), 6 deletions(-) . Date: Fri, 3 May 2024 13:03:03 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fix for v6.9 (#1) From: Ard Biesheuvel Hello Linus, Please pull the EFI fix below - it works around a shortcoming in the memory acceptation API, which may apparently hog the CPU for long enough to trigger the softlockup watchdog. Note that this only affects confidential VMs running under the Intel TDX hypervisor, which is why I accepted this for now, but this should obviously be fixed properly in the future. The following changes since commit 0bbac3facb5d6cc0171c45c9873a2dc96bea9680: Linux 6.9-rc4 (2024-04-14 13:38:39 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent-for-v6.9-1 for you to fetch changes up to 1c5a1627f48105cbab81d25ec2f72232bfaa8185: efi/unaccepted: touch soft lockup during memory accept (2024-04-24 19:11:34 +0200) ---------------------------------------------------------------- EFI fix for v6.9 (#1) - Avoid triggering the softlockup watchdog when accepting large chunks of memory from the hypervisor ---------------------------------------------------------------- Chen Yu (1): efi/unaccepted: touch soft lockup during memory accept drivers/firmware/efi/unaccepted_memory.c | 4 ++++ 1 file changed, 4 insertions(+) . Date: Tue, 14 May 2024 09:20:40 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.10 From: Ard Biesheuvel Hello Linus, Only a handful of changes this cycle, consisting of cleanup work and a low-prio bugfix. Please pull. The following changes since commit 4cece764965020c22cff7665b18a012006359095: Linux 6.9-rc1 (2024-03-24 14:10:05 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.10 for you to fetch changes up to 4b2543f7e1e6b91cfc8dd1696e3cdf01c3ac8974: efi: libstub: only free priv.runtime_map when allocated (2024-04-29 17:47:32 +0200) ---------------------------------------------------------------- EFI updates for v6.10: - Additional cleanup by Tim for the efivarfs variable name length confusion - Avoid freeing a bogus pointer when virtual remapping is omitted in the EFI boot stub ---------------------------------------------------------------- Hagar Hemdan (1): efi: libstub: only free priv.runtime_map when allocated Tim Schumacher (4): efi: pstore: Request at most 512 bytes for variable names Documentation: Mark the 'efivars' sysfs interface as removed efivarfs: Remove unused internal struct members efi: Clear up misconceptions about a maximum variable name size Documentation/ABI/removed/sysfs-firmware-efi-vars | 12 ++++ Documentation/ABI/stable/sysfs-firmware-efi-vars | 79 ----------------------- Documentation/filesystems/efivarfs.rst | 2 +- drivers/firmware/efi/efi-pstore.c | 10 ++- drivers/firmware/efi/libstub/fdt.c | 4 +- drivers/firmware/efi/vars.c | 2 +- fs/efivarfs/internal.h | 5 +- fs/efivarfs/vars.c | 5 +- include/linux/efi.h | 9 ++- 9 files changed, 33 insertions(+), 95 deletions(-) create mode 100644 Documentation/ABI/removed/sysfs-firmware-efi-vars delete mode 100644 Documentation/ABI/stable/sysfs-firmware-efi-vars . Date: Tue, 21 May 2024 19:13:04 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.10 #1 From: Ard Biesheuvel Hi Linus, Please pull the fix below. This is going be backported to v6.1 and later to address the regression described in the commit. Whether or not physical KASLR for the cases in question will be brought back later (presumably by sharing the physical placement logic with the traditional decompressor) is as yet undecided. The following changes since commit 4b2543f7e1e6b91cfc8dd1696e3cdf01c3ac8974: efi: libstub: only free priv.runtime_map when allocated (2024-04-29 17:47:32 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.10-1 for you to fetch changes up to 15aa8fb852f995dd234a57f12dfb989044968bb6: x86/efistub: Omit physical KASLR when memory reservations exist (2024-05-17 17:06:18 +0200) ---------------------------------------------------------------- EFI fixes for v6.10 #1 - Followup fix for the EFI boot sequence refactor, which may result in physical KASLR putting the kernel in a region which is being used for a special purpose via a command line argument. ---------------------------------------------------------------- Ard Biesheuvel (1): x86/efistub: Omit physical KASLR when memory reservations exist drivers/firmware/efi/libstub/x86-stub.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) . Date: Thu, 6 Jun 2024 14:45:51 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.10 #2 From: Ard Biesheuvel Hello Linus, Another small batch of EFI fixes for v6.10 - please pull. The following changes since commit c3f38fa61af77b49866b006939479069cd451173: Linux 6.10-rc2 (2024-06-02 15:44:56 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.10-2 for you to fetch changes up to 99280413a5b785f22d91e8a8a66dc38f4a214495: efi: Add missing __nocfi annotations to runtime wrappers (2024-06-05 10:18:58 +0200) ---------------------------------------------------------------- EFI fixes for v6.10 #2 - Ensure that .discard sections are really discarded in the EFI zboot image build - Return proper error numbers from efi-pstore - Add __nocfi annotations to EFI runtime wrappers ---------------------------------------------------------------- Ard Biesheuvel (2): Merge branch 'efi/next' into efi/urgent efi: Add missing __nocfi annotations to runtime wrappers Guilherme G. Piccoli (1): efi: pstore: Return proper errors on UEFI failures Nathan Chancellor (1): efi/libstub: zboot.lds: Discard .discard sections drivers/firmware/efi/efi-pstore.c | 8 ++++---- drivers/firmware/efi/libstub/zboot.lds | 1 + drivers/firmware/efi/runtime-wrappers.c | 13 ++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) . Date: Tue, 18 Jun 2024 16:45:48 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.10 #3 From: Ard Biesheuvel Hi Linus, Please pull another small set of EFI fixes below. Only the x86 one is likely to affect any actual users (and has a cc:stable), but the issue it fixes was only observed in an unusual context (kexec in a confidential VM). The following changes since commit 99280413a5b785f22d91e8a8a66dc38f4a214495: efi: Add missing __nocfi annotations to runtime wrappers (2024-06-05 10:18:58 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.10-3 for you to fetch changes up to 46e27b9961d8712bc89234444ede314cec0e8bae: efi/arm64: Fix kmemleak false positive in arm64_efi_rt_init() (2024-06-15 10:25:02 +0200) ---------------------------------------------------------------- EFI fixes for v6.10 #3 - Ensure that EFI runtime services are not unmapped by PAN on ARM - Avoid freeing the memory holding the EFI memory map inadvertently on x86 - Avoid a false positive kmemleak warning on arm64 ---------------------------------------------------------------- Ard Biesheuvel (2): efi/arm: Disable LPAE PAN when calling EFI runtime services efi/x86: Free EFI memory map only when installing a new one. Waiman Long (1): efi/arm64: Fix kmemleak false positive in arm64_efi_rt_init() arch/arm/include/asm/efi.h | 13 +++++++++++++ arch/arm64/kernel/efi.c | 2 ++ arch/x86/include/asm/efi.h | 1 - arch/x86/platform/efi/memmap.c | 12 +++++++++++- drivers/firmware/efi/memmap.c | 9 --------- 5 files changed, 26 insertions(+), 11 deletions(-) . Date: Tue, 16 Jul 2024 16:44:02 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI updates for v6.11 From: Ard Biesheuvel Hello Linus, Please pull the EFI updates described below. Details are in the tag. Note the removal of the EFI fake memory map support - this is believed to be unused and no longer worth supporting. However, we could easily bring it back if needed. (With recent developments regarding confidential VMs and unaccepted memory, combined with kexec, creating a known inaccurate view of the firmware's memory map and handing it to the OS is a feature we can live without, hence the removal. Alternatively, I could imagine making this feature mutually exclusive with those confidential VM related features, but let's try simply removing it first) The following changes since commit f2661062f16b2de5d7b6a5c42a9a5c96326b8454: Linux 6.10-rc5 (2024-06-23 17:08:54 -0400) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-next-for-v6.11 for you to fetch changes up to 4a2ebb082297f41803742729642961532e54079e: efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array (2024-07-12 10:06:01 +0200) ---------------------------------------------------------------- EFI updates for v6.11 - Drop support for the 'fake' EFI memory map on x86 - Add an SMBIOS based tweak to the EFI stub instructing the firmware on x86 Macbook Pros to keep both GPUs enabled - Replace 0-sized array with flexible array in EFI memory attributes table handling - Drop redundant BSS clearing when booting via the native PE entrypoint on x86 - Avoid returning EFI_SUCCESS when aborting on an out-of-memory condition - Cosmetic tweak for arm64 KASLR loading logic ---------------------------------------------------------------- Aditya Garg (1): x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs Ard Biesheuvel (6): x86/efi: Drop support for fake EFI memory maps efistub/smbios: Simplify SMBIOS enumeration API x86/efistub: Enable SMBIOS protocol handling for x86 x86/efistub: Avoid returning EFI_SUCCESS on error x86/efistub: Drop redundant clearing of BSS arm64/efistub: Clean up KASLR logic Kees Cook (2): efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr() efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array Documentation/admin-guide/kernel-parameters.txt | 21 --- arch/x86/Kconfig | 20 --- arch/x86/boot/compressed/kaslr.c | 43 ++--- arch/x86/include/asm/efi.h | 22 +-- arch/x86/kernel/setup.c | 1 - arch/x86/platform/efi/Makefile | 1 - arch/x86/platform/efi/efi.c | 2 - arch/x86/platform/efi/fake_mem.c | 197 ----------------------- arch/x86/platform/efi/memmap.c | 1 + drivers/firmware/efi/libstub/Makefile | 2 +- drivers/firmware/efi/libstub/arm64-stub.c | 13 +- drivers/firmware/efi/libstub/arm64.c | 3 +- drivers/firmware/efi/libstub/efistub.h | 9 +- drivers/firmware/efi/libstub/kaslr.c | 20 +-- drivers/firmware/efi/libstub/relocate.c | 2 +- drivers/firmware/efi/libstub/smbios.c | 43 +++-- drivers/firmware/efi/libstub/unaccepted_memory.c | 2 +- drivers/firmware/efi/libstub/x86-stub.c | 83 ++++++++-- drivers/firmware/efi/memattr.c | 2 +- include/linux/efi.h | 15 +- 20 files changed, 146 insertions(+), 356 deletions(-) delete mode 100644 arch/x86/platform/efi/fake_mem.c . Date: Wed, 24 Jul 2024 22:07:35 +0200 From: Ard Biesheuvel To: torvalds@linux-foundation.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel Subject: [GIT PULL] EFI fixes for v6.11 #1 From: Ard Biesheuvel Hello Linus, Please pull the fixes below. The following changes since commit 4a2ebb082297f41803742729642961532e54079e: efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array (2024-07-12 10:06:01 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-fixes-for-v6.11-1 for you to fetch changes up to ae835a96d72cd025421910edb0e8faf706998727: x86/efistub: Revert to heap allocated boot_params for PE entrypoint (2024-07-18 23:05:02 +0200) ---------------------------------------------------------------- EFI fixes for v6.11 #1 - Wipe screen_info after allocating it from the heap - used by arm32 and EFI zboot, other EFI architectures allocate it statically - Revert to allocating boot_params from the heap on x86 when entering via the native PE entrypoint, to work around a regression on older Dell hardware ---------------------------------------------------------------- Ard Biesheuvel (1): x86/efistub: Revert to heap allocated boot_params for PE entrypoint Qiang Ma (1): efi/libstub: Zero initialize heap allocated struct screen_info drivers/firmware/efi/libstub/screen_info.c | 2 ++ drivers/firmware/efi/libstub/x86-stub.c | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) .