From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.1206.1572573575479202235 for ; Thu, 31 Oct 2019 18:59:35 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: dandan.bi@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2019 18:59:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,253,1569308400"; d="scan'208";a="212651986" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 31 Oct 2019 18:59:34 -0700 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.439.0; Thu, 31 Oct 2019 18:59:34 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by shsmsx102.ccr.corp.intel.com ([169.254.2.108]) with mapi id 14.03.0439.000; Fri, 1 Nov 2019 09:59:32 +0800 From: "Dandan Bi" To: "Zhang, Shenglei" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [PATCH v2 3/3] MdeModulePkg/Mem: Initialize the variable MapMemory Thread-Topic: [PATCH v2 3/3] MdeModulePkg/Mem: Initialize the variable MapMemory Thread-Index: AQHVjyuKVJdEb9xG0EeWW1DbZM5xoad1kX6Q Date: Fri, 1 Nov 2019 01:59:31 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40C942FD@SHSMSX104.ccr.corp.intel.com> References: <20191030140830.31156-1-shenglei.zhang@intel.com> <20191030140830.31156-4-shenglei.zhang@intel.com> In-Reply-To: <20191030140830.31156-4-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: Zhang, Shenglei > Sent: Wednesday, October 30, 2019 10:09 PM > To: devel@edk2.groups.io > Cc: Bi, Dandan ; Gao, Liming > Subject: [PATCH v2 3/3] MdeModulePkg/Mem: Initialize the variable > MapMemory >=20 > MapMemory is not initialized by FindGuardedMemoryMap or > CoreInternalAllocatePages which calls MapMemory. > So we give a 0 to it. >=20 > Cc: Dandan Bi > Cc: Liming Gao > Signed-off-by: Shenglei Zhang > --- > MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > index 9477b94044ba..b4cb48843fb7 100644 > --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c > @@ -225,6 +225,8 @@ FindGuardedMemoryMap ( > UINTN BitsToUnitEnd; > EFI_STATUS Status; >=20 > + MapMemory =3D 0; > + > // > // Adjust current map table depth according to the address to access > // > -- > 2.18.0.windows.1