u-boot/lib
Alper Nebi Yasak 9fd3f881c6 efi_loader: Increase default variable store size to 64KiB
Debian's arm64 UEFI Secure Boot shim makes the EFI variable store run
out of space while mirroring its MOK database to variables. This can be
observed in QEMU like so:

  $ tools/buildman/buildman -o build/qemu_arm64 --boards=qemu_arm64 -w
  $ cd build/qemu_arm64
  $ curl -L -o debian.iso \
      https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-12.0.0-arm64-netinst.iso
  $ qemu-system-aarch64 \
      -nographic -bios u-boot.bin \
      -machine virt -cpu cortex-a53 -m 1G -smp 2 \
      -drive if=virtio,file=debian.iso,index=0,format=raw,readonly=on,media=cdrom
  [...]
  => # interrupt autoboot
  => env set -e -bs -nv -rt -guid 605dab50-e046-4300-abb6-3dd810dd8b23 SHIM_VERBOSE 1
  => boot
  [...]
  mok.c:296:mirror_one_esl() SetVariable("MokListXRT43", ... varsz=0x4C) = Out of Resources
  mok.c:452:mirror_mok_db() esd:0x7DB92D20 adj:0x30
  Failed to set MokListXRT: Out of Resources
  mok.c:767:mirror_one_mok_variable() mirror_mok_db("MokListXRT",  datasz=17328) returned Out of Resources
  mok.c:812:mirror_one_mok_variable() returning Out of Resources
  Could not create MokListXRT: Out of Resources
  [...]
  Welcome to GRUB!

This would normally be fine as shim would continue to run grubaa64.efi,
but shim's error handling code for this case has a bug [1] that causes a
synchronous abort on at least chromebook_kevin (but apparently not on
QEMU arm64).

Double the default variable store size so the variables fit. There is a
note about this value matching PcdFlashNvStorageVariableSize when
EFI_MM_COMM_TEE is enabled, so keep the old default in that case.

