linux/drivers/firmware/efi
Ard Biesheuvel 50d7cdf7a9 efi/x86: Avoid physical KASLR on older Dell systems
River reports boot hangs with v6.6 and v6.7, and the bisect points to
commit

  a1b87d54f4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")

which moves the memory allocation and kernel decompression from the
legacy decompressor (which executes *after* ExitBootServices()) to the
EFI stub, using boot services for allocating the memory. The memory
allocation succeeds but the subsequent call to decompress_kernel() never
returns, resulting in a failed boot and a hanging system.

As it turns out, this issue only occurs when physical address
randomization (KASLR) is enabled, and given that this is a feature we
can live without (virtual KASLR is much more important), let's disable
the physical part of KASLR when booting on AMI UEFI firmware claiming to
implement revision v2.0 of the specification (which was released in
2006), as this is the version these systems advertise.

Fixes: a1b87d54f4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218173
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2023-12-11 17:57:42 +01:00
..
libstub efi/x86: Avoid physical KASLR on older Dell systems 2023-12-11 17:57:42 +01:00
test efi/efi_test: read RuntimeServicesSupported 2020-12-09 08:37:27 +01:00
apple-properties.c efi: fix return value of __setup handlers 2022-03-01 09:02:21 +01:00
arm-runtime.c ARM updates for 6.2 2022-12-13 15:22:14 -08:00
capsule-loader.c efi: capsule-loader: Fix use-after-free in efi_capsule_write 2022-09-07 18:23:56 +02:00
capsule.c efi: capsule: clean scatter-gather entries from the D-cache 2020-12-09 08:37:27 +01:00
cper_cxl.c efi/cper, cxl: Remove cxl_err.h 2023-02-03 23:59:58 +01:00
cper_cxl.h efi/cper, cxl: Decode CXL Protocol Error Section 2022-11-18 09:14:10 +01:00
cper-arm.c efi/cper: Remove unnecessary aer.h include 2023-04-07 16:42:31 -05:00
cper-x86.c x86/mce, cper: Pass x86 CPER through the MCA handling chain 2020-11-21 12:05:41 +01:00
cper.c EFI updates for v6.2: 2022-12-13 14:31:47 -08:00
dev-path-parser.c efi/dev-path-parser: Refactor _UID handling to use acpi_dev_uid_to_integer() 2022-09-19 18:34:42 +02:00
earlycon.c efi: earlycon: Reprobe after parsing config tables 2023-03-13 23:28:43 +01:00
efi-bgrt.c efi/bgrt: Accept BGRT tables with a version of 0 2020-02-22 23:37:37 +01:00
efi-init.c efi: move screen_info into efi init code 2023-10-17 16:33:39 +02:00
efi-pstore.c EFI updates for v6.2: 2022-12-13 14:31:47 -08:00
efi.c asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
efibc.c efi: efibc: Guard against allocation failure 2022-09-20 18:42:55 +02:00
embedded-firmware.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
esrt.c efi/esrt: Allow ESRT access without CAP_SYS_ADMIN 2023-06-06 15:33:59 +02:00
fdtparams.c efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures 2022-11-18 09:14:09 +01:00
Kconfig arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
Makefile efi: Add unaccepted memory support 2023-06-06 17:22:20 +02:00
memattr.c A healthy mix of EFI contributions this time: 2023-02-23 14:41:48 -08:00
memmap.c efi: xen: Set EFI_PARAVIRT for Xen dom0 boot on all architectures 2022-11-18 09:14:09 +01:00
mokvar-table.c efi/mokvar: move up init order 2022-03-08 13:55:52 +02:00
rci2-table.c efi: Don't attempt to map RCI2 config table if it doesn't exist 2019-12-10 12:13:02 +01:00
reboot.c efi: Fix efi_power_off() not being run before acpi_power_off() when necessary 2022-07-10 17:41:06 +02:00
riscv-runtime.c efi/riscv: Move EFI runtime call setup/teardown helpers out of line 2023-08-21 17:59:25 +02:00
runtime-wrappers.c efi/runtime-wrappers: Clean up white space and add __init annotation 2023-08-22 10:39:26 +02:00
sysfb_efi.c efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L 2023-03-18 11:44:57 +01:00
tpm.c efi/tpm: Pass correct address to memblock_reserve 2022-10-24 08:04:25 +02:00
unaccepted_memory.c efi/unaccepted: Fix off-by-one when checking for overlapping ranges 2023-11-28 12:49:21 +01:00
vars.c efivarfs: expose used and total size 2023-05-17 18:21:34 +02:00