[edk2] [PATCH v2 2/2] MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path

2019-02-19 Thread Jian J Wang
eck at Length position. Cc: Liming Gao Cc: Ray Ni Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../UefiDevicePathLib.c | 9 + 1 file changed, 9 insertions(+) diff --git a/MdePkg/Libr

[edk2] [PATCH v2 0/2] Add sanity check for FilePath device path

2019-02-19 Thread Jian J Wang
x64) Jian J Wang (2): MdePkg/UefiDevicePathLib: Add sanity check for FilePath device path MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c | 9 + .../UefiDevicePathLi

[edk2] [PATCH v2 1/2] MdePkg/UefiDevicePathLib: Add sanity check for FilePath device path

2019-02-19 Thread Jian J Wang
eck at Length position. Cc: Liming Gao Cc: Ray Ni Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c | 9 + 1 file changed, 9 insertions(+) diff --git a/MdePkg/Libr

[edk2] [PATCH 0/3] Ensure FfsFileHeader 8 bytes aligned [CVE-2018-3630]

2019-02-26 Thread Jian J Wang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=864 To follow PI spec, ensure FfsFileHeader 8 bytes aligned. Current code only handles (FwVolHeader->ExtHeaderOffset != 0) path, update code to also handle (FwVolHeader->ExtHeaderOffset == 0) path. Star Zeng (3): MdeModulePkg/PeiCore: Ensure

[edk2] [PATCH 1/3] MdeModulePkg/PeiCore: Ensure FfsFileHeader 8 bytes aligned [CVE-2018-3630]

2019-02-26 Thread Jian J Wang
Liming Gao Cc: Jian J Wang Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei

[edk2] [PATCH 3/3] IntelFrameworkModulePkg/FwVolDxe: Ensure FfsFileHeader 8 bytes aligned [CVE-2018-3630]

2019-02-26 Thread Jian J Wang
From: Star Zeng REF: https://bugzilla.tianocore.org/show_bug.cgi?id=864 To follow PI spec, ensure FfsFileHeader 8 bytes aligned. Current code only handles (FwVolHeader->ExtHeaderOffset != 0) path, update code to also handle (FwVolHeader->ExtHeaderOffset == 0) path. Cc: Jiewen Yao Cc: Liming G

[edk2] [PATCH 2/3] MdeModulePkg/DxeCore: Ensure FfsFileHeader 8 bytes aligned [CVE-2018-3630]

2019-02-26 Thread Jian J Wang
(FwVolHeader->ExtHeaderOffset != 0) path, update code to also handle (FwVolHeader->ExtHeaderOffset == 0) path. Cc: Jiewen Yao Cc: Liming Gao Cc: Jian J Wang Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Core/Dxe/FwVol/FwVol.

[edk2] [PATCH 1/2] UefiCpuPkg/CpuDxe: set TF bit in EFLAGS in C code

2019-02-28 Thread Jian J Wang
buted-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c index 4bee8c7772..812537417d 100644

[edk2] [PATCH 0/2] Fix SMM driver hang at accessing memory beyond 4G

2019-02-28 Thread Jian J Wang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1576 Test: - Pass special test of accessing memory beyond 4G - Boot to OS with Qemu emulator platform (Fedora27, Ubuntu18.04, Windows7, Windows10) Jian J Wang (2): UefiCpuPkg/CpuDxe: set TF bit in EFLAGS in C code UefiCpuPkg/CpuDxe: remove

[edk2] [PATCH 2/2] UefiCpuPkg/CpuDxe: remove code to set TF bit in EFLAGS

2019-02-28 Thread Jian J Wang
buted-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../CpuExceptionHandlerLib/Ia32/ExceptionHandlerAsm.nasm | 7 --- .../CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm| 4 2 files changed, 11 deletions(-) diff --git a/UefiCpuPkg/Li

[edk2] [PATCH 2] UefiCpuPkg: restore strict page attributes via #DB in nonstop mode only

2019-02-28 Thread Jian J Wang
, Windows10) Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Acked-by: Laszlo Ersek --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 11 ++- .../Ia32/Exceptio