[1] https://github.com/rhboot/shim/pull/577

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-07-09 03:53:08 +02:00
..
acpi acpi: Move the table-finding functions into the libary 2023-05-11 10:25:29 +08:00
aes tools: avoid OpenSSL deprecation warnings 2021-12-26 06:57:20 +01:00
at91 SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
blake2 lib: add BLAKE2 hash support 2022-01-18 08:31:02 -05:00
bzip2 cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
crypt lib: crypt: fix selecting a non-existent option 2022-10-11 15:40:48 -04:00
crypto Merge branch 'next' 2022-07-11 14:58:57 -04:00
dhry global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
ecdsa spl: Ensure all SPL symbols in Kconfig have some SPL dependency 2022-07-07 09:29:08 -04:00
efi Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
efi_driver efi_driver: use efi_close_protocol 2022-10-10 16:34:26 +02:00
efi_loader efi_loader: Increase default variable store size to 64KiB 2023-07-09 03:53:08 +02:00
efi_selftest efi_selftests: fix protocol repeated selftesting 2023-06-16 06:48:46 +02:00
fwu_updates fwu: fix config FWU_MULTI_BANK_UPDATE 2023-05-13 11:09:51 +02:00
libavb libavb: Fix a warning with clang-15 2023-03-22 15:22:48 -04:00
libfdt fdt_region: move fdt_region.c to common/ from lib/libfdt/ 2020-04-26 14:23:55 -06:00
lzma cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
lzo SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
optee fdtdec: Support reserved-memory flags 2021-10-13 14:18:30 -07:00
rsa lib: rsa: cosmetic: fix building warning 2023-01-11 11:54:50 -05:00
zlib zlib: trees.c: Fix a warning with clang-15 2023-03-22 15:22:48 -04:00
zstd lib: zstd: update to latest Linux zstd 1.5.2 2023-01-18 19:04:17 -05:00
.gitignore lib: ignore oid_registry_data.c file 2020-01-22 17:47:57 -05:00
abuf.c abuf: Support use from tools 2023-02-11 12:22:34 -05:00
addr_map.c addrmap: Support on sandbox 2022-07-26 02:30:56 -06:00
aes.c common: Drop display_options.h from common header 2022-08-10 13:46:55 -04:00
asm-offsets.c arm64: Add missing GD_FLG_SKIP_RELOC handling 2021-11-18 18:20:19 -05:00
asn1_decoder.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bch.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
binman.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
bitrev.c lib: bitrev: Sync with Linux kernel v4.17 2018-09-18 00:01:18 -06:00
charset.c lib: add function u16_strcasecmp() 2023-01-04 13:17:42 +01:00
circbuf.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
crc7.c lib: add crc7 from Linux 2011-01-18 23:38:08 +01:00
crc8.c common: Drop linux/crc8.h 2019-12-02 18:23:07 -05:00
crc16-ccitt.c crc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.c 2022-04-21 14:32:40 -04:00
crc16.c crc16: Move standard CRC-16 implementation from ubifs to lib 2022-04-21 14:32:40 -04:00
crc32.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
crc32c.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ctype.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
date.c lib/date: Make rtc_mktime and mktime64 Y2038-ready 2022-05-05 15:06:02 -04:00
display_options.c display_options: print_size: Fix order overflow 2022-09-23 15:13:18 -04:00
div64.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
elf.c video: Renname vbe.h to vesa.h 2022-08-12 08:14:23 -04:00
errno.c sandbox: errno: avoid conflict with libc's errno 2021-05-24 14:21:30 -04:00
errno_str.c lib: errno: sync error codes 2019-10-31 07:22:53 -04:00
fdt-libcrypto.c lib/rsa: Make fdt_add_bignum() available outside of RSA code 2021-04-14 15:06:08 -04:00
fdtdec.c Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi 2023-04-30 21:29:50 -04:00
fdtdec_common.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fdtdec_test.c fdtdec: Support reserved-memory flags 2021-10-13 14:18:30 -07:00
getopt.c lib: Add getopt 2020-10-30 10:56:11 -04:00
gunzip.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
gzip.c global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
hang.c serial: Rename SERIAL_SUPPORT to SERIAL 2021-09-04 12:26:01 -04:00
hash-checksum.c image: Drop unnecessary #ifdefs from image.h 2021-10-08 15:53:27 -04:00
hashtable.c Correct SPL use of ENV_WRITEABLE_LIST 2023-02-09 16:32:26 -05:00
hexdump.c hexdump: Allow ctrl-c to interrupt output 2021-06-08 11:39:09 -04:00
image-sparse.c lib: sparse: Make CHUNK_TYPE_RAW buffer aligned 2022-01-14 12:26:30 -05:00
Kconfig acpi: Create a new Kconfig for ACPI 2023-05-11 10:25:29 +08:00
ldiv.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
linux_compat.c common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
linux_string.c Make linux kernel string funcs available to tools 2012-12-13 11:46:07 -07:00
list_sort.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
lmb.c lmb: add max number of region in lmb_dump_region() output 2023-04-06 15:08:46 -04:00
lz4.c lib/lz4: update LZ4 decompressor module 2022-03-15 16:19:29 -04:00
lz4_wrapper.c lz4: Fix compile warning comparison of distinct pointer types 2022-08-10 13:46:55 -04:00
Makefile acpi: Create a new Kconfig for ACPI 2023-05-11 10:25:29 +08:00
md5.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
membuff.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
net_utils.c net: ipv6: Add string_to_ip6 converter 2022-12-05 12:47:16 -05:00
of_live.c dm: core: Avoid creating a name property when unflattening 2022-09-29 16:11:14 -04:00
oid_registry.c lib: add oid registry utility 2019-12-06 16:44:20 -05:00
panic.c console: Use flush() before panic and reset 2023-03-22 12:51:08 -04:00
physmem.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
qsort.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rand.c common: Move random-number functions into their own header 2019-12-02 18:23:07 -05:00
rational.c lib: rational: copy the rational fraction lib routines from Linux 2021-06-11 16:34:52 +05:30
rbtree.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rc4.c rc4: mark key as const 2023-01-16 18:01:10 +08:00
rtc-lib.c lib: move rtc-lib.c to lib 2021-07-14 16:57:35 -04:00
semihosting.c lib: Add common semihosting library 2022-12-08 15:15:22 +08:00
sha1.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
sha256.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
sha512.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
slre.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
smbios-parser.c efi_loader: add SMBIOS table measurement 2021-10-26 17:58:14 +02:00
smbios.c smbios: error handling for invalid addresses 2021-07-24 10:49:51 +02:00
sscanf.c xen: Code style conformity 2020-08-24 14:11:31 -04:00
string.c lib: fix buggy strcmp and strncmp 2022-10-27 09:10:08 -04:00
strto.c lib: Add a function to split a string into substrings 2023-01-23 18:11:39 -05:00
tables_csum.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
time.c time: Tidy up some unnecessary #ifdefs 2023-02-11 12:22:34 -05:00
tiny-printf.c net: Rename SPL_NET_SUPPORT to SPL_NET 2021-09-04 12:48:53 -04:00
tpm-common.c tpm: Check outgoing command size 2021-07-15 18:42:05 -04:00
tpm-utils.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
tpm-v1.c tpm: Implement tpm_auto_start() for TPMv1.2 2023-02-28 09:44:33 +02:00
tpm-v2.c tpm: Implement tpm_auto_start() for TPMv1.2 2023-02-28 09:44:33 +02:00
tpm_api.c tpm: Implement tpm_auto_start() for TPMv1.2 2023-02-28 09:44:33 +02:00
trace.c trace: Detect an infinite loop 2023-02-11 12:22:35 -05:00
uuid.c efi: Include GUID names with EFI app and payload 2023-03-25 11:07:22 +01:00
vsprintf.c lib: missing fallthrough comment in vsnprintf_internal() 2023-04-06 19:10:08 -04:00
xxhash.c lib: Add xxhash support 2019-05-05 08:48:50 -04:00