From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ray.ni@intel.com) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Tue, 30 Jul 2019 23:03:07 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2019 23:03:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,328,1559545200"; d="scan'208";a="371387662" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 30 Jul 2019 23:03:05 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jul 2019 23:03:07 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 30 Jul 2019 23:03:06 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 30 Jul 2019 23:03:06 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.204]) with mapi id 14.03.0439.000; Wed, 31 Jul 2019 14:03:05 +0800 From: "Ni, Ray" To: "Zhang, Shenglei" , "devel@edk2.groups.io" , "edk2-devel@lists.01.org" CC: "Dong, Eric" , Laszlo Ersek Subject: Re: [PATCH 1/1] UefiCpuPkg/PiSmmCpuDxeSmm: Add check for pointer Pml5Entry Thread-Topic: [PATCH 1/1] UefiCpuPkg/PiSmmCpuDxeSmm: Add check for pointer Pml5Entry Thread-Index: AQHVR2S6TI6Ze3pgxEOfhLkBMVozz6bkPBUA Date: Wed, 31 Jul 2019 06:03:04 +0000 Deferred-Delivery: Wed, 31 Jul 2019 06:02:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C264F20@SHSMSX104.ccr.corp.intel.com> References: <20190731055630.14956-1-shenglei.zhang@intel.com> In-Reply-To: <20190731055630.14956-1-shenglei.zhang@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Zhang, Shenglei > Sent: Wednesday, July 31, 2019 1:57 PM > To: devel@edk2.groups.io; edk2-devel@lists.01.org > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek > Subject: [PATCH 1/1] UefiCpuPkg/PiSmmCpuDxeSmm: Add check for pointer > Pml5Entry >=20 > The pointer Pml5Entry, returned from call to function > AllocatePageTableMemory, may be null. > So add check for it. >=20 > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Signed-off-by: Shenglei Zhang > --- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > index a3b62f778741..d7af3b6d7941 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > @@ -375,6 +375,7 @@ SmmInitPageTable ( > // Fill PML5 entry > // > Pml5Entry =3D (UINT64*)AllocatePageTableMemory (1); > + ASSERT (Pml5Entry !=3D NULL); > *Pml5Entry =3D (UINTN) Pml4Entry | mAddressEncMask | > PAGE_ATTRIBUTE_BITS; > ZeroMem (Pml5Entry + 1, EFI_PAGE_SIZE - sizeof (*Pml5Entry)); > // > -- > 2.18.0.windows.1