From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.3475.1581796225867186126 for ; Sat, 15 Feb 2020 11:50:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=znZ7IBZz; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: amol.n.sukerkar@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2020 11:50:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,445,1574150400"; d="scan'208";a="267944718" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by fmsmga002.fm.intel.com with ESMTP; 15 Feb 2020 11:50:25 -0800 Received: from orsmsx126.amr.corp.intel.com (10.22.240.126) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 15 Feb 2020 11:50:25 -0800 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX126.amr.corp.intel.com (10.22.240.126) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 15 Feb 2020 11:50:24 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 15 Feb 2020 11:50:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FSsmzosIezw49P0si45ik9KFlTFwKsZYKesJrsCwb3n5ctj7jbWHtBjzLPw2AXQWD2KSPwiLSG9qLNLufu65K7k8uhmuaZHcIN2ZALkejvYcEGJJwqo5cUKnBeDUrY0YLsRAB5pbTdspyqFpEVkxvbHc8USClhE0ngaxqu6bsS9yPPRANQiLV/sbxPtN8l1+h9wB2/1QDaQr9kXCzlfSaDA9ONZJtCuT5qtc3d9QdhzXAgvM/qxttHxDTYVtu+1rffSku0FIL5YmfvRqWokZrY5ueLvsmfRzX8FlGEv9ciRzAkg1IGMjY3hOPddsLlD4CSCOHAunHjO6OWFA/Ld4dQ== 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-SenderADCheck; bh=hWJ99PpMxrYlFvnX95WVEer883rLWBE3QuJ+1HcrHeI=; b=Oq7o1hNjYhcp9iXmayR+CI68iF/c4mD1v2iUWfgMSLitp2tXE9DeR332MUbFfD8Je9ZVafh2YEK5vnA64FBu7E9UFYYt5+6KQYwcIPbWVEEOqcdEoy6vox6EPBMXtZnhg6NmIVyO8hczObHVACUptam2Rphghe5EtLu9kZ2q0Ra8PhkwIpLQSMYxjBjsVbgnMS/hK7/uvEkFO7GIJI66gVJyLY6OkbpHpv93ivZtPCMIDkRUYAwyZKzGNs+7tkZLse8Tsd/+PpJ6SuO1bGvZhsabfn7OTfDvd71xMTbTCgjjB1M5QpsO9VLCiux3Hm+YJmF10GM3Ipj6VN81qZ5oPg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hWJ99PpMxrYlFvnX95WVEer883rLWBE3QuJ+1HcrHeI=; b=znZ7IBZz5HYqxOHC50TjNX9iDEubIIld3WcLA7NQqlDYVHURCnSEB+MjrVcWf0wWO1aONj52XlAfIpNPd5z6I8DMUk1KByZ0VcvVUt1Rqmhl898jWt9psiSZkGUcaMABnUVf2dOtxSPDjjdXaUr9Hiipc9AsfB5DQnV5GVjc33g= Received: from SN6PR11MB2893.namprd11.prod.outlook.com (20.176.241.151) by SN6PR11MB3230.namprd11.prod.outlook.com (52.135.112.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Sat, 15 Feb 2020 19:50:22 +0000 Received: from SN6PR11MB2893.namprd11.prod.outlook.com ([fe80::e59c:2d4b:b97c:9676]) by SN6PR11MB2893.namprd11.prod.outlook.com ([fe80::e59c:2d4b:b97c:9676%7]) with mapi id 15.20.2707.034; Sat, 15 Feb 2020 19:50:22 +0000 From: "Sukerkar, Amol N" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Yao, Jiewen" , "Wang, Jian J" , "Agrawal, Sachin" , "Gao, Liming" , "Sukerkar, Amol N" Subject: Re: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Thread-Topic: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Thread-Index: AQHV45WQr3UR/dgvxEynctWBfAfr1qgco5oAgAAD1JCAAADrIIAAAYjg Date: Sat, 15 Feb 2020 19:50:22 +0000 Message-ID: References: <20200215001903.15024-1-amol.n.sukerkar@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=amol.n.sukerkar@intel.com; x-originating-ip: [134.134.136.205] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 39ead623-4970-4677-9e9b-08d7b2504b4d x-ms-traffictypediagnostic: SN6PR11MB3230: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2150; x-forefront-prvs: 03142412E2 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(136003)(346002)(366004)(39860400002)(189003)(199004)(966005)(52536014)(26005)(186003)(53546011)(6506007)(5660300002)(4326008)(478600001)(33656002)(8936002)(76116006)(64756008)(66476007)(66946007)(54906003)(86362001)(7696005)(110136005)(2906002)(66446008)(316002)(107886003)(81156014)(8676002)(81166006)(71200400001)(66556008)(9686003)(55016002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR11MB3230;H:SN6PR11MB2893.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dqu+jGdW+W/7gL3uOG4knheZYnaW/drU1Fh0R/oml1QKyxSejyAJSRRpk0gNDMcW2BTLiDlRhc6rqcstBtKT68jO1hF9CpAxD2W068krsbMp/YN7kfzBNp072r5qbu0OfN6IJ8rMQydMw5FR2Ar8F0zB3kV4PDvI5B7JSzMDOhP2G0obNztAe1J2HcZTjp2UCC8ILtwQH8ORVSMM8RazGjQ/JFjLkTwfYBJoDBf9g9aB2ewQHqT8ijKFhlJJugpdE/QMm+NBxV0MpimfV2odlef0RIFySOt5Wu/FO3s8RwfzwtPTyxHDfs/akh3qJJii+TvkyZbdYDIrvQUX//rZxisNc09ZB5+TZlBycF53Tf3ik83oPtTfUhSAuLKUbG+p6GFWyCE4DnVGVpXJpIpfLqq9gwoZOa59bQfQjZ3IXi0uYrx/kAvo/SpQpOF6xlwk4OzJ6UeSdTdX0svL2qAEk+zhYIuYU/wZYdXsDHNPsRhsgqStDDieFkbktyuZ2QFwbQAifttt7xY/jRst0pkJ3A== x-ms-exchange-antispam-messagedata: MbqgrH4sJCGuTsMFuTDXeMoOIUFlINLaXwn56KHBSWQEjdSj9ISFAQODzllfLoHoNBNgeiiICoYKi4pFue8Zd5Y5iVh9vvQM/d4s+mio1gLtHQLaaFSdKA8W0p4n3ADus+3KCI26HUEjt1JDcMgxLg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 39ead623-4970-4677-9e9b-08d7b2504b4d X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2020 19:50:22.3842 (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: o2QCtO5lH4XKg8rakYBHnt6EmJRO1n0WbCFY2nFO71/VSo5ZaipWTYWWSd9AgLiDqzetiOaMPtanaGNv7iUffMhYE6utwqDG1z6GHNoA+jY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3230 Return-Path: amol.n.sukerkar@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks for the explanation, Mike! Also, I noticed during rebasing my origin= al commit (BZ: 2151) that PcdSetxx does not work with PcdsFixedAtBuild anym= ore, which, should be by design. Please ignore patch v5 as patch v6 contains all the fixes. ~ Amol -----Original Message----- From: Kinney, Michael D =20 Sent: Saturday, February 15, 2020 12:44 PM To: Sukerkar, Amol N ; devel@edk2.groups.io; Kin= ney, Michael D Cc: Yao, Jiewen ; Wang, Jian J ; Agrawal, Sachin ; Gao, Liming Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib Amol, FixedPcdGet32() does not apply to this use case. FixedPcdGet32() is usually only used when a PCD value is used to fill in a = field of a structure in a global variable where the compiler requires a val= ue instead of a variable or a function call. The general rule is to use PcdGet/Setxx() everywhere possible to maximize c= ompatibility with different PCD types and only use FixedPcdGet/Setxx() if t= he compiler cannot build the component when PcdGet/Setxx() is used. Thanks, Mike > -----Original Message----- > From: Sukerkar, Amol N > Sent: Saturday, February 15, 2020 11:40 AM > To: Kinney, Michael D ;=20 > devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J=20 > ; Agrawal, Sachin ;=20 > Gao, Liming ; Sukerkar, Amol N=20 > > Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib >=20 > Hi Mike, >=20 > Yes, I just noticed and sent the patch with update 1 (build passed and=20 > worked with PcdGet16). I didn't notice the second change so I will=20 > make it as well in version 6. >=20 > Question: There is a call FixedPcdGet32 as well. Would it be=20 > applicable in BaseHashApiLib? >=20 > Thanks, > Amol >=20 > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, February 15, 2020 12:28 PM > To: Sukerkar, Amol N ;=20 > devel@edk2.groups.io; Kinney, Michael D > Cc: Yao, Jiewen ; Wang, Jian J=20 > ; Agrawal, Sachin ;=20 > Gao, Liming > Subject: RE: [PATCH v4 0/2] Enhancement and Fixes to BaseHashApiLib >=20 > Hi Amol, >=20 > Thanks for the updates: >=20 > There are a couple items remaining: >=20 > 1) BaseHashApiLib needs to use PcdGet32() instead of > PcdGet16() > 2) The extra [PcdsFixedAtBuild] line needs to be removed from=20 > CryptoPkg.dec >=20 > Thanks, >=20 > Mike >=20 > > -----Original Message----- > > From: Sukerkar, Amol N > > Sent: Friday, February 14, 2020 4:19 PM > > To: devel@edk2.groups.io > > Cc: Kinney, Michael D ; > Yao, Jiewen > > ; Wang, Jian J > ; Agrawal, > > Sachin ; Gao, Liming > > > Subject: [PATCH v4 0/2] Enhancement and Fixes to > BaseHashApiLib > > > > This patch implements the fixes and enhancement to > BaseHashApiLib in > > the following manner: > > - Remove reference to MD4 and MD5 hashing algorithms > as they are > > deprecated; > > - Align the enumeration for hashing algorithmswith > the one used in > > TPM 2.0 implementation defined in > > IndustryStandard/Tpm20.h; > > - Change the type of PcdHashApiLibPolicy to > PcdsFixedAtBuild to > > optimize away the unused hashing algorithms for a > particular > > instance of HashApiLib. > > > > More information can be found at Bugzilla ticket,=20 > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2511. > > > > Amol N Sukerkar (2): > > CryptoPkg/BaseHashApiLib: Align BaseHashApiLib with > TPM 2.0 > > Implementation > > CryptoPkg/BaseHashApiLib: Change > PcdHashApiLibPolicy type to > > FixedAtBuild > > > > CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.c | > > 121 ++++++-------------- > > CryptoPkg/CryptoPkg.dec | > > 18 ++- > > CryptoPkg/CryptoPkg.uni | > > 12 +- > > CryptoPkg/Include/Library/HashApiLib.h | > > 16 +-- > > 4 files changed, 52 insertions(+), 115 deletions(-) > > > > -- > > 2.16.2.windows.1 >=20 >=20