From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 CBF9820945B6A for ; Mon, 11 Dec 2017 18:52:24 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2017 18:57:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,393,1508828400"; d="scan'208";a="157923314" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 11 Dec 2017 18:57:02 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 18:57:01 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 18:57:01 -0800 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; Tue, 12 Dec 2017 10:56:59 +0800 From: "Zeng, Star" To: "Wang, Jian J" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [edk2] [PATCH 0/2] Fix issues in Heap Guard Thread-Index: AQHTciMsFZWIEaE+bkeDRXy6cd5Hr6M/BVyw Date: Tue, 12 Dec 2017 02:56:59 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9C25AE@shsmsx102.ccr.corp.intel.com> References: <20171211015518.9404-1-jian.j.wang@intel.com> In-Reply-To: <20171211015518.9404-1-jian.j.wang@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 0/2] Fix issues in Heap Guard 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: Tue, 12 Dec 2017 02:52:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jian= J Wang Sent: Monday, December 11, 2017 9:55 AM To: edk2-devel@lists.01.org Subject: [edk2] [PATCH 0/2] Fix issues in Heap Guard One issue is that macros defined in HeapGuard.h GUARD_HEAP_TYPE_PAGE GUARD_HEAP_TYPE_POOL doesn't match the definition of PCD PcdHeapGuardPropertyMask in MdeModulePk= g.dec. This patch fixed it by exchanging the BIT0 and BIT1 of them. Another is that method AdjustMemoryF() will return a bigger NumberOfPages t= han the value passed in. This is caused by counting twice of a shared Guard= page which can be used for both head and tail Guard of the memory before i= t and after it. This happens only when partially freeing just one page in t= he middle of a bunch of allocated pages. The freed page should be turned in= to a new Guard page. Since the most part code of Heap Guard feature are almost the same, PiSmmCo= re and DxeCore have both above issues. This patch series fix them all. Jian J Wang (2): MdeModulePkg/DxeCore: Fix issues in Heap Guard MdeModulePkg/PiSmmCore: Fix issues in Heap Guard MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 93 ++++++++++++++++++++++++++---= ---- MdeModulePkg/Core/Dxe/Mem/HeapGuard.h | 4 +- MdeModulePkg/Core/Dxe/Mem/Page.c | 15 +++--- MdeModulePkg/Core/Dxe/Mem/Pool.c | 4 +- MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 91 ++++++++++++++++++++++++++---= --- MdeModulePkg/Core/PiSmmCore/HeapGuard.h | 4 +- 6 files changed, 164 insertions(+), 47 deletions(-) -- 2.15.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel