From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::232; helo=mail-io0-x232.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 28A59210E0FAC for ; Fri, 1 Jun 2018 07:00:16 -0700 (PDT) Received: by mail-io0-x232.google.com with SMTP id l19-v6so19999051ioj.5 for ; Fri, 01 Jun 2018 07:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XxoklFr0Bk7fPQm6HDi61LeXtmmZfRWA96dTt/IZuLE=; b=Ph/C8fKzN3k0qa2ABoOdyxrRgqNKLpJf6p5ZgPsZpw8+4hj6ZOLqlEsLr/nOzS8OUN 4N1U1NmRuitnAWrJEIa5no3HSNdqI3ZcSY1rTA4ZPIdhT7ZLc2ifVZInxY07ZcVWvvyX zCfD7Sq24mC91Q5oftJl2DgZiuPOn5NqzVWFM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XxoklFr0Bk7fPQm6HDi61LeXtmmZfRWA96dTt/IZuLE=; b=fBljcxr8bpP02m6Ilyh4nVZGYR+CWl2BtLev0QC0EO90+Nsxn0adGPGUHNi5IFdOJU Ga9I1LGq/fymUasSIi5q2bya2wVW+eJoXASOwKMzzBZFTJEbGRP1q5iTil8Fj9Ke9whu t9kemF/ZGLVpWEPGxSTX6nlkatJd7mmNbbwYEbTqZEkCGHg9ePK4W0SXCJ6rz0NHUL1v ZERsQ9gU3aRTJT0xTvymMhBN7PKGiX1udKz9OpUIHNsU1BHaA2AbEfB3xNsxpjedeDHo pxsQosF4KF59YTWpQ78Qxjl/k+ccJXGV/GgxGuzRyim/M3ga/gRLVJB5KpOF4hVMmKdE KtvA== X-Gm-Message-State: APt69E0C8lECXu8y0uHwvDql8WwPWQxO8u//GH4JgMAEtUJCXB7UV8z0 EdjmEDTkvP/MlzOtBniTq60wepLvWGcVWITTMGqVHw== X-Google-Smtp-Source: ADUXVKK2MkN754w+LpH3LcwObIg57Sa/zwyATvfCN6rEo2roeUAFH44vx7Glc1grtabSZucQ8NTp2JBFIru8QWasyRw= X-Received: by 2002:a6b:32d4:: with SMTP id y203-v6mr1531126ioy.107.1527861615899; Fri, 01 Jun 2018 07:00:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bb86:0:0:0:0:0 with HTTP; Fri, 1 Jun 2018 07:00:15 -0700 (PDT) In-Reply-To: <1527861493-17332-1-git-send-email-mw@semihalf.com> References: <1527861493-17332-1-git-send-email-mw@semihalf.com> From: Ard Biesheuvel Date: Fri, 1 Jun 2018 16:00:15 +0200 Message-ID: To: Marcin Wojtas , "Zeng, Star" , Eric Dong Cc: "edk2-devel@lists.01.org" , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , Leif Lindholm , =?UTF-8?B?SmFuIETEhWJyb8Wb?= 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:00:17 -0000 Content-Type: text/plain; charset="UTF-8" (+ MdeModulePkg maintainers) On 1 June 2018 at 15:58, Marcin Wojtas wrote: > 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. > > 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(-) > > 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 = FvPpi->ProcessVolume ( > + FvPpi, > + SecCoreData->BootFirmwareVolumeBase, > + (UINTN)BfvHeader->FvLength, > + &FvHandle > + ); > + ASSERT_EFI_ERROR (Status); > > // > // Update internal PEI_CORE_FV array. > -- > 2.7.4 >