efi_loader: AllocateAddress requires page address
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 6 Nov 2022 00:52:13 +0000 (01:52 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 6 Nov 2022 09:50:04 +0000 (10:50 +0100)
commit53def68df5ec10c9aaa46d3422c58fc85d0c93e6
tree9ca1ad441942a83fed8ec1c8633f44f468d9a689
parent0b4cbeba593058104349a437ceb4d615e99b4019
efi_loader: AllocateAddress requires page address

AllocatePages() can be called with Type=AllocateAddress. Such a call can
only succeed if *Memory points to the address of an unallocated page range.

A call with *Memory being an address that is not page aligned must not
succeed. The UEFI specification requires returning EFI_OUT_OF_RESOURCES
if the requested pages cannot be allocated.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_memory.c