public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiewen Yao <jiewen.yao@intel.com>
To: edk2-devel@lists.01.org
Cc: Jeff Fan <jeff.fan@intel.com>,
	Michael Kinney <michael.d.kinney@intel.com>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Star Zeng <star.zeng@intel.com>, Feng Tian <feng.tian@intel.com>
Subject: [PATCH 0/3] DXE Memory Protection
Date: Thu, 26 Jan 2017 16:39:12 +0800	[thread overview]
Message-ID: <1485419955-26652-1-git-send-email-jiewen.yao@intel.com> (raw)

This series patch provides capability to protect PE/COFF image
in DXE memory.
If the UEFI image is page aligned, the image code section is set to read
only and the image data section is set to non-executable.

The DxeCore calls CpuArchProtocol->SetMemoryAttributes() to protect
the image.

Tested platform: NT32/Quark IA32/OVMF IA32/OVMF IA32X64/Intel internal X64/
Tested OS: UEFI Win10, UEFI Ubuntu 16.04.

Untested platform: ARM/AARCH64.
Can ARM/AARCH64 owner help to take a look and try the ARM platform?

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>


Jiewen Yao (3):
  UefiCpuPkg/CpuDxe: Add memory attribute setting.
  ArmPkg/CpuDxe: Correct EFI_MEMORY_RO usage
  MdeModulePkg/DxeCore: Add UEFI image protection.

 ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c           |   2 +-
 ArmPkg/Drivers/CpuDxe/Arm/Mmu.c               |   5 +-
 MdeModulePkg/Core/Dxe/DxeMain.h               |  53 ++
 MdeModulePkg/Core/Dxe/DxeMain.inf             |   2 +
 MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c       |   1 +
 MdeModulePkg/Core/Dxe/Image/Image.c           |   5 +
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 822 ++++++++++++++++
 MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c  |  22 -
 UefiCpuPkg/CpuDxe/CpuDxe.c                    | 137 +--
 UefiCpuPkg/CpuDxe/CpuDxe.inf                  |   4 +-
 UefiCpuPkg/CpuDxe/PageTableLib.h              | 204 ++++
 UefiCpuPkg/CpuDxe/PageTableLibX86Pae.c        | 997 ++++++++++++++++++++
 12 files changed, 2168 insertions(+), 86 deletions(-)
 create mode 100644 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
 create mode 100644 UefiCpuPkg/CpuDxe/PageTableLib.h
 create mode 100644 UefiCpuPkg/CpuDxe/PageTableLibX86Pae.c

-- 
2.7.4.windows.1



             reply	other threads:[~2017-01-26  8:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  8:39 Jiewen Yao [this message]
2017-01-26  8:39 ` [PATCH 1/3] UefiCpuPkg/CpuDxe: Add memory attribute setting Jiewen Yao
2017-02-03  8:51   ` Gao, Liming
2017-02-04  0:42     ` Yao, Jiewen
2017-02-06  3:27   ` Fan, Jeff
2017-02-06  3:58     ` Yao, Jiewen
2017-02-06  5:26       ` Fan, Jeff
2017-02-06  5:28         ` Yao, Jiewen
2017-01-26  8:39 ` [PATCH 2/3] ArmPkg/CpuDxe: Correct EFI_MEMORY_RO usage Jiewen Yao
2017-01-26 12:11   ` Leif Lindholm
2017-01-26 12:17     ` Yao, Jiewen
2017-01-26  8:39 ` [PATCH 3/3] MdeModulePkg/DxeCore: Add UEFI image protection Jiewen Yao
2017-02-03  8:39   ` Gao, Liming
2017-02-04  0:41     ` Yao, Jiewen
2017-02-04  3:39       ` Gao, Liming
2017-02-06  1:07         ` Tian, Feng
2017-02-06  1:39           ` Yao, Jiewen
2017-02-06 14:34   ` Ard Biesheuvel
2017-02-06 14:51     ` Yao, Jiewen
2017-02-06 14:52       ` Ard Biesheuvel
2017-02-06 17:52         ` Kinney, Michael D

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=1485419955-26652-1-git-send-email-jiewen.yao@intel.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