rhboot / shim

UEFI shim loader
Other
816 stars 284 forks source link

Setting memory attributes in handle_image() does not comply with UEFI specification #614

Open xypron opened 9 months ago

xypron commented 9 months ago

The UEFI specification requires for the ARM 64bit architecture that if a 64 KiB page contains either of

then all 4KiB pages in the 64KiB page must use identical attributes.

We must ensure that the buffer allocated with AllocatePages() in handle_image() for which we set memory attributes does not contain any of the above memory types. The easiest way to fulfill the requirement is appropriate alignment and rounding of the used memory.

Best regards

Heinrich