diff options
author | Jan Janssen <medhefgo@web.de> | 2023-05-02 19:41:58 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2023-05-02 22:38:15 +0100 |
commit | ec232e4abd7aebfec06b4814b30129532b2bcefd (patch) | |
tree | 004039e5e0a9b15ec70ee498782f99c17e303aca /src | |
parent | 845824acddf2e7e08c94afe7cfee6e50a682c947 (diff) | |
download | systemd-ec232e4abd7aebfec06b4814b30129532b2bcefd.tar.gz |
boot: Use correct memory type for allocations
We were using the wrong memory type when allocating pool memory. This
does not seem to cause a problem on x86, but the kernel will fail to
boot at least on ARM in QEMU.
This is caused by mixing different allocation types which ended up
breaking the kernel or EDK2 during boot services exit. Commit
2f3c3b0bee5534f2338439f04b0aa517479f8b76 appears to fix this boot
failure because it was replacing the gnu-efi xpool_print with xasprintf
thereby unifying the allocation type.
But this same issue can also happen without this fix somehow when the
random-seed logic is in use.
Fixes: #27371
Diffstat (limited to 'src')
-rw-r--r-- | src/boot/efi/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 9df7b4a2d4..9058918a93 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -28,7 +28,7 @@ static inline void freep(void *p) { _malloc_ _alloc_(1) _returns_nonnull_ _warn_unused_result_ static inline void *xmalloc(size_t size) { void *p; - assert_se(BS->AllocatePool(EfiBootServicesData, size, &p) == EFI_SUCCESS); + assert_se(BS->AllocatePool(EfiLoaderData, size, &p) == EFI_SUCCESS); return p; } |