From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH V2 2/3] SecurityPkg: Support TdProtocol in DxeTpm2MeasureBootLib To: Min Xu ,devel@edk2.groups.io From: "Sami Mujawar" X-Originating-Location: Cambridge, England, GB (217.140.99.251) X-Originating-Platform: Mac Firefox 93 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 01 Nov 2021 06:35:10 -0700 References: In-Reply-To: Message-ID: <16473.1635773710250736487@groups.io> Content-Type: multipart/alternative; boundary="kKAksMsW9viYg7jMCOJI" --kKAksMsW9viYg7jMCOJI Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Min, Please find my response inline marked [SAMI]. Regards, Sami Mujawar On Tue, Oct 26, 2021 at 10:19 PM, Min Xu wrote: >=20 >=20 >>=20 >>> + if (TdProtocol !=3D NULL) { >>> + TdEvent =3D CreateTdEventFromTcg2Event (TdProtocol, Tcg2Event, >>=20 >> EventSize); >>=20 >>> + if (TdEvent =3D=3D NULL) { >>> + goto Exit; >>=20 >> [SAMI] I think Status should be set to reflect an appropriate error code >> here. >=20 > I am thinking if TCG2_PROTOCOL and TEE_PROTOCOL will be installed in the > same time? > 1) If these 2 protocols are NOT installed in the same time, then the > returned status reflect the actual operation result of the protocol. > 2) If these 2 protocols can be installed in the same time, then it will b= e > a problem that the how to reflect the operation result of the protocols b= y > the status? > I prefer 1) that these 2 protocols are NOT installed in the same time. > Because it doesn't make sense to measure the boot in 2 times. > What's your suggestion? [SAMI] I don't know if there is a use-case for both the protocols to be ins= talled at the same time. But, I would agree it would not make sense to meas= ure twice. >=20 > BTW, CreateTdEventFromTcg2Event will be updated to return a status to > indicate the operation result. So that the status can reflect an > appropriate error code. --kKAksMsW9viYg7jMCOJI Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Min,

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

On Tue, Oct 26, 2021 at 10:19 = PM, Min Xu wrote:
+ if (TdProtocol !=3D NULL) {
+ TdEvent =3D CreateTdEventF= romTcg2Event (TdProtocol, Tcg2Event,
EventSize);
+ if (TdEvent =3D=3D NULL) {
+ goto Exit;
[SAMI] I think Status should be set to reflect an appropriate error code he= re.
I am thinking if TCG2_PROTOCOL and TEE_PROTOCOL will be installed in the sa= me time?
1) If these 2 protocols are NOT installed in the same time, t= hen the returned status reflect the actual operation result of the protocol= .
2) If these 2 protocols can be installed in the same time, then it w= ill be a problem that the how to reflect the operation result of the protoc= ols by the status?
I prefer 1) that these 2 protocols are NOT installe= d in the same time. Because it doesn't make sense to measure the boot in 2 = times.
What's your suggestion?
[SAMI] I don't know if there is a use-case for both the protocols to be ins= talled at the same time. But, I would agree it would not make sense to meas= ure twice.
BTW, CreateTdEventFromTcg2Event will be updated to return a sta= tus to indicate the operation result. So that the status can reflect an app= ropriate error code.
--kKAksMsW9viYg7jMCOJI--