linux/drivers/firmware/efi/libstub
Ard Biesheuvel 0b1d9debe3 efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure
The logic in efi_random_alloc() will iterate over the memory map twice,
once to count the number of candidate slots, and another time to locate
the chosen slot after randomization.

If there is insufficient memory to do the allocation, the second loop
will run to completion without actually having located a slot, but we
currently return EFI_SUCCESS in this case, as we fail to initialize
status to the appropriate error value of EFI_OUT_OF_RESOURCES.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2023-03-23 15:15:45 +01:00
..
Makefile efi: arm64: enter with MMU and caches enabled 2023-01-24 11:51:08 +00:00
Makefile.zboot efi/libstub: zboot: Add compressed image to make targets 2023-03-21 15:20:56 +01:00
alignedmem.c arm64: efi: Limit allocations to 48-bit addressable physical region 2022-12-07 19:50:44 +01:00
arm32-stub.c efi: libstub: Move screen_info handling to common code 2022-11-09 12:42:02 +01:00
arm64-stub.c efi/libstub: Use relocated version of kernel's struct screen_info 2023-03-23 12:27:18 +01:00
arm64.c arm64: efi: Use SMBIOS processor version to key off Ampere quirk 2023-03-18 11:44:56 +01:00
efi-stub-entry.c efi/libstub: Use relocated version of kernel's struct screen_info 2023-03-23 12:27:18 +01:00
efi-stub-helper.c efi: zboot: Use EFI protocol to remap code/data with the right attributes 2023-02-03 16:39:22 +01:00
efi-stub.c efi/libstub: Use relocated version of kernel's struct screen_info 2023-03-23 12:27:18 +01:00
efistub.h efi/libstub: Use relocated version of kernel's struct screen_info 2023-03-23 12:27:18 +01:00
fdt.c efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0 2022-10-21 11:09:41 +02:00
file.c efi: libstub: Add mixed mode support to command line initrd loader 2022-11-18 09:14:08 +01:00
gop.c efi/gop: Add an option to list out the available GOP modes 2020-05-20 19:09:20 +02:00
intrinsics.c efi: libstub: Clone memcmp() into the stub 2022-11-09 12:42:02 +01:00
loongarch-stub.c efi/loongarch: libstub: Split off kernel image relocation for builtin stub 2022-11-09 12:42:03 +01:00
loongarch.c efi/loongarch: libstub: Split off kernel image relocation for builtin stub 2022-11-09 12:42:03 +01:00
mem.c arm64: efi: Limit allocations to 48-bit addressable physical region 2022-12-07 19:50:44 +01:00
pci.c efi/libstub: Correct comment typos 2020-05-06 11:27:55 +02:00
printk.c efi: libstub: Enable efi_printk() in zboot decompressor 2022-11-09 12:42:02 +01:00
random.c efi: stub: use random seed from EFI variable 2022-12-01 09:51:21 +01:00
randomalloc.c efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure 2023-03-23 15:15:45 +01:00
relocate.c efi: libstub: install boot-time memory map as config table 2022-09-27 13:22:49 +02:00
riscv-stub.c efi/riscv: libstub: Split off kernel image relocation for builtin stub 2022-11-09 12:42:03 +01:00
riscv.c efi/riscv: libstub: Split off kernel image relocation for builtin stub 2022-11-09 12:42:03 +01:00
screen_info.c efi/libstub: Use relocated version of kernel's struct screen_info 2023-03-23 12:27:18 +01:00
secureboot.c efi: libstub: check Shim mode using MokSBStateRT 2022-09-22 10:15:44 +02:00
skip_spaces.c efi/libstub: Fix missing-prototype warning for skip_spaces() 2020-06-15 19:43:58 +02:00
smbios.c efi/libstub: smbios: Drop unused 'recsize' parameter 2023-03-18 11:44:57 +01:00
string.c efi: libstub: Provide local implementations of strrchr() and memchr() 2022-11-09 12:42:02 +01:00
systable.c efi/libstub: move efi_system_table global var into separate object 2022-09-19 11:19:35 +02:00
tpm.c More EFI changes for v5.8: 2020-05-25 15:11:14 +02:00
vsprintf.c isystem: ship and use stdarg.h 2021-08-19 09:02:55 +09:00
x86-stub.c x86/boot/compressed, efi: Merge multiple definitions of image_offset into one 2022-11-24 08:55:55 +01:00
zboot-header.S efi/libstub: zboot: Mark zboot EFI application as NX compatible 2023-03-10 14:11:39 +01:00
zboot.c efi/libstub: Use relocated version of kernel's struct screen_info 2023-03-23 12:27:18 +01:00
zboot.lds efi: libstub: Fix incorrect payload size in zboot header 2022-10-21 11:09:41 +02:00