From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.3932.1581585557640122159 for ; Thu, 13 Feb 2020 01:19:17 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: liming.gao@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 orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2020 01:19:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,436,1574150400"; d="scan'208";a="252224287" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 13 Feb 2020 01:19:16 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 13 Feb 2020 01:19:16 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 13 Feb 2020 17:18:59 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Thu, 13 Feb 2020 17:18:59 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "newexplorerj@gmail.com" Subject: Re: [edk2-devel] [PATCH 1/3] FmpDevicePkg/FmpDxe: Issues reported by ECC in EDK2. Thread-Topic: [edk2-devel] [PATCH 1/3] FmpDevicePkg/FmpDxe: Issues reported by ECC in EDK2. Thread-Index: AQHV4khjSIcwsDWFnEKB0RLdZp41bqgY2J3Q Date: Thu, 13 Feb 2020 09:18:59 +0000 Message-ID: <0c44d61de4d84f3ab35a5207e3f87bcb@intel.com> References: <16ebd7982dcfc25c46bf933384bfcdb5f711e9a2.1581494371.git.newexplorerj@gmail.com> In-Reply-To: <16ebd7982dcfc25c46bf933384bfcdb5f711e9a2.1581494371.git.newexplorerj@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of GuoMinJ > Sent: Thursday, February 13, 2020 4:34 PM > To: devel@edk2.groups.io > Cc: GuoMinJ > Subject: [edk2-devel] [PATCH 1/3] FmpDevicePkg/FmpDxe: Issues reported b= y ECC in EDK2. >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2515 >=20 > Change the FmpDevicePkg to match the ECC check rule >=20 > Signed-off-by: GuoMinJ > --- > FmpDevicePkg/FmpDxe/Dependency.c | 4 ++-- > FmpDevicePkg/FmpDxe/Dependency.h | 2 +- > FmpDevicePkg/FmpDxe/FmpDxe.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/FmpDevicePkg/FmpDxe/Dependency.c b/FmpDevicePkg/FmpDxe/Depe= ndency.c > index b63a36b989..8f97c42916 100644 > --- a/FmpDevicePkg/FmpDxe/Dependency.c > +++ b/FmpDevicePkg/FmpDxe/Dependency.c > @@ -163,8 +163,8 @@ Push ( > /** > Pop an element from the stack. >=20 > - @param[in] Value Element to pop. > - @param[in] Type Type of element. > + @param[out] Element Element to pop. > + @param[in] Type Type of element. >=20 > @retval EFI_SUCCESS The value was popped onto the stack. > @retval EFI_ACCESS_DENIED The pop operation underflowed the stac= k. > diff --git a/FmpDevicePkg/FmpDxe/Dependency.h b/FmpDevicePkg/FmpDxe/Depe= ndency.h > index a2aaaceeae..badd2542d6 100644 > --- a/FmpDevicePkg/FmpDxe/Dependency.h > +++ b/FmpDevicePkg/FmpDxe/Dependency.h > @@ -56,7 +56,7 @@ EvaluateImageDependencies ( > IN CONST EFI_GUID ImageTypeId, > IN CONST UINT32 Version, > IN CONST EFI_FIRMWARE_IMAGE_DEP *Dependencies, > - IN CONST UINT32 DependenciesSize, > + IN CONST UINT32 DepexSize, > OUT BOOLEAN *IsSatisfied > ); >=20 > diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c > index aa92331966..5b523291e4 100644 > --- a/FmpDevicePkg/FmpDxe/FmpDxe.c > +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c > @@ -413,7 +413,7 @@ PopulateDescriptor ( > } > if (!EFI_ERROR (Status) && Image !=3D NULL) { > IsDepexValid =3D ValidateImageDepex ((EFI_FIRMWARE_IMAGE_DEP *) I= mage, ImageSize, &DepexSize); > - if (IsDepexValid =3D=3D TRUE) { > + if (IsDepexValid) { > Private->Descriptor.Dependencies =3D AllocatePool (DepexSize); > if (Private->Descriptor.Dependencies !=3D NULL) { > CopyMem (Private->Descriptor.Dependencies->Dependencies, Imag= e, DepexSize); > -- > 2.17.1 >=20 >=20 >=20