[edk2] [PATCH] Maintainers.txt: remove unexpected unicode BOM

2019-03-08 Thread Jian J Wang
The BOM was introduced by commit 6c05b958df532345a35b418b05effcf7fd51fc4e accidentally. Cc: Yao Jiewen Cc: Zhang, Chao B Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- Maintainers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[edk2] [PATCH] CryptoPkg/BaseCryptLib: split CryptPkcs7Verify.c on behalf of runtime

2019-01-28 Thread Jian J Wang
under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../Library/BaseCryptLib/BaseCryptLib.inf | 5 +- .../Library/BaseCryptLib/InternalCryptLib.h | 32 + .../Library/BaseCryptLib/PeiCryptLib.inf | 3 +- .../BaseCryptLib/Pk/CryptPkcs7VerifyBase.c

[edk2] [PATCH 2/2] MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path

2019-01-28 Thread Jian J Wang
: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../UefiDevicePathLib.c | 8 1 file changed, 8 insertions(+) diff --git a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c

[edk2] [PATCH 0/2] Add sanity check for FilePath device path

2019-01-28 Thread Jian J Wang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497 Jian J Wang (2): MdePkg/UefiDevicePathLib: Add sanity check for FilePath device path MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c

[edk2] [PATCH 1/2] MdePkg/UefiDevicePathLib: Add sanity check for FilePath device path

2019-01-28 Thread Jian J Wang
: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c | 8 1 file changed, 8 insertions(+) diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c b/MdePkg/Library

[edk2] [PATCH] MdeModulePkg/PiSmmIpl: fix non-executable SMM RAM

2018-04-11 Thread Jian J Wang
ry cache capabilities before setting corresponding attributes. Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/PiSmmCore/PiSmmIp

[edk2] [PATCH 0/2] add sanity check for SetMemoryAttributes

