public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, edk2-devel@ml01.01.org
Cc: leif.lindholm@linaro.org
Subject: Re: [PATCH v2] ArmVirtPkg AARCH64: enable NX memory protection for all platforms
Date: Wed, 1 Mar 2017 19:32:24 +0100	[thread overview]
Message-ID: <6d185b29-8917-72ce-9484-84cb03435701@redhat.com> (raw)
In-Reply-To: <1488378977-15398-1-git-send-email-ard.biesheuvel@linaro.org>

On 03/01/17 15:36, Ard Biesheuvel wrote:
> This sets the recently introduced PCD PcdDxeNxMemoryProtectionPolicy to
> a value that protects all memory regions except code regions against
> inadvertent execution.
> 
> Note that this does not [yet] protect EfiLoaderData regions, due to
> compatibility issues with shim and GRUB.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
> ---
> v2: leave EfiLoaderData executable for the time being
> 
>  ArmVirtPkg/ArmVirt.dsc.inc | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> index 2b0a44e14d24..a91b27f13cf2 100644
> --- a/ArmVirtPkg/ArmVirt.dsc.inc
> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> @@ -383,6 +383,13 @@ [PcdsFixedAtBuild.AARCH64]
>    #
>    gEfiMdeModulePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x3
>  
> +  #
> +  # Enable NX memory protection for all non-code regions, including OEM and OS
> +  # reserved ones, with the exception of LoaderData regions, of which OS loaders
> +  # (i.e., GRUB) may assume that its contents are executable.
> +  #
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1
> +
>  [Components.common]
>    #
>    # Networking stack
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by:  Laszlo Ersek <lersek@redhat.com>


  reply	other threads:[~2017-03-01 18:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01 14:36 [PATCH v2] ArmVirtPkg AARCH64: enable NX memory protection for all platforms Ard Biesheuvel
2017-03-01 18:32 ` Laszlo Ersek [this message]
2017-03-01 18:37   ` Ard Biesheuvel

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=6d185b29-8917-72ce-9484-84cb03435701@redhat.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