From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 197C6740038 for ; Fri, 14 Jun 2024 16:09:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=QeVxfjlHZpO1+dUvYoPsCGlXcu1ZYekMm6b7fj3HzYQ=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1718381345; v=1; b=sMqZMXxlLHQulWf+b5EG6uSQwSCUXh391xQb8BtxYR6nkQEExKC5XcZFYe9sD7p+jttL9Z/5 iOK9UBHe/FfvJuYzh55qjxFvZt5B2WV7XxJcm7TXseSAAFWzsoDQOf3KDWiEe3BWaafnPor3/up x5LtlkMNKBfgUQeUquD6YN6BvkqIAGrCH7PJM5TzWTnvI2M3JmC0RLMuCJ5tlwaGVM5GJcxB7Nb w01gG8S+L4WS2h5jHQteK4TtcVbv7uMdMg1F8I7awUA35r5pIzbcy1udUr4v39iar5Iak1WxOGE fEIGVE+/VCowypG+bgSKGOS4/ETzPOrmH2/ThppdpsX2w== X-Received: by 127.0.0.2 with SMTP id rdjIYY7687511xiHB9LRTYRM; Fri, 14 Jun 2024 09:09:04 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web11.15683.1718381343993768571 for ; Fri, 14 Jun 2024 09:09:04 -0700 X-CSE-ConnectionGUID: /t9PqC+EQo+giAz5gyOLrw== X-CSE-MsgGUID: huCy292eR5CwyX4w3yfrMQ== X-IronPort-AV: E=McAfee;i="6700,10204,11103"; a="32816350" X-IronPort-AV: E=Sophos;i="6.08,238,1712646000"; d="scan'208";a="32816350" X-Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2024 09:09:04 -0700 X-CSE-ConnectionGUID: 5Au+OQBpSnq0NgtU2o3U8w== X-CSE-MsgGUID: 62lX34t2T2eCTfOaZLFmEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,238,1712646000"; d="scan'208";a="40678636" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa009.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Jun 2024 09:09:04 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 14 Jun 2024 09:09:03 -0700 X-Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 14 Jun 2024 09:09:02 -0700 X-Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 14 Jun 2024 09:09:02 -0700 X-Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 14 Jun 2024 09:09:02 -0700 X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by CY8PR11MB7313.namprd11.prod.outlook.com (2603:10b6:930:9c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.25; Fri, 14 Jun 2024 16:09:00 +0000 X-Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::6444:ca4c:aa3e:f8d2]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::6444:ca4c:aa3e:f8d2%4]) with mapi id 15.20.7677.026; Fri, 14 Jun 2024 16:09:00 +0000 From: "Yao, Jiewen" To: "Li, Yi1" , Gerd Hoffmann , "devel@edk2.groups.io" CC: "Hou, Wenxing" , "Kinney, Michael D" , Pedro Falcato , "Ard Biesheuvel" Subject: Re: [edk2-devel] CryptoPkg host test broken due to smoketest for RDRAND Thread-Topic: [edk2-devel] CryptoPkg host test broken due to smoketest for RDRAND Thread-Index: Adq+Jb7093oqeuwpSsG41P6wAdVV4wAIZ+kAAAXvM3AABWY3oA== Date: Fri, 14 Jun 2024 16:09:00 +0000 Message-ID: References: <3kj5r4awgurnnlqm67pvpumo4rwwhounzgynydtdohs7cif4qw@edfavg3ztcaq> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|CY8PR11MB7313:EE_ x-ms-office365-filtering-correlation-id: 512a99eb-9123-4461-6ab6-08dc8c8c4d96 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?Y7Sx+VLjgJnmcvVw/8lSsEMy4rehwOM+dvWZKF1uiOL3MFZKpxmOXtXlJQvz?= =?us-ascii?Q?IWaWjFezIhWMSrd5kaYVAOlWshxQdJ+FUrwsjwg0oBgZjOlW25mS8rvjFVJv?= =?us-ascii?Q?gqeHJiiTb1Yq6wVNekDUGFifxhKW1h11rHYZHNoAm72QjStwqUBZaGfSmnMd?= =?us-ascii?Q?0ix7Nn/NCkNwRTV0BY/z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ascii?Q?ZqCie5dWmjk8bm8AcRivQKVJYLZ79baLeg6eNwAEsQIpS2E33qwy3bySSZ9c?= =?us-ascii?Q?dAnprHqNEe5+38B0WpHkOlCkIfNHYxsx6SP3Xz5e+fES8s2PpH8F65T5FJ7P?= =?us-ascii?Q?ITo1+UjSmxH7zuxqKFSApJYTonZJ5FwGqTYqvHNdjZtHoXGe4ierjXh+zX6p?= =?us-ascii?Q?YR4RsZXWFzilnslKdq+G1btzz7HrdhcgntwMPBDS+6PfRDDzL2s5nvJgmlNz?= =?us-ascii?Q?MhWK4oZZijlhypZAIE0uyyuzcmcadkGWxs3K4jfH6zi0kBeE3nGP2eQnBVsj?= =?us-ascii?Q?GNboHv1l+jQpYmhRJoi/ZKLqSy5f?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?d3RnAnK/i5Ubq/wqxPcnL91Y5RR6z+my7I55YbwKQRB4nM4rnxEM4fXFEu9k?= =?us-ascii?Q?lJOXMnlcZbq99YRfeZpb4SxJw5LEUhRKuFiG5nb1hIom7ohu5LQgb106lN2L?= =?us-ascii?Q?HLUx/Q0QBuQiTT3XiPSgfUKRFV4A9I+x2bj9Ve5j4WBFcwthbi0+8b8MAwHR?= =?us-ascii?Q?QK1ziDeyVlIFgZn76/Vfj702D4oVVJ/m2RZHTsuVkcEIBy+/7+L1yF2fRDfk?= =?us-ascii?Q?ha4HzVqZ69GxRpw9KFPXRxfRMZ1AaIhcAkhERWgJVkhHQi/vVM7EwHcHxq52?= =?us-ascii?Q?cyFSaqG8o3cfEau82Lj5tOBRCmHq7ojvEIBh/i+ImSGJ93HhG1Dzqs9EtiAf?= =?us-ascii?Q?d/CrW/avn9qJnW5q+YWG5/4vPBjB7vka8bX0ZWj2FmUBlq+HN7rmHXBV9Rnk?= =?us-ascii?Q?CEOmhyPD0/FPfssJ9cZh2G1XztRyMtxlz+/W+6qEPE8hsS6D0zHSi5SN9q1E?= =?us-ascii?Q?ED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UCxEdZW?= =?us-ascii?Q?vUC8VUO1+wRX6YAyymQTPat43sU1qa16D0yByHhrPDD6MvIHItScWhAWed84?= =?us-ascii?Q?UHjOzjsxBRVkhoZ1TxIOD7CgDhtL35aRzC/8FXZD7fB0Gf+zyucUcUyHO+yi?= =?us-ascii?Q?7QK22ENvOwhkxnADxrkXTAUCaddew0NWC1YAuQ6T0YRCQASQkXyM0NMxtB49?= =?us-ascii?Q?+HnCez1msRFSWt1SYld/CgpSgucPJISy4nLxE3AN?= 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: 512a99eb-9123-4461-6ab6-08dc8c8c4d96 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jun 2024 16:09:00.4733 (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: Qvx8siHHklKsMvZztj65xKZ4gF3UBU2rz2AjlhTPezbFai8yrXPvEfCftPP5KW/F7va82oGwWgulXfaWmM1tnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7313 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 14 Jun 2024 09:09:04 -0700 Resent-From: jiewen.yao@intel.com Reply-To: devel@edk2.groups.io,jiewen.yao@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: PJSYIrvsyT7mMG9rWg3qDjU3x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=sMqZMXxl; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Hey This PR seems just a workaround. I don't feel it is right solution to hardcode BIT30. What if the host platform does not have such capability? You will get failu= re later. To fix this function, can we call real CPUID instruction to return real val= ue? UINT32 EFIAPI UnitTestHostBaseLibAsmCpuid ( IN UINT32 Index, OUT UINT32 *Eax OPTIONAL, OUT UINT32 *Ebx OPTIONAL, OUT UINT32 *Ecx OPTIONAL, OUT UINT32 *Edx OPTIONAL ) { UINT32 RetEcx; RetEcx =3D 0; switch (Index) { case 1: RetEcx |=3D BIT30; /* RdRand */ break; } if (Eax !=3D NULL) { *Eax =3D 0; } if (Ebx !=3D NULL) { *Ebx =3D 0; } if (Ecx !=3D NULL) { *Ecx =3D RetEcx; } if (Edx !=3D NULL) { *Edx =3D 0; } return Index; } > -----Original Message----- > From: Li, Yi1 > Sent: Friday, June 14, 2024 9:32 PM > To: Gerd Hoffmann ; devel@edk2.groups.io > Cc: Hou, Wenxing ; Yao, Jiewen > ; Kinney, Michael D ; > Pedro Falcato ; Ard Biesheuvel > > Subject: RE: [edk2-devel] CryptoPkg host test broken due to smoketest for > RDRAND >=20 > Approved, appreciate your quick response. >=20 > Thanks, > Yi >=20 > -----Original Message----- > From: Gerd Hoffmann > Sent: Friday, June 14, 2024 6:41 PM > To: devel@edk2.groups.io; Li, Yi1 > Cc: Hou, Wenxing ; Yao, Jiewen > ; Kinney, Michael D ; > Pedro Falcato ; Ard Biesheuvel > > Subject: Re: [edk2-devel] CryptoPkg host test broken due to smoketest for > RDRAND >=20 > On Fri, Jun 14, 2024 at 07:07:41AM GMT, Li, Yi wrote: > > All crypto host tests which consumed randlib broken due to: > > https://github.com/tianocore/edk2/pull/5714 > > Not sure why this issue not reported by CI when merge this PR. > > > > The reason is that the ```BaseRngLibConstructor``` of rnglib is not cal= led in host > test, so ```mRdRandSupported``` is not enabled. > > Then the Crypto API calls ```GetRandomNumber*``` will fail. > > GetRandomNumber64 ( > > OUT UINT64 *Rand > > ) > > { > > ...... > > if (!ArchIsRngSupported ()) { > > return FALSE; > > } > > > > Is there a way to let unit test host to call the constructors correctly= ? >=20 > https://github.com/tianocore/edk2/pull/5775 >=20 > take care, > Gerd -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119574): https://edk2.groups.io/g/devel/message/119574 Mute This Topic: https://groups.io/mt/106666288/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-