From: "Chen, Gang C" <gang.c.chen@intel.com>
To: "Lin, Du" <du.lin@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "S, Ashraf Ali" <ashraf.ali.s@intel.com>,
"Chiu, Chasel" <chasel.chiu@intel.com>,
"Duggapu, Chinni B" <chinni.b.duggapu@intel.com>,
"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"Zeng, Star" <star.zeng@intel.com>,
"Mohapatra, Susovan" <susovan.mohapatra@intel.com>,
"Kuo, Ted" <ted.kuo@intel.com>
Subject: Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Error handling of TpmMeasureAndLogDataWithFlags()
Date: Wed, 13 Mar 2024 01:45:54 +0000 [thread overview]
Message-ID: <IA0PR11MB7935A3B9571A6385B7D0F5CCA32A2@IA0PR11MB7935.namprd11.prod.outlook.com> (raw)
In-Reply-To: <c31baa7c51c52047ddc00a3fcbf6e35ccca9d585.1710227795.git.du.lin@intel.com>
Reviewed-by: Chen Gang C <gang.c.chen@intel.com>
BR
Gang
-----Original Message-----
From: Lin, Du <du.lin@intel.com>
Sent: Tuesday, March 12, 2024 5:20 PM
To: devel@edk2.groups.io
Cc: Lin, Du <du.lin@intel.com>; S, Ashraf Ali <ashraf.ali.s@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Chen, Gang C <gang.c.chen@intel.com>; Duggapu, Chinni B <chinni.b.duggapu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>; Mohapatra, Susovan <susovan.mohapatra@intel.com>; Kuo, Ted <ted.kuo@intel.com>
Subject: [PATCH] IntelFsp2WrapperPkg: Error handling of TpmMeasureAndLogDataWithFlags()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4700
TpmMeasureAndLogDataWithFlags() computes the measure the code and log it into PCR 0. TpmMeasureAndLogData() computes the hash for the configuration. The same "Status" variable is used to store the return values for both of the functions. There is no error handling if
TpmMeasureAndLogDataWithFlags() returns an error Status.
Fix the issue by adding error handling for TpmMeasureAndLogDataWithFlags().
Signed-off-by: Du Lin <du.lin@intel.com>
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Chen Gang C <gang.c.chen@intel.com>
Cc: Duggapu Chinni B <chinni.b.duggapu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Susovan Mohapatra <susovan.mohapatra@intel.com>
Cc: Ted Kuo <ted.kuo@intel.com>
---
.../Library/BaseFspMeasurementLib/FspMeasurementLib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c
index 2c017a4250..228277649b 100644
--- a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.c
+++ b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
+++ b.c
@@ -197,6 +197,10 @@ MeasureFspFirmwareBlobWithCfg (
(UINTN)sizeof (DigestList),
EDKII_TCG_PRE_HASH_LOG_ONLY
);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "TpmMeasureAndLogDataWithFlags failed - %r\n", Status));
+ return Status;
+ }
Status = TpmMeasureAndLogData (
1,
--
2.26.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116700): https://edk2.groups.io/g/devel/message/116700
Mute This Topic: https://groups.io/mt/104886875/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-03-13 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 9:20 [edk2-devel] [PATCH] IntelFsp2WrapperPkg: Error handling of TpmMeasureAndLogDataWithFlags() Du Lin
2024-03-13 1:45 ` Chen, Gang C [this message]
2024-03-13 6:47 ` Ashraf Ali S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=IA0PR11MB7935A3B9571A6385B7D0F5CCA32A2@IA0PR11MB7935.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox