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.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 8FDC4210D6CC0 for ; Fri, 1 Jun 2018 07:35:25 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 07:35:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,467,1520924400"; d="scan'208";a="46527745" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 01 Jun 2018 07:35:24 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 1 Jun 2018 07:35:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 1 Jun 2018 07:35:24 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.87]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Fri, 1 Jun 2018 22:35:22 +0800 From: "Gao, Liming" To: Marcin Wojtas , "edk2-devel@lists.01.org" CC: "Tian, Feng" , "Kinney, Michael D" , "leif.lindholm@linaro.org" , "ard.biesheuvel@linaro.org" , "jsd@semihalf.com" Thread-Topic: [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV Thread-Index: AQHT+bCk4c5UBqFsmUSLn/PBkaXh4aRLd77w Date: Fri, 1 Jun 2018 14:35:22 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E291B6D@SHSMSX104.ccr.corp.intel.com> References: <1527861493-17332-1-git-send-email-mw@semihalf.com> In-Reply-To: <1527861493-17332-1-git-send-email-mw@semihalf.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmY2NmMyNmYtMjRlMy00MzlmLWExMzQtMmZlNjM0YTY2NGIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaERRN1JkVENWK3hYbXhGNmNIUTRiNkViZkdcL2JBcFB5WGJcL0lVTnYrR1h1SWR4WG9YRm9vTzh5eG1Hc0NKZDY2In0= dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 14:35:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I agree to add this checker.=20 Reviewed-by: Liming Gao > -----Original Message----- > From: Marcin Wojtas [mailto:mw@semihalf.com] > Sent: Friday, June 1, 2018 9:58 PM > To: edk2-devel@lists.01.org > Cc: Tian, Feng ; Kinney, Michael D ; Gao, Liming ; > leif.lindholm@linaro.org; ard.biesheuvel@linaro.org; jsd@semihalf.com; Ma= rcin Wojtas > Subject: [PATCH] MdeModulePkg PeiCore: Check error status when processing= boot FV >=20 > Until now the possible errors returned from processing > boot firmware volume were not checked, which could cause > misbehavior in further booting stages. Add relevant assert. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas > Signed-off-by: Jan Dabros > --- > MdeModulePkg/Core/Pei/FwVol/FwVol.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) >=20 > diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/= FwVol/FwVol.c > index 8009546..4150b33 100644 > --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c > +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c > @@ -495,12 +495,13 @@ PeiInitializeFv ( > // > // Get handle of BFV > // > - FvPpi->ProcessVolume ( > - FvPpi, > - SecCoreData->BootFirmwareVolumeBase, > - (UINTN)BfvHeader->FvLength, > - &FvHandle > - ); > + Status =3D FvPpi->ProcessVolume ( > + FvPpi, > + SecCoreData->BootFirmwareVolumeBase, > + (UINTN)BfvHeader->FvLength, > + &FvHandle > + ); > + ASSERT_EFI_ERROR (Status); >=20 > // > // Update internal PEI_CORE_FV array. > -- > 2.7.4