From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.9903.1628175455603980657 for ; Thu, 05 Aug 2021 07:57:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=YCo4xD3P; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [167.220.2.74]) by linux.microsoft.com (Postfix) with ESMTPSA id 3C27620B36ED; Thu, 5 Aug 2021 07:57:35 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3C27620B36ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1628175455; bh=wqOPZyqvMol1Ot0AZ3liITRlcLLvRpp9dceJHTPkVhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YCo4xD3PXRPLlmbohwUg2v6CFOBb+TSMu+ULcdg98/CL2t2WfLfNwu4nVspKQjgck 6m0C2HqEkKPKQScWTN9gQXfv81JHAvFohoANWl1rKDwQCtVDEu9ovkPuMT+sUlxx5L tnVBzSRe/85d/EHWaagDRwqGrck1VNXUenPRiIQA= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 2/5] MinPlatformPkg/TestPointCheckLib: Set required size field in protocol Date: Thu, 5 Aug 2021 10:57:03 -0400 Message-Id: <20210805145706.2470-3-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210805145706.2470-1-mikuback@linux.microsoft.com> References: <20210805145706.2470-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3518 Per the protocol definition, the caller must allocate the input structure and set the size field. TestPointCheckTcgTrustedBoot() does not do this which can result in an EFI_BUFFER_TOO_SMALL error. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckTcg= TrustedBoot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib= /DxeCheckTcgTrustedBoot.c b/Platform/Intel/MinPlatformPkg/Test/Library/Te= stPointCheckLib/DxeCheckTcgTrustedBoot.c index 2a04f86fedac..7a8e3fed22f9 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckTcgTrustedBoot.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckTcgTrustedBoot.c @@ -41,6 +41,7 @@ TestPointCheckTcgTrustedBoot ( goto Done; } =20 + ProtocolCapability.Size =3D (UINT8) sizeof (ProtocolCapability); Status =3D Tcg2->GetCapability (Tcg2, &ProtocolCapability); if (EFI_ERROR(Status)) { DEBUG ((DEBUG_ERROR, "Tcg2->GetCapability - %r\n", Status)); --=20 2.28.0.windows.1