2018-04-11 Thread Jian J Wang
Heap Guard feature needs enough memory and paging to work. Otherwise calling SetMemoryAttributes to change page attribute will fail. This patch add necessary check of result of calling SetMemoryAttributes. This can help users to debug their problem in enabling this feature. Jian J Wang (2

[edk2] [PATCH 1/2] MdeModulePkg/DxeCore: add sanity check for SetMemoryAttributes

2018-04-11 Thread Jian J Wang
: Eric Dong Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core

[edk2] [PATCH 2/2] MdeModulePkg/SmmCore: add sanity check for SetMemoryAttributes

2018-04-11 Thread Jian J Wang
: Eric Dong Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Core/PiSmmCore

[edk2] [PATCH v2] MdeModulePkg/PiSmmIpl: fix non-executable SMM RAM

2018-04-11 Thread Jian J Wang
write-back attribute because of no corresponding cache capabilities. This patch will add necessary cache capabilities before setting corresponding attributes. Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 S

[edk2] [PATCH 0/2] Fix Nt32Pkg/EmulatorPkg boot failure

2018-09-27 Thread Jian J Wang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1215 This issue is caused by commit 5267926134d17e86672b84fd57b438f05ffa68e1. Jian J Wang (2): Nt32Pkg/Nt32Pkg.dsc: override PCD default to avoid boot failure EmulatorPkg/EmulatorPkg.dsc: override PCD default to avoid boot failure

[edk2] [PATCH 2/2] EmulatorPkg/EmulatorPkg.dsc: override PCD default to avoid boot failure

2018-09-27 Thread Jian J Wang
ndows OS. This patch solves this issue by setting PcdImageProtectionPolicy to 0 explicitly in EmulatorPkg.dsc. Cc: Jordan Justen Cc: Andrew Fish Cc: Ruiyu Ni Cc: Star Zeng Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- Emulat

[edk2] [PATCH 1/2] Nt32Pkg/Nt32Pkg.dsc: override PCD default to avoid boot failure

2018-09-27 Thread Jian J Wang
ws OS. This patch solves this issue by setting PcdImageProtectionPolicy to 0 explicitly in Nt32Pkg.dsc. Cc: Ruiyu Ni Cc: Hao Wu Cc: Star Zeng Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- Nt32Pkg/Nt32Pkg.dsc | 1 + 1 file changed, 1 inse

[edk2] [PATCH] MdePkg/BaseStackCheckLib: add MSFT toolchain support

2018-10-15 Thread Jian J Wang
Fish Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../BaseStackCheckLib/BaseStackCheckLib.inf| 11 +- .../Library/BaseStackCheckLib/BaseStackCheckMsft.c | 221 + .../Library/BaseStackCheckLib/BaseStackCheckNull.c

[edk2] [PATCH] UefiCpuPkg/CpuExceptionHandlerLib: always clear descriptor data in advance

2018-10-17 Thread Jian J Wang
prevent such problem from happening. Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c | 3 +++ UefiCpuPkg/Library/CpuExceptionHandlerLib/X64

[edk2] [PATCH 3/3] MdeModulePkg/Core: add use-after-free memory detection

2018-10-18 Thread Jian J Wang
under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/DxeMain.h | 1 + MdeModulePkg/Core/Dxe/DxeMain.inf| 1 + MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 8 + MdeModulePkg/Core/Dxe/Mem/HeapGuard.c

[edk2] [PATCH 1/3] MdeModulePkg/MdeModulePkg.dec: add new PCD for UAF detection feature

2018-10-18 Thread Jian J Wang
ntribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 6037504fa7..83736cd761 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeMod

[edk2] [PATCH 0/3] Add use-after-free memory detection

2018-10-18 Thread Jian J Wang
UAF (Use-After-Free) memory detection is new feature introduced to detect illegal access to memory which has been freed. Jian J Wang (3): MdeModulePkg/MdeModulePkg.dec: add new PCD for UAF detection feature UefiCpuPkg/CpuDxe: fix an infinite loop issue MdeModulePkg/Core: add use-after-free

[edk2] [PATCH 2/3] UefiCpuPkg/CpuDxe: fix an infinite loop issue

2018-10-18 Thread Jian J Wang
location function and fail any other requests if it has not been done. Cc: Laszlo Ersek Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 12 +++

[edk2] [PATCH v2 1/5] MdeModulePkg/MdeModulePkg.dec: update PCD description for new feature

2018-10-23 Thread Jian J Wang
e same time. Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 10 ++ MdeModulePkg/MdeModulePkg.uni | 6 +- 2 files changed, 15 ins

[edk2] [PATCH v2 0/5] Add freed-memory guard feature

2018-10-23 Thread Jian J Wang
a new feauture used to detect UAF (Use-After-Free) memory issue. Jian J Wang (5): MdeModulePkg/MdeModulePkg.dec: update PCD description for new feature UefiCpuPkg/CpuDxe: fix an infinite loop issue MdeModulePkg/Core: fix a lock issue in GCD memory map dump MdeModulePkg/Core: add freed-memory

[edk2] [PATCH v2 3/5] MdeModulePkg/Core: fix a lock issue in GCD memory map dump

2018-10-23 Thread Jian J Wang
ael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 140 1 file changed, 86 insertions(+), 54 deletions(-) diff --git a/MdeM

[edk2] [PATCH v2 2/5] UefiCpuPkg/CpuDxe: fix an infinite loop issue

2018-10-23 Thread Jian J Wang
r freed-memory guard. Cc: Laszlo Ersek Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuDxe.h | 2 +- UefiCpuPkg/CpuDxe/CpuPageTable.c | 19 +-- 2 f

[edk2] [PATCH v2 4/5] MdeModulePkg/Core: add freed-memory guard feature

2018-10-23 Thread Jian J Wang
pages which haven been freed. Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 409 +- MdeModule

[edk2] [PATCH v2 5/5] MdeModulePkg/Core: fix-up for changes introduced by freed-memory guard

2018-10-23 Thread Jian J Wang
memory descriptor to reduce the overall descriptor number. Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 2 +- MdeMod

[edk2] [PATCH v3 0/6] Introduce freed-memory guard feature

2018-10-23 Thread Jian J Wang
> v3 changes: > Updated per comments from Laszlo. Please refer to individual patch > file for details Freed-memory guard is a new feauture used to detect UAF (Use-After-Free) memory issue. Tests: a. Feature basic unit/functionality test b. OVMF regression test Jian J Wang (6): Mde

[edk2] [PATCH v3 3/6] UefiCpuPkg/CpuDxe: consider freed-memory guard in non-stop mode

2018-10-23 Thread Jian J Wang
d-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuDxe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index 064ea05bba..3183a3f7f4 100644 --- a/UefiCpuPkg/CpuDxe/CpuD

[edk2] [PATCH v3 1/6] MdeModulePkg: cleanup Heap Guard pool/page type PCD documentation

2018-10-23 Thread Jian J Wang
dPageType don't have effect to the BIT4 of PcdHeapGuardPropertyMask. Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 4

[edk2] [PATCH v3 4/6] UefiCpuPkg/CpuDxe: prevent recursive calling of InitializePageTablePool

2018-10-23 Thread Jian J Wang
o upper layer of code. Cc: Laszlo Ersek Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 23 +-- 1 file changed, 21 insertions(+), 2 dele

[edk2] [PATCH v3 2/6] MdeModulePkg: introduce UEFI freed-memory guard bit in HeapGuard PCD

2018-10-23 Thread Jian J Wang
Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 6 ++ MdeModulePkg/MdeModulePkg.uni | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-)

