From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 D0D7E21C913BC for ; Sun, 19 Nov 2017 19:03:01 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2017 19:07:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,424,1505804400"; d="scan'208";a="178249586" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 19 Nov 2017 19:07:14 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 19 Nov 2017 19:07:14 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 19 Nov 2017 19:07:13 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.213]) with mapi id 14.03.0319.002; Mon, 20 Nov 2017 11:07:12 +0800 From: "Wu, Hao A" To: "Zeng, Star" , "Wang, Jian J" , "edk2-devel@lists.01.org" CC: "Dong, Eric" Thread-Topic: [PATCH] MdeModulePkg/PiSmmCore: Fix an assert issue in pool free Thread-Index: AQHTYak8DRRtFSIVYkW3t+m1/gWmMaMcDCiAgACJjfA= Date: Mon, 20 Nov 2017 03:07:11 +0000 Message-ID: References: <20171120024226.16280-1-jian.j.wang@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9B81E2@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B9B81E2@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] MdeModulePkg/PiSmmCore: Fix an assert issue in pool free 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: Mon, 20 Nov 2017 03:03:02 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Tested-by: Hao Wu Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: Zeng, Star > Sent: Monday, November 20, 2017 10:54 AM > To: Wang, Jian J; edk2-devel@lists.01.org > Cc: Dong, Eric; Wu, Hao A; Zeng, Star > Subject: RE: [PATCH] MdeModulePkg/PiSmmCore: Fix an assert issue in pool > free >=20 > Reviewed-by: Star Zeng >=20 > By the way, could you add comments in the commit log to say which commit = is > causing this issue? >=20 > Thanks, > Star > -----Original Message----- > From: Wang, Jian J > Sent: Monday, November 20, 2017 10:42 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Dong, Eric ; W= u, > Hao A > Subject: [PATCH] MdeModulePkg/PiSmmCore: Fix an assert issue in pool free >=20 > This issue is caused by assigning incorrect value to PoolHdr.Size if the = requested > size is more than MAX_POOL_SIZE, because the SMM core will actually > allocate page memory instead of pool memory in this situation. >=20 > Cc: Star Zeng > Cc: Eric Dong > Cc: Wu Hao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jian J Wang > --- > MdeModulePkg/Core/PiSmmCore/Pool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c > b/MdeModulePkg/Core/PiSmmCore/Pool.c > index e77caa8853..e98ce01b0f 100644 > --- a/MdeModulePkg/Core/PiSmmCore/Pool.c > +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c > @@ -287,7 +287,7 @@ SmmInternalAllocatePool ( >=20 > PoolHdr =3D (POOL_HEADER*)(UINTN)Address; > PoolHdr->Signature =3D POOL_HEAD_SIGNATURE; > - PoolHdr->Size =3D Size; > + PoolHdr->Size =3D EFI_PAGES_TO_SIZE (NoPages); > PoolHdr->Available =3D FALSE; > PoolHdr->Type =3D PoolType; >=20 > -- > 2.14.1.windows.1