There is UEFI firmware popping up in the wild now that implements stricter
permission checks using NX and write protect page table entry bits.
This means that firmware now may fail to load binaries if its individual
sections are not page aligned, as otherwise it can not ensure permission
boundarie
I got a new toy recently: An HP Envy X2 system. This is one of those shiny
new Qualcomm Snapdragon based Windows tablet/notebook hybrid things.
While running Windows on those is actually not a terribly bad experience now
that WSL is out, I would like to see Linux run on those as well in the future
The efi-arm case was defining its own header size calculation, even though it's
100% identical to the common EFI32_HEADER_SIZE definition.
So let's clean it up to use the common define.
Signed-off-by: Alexander Graf
---
util/mkimage.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
There are a few spots in the PE generation code for EFI binaries that uses
the section alignment rather than file alignment, even though the alignment
is really only file bound.
Replace those cases with the file alignment constant instead.
Reported-by: Daniel Kiper
Signed-off-by: Alexander Graf