From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: chasel.chiu@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Fri, 30 Aug 2019 05:40:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2019 05:40:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,447,1559545200"; d="scan'208";a="332847373" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by orsmga004.jf.intel.com with ESMTP; 30 Aug 2019 05:40:00 -0700 Received: from pgsmsx106.gar.corp.intel.com (10.221.44.98) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 30 Aug 2019 20:39:59 +0800 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.22]) by PGSMSX106.gar.corp.intel.com ([169.254.9.10]) with mapi id 14.03.0439.000; Fri, 30 Aug 2019 20:39:59 +0800 From: "Chiu, Chasel" To: "Kubacki, Michael A" , "devel@edk2.groups.io" , "Desimone, Nathaniel L" CC: "Chaganty, Rangasai V" Subject: Re: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem () Thread-Topic: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed ZeroMem () Thread-Index: AQHVXr2RCXlGlARLf0iIOLNq3J3ZqKcSO88AgAFmqfA= Date: Fri, 30 Aug 2019 12:39:59 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC5047D438@PGSMSX111.gar.corp.intel.com> References: <20190829230012.30756-1-nathaniel.l.desimone@intel.com> <49AB4ACB9627B8468F29D589A27B745588A93349@ORSMSX121.amr.corp.intel.com> In-Reply-To: <49AB4ACB9627B8468F29D589A27B745588A93349@ORSMSX121.amr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGZlOTYyYjMtYTFkYy00MjRmLTgxOGMtMTNmZTQxNDllZjYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRUFVeHFRNWNSZFNCV2REZityZVVsZ3c2YVR2WnorSFdtdFdGaVM1R0swRmVNb2JtNyt5Y1N0a21xbGJ0akJNRiJ9 x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.205] MIME-Version: 1.0 Return-Path: chasel.chiu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chasel Chiu > -----Original Message----- > From: Kubacki, Michael A > Sent: Friday, August 30, 2019 7:16 AM > To: devel@edk2.groups.io; Desimone, Nathaniel L > > Cc: Chiu, Chasel ; Chaganty, Rangasai V > > Subject: RE: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed > ZeroMem () >=20 > In the future, the subject should include [edk2-platforms] for patches i= n the > repo. >=20 > Reviewed-by: Michael Kubacki >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Nate > > DeSimone > > Sent: Thursday, August 29, 2019 4:00 PM > > To: devel@edk2.groups.io > > Cc: Chiu, Chasel ; Kubacki, Michael A > > ; Chaganty, Rangasai V > > > > Subject: [edk2-devel] [PATCH] CoffeelakeSiliconPkg: Add a needed > > ZeroMem () > > > > AddComponentConfigBlocks () should ZeroMem () the Config Block Header > > before using it. > > > > Cc: Chasel Chiu > > Cc: Michael Kubacki > > Cc: Sai Chaganty > > Signed-off-by: Nate DeSimone > > --- > > .../Library/BaseSiConfigBlockLib/BaseSiConfigBlockLib.c | 1 = + > > 1 file changed, 1 insertion(+) > > > > diff --git > > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base > > SiCon > > figBlockLib.c > > b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base > > SiCon > > figBlockLib.c > > index 16a14b3245..3c02a4563c 100644 > > --- > > a/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base > > SiCon > > figBlockLib.c > > +++ > > b/Silicon/Intel/CoffeelakeSiliconPkg/Library/BaseSiConfigBlockLib/Base > > SiCon > > figBlockLib.c > > @@ -75,6 +75,7 @@ AddComponentConfigBlocks ( > > // Loop to identify each config block from ComponentBlocks[] Table > > and add each of them > > // > > for (BlockCount =3D 0 ; BlockCount < TotalBlockCount; BlockCount++)= { > > + ZeroMem (&ConfigBlockBuf, sizeof (CONFIG_BLOCK)); > > CopyMem (&(ConfigBlockBuf.Header.GuidHob.Name), > > ComponentBlocks[BlockCount].Guid, sizeof (EFI_GUID)); > > ConfigBlockBuf.Header.GuidHob.Header.HobLength =3D > > ComponentBlocks[BlockCount].Size; > > ConfigBlockBuf.Header.Revision =3D > > ComponentBlocks[BlockCount].Revision; > > -- > > 2.17.1.windows.2 > > > > > >=20