From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id ECD892034CF8C for ; Wed, 25 Oct 2017 23:49:08 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 25 Oct 2017 23:52:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,434,1503385200"; d="scan'208";a="167788540" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 25 Oct 2017 23:52:54 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Oct 2017 23:52:54 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Thu, 26 Oct 2017 14:52:52 +0800 From: "Zeng, Star" To: "Yao, Jiewen" , "Wang, Jian J" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Wolman, Ayellet" , "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH v3 0/6] Implement heap guard feature Thread-Index: AQHTS5j/dbGhw5MDTkSMRSbHQ7yiu6LzSUuAgAHmVwCAAIZu0A== Date: Thu, 26 Oct 2017 06:52:51 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9AE4A9@shsmsx102.ccr.corp.intel.com> References: <20171023005054.7528-1-jian.j.wang@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503AA04EF0@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503AA04EF0@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v3 0/6] Implement heap guard feature X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 06:49:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I suggest putting [3/6] at the first patch as it adds definitions that are = used by other patches. Thanks, Star -----Original Message----- From: Yao, Jiewen=20 Sent: Thursday, October 26, 2017 2:49 PM To: Wang, Jian J ; edk2-devel@lists.01.org Cc: Kinney, Michael D ; Wolman, Ayellet ; Dong, Eric ; Zeng, Star ; Yao, Jiewen Subject: RE: [edk2] [PATCH v3 0/6] Implement heap guard feature That is great work. Jian. Some suggestion for your consideration: 0) I suggest add Laszlo to review SMM part, and add Ruiyu to review SMM_MEM= ORY_ATTRIBUTE_PROTOCOL. 1) Would you please mention what test we have done for this feature? Such as OVMF/realPlatform? IA32/X64? Have you validated NT32? Or try to enable protection? :-) 2) Is that any dependency of this patch? I think there is OPENSSL wrapper reallocate() issue not resolved yet. I suggest we check in all dependent patch at first, then check in this one. 3) If you need submit V4, please separate MdeModulePkg/Include/Protocol/Smm= MemoryAttribute.h from 2/6 to be a standalone patch. In general, an interfa= ce and an implementation are separated. Thank you Yao Jiewen > -----Original Message----- > From: Wang, Jian J > Sent: Wednesday, October 25, 2017 9:48 AM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Wolman, Ayellet=20 > ; Yao, Jiewen ; Dong,=20 > Eric ; Zeng, Star > Subject: RE: [edk2] [PATCH v3 0/6] Implement heap guard feature >=20 > Hi, >=20 > Just a warm reminding. I didn't see any feedbacks on the v3 patch. > If no more comments, I'll check in the patch soon. >=20 > Thanks, > Jian >=20 > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf=20 > > Of Jian J Wang > > Sent: Monday, October 23, 2017 8:51 AM > > To: edk2-devel@lists.01.org > > Cc: Kinney, Michael D ; Wolman, Ayellet=20 > > ; Yao, Jiewen ;=20 > > Dong, Eric ; Zeng, Star > > Subject: [edk2] [PATCH v3 0/6] Implement heap guard feature > > > > > Patch V3 changes: > > > a. Add new protocol gEdkiiSmmMemoryAttributeProtocolGuid to do > > > memory attributes update instead of doing it directly in=20 > > > SmmCore b. Fix GCC build error > > > > > Patch V2 changes: > > > a. Remove local variable initializer with memory copy from globals=20 > > > b. Change map table dump code to use DEBUG_PAGE|DEBUG_POOL level > > > message > > > c. Fix malfunction in 32-bit boot mode d. Add comment for the use=20 > > > of mOnGuarding e. Change name of function InitializePageTableLib=20 > > > to > > > InitializePageTableGlobals > > > f. Add code in 32-bit code to bypass setting page table to=20 > > > read-only g. Coding style clean-up > > > > > > > This feature makes use of paging mechanism to add a hidden (not=20 > > present) page just before and after the allocated memory block. If=20 > > the code tries to access memory outside of the allocated part, page=20 > > fault exception will be triggered. > > > > This feature is disabled by default and is not recommended to enable=20 > > it in production build of BIOS. > > > > Cc: Star Zeng > > Cc: Eric Dong > > Cc: Jiewen Yao > > Cc: Michael Kinney > > Cc: Ayellet Wolman > > Suggested-by: Ayellet Wolman > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Jian J Wang > > > > Jian J Wang (6): > > MdeModulePkg/DxeCore: Implement heap guard feature for UEFI > > MdeModulePkg/PiSmmCore: Implement heap guard feature for SMM > mode > > MdeModulePkg/MdeModulePkg.dec,.uni: Add Protocol, PCDs and string > > tokens > > UefiCpuPkg/CpuDxe: Reduce debug message > > UefiCpuPkg/PiSmmCpuDxeSmm: Disable page table protection > > MdeModulePkg/DxeIpl: Enable paging for heap guard > > > > MdeModulePkg/Core/Dxe/DxeMain.inf | 4 + > > MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 1184 > > ++++++++++++++++ > > MdeModulePkg/Core/Dxe/Mem/HeapGuard.h | 380 > +++++ > > MdeModulePkg/Core/Dxe/Mem/Imem.h | 38 +- > > MdeModulePkg/Core/Dxe/Mem/Page.c | 130 +- > > MdeModulePkg/Core/Dxe/Mem/Pool.c | 154 +- > > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 1 + > > MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 29 +- > > MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 1469 > > ++++++++++++++++++++ > > MdeModulePkg/Core/PiSmmCore/HeapGuard.h | 399 > ++++++ > > MdeModulePkg/Core/PiSmmCore/Page.c | 51 +- > > MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 7 +- > > MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 81 +- > > MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 8 + > > MdeModulePkg/Core/PiSmmCore/Pool.c | 81 +- > > MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h | 136 ++ > > MdeModulePkg/MdeModulePkg.dec | 60 + > > MdeModulePkg/MdeModulePkg.uni | 58 + > > UefiCpuPkg/CpuDxe/CpuPageTable.c | 5 +- > > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 7 + > > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 20 + > > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 98 ++ > > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 2 + > > UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 163 > +++ > > UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 3 +- > > 25 files changed, 4472 insertions(+), 96 deletions(-) create mode=20 > > 100644 MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > > create mode 100644 MdeModulePkg/Core/Dxe/Mem/HeapGuard.h > > create mode 100644 MdeModulePkg/Core/PiSmmCore/HeapGuard.c > > create mode 100644 MdeModulePkg/Core/PiSmmCore/HeapGuard.h > > create mode 100644 > MdeModulePkg/Include/Protocol/SmmMemoryAttribute.h > > > > -- > > 2.14.1.windows.1 > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel