From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web09.15766.1655369508149999755 for ; Thu, 16 Jun 2022 01:51:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=j0HocLXc; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655369508; x=1686905508; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=hfL4BjvpdTt0NL8Jn5kQ5ccrTF1MObCcf3H/yzYdSP8=; b=j0HocLXcG5HP9SZQ961qWZnuD8Op3j/uw4hPyi9W34roksxvQZufelgr /RwJgRUKp3Ic2XMafXt0N1SXecCq6pj1toI/jTy8raJ9rkYKVVn6Z9uhc paS1BN+cHCJtTFsmrKGnZGtHSAHQRYdYqsiWig71I8PIbKIHrmEkwTGuC w0BjIP/N2aSbRIk9fLktSxPHBQaMH8WnpZABIecJruPFuFX9mwdMxnV4S FCK5nuOjIt2ed5vUaimlgfCnZ8T2VXprxkve0QAhAkTMZOhNoyDPBlA6k 8dAPZv+ReOXFOQbrthWcAlEg1vprQ0E4daCAqgpOU5411t8Fitzn8fSAA g==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="279260482" X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="279260482" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 01:51:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="727805870" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 16 Jun 2022 01:51:47 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 16 Jun 2022 01:51:47 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 16 Jun 2022 01:51:47 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 16 Jun 2022 01:51:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mR3QLimpMfkbIyOTsj+l1Xovn/tz4HiVG8Z6yQJKtEztTzN57A0hLcuBKdjnYMCXJlDRrOLwSdpejKdm4qpeuIZu0XXDrjBbQ316p0sh6fACBm73Ut2LHQlKSWglwQGT9wN9QlIelc163R6iQY1XXSOnlwSKqh66zpx/UkEJoZIqLYd9gJsYw2HIdX96OdIPvreNXQ73Ef0AsFxRRVmXKnXfqoFksMI54JMnfZUmBNwoowBq7Jzo2ypNhcS60yGvlfwq2H3zGQrAWBJn0zI8pkjGmwxS4kH9s/uJZlqnu5Nf7HVEbiUgxu1NoZFnN6tVdl8kC6G3PNZN6+Ua+dDyNQ== 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=MmfDFjkL7J33XtnGemzPvl5C6QyC/sTKSy7SO8dmvYc=; b=bbadEHilsioXdCB+1AcAlmN7f2AkCfeLFf7V0cA0ZQtHqFxwwiyj6Lihduvsmp2ZAxWxLpf67wP2E/w+UWv0h2svHUK0P5UGtn2PKmNHOfdK8C+6tjgoHe9IcdqBukNvLjaMBVbbylNzHS9ZYKxp+r6XkyyWHJ7BzJRRFcLSjzqABYG4FtSSfi+GocpiS6kbFM5b7J48wlNlmLPQgoc7caDYSfL/LeLQXWA8mrXWq7zYFDoX+jIzEACiZxKY0HNXyEWzZYpbTbme6NYZRiVogSZyfb/go0M5lNjbUJjSPpRPQWPYUAwf0ushTePTp+cI2ihy/ZxUAJlxtFoZjL8QUQ== 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 MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by BL0PR11MB3377.namprd11.prod.outlook.com (2603:10b6:208:66::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Thu, 16 Jun 2022 08:51:45 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::24ae:1cd3:3192:4c7e]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::24ae:1cd3:3192:4c7e%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 08:51:45 +0000 From: "Yao, Jiewen" To: "Xu, Min M" , "devel@edk2.groups.io" CC: Gerd Hoffmann , "Wang, Jian J" Subject: Re: [PATCH 2/2] SecurityPkg/HashLibTdx: Return EFI_UNSUPPORTED if it is not Tdx guest Thread-Topic: [PATCH 2/2] SecurityPkg/HashLibTdx: Return EFI_UNSUPPORTED if it is not Tdx guest Thread-Index: AQHYfk8MThKL7lQQL0KNHisL1OjlCK1LxV7wgAX6mJA= Date: Thu, 16 Jun 2022 08:51:45 +0000 Message-ID: References: <20220612112434.1829-1-min.m.xu@intel.com> <20220612112434.1829-2-min.m.xu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action 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: 0cc504a3-5c82-4e5b-7e5a-08da4f757119 x-ms-traffictypediagnostic: BL0PR11MB3377:EE_ 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: CHgBqy0yR1bkyP7GqG4zZ06DqxGSIbf+iw23U4B3YmTsPtR335QvYrLkTtZMUSNrrv8k7YLR7GTSXaxQViuIL/tnCbrM6KyBDFlxxcWn/wD9jOagBTfwDZ3yRgAFGCQSdMYa+QghAMDNxZo5RtDUaZ9uXFJ7E7BCNKMK49o+f7RV2c20nwkpN6LxQw5m4NelrG5CxoFs0zoyYJzMWGkXylW6H/UATO7Hk5YG3StJx2QnYi1yu99bWqVFYrjC/H4Gujh53/y5lvFpyLbzvSwItL5TWmNbFq6hHKZjJeMAyhTA4IlH0fWRKQVoiQRJDs278kbxOY2LYrEaIfXw5VGanfPThEtPmJzMZsCAulxVXREBO+cR/pKu9TJwuLpjIb4sD+ICAx8yuSjvBJu682NwYJof2S9rwJTArKHIoX5U7NBFfD5Lm0PNDUv650leSCJ+r3MLVCTh02yxD00raVCEZNMoqLsuMxDVZaq2Cw/d598ccEgxccbFk07idpikKIQiBpjjDP64rv3dd+JVLXWbfXE2rvr1rs6M1Jm8UQlFHw9/q0hXpWNheIwPMTRGBU1CZ1hjbfMtVZaPsyXvwprZTMDZaho9cR15EXeVRdxmjAd3ppR3lqn+Fp7hHE6B9nHPV2a+fjDq4glRF099VqiB6FMi6z1BPk0/wiSCkAqkxVIGxvdRG14082puy+VcoDcedY397pnEVaTarD3ZAr56Sse/WSqOrcNr3IAmusNav5WW9QokH+y/aplszj07SHioGqU9Tf9/Ag/X1DAOKyrZyFrxhfEVI2HAg19DLpWucRQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(366004)(4326008)(33656002)(55016003)(5660300002)(8676002)(8936002)(38070700005)(52536014)(15650500001)(64756008)(71200400001)(966005)(66556008)(508600001)(66476007)(66446008)(76116006)(66946007)(2906002)(316002)(54906003)(110136005)(86362001)(26005)(9686003)(6506007)(107886003)(53546011)(7696005)(82960400001)(186003)(38100700002)(83380400001)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2SSbKdTw95anHrRnjNFCuDzsyZDaLE6mWQ0b+4lG07B/XqB7eXfsFh14p0CM?= =?us-ascii?Q?TIIstsb5TJmyzT55GIfdJL9dl8pQ7ftt0qXKHe0rSVHlUZ64h5+ZCQvtYjH0?= =?us-ascii?Q?TB+CA61QvhCv3pfN79e23lWxtENx0U09v7LrpxKA2NMHIGRE96c7KFmxVJqj?= =?us-ascii?Q?OJiZUoC15js2sv6u5jFyocgkIWRB4yH6xScSRgnGXBM8EO73tvdSFUUoZxO3?= =?us-ascii?Q?j8oBEmXTA5QBjgqF91Zua0mBVzW8dCeDFe5LkBhJ1e+lIYjjifOnd5Gdsd8Y?= =?us-ascii?Q?+0Xstg3xk0s721VFFXvsVQrplM+zPOSE4atAwi5JVrXG0HBl3XmWUCujs+/g?= =?us-ascii?Q?wfb7Ynt0Kufd35CSjyPo7TOWqE6sYhI3tSd3YlehV7CIiJEl/zth04RWTPZe?= =?us-ascii?Q?rUsQbgbXuyw2wthor2eQl5ewdB9dHaJhvNScTSyxWrit8TOLrUOasmwzCquP?= =?us-ascii?Q?PFV9Y1emH+GwKLG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?Q?55dRkRJ1aW1RkCGv87bnHzpUvlXK33b/WMjaB/8fNtFg1I20pcth9sxjKiDh?= =?us-ascii?Q?O0eE59IGxpd/sBbzkpbqCKRUAujUPpzmCuwJMvWoVZKm2dEVofm7idUap/Da?= =?us-ascii?Q?3e82J2hTUfX5FsgpEECtNSAiMuyKoeGaViCx87PaTSKBzmu69+lbdtB09ft7?= =?us-ascii?Q?oRyS231ZPsle6eKtJsn4YQP0I0yZt1HqIiLGlQMjAoZIjtFUA+yHZD1F01z0?= =?us-ascii?Q?YE3Hx7NlWq49zeXkb6toS+yhAqSDZXIdTF/cyhroiQnvLa7+RTLZj3oJ0WX/?= =?us-ascii?Q?RfubE7SV/DpEYIrSB15vkSRrTEZMWUJbhLyf2c+3+3KQu+rxA/aTZKFzTCIV?= =?us-ascii?Q?/EL8pJSg4A=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cc504a3-5c82-4e5b-7e5a-08da4f757119 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2022 08:51:45.2985 (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: xSsspkK77jf3zXbcfvYMF3EsronE/ro7IPpF3pF0pu8t+A/gfCiNptddzynWnkUbjhca3ELh5+rH/D4bn7Roig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3377 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Both are merged. https://github.com/tianocore/edk2/pull/2981 > -----Original Message----- > From: Yao, Jiewen > Sent: Sunday, June 12, 2022 9:34 PM > To: Xu, Min M ; devel@edk2.groups.io > Cc: Gerd Hoffmann ; Wang, Jian J > Subject: RE: [PATCH 2/2] SecurityPkg/HashLibTdx: Return EFI_UNSUPPORTED i= f > it is not Tdx guest >=20 > Reviewed-by: Jiewen Yao >=20 > > -----Original Message----- > > From: Xu, Min M > > Sent: Sunday, June 12, 2022 7:25 PM > > To: devel@edk2.groups.io > > Cc: Xu, Min M ; Gerd Hoffmann ; > > Yao, Jiewen ; Wang, Jian J > > Subject: [PATCH 2/2] SecurityPkg/HashLibTdx: Return EFI_UNSUPPORTED if = it > is > > not Tdx guest > > > > From: Min M Xu > > > > HashLibTdx is designed for the Tdx guest. So if is not a Tdx guest, > > return EFI_UNSUPPORTED in RegisterHashInterfaceLib. > > > > Cc: Gerd Hoffmann > > Cc: Jiewen Yao > > Cc: Jian J Wang > > Signed-off-by: Min Xu > > --- > > SecurityPkg/Library/HashLibTdx/HashLibTdx.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/SecurityPkg/Library/HashLibTdx/HashLibTdx.c > > b/SecurityPkg/Library/HashLibTdx/HashLibTdx.c > > index 75d96ee64b44..3cebbc70d3ec 100644 > > --- a/SecurityPkg/Library/HashLibTdx/HashLibTdx.c > > +++ b/SecurityPkg/Library/HashLibTdx/HashLibTdx.c > > @@ -186,7 +186,13 @@ RegisterHashInterfaceLib ( > > IN HASH_INTERFACE *HashInterface > > ) > > { > > - ASSERT (TdIsEnabled ()); > > + // > > + // HashLibTdx is designed for Tdx guest. So if it is not Tdx guest, > > + // return EFI_UNSUPPORTED. > > + // > > + if (!TdIsEnabled ()) { > > + return EFI_UNSUPPORTED; > > + } > > > > // > > // Only SHA384 is allowed. > > -- > > 2.29.2.windows.2