From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.1150.1649292864661932297 for ; Wed, 06 Apr 2022 17:54:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=d8GTHZg0; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: nathaniel.l.desimone@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649292866; x=1680828866; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vPYqXzACPUT1Q79QG8tzv/B6IBnt67KZuoMpS4HLGSM=; b=d8GTHZg0p6VHR3KHDsmi67cAsrmGV3K9Dl6MFOem6/k4xTj9q9DzECoP R0pDJlc7PzxIOAt+D61js1OvJG1/MdUYavEdGlkHc+UX4Fe/3+rFEWyAd 7Ny707Z42zQjN4Nlm2E0US+FJZQdAVwneJp1t2LiCn9YZ1BM5Cq4fcjPi v8Z7SjrSHlTeevBroBWxPAw2KrWGc9S6moypRfBMQ1aeiu+Sngv8QCWcZ BX58sBPirxTpRqfFh7/uClM38cE0emZeSoiYKQhDgucgtgK+zqt0bvpct KFFEppNUMbCTVkk4xkpi+RHeigR9Q0qmFVMdCAjAR5C/LrgFiabBbYdbT g==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="243329222" X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="243329222" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 17:54:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="549789998" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 06 Apr 2022 17:54:25 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 6 Apr 2022 17:54:25 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 6 Apr 2022 17:54:25 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 6 Apr 2022 17:54:25 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 6 Apr 2022 17:54:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EP7tdFGi0NfVdRR2LyhWeTifUWMCqbNopraO95x1SLSCVzEMJEOTUhBI0KxuCK09+6FYT5myru9J0kydJX9a3WbXiGBaTfMnW9AvUKYi2IsbvW0xmHF+qiBJe6ek/neTbi8j+KDPvc+pQ8MH+cszeQJWX1N2hYHBB1Uzgp6i25BdSrhuplTBYTs/Q7dUayMH3Y+FD37QSBIHFHpfp4WdS8/TRiL1+TOgLGJ1/K89q9Lu3ef0lBPktgbQ84frnCNTf+NPK/NXWLw0ss9WXWfO5mxlv4E5tozJGpN6mtIK8RmgdMtd2TfWctAb/jnSgup43zwa4XZNAWvTwBWz7vp6iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IE3FVKFkmJGcbz3if//o7PDuEZNAWjmEaKZu8eOTNmY=; b=Q3iCzk6oTe+SCO0/V2hWDbh2r6t85+WhKXCOU2i4OTzq7LEh4vPwzDJxq5ERDZwEuT4Bx2rBwKkki5spAtCHSTKZ8JVmM7YurqrWBZ7ABw1auJWPtWzNp1juQHgT+j2+WB21WM9Kzz6aNImHyhSKJGk3Cjba3Nv2Q55QhaViDJPVo+kVKp68CD80zYHtzprssGCVsHjibeahmv755K0yJc0g62s9vtPdfASAXmpb/55v6yUbVb+Jsut2/XTI2gS6r+d4YcK/kdxBeM70/AYUhAs3QdMjYGa9oqq+3Nr9iM5tmS7mqXoJ9lNhDrVCvOOwQnrmzj//bkX8nnXFop8fwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH0PR11MB5832.namprd11.prod.outlook.com (2603:10b6:510:141::7) by BYAPR11MB3574.namprd11.prod.outlook.com (2603:10b6:a03:b1::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.30; Thu, 7 Apr 2022 00:54:17 +0000 Received: from PH0PR11MB5832.namprd11.prod.outlook.com ([fe80::ad86:86fe:a02b:174f]) by PH0PR11MB5832.namprd11.prod.outlook.com ([fe80::ad86:86fe:a02b:174f%4]) with mapi id 15.20.5123.031; Thu, 7 Apr 2022 00:54:17 +0000 From: "Nate DeSimone" To: "mikuback@linux.microsoft.com" , "devel@edk2.groups.io" CC: Bret Barkelew , "Chiu, Chasel" , "Gao, Liming" , "Dong, Eric" Subject: Re: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Fix mis-parsed HSTI structures Thread-Topic: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Fix mis-parsed HSTI structures Thread-Index: AQHYPlL61TlXERmkG06YsNrbN4vXYKzjtvSQ Date: Thu, 7 Apr 2022 00:54:16 +0000 Message-ID: References: <20220323011053.9546-1-mikuback@linux.microsoft.com> In-Reply-To: <20220323011053.9546-1-mikuback@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 22d2bd7c-252e-4b70-aa8f-08da1831247a x-ms-traffictypediagnostic: BYAPR11MB3574:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Jb6nQAWskXGMMxiVxzZG6mmincTyck0+4I8isSj+Fx6I1f51KeV24VBJHwe+LN9yrLrALQYlVgMl7dRMt8ruarBDAI0W+HG5jz2Lv/oM25h555HvwVGiRSxdsSGZw0D6gVW8gR/iZ3tKyetLuo+KH4oliciFB6Rm4I1oftURCgeor0QDiORSqinehAEa1M0iLRrGnJsdZyS0LIx3yyjm9LLuHxQwACVMCeYtUKrK9tbXnh0NtZr2r2abMLnQOX/Y8ZghXAHFgpBR88ig32KZPGu0rMESXk/MhqJVaq0zStF7NP9ghgAfAWwzS32wEHIqFccGoq9E++DBk+TDNffinqCdillTujeBRGI+IIiWrjntgPpGFLC5BmW/37BR1ZR+VCZ+BeBE5VVqbK5Qaz4lM5NaDIj0wc46tlKfmY88ESxus4bODIoeuwlv/x18139Ypdxrq6N5zil3dUd6kn3YTCFf1wwfbAraQgMaW//tmlD0Zg1LWKUrwlNJyjTyBS0MwYiP2GNXBMEb27bOpG3wehhhAnRsz2YYGZg+tLkKo3VjEvUgsiCI9EhjJU1uJ3H/cXe/lBmrb2mzB5+mvgda5D2IjMeCA36OzDk0SwqjURSvf/bz50SRxbm4YeFBhxWog2rqoixqJMwTA/hbT/lFnC8hjShOxbYyeJ0Ud5MdUKNTHOJFfGjyJqe/ZMl6iwV7HAutr0wVHHGOE6isRKcKyNLiwHJ/6VwZAvVo5Dqqx2pzyFNyfA2buoEs4ZpyCvwETLZT3yH+rbCnj3XgV6o9JNDd2yfgG5aCSoktM2fMPKQ2QTgQXaT1+rmGleLeIRIwC8acN6hCEmJy8r7tWZ5RSQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5832.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(83380400001)(53546011)(26005)(9686003)(38100700002)(186003)(86362001)(107886003)(82960400001)(38070700005)(2906002)(122000001)(5660300002)(71200400001)(110136005)(64756008)(66556008)(66446008)(4326008)(316002)(8676002)(8936002)(76116006)(966005)(55016003)(52536014)(33656002)(54906003)(66946007)(7696005)(6506007)(508600001)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aXVmaVrP0UAt78Y2FMraoaP0BagGFGauVCYUV0gRwN+f7EqemOwvWjILN7vA?= =?us-ascii?Q?arjRKQsXB20XBWC/5mvR4UxB3SbOM+WdcMY8ZfuzyKLe8HYk9WfKrSLvrLx6?= =?us-ascii?Q?WHiSY3BB1CfJkovD8JfmRDiq5Ny2zPdkTPPGP+6oNe/9aHKRbXv8zbfS4E+k?= =?us-ascii?Q?MVochYN92fi0R+BWnTrbGLcPq9AHSSimDwW/FTR0ZmxPxWyF57sU+0kKncP1?= =?us-ascii?Q?a+gulE/c9Xj9Re68XsDfmKJ4cb1kOJ61+ARyDpuOY9ABhojfAkEv3sp3bxTR?= =?us-ascii?Q?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EgZYaQI17AA7g8bomHRBZt5JiUCtRVs9?= =?us-ascii?Q?29jku8vW2f5klfy3FHRQcuQzXYIEpaSBXzte4jFeu5jmzrPBTz/TFS8JsPTn?= =?us-ascii?Q?0DL+atdkTQR5Af6hNVKG0H5jLakPB326V+KtfErTqW+Wtloe8h2EzfGFdRKk?= =?us-ascii?Q?ebIU5dU63YAfJW0fVDHw4HELICIk+Ipd26BiXCIzyxEIguOmUh5qV5ZavcJA?= =?us-ascii?Q?A6Yt6cFB1rYN55kK2GWBYfwgylrhivvkBLchvA0qnFMx5x64I24pDLvnNJci?= =?us-ascii?Q?t0Y46Y3IfsUx6e+kdsAV7mAjHHUTh+hIqhFRhd/Re9aCR4qaqtfzZuwZRrcp?= =?us-ascii?Q?vkXchB+aY1Lm7jVupOQ3p5RItf38eDVXbHPcxGs5ElfBnku8ivOKxMgh+ekU?= =?us-ascii?Q?l/FBXRaMip/+aXfdl+4XK4oPMgXHfvJmy6iYXhGCJjklYDBWM3T+GhoaGLI0?= =?us-ascii?Q?ZaghSPJsy8DCMzqdh07iaP0FTNJ3lB8XagkpT1aMlP+XDa1CMbzBUuRixo+e?= =?us-ascii?Q?urKmPfjfZEglYP1c835668CUkEwun02s9j3fZFk6LkWW9zzenEeSBlagZBR0?= =?us-ascii?Q?ttTAG22k2okeai8IPW0u6Cp99h6L52M=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5832.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22d2bd7c-252e-4b70-aa8f-08da1831247a X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2022 00:54:16.9891 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0u9lAm1C3PWxi2MY7MO3BvAJklhd40M38foyT8tfcOrUgklhOGPTQlDav3mB2QV+30+8zBnnGfREc+D8FhIZomCCMn2dsHwlRp00dLCLXj8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3574 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed: https://github.com/tianocore/edk2-platforms/commit/170f455 -----Original Message----- From: mikuback@linux.microsoft.com =20 Sent: Tuesday, March 22, 2022 6:11 PM 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: F= ix 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 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/DxeCheckHsti.= c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/D= xeCheckHsti.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLi= b/DxeCheckHsti.c index 7756369ae17b..f2f3fa83a57c 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheck= Hsti.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCh +++ eckHsti.c @@ -40,6 +40,16 @@ DumpHsti ( DEBUG ((DEBUG_INFO, " SecurityFeaturesSize - 0x%08x\n", Hsti->Se= curityFeaturesSize)); =20 SecurityFeatures =3D (UINT8 *) (Hsti + 1); + + if (Hsti->Role =3D=3D PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) { + DEBUG ((DEBUG_INFO, " SecurityFeaturesRequired - ")); + for (Index =3D 0; Index < Hsti->SecurityFeaturesSize; Index++) { + DEBUG ((DEBUG_INFO, "%02x ", SecurityFeatures[Index])); + } + DEBUG ((DEBUG_INFO, "\n")); + SecurityFeatures =3D (UINT8 *) (SecurityFeatures +=20 + Hsti->SecurityFeaturesSize); } + DEBUG ((DEBUG_INFO, " SecurityFeaturesImplemented - ")); for (Index =3D 0; Index < Hsti->SecurityFeaturesSize; Index++) { DEBUG ((DEBUG_INFO, "%02x ", SecurityFeatures[Index])); @@ -81,7 +91,7= @@ TestPointCheckHsti ( EFI_STATUS Status; UINTN Index; BOOLEAN Result; - =20 + Result =3D TRUE; DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D TestPointCheckHsti - Enter\n")); for (Index =3D 0; Index < sizeof(mRole)/sizeof(mRole[0]); Index++) { -- 2.28.0.windows.1