[edk2] [PATCH v3 5/6] MdeModulePkg/Core: prevent re-acquire GCD memory lock

2018-10-23 Thread Jian J Wang
CoreAllocatePoolI() => CoreAllocatePoolPagesI() => CoreAllocatePoolPages() => FindFreePages() => PromoteMemoryResource() => CoreAcquireGcdMemoryLock() ** Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.

[edk2] [PATCH v3 6/6] MdeModulePkg/Core: add freed-memory guard feature

2018-10-23 Thread Jian J Wang
s back into the memory map. Now the number can stay at around 510. Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/Hea

[edk2] [PATCH v4 1/6] MdeModulePkg: cleanup Heap Guard pool/page type PCD documentation

2018-10-25 Thread Jian J Wang
BIT4 of PcdHeapGuardPropertyMask. Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 4 MdeModulePkg/MdeModulePkg.uni | 2 ++ 2 files changed, 6 in

[edk2] [PATCH v4 0/6] Introduce freed-memory guard feature

2018-10-25 Thread Jian J Wang
> v4 changes: > Updated per comments from Star. Please refer to individual patch > file for details (#2/5/6) Freed-memory guard is a new feauture used to detect UAF (Use-After-Free) memory issue. Tests: a. Feature basic unit/functionality test b. OVMF regression test Jian

[edk2] [PATCH v4 2/6] MdeModulePkg: introduce UEFI freed-memory guard bit in HeapGuard PCD

2018-10-25 Thread Jian J Wang
Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 16 MdeModulePkg/MdeModulePkg.uni | 14 ++ 2 files changed, 22 insertions(+), 8 deletions(-) d

[edk2] [PATCH v4 3/6] UefiCpuPkg/CpuDxe: consider freed-memory guard in non-stop mode

2018-10-25 Thread Jian J Wang
is for UEFI-only. This patch only updates HEAP_GUARD_NONSTOP_MODE in "UefiCpuPkg/CpuDxe/CpuDxe.h" (add BIT4). Cc: Eric Dong Cc: Laszlo Ersek Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang

[edk2] [PATCH v4 6/6] MdeModulePkg/Core: add freed-memory guard feature

2018-10-25 Thread Jian J Wang
Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 409 +- MdeModulePkg/Core/Dxe/Mem/HeapGuard.h | 65 +++- MdeModulePkg/Core/Dxe/Mem/Page.c | 42 ++- MdeModulePkg/Core/Dxe/Mem/Pool.c | 23 +-

[edk2] [PATCH v4 5/6] MdeModulePkg/Core: prevent re-acquire GCD memory lock

2018-10-25 Thread Jian J Wang
=> CoreAllocatePoolPages() => FindFreePages() => PromoteMemoryResource() => CoreAcquireGcdMemoryLock() ** Cc: Star Zeng Cc: Michael D Kinney Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang ---

[edk2] [PATCH v4 4/6] UefiCpuPkg/CpuDxe: prevent recursive calling of InitializePageTablePool

2018-10-25 Thread Jian J Wang
n Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c ind

[edk2] [PATCH] MdeModulePkg/Core: fix an IA32 build failure

2018-10-25 Thread Jian J Wang
: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c index 449a022658..521e0d7b2a 100644 --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c +++ b

[edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: optimize TLB flush operation

2018-10-26 Thread Jian J Wang
Tests: a. Verified that issue in BZ#1281 is gone b. Verified SMM heap guard works well on any processor c. OVMF boot (Fedora26, Ubuntu18.04, Windows 10) Cc: Eric Dong Cc: Laszlo Ersek Cc: Jiewen Yao Cc: Star Zeng Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-

[edk2] [PATCH] MdeModulePkg/Core: correct one coding style

2018-10-26 Thread Jian J Wang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1284 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Cc: Dandan Bi Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/Hea

[edk2] [PATCH] MdeModulePkg/Core: fix an issue of potential NULL pointer access

2018-10-29 Thread Jian J Wang
Entry); Tests: Pass build and boot to shell. Cc: Hao Wu Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModu

[edk2] [PATCH 0/2] fix ineffective guard page issue

2018-11-02 Thread Jian J Wang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1295 Jian J Wang (2): MdeModulePkg/Core: fill logic hole in MemoryProtectionCpuArchProtocolNotify MdeModulePkg/Core: fix ineffective guard page issue MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 44 +-- 1

[edk2] [PATCH 2/2] MdeModulePkg/Core: fix ineffective guard page issue

2018-11-02 Thread Jian J Wang
ent handler, the related PCDs like PcdImageProtectionPolicy and PcdDxeNxMemoryProtectionPolicy will be checked again to do its job. Cc: Star Zeng Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModuleP

[edk2] [PATCH 1/2] MdeModulePkg/Core: fill logic hole in MemoryProtectionCpuArchProtocolNotify

2018-11-02 Thread Jian J Wang
1030: return; Cc: Star Zeng Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 42 +-- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/M

[edk2] [PATCH v2 0/2] *fix ineffective guard page issue

2018-11-06 Thread Jian J Wang
>v2: re-generate the patch per Leif's comments REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1295 Cc: Star Zeng Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Jian J Wang (2): MdeModulePkg/Co

[edk2] [PATCH v2 2/2] MdeModulePkg/Core: fix ineffective guard page issue

2018-11-06 Thread Jian J Wang
ributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 36 +-- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/

[edk2] [PATCH v2 1/2] MdeModulePkg/Core: fill logic hole in MemoryProtectionCpuArchProtocolNotify

2018-11-06 Thread Jian J Wang
o make sure the resource is freed before exit. 1029: CoreCloseEvent (Event); 1030: return; Cc: Star Zeng Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.

[edk2] [PATCH v3 0/2] fix ineffective guard page issue

2018-11-06 Thread Jian J Wang
>v3: found and fixed another memory leak REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1295 Cc: Star Zeng Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Jian J Wang (2): MdeModulePkg/Core: fill lo

[edk2] [PATCH v3 1/2] MdeModulePkg/Core: fill logic hole in MemoryProtectionCpuArchProtocolNotify

2018-11-06 Thread Jian J Wang
yu Ni Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModul

[edk2] [PATCH v3 2/2] MdeModulePkg/Core: fix ineffective guard page issue

2018-11-06 Thread Jian J Wang
otify event handler, the related PCDs like PcdImageProtectionPolicy and PcdDxeNxMemoryProtectionPolicy will be checked again before doing related jobs. Cc: Star Zeng Cc: Jiewen Yao Cc: Ruiyu Ni Cc: Leif Lindholm Contributed-under: TianoCore Contribution Agreement 1.1 Signed-

[edk2] [PATCH 2/4] UefiCpuPkg/CpuExceptionHandlerLib: Setup single step in #PF handler

2018-08-19 Thread Jian J Wang
returns back to the instruction causing #PF and re-execute it. This is an necessary step to implement non-stop mode for Heap Guard and NULL Pointer Detection feature. Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang

[edk2] [PATCH 4/4] UefiCpuPkg/PiSmmCpuDxeSmm: implement non-stop mode for SMM

2018-08-19 Thread Jian J Wang
Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 43 +++-- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiException.nasm | 3 +- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 60 +++- UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h

[edk2] [PATCH 0/4] Support non-stop mode in heap guard and null detection

2018-08-19 Thread Jian J Wang
resent'. Usage: The non-stop mode is enabled/disabled by BIT6 of following PCDs gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask The default setting is 'disable'. BZ Tracker: https://bugzilla.tianocore.or

[edk2] [PATCH 1/4] MdeModulePkg/MdeModulePkg.dec: add new settings for PCDs

2018-08-19 Thread Jian J Wang
to both UEFI and SMM NULL Pointer Detection, if any of them is enabled. Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[edk2] [PATCH v2 0/4] Support non-stop mode in heap guard and null detection

2018-08-20 Thread Jian J Wang
27;disable'. BZ Tracker: https://bugzilla.tianocore.org/show_bug.cgi?id=1095 OS Boot Validation: Platform: OVMF OS (x64): Fedora 26, Ubuntu 18.04, Windows 10, Windows 7 Jian J Wang (4): MdeModulePkg/MdeModulePkg.dec: add new settings for PCDs UefiCpuPkg/CpuExceptionHandlerLib: Setup single ste

[edk2] [PATCH v2 1/4] MdeModulePkg/MdeModulePkg.dec: add new settings for PCDs

2018-08-20 Thread Jian J Wang
ointer Detection feature. It applies to both UEFI and SMM NULL Pointer Detection, if any of them is enabled. Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 4 +++- 1 file chan

[edk2] [PATCH v2 3/4] UefiCpuPkg/CpuDxe: implement non-stop mode for uefi

2018-08-20 Thread Jian J Wang
Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuDxe.h | 39 ++ UefiCpuPkg/CpuDxe/CpuDxe.inf | 3 + UefiCpuPkg/CpuDxe/CpuMp.c| 34 - UefiCpuPkg/CpuDxe/CpuPageTable.c | 271 ++

[edk2] [PATCH v2 2/4] UefiCpuPkg/CpuExceptionHandlerLib: Setup single step in #PF handler

2018-08-20 Thread Jian J Wang
triggered once the cpu control returns back to the instruction causing #PF and re-execute it. This is an necessary step to implement non-stop mode for Heap Guard and NULL Pointer Detection feature. Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.

[edk2] [PATCH] UefiCpuPkg/CpuDxe: change level of DEBUG message

2018-08-28 Thread Jian J Wang
Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuDxe.c | 2 +- UefiCpuPkg/CpuDxe/CpuPageTable.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c

[edk2] [PATCH] MdeModulePkg/MdeModulePkg.uni: update PCD string per dec file change

2018-08-30 Thread Jian J Wang
Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.uni | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni index 080b8a62c0..8807af801e 100644 --- a/MdeModulePkg/MdeModulePkg.uni +++ b/MdeModulePkg

[edk2] [PATCH 0/4] Add PEI Stack Guard feature

2018-09-02 Thread Jian J Wang
://bugzilla.tianocore.org/show_bug.cgi?id=1137 Jian J Wang (4): MdeModulePkg/DxeIpl: disable paging before creating new page table UefiCpuPkg/CpuExceptionHandlerLib: support stack switch for PEI exceptions UefiCpuPkg/MpInitLib: fix register restore issue in AP wakeup UefiCpuPkg/CpuMpPei

[edk2] [PATCH 3/4] UefiCpuPkg/MpInitLib: fix register restore issue in AP wakeup

2018-09-02 Thread Jian J Wang
: "Ware, Ryan R" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpL

[edk2] [PATCH 2/4] UefiCpuPkg/CpuExceptionHandlerLib: support stack switch for PEI exceptions

2018-09-02 Thread Jian J Wang
: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Cc: Jiewen Yao Cc: Star Zeng Cc: "Ware, Ryan R" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../CpuExceptionHandlerLib/PeiCpuException.c | 27 +- .../PeiCpuExceptionHand

[edk2] [PATCH 4/4] UefiCpuPkg/CpuMpPei: support stack guard feature

2018-09-02 Thread Jian J Wang
TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuMpPei/CpuMpPei.c | 269 - UefiCpuPkg/CpuMpPei/CpuMpPei.h | 14 + UefiCpuPkg/CpuMpPei/CpuMpPei.inf | 11 +- UefiCpuPkg/CpuMpPei/CpuPaging.c | 637 +++ 4 files ch

[edk2] [PATCH 1/4] MdeModulePkg/DxeIpl: disable paging before creating new page table

2018-09-02 Thread Jian J Wang
conflict. There's no such issue for 64-bit PEI so this change applies only to 32-bit code. Cc: Star Zeng Cc: Ruiyu Ni Cc: Jiewen Yao Cc: "Ware, Ryan R" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/DxeIplPeim/Ia32/Dxe

[edk2] [PATCH] UefiCpuPkg/CpuDxe: fix ECC reported issues

2018-09-07 Thread Jian J Wang
There're two parameters which have different name in comment and prototype. Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuDxe.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/C

[edk2] [PATCH] UefiCpuPkg/CpuDxe: fix an incorrect bit-wise operation

2018-09-07 Thread Jian J Wang
The left operand is 64-bit but right operand could be 32-bit. A typecast is a must because of '~' op before it. Cc: Hao A Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuPageTable.c | 2 +- 1 file changed, 1 inser

[edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error

2018-09-09 Thread Jian J Wang
tform developer about it. Cc: Star Zeng Cc: Benjamin You Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3

[edk2] [PATCH] UefiCpuPkg/CpuMpPei: suppress compiler complaining

2018-09-10 Thread Jian J Wang
BZ#: https://bugzilla.tianocore.org/show_bug.cgi?id=1166 Cc: Dandan Bi Cc: Hao A Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuMpPei/CpuPaging.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git

[edk2] [PATCH 1/5] MdeModulePkg/DxeIplPeim: expire the use of PcdSetNxForStack

2018-09-10 Thread Jian J Wang
PcdDxeNxMemoryProtectionPolicy is set, the DxeIpl will set NX bit in page table entries mapping the stack memory. Cc: Star Zeng Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Ruiyu Ni Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core

[edk2] [PATCH 2/5] OvmfPkg/PlatformPei: expire the use of PcdSetNxForStack

2018-09-10 Thread Jian J Wang
usten Cc: Ard Biesheuvel Cc: Ruiyu Ni Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- OvmfPkg/PlatformPei/Platform.c | 1 - OvmfPkg/PlatformPei/PlatformPei.inf | 1 - 2 files changed, 2 deletions(-) diff --git a/OvmfPkg/Platfo

[edk2] [PATCH 3/5] OvmfPkg: expire the use of PcdSetNxForStack

2018-09-10 Thread Jian J Wang
-off-by: Jian J Wang --- OvmfPkg/OvmfPkgIa32.dsc| 1 - OvmfPkg/OvmfPkgIa32X64.dsc | 1 - OvmfPkg/OvmfPkgX64.dsc | 1 - 3 files changed, 3 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 9f07e75050..1eaefbfd6e 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b

[edk2] [PATCH 4/5] ArmVirtPkg/ArmVirt.dsc.inc: expire the use of PcdSetNxForStack

2018-09-10 Thread Jian J Wang
-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- ArmVirtPkg/ArmVirt.dsc.inc | 5 - 1 file changed, 5 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 70a0ac4d78..d87ae5a32d 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg

[edk2] [PATCH 0/5] expire the use of PcdSetNxForStack

2018-09-10 Thread Jian J Wang
PcdDxeNxMemoryProtectionPolicy is set, the DxeIpl will set NX bit in page table entries mapping the stack memory. Jian J Wang (5): MdeModulePkg/DxeIplPeim: expire the use of PcdSetNxForStack OvmfPkg/PlatformPei: expire the use of PcdSetNxForStack OvmfPkg: expire the use of PcdSetNxForStack

[edk2] [PATCH 5/5] MdeModulePkg: expire PcdSetNxForStack

2018-09-10 Thread Jian J Wang
PcdDxeNxMemoryProtectionPolicy if NX protection is needed for stack. Cc: Star Zeng Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Ruiyu Ni Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 10 +- MdeModulePkg

[edk2] [PATCH] MdeModulePkg/DxeIpl: support more NX related PCDs

2018-09-13 Thread Jian J Wang
ution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 2 + MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 +- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 55 +++- MdeModulePkg/Core/DxeIplPeim/X64/Virtu

[edk2] [PATCH V2 0/2] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error

2018-09-14 Thread Jian J Wang
strong binding between them. This patch series try to fix this problem by a useful message. Jian J Wang (2): UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into else block UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 18 -- 1 fi

[edk2] [PATCH v2 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: move InitSmmS3Cr3() into else block

2018-09-14 Thread Jian J Wang
Cc: Star Zeng Cc: Benjamin You Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Cp

[edk2] [PATCH v2 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: add message for S3 config error

2018-09-14 Thread Jian J Wang
't embody this strong binding between them. An error message and CpuDeadLoop are added in this patch to warn platform developer about it. Cc: Star Zeng Cc: Benjamin You Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang -

[edk2] [PATCH v2] UefiCpuPkg/CpuMpPei: fix vs2012 build error

2018-09-18 Thread Jian J Wang
k Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuMpPei/CpuPaging.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UefiCpuPkg/CpuMpPei/CpuPaging.c b/UefiCpuPkg/CpuMpPei/CpuPaging.c index bcb942a8e5..c7e0822452 100644 --- a/UefiCpuPkg/CpuMpP

[edk2] [PATCH] UefiCpuPkg/CpuMpPei: fix unsafe way to get stack pointer

2018-09-18 Thread Jian J Wang
-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuMpPei/CpuMpPei.h | 8 UefiCpuPkg/CpuMpPei/CpuPaging.c | 9 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h b/UefiCpuPkg/CpuMpPei/CpuMpPei.h index

[edk2] [PATCH v2 0/2] clarify NXE enabling logic

2018-09-19 Thread Jian J Wang
(IA32/X64) c. boot to fedora26, ubuntu18.04, windows 7 and windows 10 on OVMF emulated platform (X64) Cc: Star Zeng Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Ruiyu Ni Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang Jian J Wang (2): MdeMod

[edk2] [PATCH v2 2/2] MdeModulePkg/DxeIpl: support more NX related PCDs

2018-09-19 Thread Jian J Wang
d. Cc: Star Zeng Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Ruiyu Ni Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 2 ++ MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 ++-- MdeMo

[edk2] [PATCH v2 1/2] MdeModulePkg/MdeModulePkg.dec/.uni: clarify PCDs usage

2018-09-19 Thread Jian J Wang
well as to clear BIT4 of PcdDxeNxMemoryProtectionPolicy. Cc: Star Zeng Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Ruiyu Ni Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 20 +++- MdeModulePkg/

[edk2] [PATCH 1/2] UefiCpuPkg/CpuDxe: allow accessing (DXE) page table in SMM mode

2018-06-11 Thread Jian J Wang
Dong Cc: Laszlo Ersek Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/CpuDxe/CpuDxe.c | 2 +- UefiCpuPkg/CpuDxe/CpuDxe.inf | 1 + UefiCpuPkg/CpuDxe/CpuPageTable.c

[edk2] [PATCH 2/2] MdeModulePkg/Core: remove SMM check for Heap Guard feature detection

2018-06-11 Thread Jian J Wang
Star Zeng Cc: Eric Dong Cc: Jiewen Yao Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg

[edk2] [PATCH 0/2] fix DXE memory free issue in SMM mode

2018-06-11 Thread Jian J Wang
ation in a global variable and use it to access DXE page table if in SMM mode. Jian J Wang (2): UefiCpuPkg/CpuDxe: allow accessing (DXE) page table in SMM mode MdeModulePkg/Core: remove SMM check for Heap Guard feature detection MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 UefiCpuPkg/C

  1   2   3   4   >