From nobody Fri Apr 26 13:58:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1527861512563928.2353985068804; Fri, 1 Jun 2018 06:58:32 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0841B210D6CFF; Fri, 1 Jun 2018 06:58:31 -0700 (PDT) Received: from mail-lf0-x229.google.com (mail-lf0-x229.google.com [IPv6:2a00:1450:4010:c07::229]) (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 E7D7D20977882 for ; Fri, 1 Jun 2018 06:58:29 -0700 (PDT) Received: by mail-lf0-x229.google.com with SMTP id v135-v6so14993585lfa.9 for ; Fri, 01 Jun 2018 06:58:29 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id t126-v6sm786590lff.7.2018.06.01.06.58.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Jun 2018 06:58:26 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4010:c07::229; helo=mail-lf0-x229.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=WhgtGzxXt9VS2jH5bhToVsp8JFD8vTEVxMQZYZemClQ=; b=Ne/b3aazJqvF0LMbMotdQnFh2jBkF3PmE9uRIyQoaWGkE5uHgg5348Vhi/SmOGMmTX QNY0d3s7ix0qEdQFDYLAZfjHnVmq1Q/VGcVPnOX67OhUdNeDs1PFAoy4IsajMgGziXx7 yUCOxsUfZt0FCpNrMFOfTO5iEhshbN9CzScSQQv1aRNnbvsX7J8taM/It7rl7xUBo8Tl hyakOaFvE1Od+wpwx9nIBG9AVgEXEROV6feiecHUuJGC4nfnzx3CNECouLp/hCBdDM7T vxtVSf1WorFd3S08VXg/HnBb5op+ABIJCBOrXo5z32eOyxA8e6vxdFMd7K0V4ylNcTBq gv0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WhgtGzxXt9VS2jH5bhToVsp8JFD8vTEVxMQZYZemClQ=; b=MUd04iKeB9p2h6nEGzhmTooGOABWb3yWENu6PdIoJoteKJGIalUNmFfWQ8gjc+hDKX 8cwSfyyO8ILTBa1M6tiiYmAn0XGZv/nnaMGlT2OeqJXce6av/w/b1Fg3a7ppUnyvlcAC ONQkZ93txx9Hyiv7YX7r68hf/zZtyC4YbroELA6gChOe0Zs4Flc1lWYdfF5mwlvY1hbt 9MEn0w/zIWv3U+aE3LhXTmWL5ORAZiVKbkfvpYqEn73EwVvkd4TMEDKDrMr1y7EWgasU Em+VEPA/XgXEtEaMfId/CEyMnSWQUvUzvdxjJTzeLlES6gCees+CzldcFcCxPZSfHYDd dwMw== X-Gm-Message-State: ALKqPweRKVw2nMxCtLHCBV32jq1f/LoavL1+5/LjuHJGoNX4Kh/J6NE6 7f8zN+SMA+I0EwJmnt+sVW7G0uwTlww= X-Google-Smtp-Source: ADUXVKLsYf+UcXC3ZeI3IRxnw0XsWcZvRU0od8utfwFeqahe/L+j68GTFuxb3orwQSpkTo43rYbWzA== X-Received: by 2002:a2e:8541:: with SMTP id u1-v6mr8123694ljj.10.1527861507481; Fri, 01 Jun 2018 06:58:27 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Date: Fri, 1 Jun 2018 15:58:13 +0200 Message-Id: <1527861493-17332-1-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [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: , Cc: feng.tian@intel.com, liming.gao@intel.com, ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, michael.d.kinney@intel.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Liming Gao Reviewed-by: Star Zeng --- 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/Fw= Vol/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,=20 - 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. --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel