From: Michael Zimmermann <sigmaepsilon92@gmail.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: SetMemorySpaceAttributes with EFI_MEMORY_XP
Date: Mon, 20 Mar 2017 12:10:20 +0100 [thread overview]
Message-ID: <CAN9vWD+L700Ev2aVqkesBCD1d0OP=T-sCZLQ-NV+9=Bfkuu35A@mail.gmail.com> (raw)
In-Reply-To: <d8778c9e-1029-140b-5746-2d311a6c9968@redhat.com>
> but then (I think) the DXE_CORE must
have set the same bit in the "supported" bitmask too, when the memory
was added.
that's the point, if my port behaves the same as ArmVirt, it doesn't.
for all memory, capabilities are 8000000000000008 and attributes are
0000000000000000 for unused memory and 0000000000000008 for used
memory.
This seems to confirm what Ard said about the GCD not being altered
for NX permissions.
Thanks
Michael
On Mon, Mar 20, 2017 at 12:06 PM, Laszlo Ersek <lersek@redhat.com> wrote:
> On 03/20/17 11:32, Michael Zimmermann wrote:
>> Hi,
>>
>> I didn't test ArmVirtQemuKernel but I'm trying to use some of the code
>> for another platform.
>> So does this call ever succeed with PcdDxeNxMemoryProtectionPolicy
>> being enabled?
>> https://github.com/tianocore/edk2/blob/76874be3d411bf8daac051718e20932e0bf97d70/ArmVirtPkg/HighMemDxe/HighMemDxe.c#L95
>> Status = gDS->SetMemorySpaceAttributes (CurBase, CurSize, Attributes);
>>
>> Neither the memory that was added by this Dxe nor the one added
>> automatically by GCD has the EFI_MEMORY_XP capability which causes
>> SetMemorySpaceAttributes to return EFI_UNSUPPORTED.
>
> See commit 413edd470932 ("ArmVirtPkg/HighMemDxe: preserve non-exec
> permissions on newly added regions", 2017-02-28). EFI_MEMORY_XP is only
> requested if EfiConventionalMemory's bit is set in
> PcdDxeNxMemoryProtectionPolicy, but then (I think) the DXE_CORE must
> have set the same bit in the "supported" bitmask too, when the memory
> was added.
>
> Thanks
> Laszlo
>
prev parent reply other threads:[~2017-03-20 11:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 10:32 SetMemorySpaceAttributes with EFI_MEMORY_XP Michael Zimmermann
2017-03-20 11:04 ` Ard Biesheuvel
2017-03-20 11:16 ` Michael Zimmermann
2017-03-20 11:20 ` Ard Biesheuvel
2017-03-20 11:38 ` Laszlo Ersek
2017-03-20 14:08 ` Ard Biesheuvel
2017-03-20 15:22 ` Yao, Jiewen
2017-03-20 15:24 ` Laszlo Ersek
2017-03-20 19:31 ` Ard Biesheuvel
2017-03-20 11:06 ` Laszlo Ersek
2017-03-20 11:10 ` Michael Zimmermann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAN9vWD+L700Ev2aVqkesBCD1d0OP=T-sCZLQ-NV+9=Bfkuu35A@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox