public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wang, Jian J" <jian.j.wang@intel.com>
To: edk2-devel@lists.01.org
Subject: [PATCH 0/4] Implement NULL pointer detection feature for special pool
Date: Wed, 13 Sep 2017 17:25:03 +0800	[thread overview]
Message-ID: <20170913092507.12504-1-jian.j.wang@intel.com> (raw)
In-Reply-To: <Implement NULL pointer detection feature>

The mechanism behind is to trigger a page fault exception at address 0. This can be made by disabling page 0 (0-4095) during page table setup. So this feature can only be available on platform with paging enabled. Once this feature is enabled, any code, like CSM, which has to access memory in page 0 needs to enable this page temporarily in advance and disable it afterwards. PcdNullPointerDetectionPropertyMask is used to control and elaborate the use cases. For example, BIT7 of this PCD must be set for Windows 7 boot on Qemu if BIT0 set; or boot will fail.

Wang, Jian J (4):
  Implement NULL pointer detection in EDK-II Core.
  Implement NULL pointer detection for SMM mode code.
  Update CSM code to temporarily bypass NULL pointer detection if
    enabled.
  Update QemuVideoDxe driver to bypass NULL pointer detection if
    enabled.

 .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c       | 10 +++-
 .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h       | 18 +++++++
 .../Csm/BiosThunk/KeyboardDxe/KeyboardDxe.inf      |  2 +
 .../Csm/LegacyBiosDxe/LegacyBda.c                  |  4 ++
 .../Csm/LegacyBiosDxe/LegacyBios.c                 | 55 ++++++++++++++++++----
 .../Csm/LegacyBiosDxe/LegacyBiosDxe.inf            |  2 +
 .../Csm/LegacyBiosDxe/LegacyBiosInterface.h        | 23 +++++++++
 .../Csm/LegacyBiosDxe/LegacyBootSupport.c          | 33 ++++++++++---
 .../Csm/LegacyBiosDxe/LegacyPci.c                  | 17 ++++++-
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c  | 41 ++++++++++------
 MdeModulePkg/Core/Dxe/DxeMain.inf                  |  3 +-
 MdeModulePkg/Core/Dxe/Mem/Page.c                   | 21 +++++----
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c      | 47 ++++++++++++++++++
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.h              | 15 ++++++
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf            |  3 +-
 MdeModulePkg/Core/DxeIplPeim/DxeLoad.c             | 53 +++++++++++++++++++++
 MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c    |  8 +++-
 MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c     |  2 +
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c   | 23 ++++++---
 MdeModulePkg/MdeModulePkg.dec                      | 12 +++++
 OvmfPkg/QemuVideoDxe/Driver.c                      | 15 +++++-
 OvmfPkg/QemuVideoDxe/Qemu.h                        | 16 +++++++
 OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf              |  2 +
 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c           | 11 +++++
 UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c              | 25 +++++++++-
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h         |  2 +
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf       | 17 +++----
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c            | 11 +++++
 28 files changed, 429 insertions(+), 62 deletions(-)

-- 
2.14.1.windows.1



       reply	other threads:[~2017-09-13  9:22 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Implement NULL pointer detection feature>
2017-09-13  9:25 ` Wang, Jian J [this message]
2017-09-13  9:25   ` [PATCH 1/4] MdeModulePkg/Core: Implement NULL pointer detection in EDK-II Core Wang, Jian J
2017-09-13 16:33     ` Johnson, Brian (EXL - Eagan)
2017-09-14  1:37       ` Wang, Jian J
2017-09-13 17:28     ` Jordan Justen
2017-09-14  1:25       ` Wang, Jian J
2017-09-14  6:33         ` Jordan Justen
2017-09-14  6:51           ` Wang, Jian J
2017-09-14  8:22             ` Laszlo Ersek
2017-09-13  9:25   ` [PATCH 2/4] UefiCpuPkg/PiSmmCpuDxeSmm: Implement NULL pointer detection for SMM mode code Wang, Jian J
2017-09-13 16:33     ` Johnson, Brian (EXL - Eagan)
2017-09-14  1:31       ` Wang, Jian J
2017-09-13 17:31     ` Jordan Justen
2017-09-14  1:20       ` Wang, Jian J
2017-09-13  9:25   ` [PATCH 3/4] IntelFrameworkModulePkg/Csm: Update CSM code to temporarily bypass NULL pointer detection if enabled Wang, Jian J
2017-09-13 16:33     ` Johnson, Brian (EXL - Eagan)
2017-09-13  9:25   ` [PATCH 4/4] OvmfPkg/QemuVideoDxe: Update QemuVideoDxe driver to " Wang, Jian J
2017-09-13 16:33     ` Johnson, Brian (EXL - Eagan)
2017-09-13 23:34     ` Laszlo Ersek
2017-09-14  1:17       ` Wang, Jian J
2017-09-14  3:17         ` Wang, Jian J
2017-09-14  8:30           ` Laszlo Ersek
2017-09-14  8:38             ` Yao, Jiewen
2017-09-14  8:46               ` Wang, Jian J
2017-09-14  8:48                 ` Yao, Jiewen
2017-09-14  8:54                 ` Laszlo Ersek
2017-09-14  9:39                   ` Zeng, Star
2017-09-14  9:55                     ` Laszlo Ersek
2017-09-14 10:16                       ` Zeng, Star
2017-09-15  0:15                         ` Wang, Jian J
2017-09-15  6:05                           ` Wang, Jian J
2017-09-15  6:28                             ` Zeng, Star
2017-09-14  8:52               ` Laszlo Ersek
2017-09-14  5:50         ` Jordan Justen
2017-09-14  6:52           ` Wang, Jian J
2017-09-14  8:26         ` Laszlo Ersek
2017-09-13  8:07 [PATCH 0/4] Implement NULL pointer detection feature for special pool Wang, Jian J
2017-09-13  8:59 ` Wang, Jian J

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=20170913092507.12504-1-jian.j.wang@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