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.web08.753.1649121005416748246 for ; Mon, 04 Apr 2022 18:10:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=OzwJsjy4; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id 0CCB520DFD5F; Mon, 4 Apr 2022 18:10:03 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0CCB520DFD5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649121004; bh=zbQqNae4J0v18BVCDTk4PLD4w6QAjLUQ8/nWfnrw6rI=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=OzwJsjy4fjLpBDfMwdEnr3CrRSsddSDA4dXrGDDZlrudvsxh9eVN5z5irlzNOfXsa nyWCvdxdOIiy0+GaG+ZB/UY1arDVRa/BL4IcsbrYfk3HnzXEOixw363j/Wnrl+dQac GFgzXEkIw92PaTOhN5gABx4bmLJSm96Reeb8eIEQ= Message-ID: <1cf8f179-9994-d4a6-3e02-ad57ee41eae7@linux.microsoft.com> Date: Mon, 4 Apr 2022 21:10:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Fix mis-parsed HSTI structures From: "Michael Kubacki" To: devel@edk2.groups.io, chasel.chiu@intel.com Cc: Bret Barkelew , "Desimone, Nathaniel L" , "Gao, Liming" , "Dong, Eric" References: <20220323011053.9546-1-mikuback@linux.microsoft.com> <92750dff-9946-34d4-cce1-00feb47d351c@linux.microsoft.com> In-Reply-To: <92750dff-9946-34d4-cce1-00feb47d351c@linux.microsoft.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Just another reminder to please merge this patch if there is no further=20 feedback. Thanks, Michael On 4/1/2022 10:12 AM, Michael Kubacki wrote: > Thanks for the review. >=20 > Can you please merge this soon if there are no concerns? >=20 > On 3/23/2022 2:14 AM, Chiu, Chasel wrote: >> >> Reviewed-by: Chasel Chiu >> >> >>> -----Original Message----- >>> From: mikuback@linux.microsoft.com >>> Sent: Wednesday, March 23, 2022 9:11 AM >>> To: devel@edk2.groups.io >>> Cc: Bret Barkelew ; Chiu, Chasel >>> ; Desimone, Nathaniel L >>> ; Gao, Liming >>> ; Dong, Eric >>> Subject: [edk2-platforms][PATCH v1 1/1] >>> MinPlatformPkg/TestPointCheckLib: Fix mis-parsed HSTI structures >>> >>> From: Michael Kubacki >>> >>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3612 >>> >>> Printing corruption can occur if the DumpHsti helper function=20 >>> encounters a >>> structure from the IHV (i.e. one that contains the 'Required' field). >>> >>> Co-authored-by: Bret Barkelew >>> Cc: Chasel Chiu >>> Cc: Nate DeSimone >>> Cc: Liming Gao >>> Cc: Eric Dong >>> Signed-off-by: Michael Kubacki >>> --- >>> >>> Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckH >>> sti.c | 12 +++++++++++- >>> =C2=A0 1 file changed, 11 insertions(+), 1 deletion(-) >>> >>> diff --git >>> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChec >>> kHsti.c >>> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChec >>> kHsti.c >>> index 7756369ae17b..f2f3fa83a57c 100644 >>> --- >>> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChec >>> kHsti.c >>> +++ >>> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCh >>> +++ eckHsti.c >>> @@ -40,6 +40,16 @@ DumpHsti ( >>> =C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "=C2=A0 SecurityFeaturesSize=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - 0x%08x\n",=20 >>> Hsti- >>>> SecurityFeaturesSize)); >>> >>> =C2=A0=C2=A0=C2=A0 SecurityFeatures =3D (UINT8 *) (Hsti + 1); >>> + >>> +=C2=A0 if (Hsti->Role =3D=3D PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE= ) { >>> +=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "=C2=A0 SecurityFeaturesRequire= d=C2=A0=C2=A0=C2=A0 - ")); >>> +=C2=A0=C2=A0=C2=A0 for (Index =3D 0; Index < Hsti->SecurityFeaturesSiz= e; Index++) { >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "%02x ", SecurityFe= atures[Index])); >>> +=C2=A0=C2=A0=C2=A0 } >>> +=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "\n")); >>> +=C2=A0=C2=A0=C2=A0 SecurityFeatures =3D (UINT8 *) (SecurityFeatures + >>> + Hsti->SecurityFeaturesSize);=C2=A0 } >>> + >>> =C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "=C2=A0 SecurityFeaturesImplemen= ted - ")); >>> =C2=A0=C2=A0=C2=A0 for (Index =3D 0; Index < Hsti->SecurityFeaturesSize= ; Index++) { >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "%02x ", SecurityFea= tures[Index])); @@ -81,7 >>> +91,7 @@ TestPointCheckHsti ( >>> =C2=A0=C2=A0=C2=A0 EFI_STATUS=C2=A0 Status; >>> =C2=A0=C2=A0=C2=A0 UINTN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Index; >>> =C2=A0=C2=A0=C2=A0 BOOLEAN=C2=A0=C2=A0=C2=A0=C2=A0 Result; >>> - >>> + >>> =C2=A0=C2=A0=C2=A0 Result =3D TRUE; >>> =C2=A0=C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D TestPointCheckHsti= - Enter\n")); >>> =C2=A0=C2=A0=C2=A0 for (Index =3D 0; Index < sizeof(mRole)/sizeof(mRole= [0]); Index++) { >>> --=20 >>> 2.28.0.windows.1 >> >> >> >>=20 >>