public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] ArmPkg/UncachedMemoryAllocationLib: set XP bit via CPU arch protocol
Date: Wed, 15 Mar 2017 19:37:05 +0000	[thread overview]
Message-ID: <CAKv+Gu-daa3zSygbzXY1_hdS59JESFZ9KXRo=mwS7y=Wza1gFw@mail.gmail.com> (raw)
In-Reply-To: <CAKv+Gu-H+ymk245Os1VxK0b5AJU5=fPpZjw1xAz_UNsUDHvVeA@mail.gmail.com>

On 15 March 2017 at 10:12, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 15 March 2017 at 09:59, Ryan Harkin <ryan.harkin@linaro.org> wrote:
>> Hi Ard,
>>
>> Thanks for the quick turnaround as always.
>>
>> On 14 March 2017 at 20:20, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>>> On Tue, Mar 14, 2017 at 07:58:15PM +0000, Ard Biesheuvel wrote:
>>>> Commit e7b24ec9785d ("ArmPkg/UncachedMemoryAllocationLib: map uncached
>>>> allocations non-executable") adds code that manipulates the GCD memory
>>>> space attributes of a newly allocated uncached region without checking
>>>> whether this region expose these attributes in its capabilities mask.
>>>>
>>>> Given that the intent is to remove executable permissions from the region,
>>>> this is a fairly pointless exercise to begin with, regardless of whether
>>>> it is correct or not. The reason is that RO/XP memory attributes in the
>>>> GCD memory space map or the UEFI memory map are completely disconnected
>>>> from the actual mapping permissions used in the page tables.
>>>>
>>>> So instead, invoke the CPU arch protocol directly, and add the non-exec
>>>> attributes in the page tables directly.
>>>>
>>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>
>> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
>>
>> FVPs and TC2 worked before this change, Juno was hanging on boot as
>> per an earlier email thread.
>>
>> I tested this change on FVP Foundation & AEMv8, TC2 and Juno R0/1/2
>> and they all work fine after it's applied to the current HEAD of EDK2
>> (commit 8057622).
>>

Pushed now.


      reply	other threads:[~2017-03-15 19:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 19:58 [PATCH] ArmPkg/UncachedMemoryAllocationLib: set XP bit via CPU arch protocol Ard Biesheuvel
2017-03-14 20:20 ` Leif Lindholm
2017-03-15  9:59   ` Ryan Harkin
2017-03-15 10:12     ` Ard Biesheuvel
2017-03-15 19:37       ` Ard Biesheuvel [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='CAKv+Gu-daa3zSygbzXY1_hdS59JESFZ9KXRo=mwS7y=Wza1gFw@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