[PATCH v2 2/5] arm64: efi: apply strict permissons for UEFI Runtime Services regions
Ard Biesheuvel
ard.biesheuvel at linaro.org
Wed May 18 06:08:32 PDT 2016
On 18 May 2016 at 15:06, Shanker Donthineni <shankerd at codeaurora.org> wrote:
> Hi Ard,
>
> We are not using the permission attribute table and all the Runtime
> Data/Code regions are marked with 'XP' bit. Do you think something
> wrong in our UEFI implementation or Linux has to map RuntimeCode
> regions with executable permission always irrespective of an attribute
> flag EFI_MEMORY_XP?
>
> [ 0.000000] efi: Processing EFI memory map:
> [ 0.000000] efi: 0x000000100000-0x00000010ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
> [ 0.000000] efi: 0x00003b830000-0x00003b83ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
> [ 0.000000] efi: 0x00003c000000-0x00003fffffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
> [ 0.000000] efi: 0x000000100000-0x00000010ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
> [ 0.000000] efi: 0x00003b830000-0x00003b83ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
> [ 0.000000] efi: 0x00003c000000-0x00003fffffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
> [ 0.000000] efi: 0x004000820000-0x00400085ffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x004003080000-0x00400308ffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047f9960000-0x0047f997ffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fa9c0000-0x0047fa9cffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047faa30000-0x0047faa3ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fab90000-0x0047fab9ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047faba0000-0x0047fabaffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fab90000-0x0047fab9ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047faba0000-0x0047fabaffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fabb0000-0x0047fabbffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fabc0000-0x0047fad9ffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fada0000-0x0047fae2ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047faf50000-0x0047faf7ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fafa0000-0x0047fafbffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047faf50000-0x0047faf7ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fafa0000-0x0047fafbffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fff90000-0x0047fff9ffff [Runtime Code |RUN| | |XP| | | | |WB|WT|WC|UC]*
> [ 0.000000] efi: 0x0047fffb0000-0x0047fffdffff [Runtime Data |RUN| | |XP| | | | |WB|WT|WC|UC]*
>
This memory map looks utterly broken. Assuming you are using
Tianocore, does it work when setting
gEfiMdeModulePkgTokenSpaceGuid.PcdPropertiesTableEnable to FALSE in
your platform?
More information about the linux-arm-kernel
mailing list