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.20; helo=mga02.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 A970920349D80 for ; Sun, 19 Nov 2017 19:17:04 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2017 19:21:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,424,1505804400"; d="scan'208";a="178253825" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 19 Nov 2017 19:21:17 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 19 Nov 2017 19:21:17 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Mon, 20 Nov 2017 11:21:14 +0800 From: "Wang, Jian J" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Wu, Hao A" Thread-Topic: [PATCH] MdeModulePkg/PiSmmCore: Fix an assert issue in pool free Thread-Index: AQHTYak8B6zDJo+Gk06k0fB5YTYeEqMckfdAgAAH4OA= Date: Mon, 20 Nov 2017 03:21:13 +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: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWZlZTBlMzAtN2Y5My00NDA0LTk5ZDItYjU2ZjA3ZDAxNjBmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJRSHVXOWdqdTJhVW5HcGRUNmNyMnRYQUNuYzJ6dlllQWdCdWQ1RlNUSUw1XC9xWGcySFQrR2FhVHlcLzBGb084OXIifQ== x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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:17:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sure. Thanks for reminding. > -----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 ; Zen= g, > 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 alloc= ate > 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