Re: [edk2] [PATCH 2/5] MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM mode

2017-10-12 Thread Wang, Jian J
Ok. I'll change it to follow required coding style. Thanks for catching it. > -Original Message- > From: Dong, Eric > Sent: Friday, October 13, 2017 9:27 AM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen ; > Kinney, Michael D ; Wolman, Ayellet > > Subject: RE:

Re: [edk2] [PATCH 2/5] MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM mode

2017-10-12 Thread Dong, Eric
Hi Jian, I think below code not follow EDKII coding style, EDKII requires definition and assignment in different code. + UINTN LevelShift[GUARDED_HEAP_MAP_TABLE_DEPTH] += GUARDED_HEAP_MAP_TABLE_DEPTH_SHIFTS; + UINTN LevelMask[GUAR

[edk2] [PATCH 2/5] MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM mode

2017-10-10 Thread Jian J Wang
This feature makes use of paging mechanism to add a hidden (not present) page just before and after the allocated memory block. If the code tries to access memory outside of the allocated part, page fault exception will be triggered. This feature is controlled by three PCDs: gEfiMdeModulePkgT