MdeModulePkg/Core/Pei/FwVol/FwVol.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
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 <mw@semihalf.com>
Signed-off-by: Jan Dabros <jsd@semihalf.com>
---
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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
(+ MdeModulePkg maintainers) On 1 June 2018 at 15:58, Marcin Wojtas <mw@semihalf.com> 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 <mw@semihalf.com> > Signed-off-by: Jan Dabros <jsd@semihalf.com> > --- > 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 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Star Zeng <star.zeng@intel.com> Pushed at 38c977c148e92e2af17c5d346d9b4b2e7a18680a. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard Biesheuvel Sent: Friday, June 1, 2018 10:00 PM To: Marcin Wojtas <mw@semihalf.com>; Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com> Cc: Tian, Feng <feng.tian@intel.com>; edk2-devel@lists.01.org; Leif Lindholm <leif.lindholm@linaro.org>; Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com> Subject: Re: [edk2] [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV (+ MdeModulePkg maintainers) On 1 June 2018 at 15:58, Marcin Wojtas <mw@semihalf.com> 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 <mw@semihalf.com> > Signed-off-by: Jan Dabros <jsd@semihalf.com> > --- > 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 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
I agree to add this checker. Reviewed-by: Liming Gao <liming.gao@intel.com> > -----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 <feng.tian@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; > leif.lindholm@linaro.org; ard.biesheuvel@linaro.org; jsd@semihalf.com; Marcin Wojtas <mw@semihalf.com> > Subject: [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV > > 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 <mw@semihalf.com> > Signed-off-by: Jan Dabros <jsd@semihalf.com> > --- > 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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.