From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web08.5954.1648016090475192036 for ; Tue, 22 Mar 2022 23:14:50 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ccJJIXV+; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: chasel.chiu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648016090; x=1679552090; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PgudmobvvQFbiDSJppNXFij8SkqnPFM+khJ/PeHZMj0=; b=ccJJIXV+cfq4Mu2fvhznGHjj9Ix2VexqBF8oEj3kYYR48F8BaSCOJmJ3 xrSREpqbTHsYP9I/+E8VmTFSCVbmZZzUwGuFt3Hg/fmA+CwwhUG15mDMF ObQ1c4Sj6CwnRLU1RLyoroq545lR5wMOLZeTtbX0bg5fCl1e9sTidB2Tx c6NutWs7T2Gn+WVFywsgo84GsFq3BdmEXmK5D46JUrdEGbzpzwlgLpuj6 Ci7/MfoRtvSmU+nyuX8FZXPnJAJNjkJx4gcp1jwpWLbZNn6ZRcJ3hXul0 TUEOjyXfPm81bqWyvxcj5CPv7nbo5XbUFuRSklJqwIexXY0+r9MevEFmz w==; X-IronPort-AV: E=McAfee;i="6200,9189,10294"; a="245504980" X-IronPort-AV: E=Sophos;i="5.90,203,1643702400"; d="scan'208";a="245504980" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 23:14:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,203,1643702400"; d="scan'208";a="637351014" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by FMSMGA003.fm.intel.com with ESMTP; 22 Mar 2022 23:14:49 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 22 Mar 2022 23:14:48 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 22 Mar 2022 23:14:48 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 22 Mar 2022 23:14:48 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Tue, 22 Mar 2022 23:14:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HrsYqHXKw4SerByT1AuW4FhFbX+uF5FwxTxsCyR8vg6gbeSLuthvflOTeFeAsPUPgtW6UuhqoIDhrANWH/luHRG9bE6zKfEZ8Yjs8yiwX3QMwKmMcYHmKw7nn54s7pv9Nz368PBK3aND9Ybe7uJaVdLYuTq7Tbr9von6fGydP0S2BZ9Rdgy8eQBwYi/6WryH1FIAWVbZW6a5q5eXDXp6hclQaOGmpI6kJu99hUpMj3TtxJQxSgnU5UiC5vReYGtDdmIsRqTeehBENF6F6R9ew9XKZMwDsvV3BbnCPDVJnzsQhubPjOzf9lS5h9sYzrQFX22OccTMQ2UKXL3rOMTTxw== 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=EutCg7Fnll/qBkkZDY4RjK4XmTfxo/uG+8qqsVhIEpc=; b=es9fKPCoM/1KetX8/lFGXStRVrCKAomkiPOZ0jL6VtGFdsKacSVFH/MtEaogM2EmebjCIq8ZtTG7NX5KA72rGyYw9hnaq5pKDg3NIL5x4BOSl7PqH7gMxhJZAGHMYL8bAjoK2E2SxtYUpHwL40Vrm/N1/+4IxUuQBnxHoXTDkApg2eaLyWl6EiccotNlk7cjdxEyEs/VowPXEcagY9d9tVi4kjxOkP0KjvkuPwyxCamQN/QpbU5E5R5RtANUmsXILYEiq6ralNMpz3WMvEfk9Sx7zgJ6y+Yw7ihNzuPfn9tH/ayAHQlqQNkydhp6CBkqF4B4Z58zgQRWXC6Vtez+XQ== 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 BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by PH0PR11MB5595.namprd11.prod.outlook.com (2603:10b6:510:e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.14; Wed, 23 Mar 2022 06:14:45 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::8c4b:e24c:c69f:7809]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::8c4b:e24c:c69f:7809%5]) with mapi id 15.20.5102.017; Wed, 23 Mar 2022 06:14:45 +0000 From: "Chiu, Chasel" To: "mikuback@linux.microsoft.com" , "devel@edk2.groups.io" CC: Bret Barkelew , "Desimone, Nathaniel L" , "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: AQHYPlL6aqJM+bIBA06QvvZ2ql8Cv6zMfcdg Date: Wed, 23 Mar 2022 06:14:45 +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: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 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: e9bf2a8c-e2d0-4553-e614-08da0c946d63 x-ms-traffictypediagnostic: PH0PR11MB5595: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: 4tg0yCr1YeENGXHRzngabVq6pIVoSFIcZU54H26DGw9SV4wPRPd3B5wRPVbG5g4EpVRG3VqRPEt98ydFmJmrJc4/Wzh3BdcBnxENHYlLL2FJsvne7iGzs+0M32cCfpQmho9owDwi7r/c+1nF9u6JrAoyT4upPFjI2ITVl6joiLuu5zNXTYBE9sJsE/zD5iujZ24jZu4iZ8JHWHAuBOBMKF1Efq+vMUdQyqVPLFdet2cvZEHzyBzOkW22quN64B1zt2xrByjSbb+NDjFMALOPGaKwLTx5AWxyu31nymCOyxf/FeH0sQjzhTMqY8Z34HTo2w1AwJ1BBqQM8UDZpsie8aM+xN7OIP6rougeyItTuoM2hNCvKAVkJzHjLvm05surwoxsXek/HwOKmdjMl+kBaMWcsYn1pbcJ2QET6RPmySrNOhDDFHZ/uJzbbmrfDxLaBHtUaNXe+hkbcEs/zJ+G6bkY46pHgfGCVh1OoOfX3yc04nwqMXeSAsNxkRksPyYaAkiFAKoppIOW5GvXh+wCZPtpOsQy88Wx8JrlpSCY4L2j/9ADcuONsBYOFMaPnjn7XXExQjBPqgSJdv40TBJVW4G+3TjM/72+qr5q5QWKlOKXMl0wTyeR5V998rvoy6olMq21qoUTWMc9wWNmuPcljVsdOO/xCGCgQgI1PZKNowJYoO040PzDyeVsOy/OB7t9bqrsch+yBFM8qh/sX7FyLemRXa8QLHEMfVmt61AurN8R8Bgy7U3Oy3aF2FsfOZt7wA+yFsGO0EONOQQ5uN8fhvHs5Ks/A9NNSIOLhGc6/WGFhhXqAzNR0WhNRZyFP5Y5 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5483.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(122000001)(38100700002)(8936002)(52536014)(71200400001)(55016003)(86362001)(54906003)(186003)(316002)(2906002)(107886003)(82960400001)(38070700005)(6506007)(7696005)(5660300002)(33656002)(9686003)(53546011)(508600001)(83380400001)(4326008)(64756008)(76116006)(66946007)(8676002)(66476007)(66446008)(26005)(110136005)(66556008)(11716005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2LazYmETvIYkqdP8d9xIea77/SYcoO7E+zMxWprdoS5gykB+r5VMeJbEkqpl?= =?us-ascii?Q?45lvSmfAc0wYnsKc+PkRPzCTIDz7byCsgnI7icau4JPhYlGhEhiA8wVwuphU?= =?us-ascii?Q?bSVvXHWLniULfsl7PgRgZR92cD40TesFjb5DqAmN4JpAJwzBqSDTeml9api9?= =?us-ascii?Q?WQa6BP5WemKIZqV4TJ71zcNcnIRYRkt7xLwbPHxIKRVt9A6wTWraAJx9/TDi?= =?us-ascii?Q?J2WNlp8bejuiLUwWtEwBo8xIXv2jAKRZOgjowVnwr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us-ascii?Q?s5tJGWzovYUmc7Zdp/FTeCiv8/1aDMYvQ6UOMt23IbQ7hduyQCXx+TQ1fn2O?= =?us-ascii?Q?IVJfwMvt6/9afMshhkW366atbDc9Y4sGpyMM7x6wsAqDEMbpLUDs31bg7mTf?= =?us-ascii?Q?+WaxRu+FnGErh+9X/1Bx4tkWKseFU7cmvwrv8n0Q15uAEe1VU8i4WgD+oYrt?= =?us-ascii?Q?E/bM1QyOkjZRnZLMW6ab7wI+TFc3ZRtwiddML621iNkC7XxdFhro8IxxrH25?= =?us-ascii?Q?LaeYpE4XrwihACUVdNoarOXXgFXvP9xHX/kLJZMAyX6rIFAlZzeblHiEj3FZ?= =?us-ascii?Q?GSNPSX4/IChdjBssfYhOvE6+0gu/gS6q?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9bf2a8c-e2d0-4553-e614-08da0c946d63 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2022 06:14:45.5365 (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: LAmeY97wvknPyTslmj/eqgKXVeLymTvxL9SD6LYos6d+J/o0noFLHRoUQ2HajtjRqjs+kQfQGdPXSEw2SB3k6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5595 Return-Path: chasel.chiu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 >=20 > From: Michael Kubacki >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3612 >=20 > Printing corruption can occur if the DumpHsti helper function encounters = a > structure from the IHV (i.e. one that contains the 'Required' field). >=20 > Co-authored-by: Bret Barkelew > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Liming Gao > Cc: Eric Dong > Signed-off-by: Michael Kubacki > --- >=20 > Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckH > sti.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > 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 ( > DEBUG ((DEBUG_INFO, " SecurityFeaturesSize - 0x%08x\n", Hsti- > >SecurityFeaturesSize)); >=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 + > + 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; > - > + > 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