From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 24C35202E616F for ; Mon, 16 Oct 2017 07:05:51 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2017 07:09:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,387,1503385200"; d="scan'208";a="1206350041" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 16 Oct 2017 07:09:25 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Oct 2017 07:09:25 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Oct 2017 07:09:24 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Mon, 16 Oct 2017 22:09:22 +0800 From: "Zhang, Chao B" To: Gary Lin CC: "edk2-devel@lists.01.org" , "Long, Qin" Thread-Topic: [edk2] [PATCH] SecurityPkg:AuthVariableLib:Implement ECR1707 for Private Auth Variable Thread-Index: AQHTQzqGHmh663bnF0qonEG/PuhN66LlPLSAgAFNfLA= Date: Mon, 16 Oct 2017 14:09:22 +0000 Message-ID: References: <20171012091425.29420-1-chao.b.zhang@intel.com> <20171016021529.sz6sqnud5twdxj6w@GaryWorkstation> In-Reply-To: <20171016021529.sz6sqnud5twdxj6w@GaryWorkstation> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg:AuthVariableLib:Implement ECR1707 for Private Auth Variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 14:05:51 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 R2FyeToNCiAgVGhhbmtzIGZvciBwb2ludGluZyB0aGlzLiBQbGVhc2UgaGVscCB0byByZXZpZXcg dGhlIHBhdGNoLg0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogR2FyeSBMaW4g W21haWx0bzpnbGluQHN1c2UuY29tXSANClNlbnQ6IE1vbmRheSwgT2N0b2JlciAxNiwgMjAxNyAx MDoxNSBBTQ0KVG86IFpoYW5nLCBDaGFvIEIgPGNoYW8uYi56aGFuZ0BpbnRlbC5jb20+DQpDYzog ZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmc7IExvbmcsIFFpbiA8cWluLmxvbmdAaW50ZWwuY29tPg0K U3ViamVjdDogUmU6IFtlZGsyXSBbUEFUQ0hdIFNlY3VyaXR5UGtnOkF1dGhWYXJpYWJsZUxpYjpJ bXBsZW1lbnQgRUNSMTcwNyBmb3IgUHJpdmF0ZSBBdXRoIFZhcmlhYmxlDQoNCk9uIFRodSwgT2N0 IDEyLCAyMDE3IGF0IDA1OjE0OjI1UE0gKzA4MDAsIFpoYW5nLCBDaGFvIEIgd3JvdGU6DQo+IEVD UjE3MDcgZm9yIFVFRkkyLjcgY2xhcmlma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Ag ICAgVUlOVDggICAgICAgICAgICAqQ2VydERhdGEsDQo+IC0gIElOICAgICBVSU5UTiAgICAgICAg ICAgIENlcnREYXRhU2l6ZQ0KPiArICBJTiAgICAgVUlOVDggICAgICAgICAgICAqU2lnbmVyQ2Vy dCwNCj4gKyAgSU4gICAgIFVJTlROICAgICAgICAgICAgU2lnbmVyQ2VydFNpemUsDQo+ICsgIElO ICAgICBVSU5UOCAgICAgICAgICAgICpUb3BMZXZlbENlcnQsDQo+ICsgIElOICAgICBVSU5UTiAg ICAgICAgICAgIFRvcExldmVsQ2VydFNpemUNCj4gICAgKQ0KPiAgew0KPiAgICBFRklfU1RBVFVT ICAgICAgICAgICAgICBTdGF0dXM7DQo+IEBAIC0xOTA0LDEwICsxOTg4LDEyIEBAIEluc2VydENl cnRzVG9EYiAoDQo+ICAgIFVJTlQzMiAgICAgICAgICAgICAgICAgIE5ld0NlcnREYlNpemU7DQo+ ICAgIFVJTlQzMiAgICAgICAgICAgICAgICAgIENlcnROb2RlU2l6ZTsNCj4gICAgVUlOVDMyICAg ICAgICAgICAgICAgICAgTmFtZVNpemU7DQo+ICsgIFVJTlQzMiAgICAgICAgICAgICAgICAgIENl cnREYXRhU2l6ZTsNCj4gICAgQVVUSF9DRVJUX0RCX0RBVEEgICAgICAgKlB0cjsNCj4gICAgQ0hB UjE2ICAgICAgICAgICAgICAgICAgKkRiTmFtZTsNCj4gKyAgVUlOVDggICAgICAgICAgICAgICAg ICAgU2hhMjU2RGlnZXN0W1NIQTI1Nl9ESUdFU1RfU0laRV07DQo+ICANCj4gLSAgaWYgKChWYXJp YWJsZU5hbWUgPT0gTlVMTCkgfHwgKFZlbmRvckd1aWQgPT0gTlVMTCkgfHwgKENlcnREYXRhID09 IE5VTEwpKSB7DQo+ICsgIGlmICgoVmFyaWFibGVOYW1lID09IE5VTEwpIHx8IChWZW5kb3JHdWlk ID09IE5VTEwpIHx8IChTaWduZXJDZXJ0ID09IE5VTEwpIHx8KFRvcExldmVsQ2V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GF0dXM7DQo+ICsgIH0NCj4gKw0KPiAgICBOZXdDZXJ0RGIgICAg ID0gKFVJTlQ4KikgbUNlcnREYlN0b3JlOw0KPiAgDQo+ICAgIC8vDQo+IEBAIC0xOTk5LDcgKzIw OTgsNyBAQCBJbnNlcnRDZXJ0c1RvRGIgKA0KPiAgDQo+ICAgIENvcHlNZW0gKA0KPiAgICAgIChV SU5UOCAqKSBQdHIgKyAgc2l6ZW9mIChBVVRIX0NFUlRfREJfREFUQSkgKyBOYW1lU2l6ZSAqIHNp emVvZiAoQ0hBUjE2KSwNCj4gLSAgICBDZXJ0RGF0YSwNCj4gKyAgICBTaGEyNTZEaWdlc3QsDQo+ ICAgICAgQ2VydERhdGFTaXplDQo+ICAgICAgKTsNCj4gIA0KPiBAQCAtMjE4MSwxOSArMjI4MCwy NyBAQCBWZXJpZnlUaW1lQmFzZWRQYXlsb2FkICgNCj4gICAgVUlOVE4gICAgICAgICAgICAgICAg ICAgICAgICAgICAgTmV3RGF0YVNpemU7DQo+ICAgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICpCdWZmZXI7DQo+ICAgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgIExl bmd0aDsNCj4gLSAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAgKlJvb3RDZXJ0Ow0K PiAtICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICBSb290Q2VydFNpemU7DQo+ICsg IFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICpUb3BMZXZlbENlcnQ7DQo+ICsgIFVJ TlROICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRvcExldmVsQ2VydFNpemU7DQo+ICsgIFVJ TlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICpUcnVzdGVkQ2VydDsNCj4gKyAgVUlOVE4g ICAgICAgICAgICAgICAgICAgICAgICAgICAgVHJ1c3RlZENlcnRTaXplOw0KPiAgICBVSU5UOCAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqU2lnbmVyQ2VydHM7DQo+ICAgIFVJTlROICAgICAg ICAgICAgICAgICAgICAgICAgICAgIENlcnRTdGFja1NpemU7DQo+ICAgIFVJTlQ4ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICpDZXJ0c0luQ2VydERiOw0KPiAgICBVSU5UMzIgICAgICAgICAg ICAgICAgICAgICAgICAgICBDZXJ0c1NpemVpbkRiOw0KPiArICBVSU5UOCAgICAgICAgICAgICAg ICAgICAgICAgICAgICBTaGEyNTZEaWdlc3RbU0hBMjU2X0RJR0VTVF9TSVpFXTsNCj4gIA0KPiAr ICAvLw0KPiArICAvLyAxLiBUb3BMZXZlbENlcnQgaXMgdGhlIHRvcC1sZXZlbCBpc3N1ZXIgY2Vy dGlmaWNhdGUgaW4gc2lnbmF0dXJlIFNpZ25lciBDZXJ0IENoYWluDQo+ICsgIC8vIDIuIFRydXN0 ZWRDZXJ0IGlzIHRoZSBjZXJ0aWZpY2F0ZSB3aGljaCBmaXJtd2FyZSB0cnVzdHMuIEl0IGNvdWxk IGJlIHNhdmVkIGluIHByb3RlY3RlZA0KPiArICAvLyAgICAgc3RvcmFnZSBvciBQSyBwYXlsb2Fk IG9uIFBLIGluaXQNCj4gKyAgLy8NCj4gICAgVmVyaWZ5U3RhdHVzICAgICAgICAgICA9IEZBTFNF Ow0KPiAgICBDZXJ0RGF0YSAgICAgICAgICAgICAgID0gTlVMTDsNCj4gICAgTmV3RGF0YSAgICAg ICAgICAgICAgICA9IE5VTEw7DQo+ICAgIEF0dHIgICAgICAgICAgICAgICAgICAgPSBBdHRyaWJ1 dGVzOw0KPiAgICBTaWduZXJDZXJ0cyAgICAgICAgICAgID0gTlVMTDsNCj4gLSAgUm9vdENlcnQg ICAgICAgICAgICAgICA9IE5VTEw7DQo+ICsgIFRvcExldmVsQ2VydCAgICAgICAgICAgPSBOVUxM Ow0KPiAgICBDZXJ0c0luQ2VydERiICAgICAgICAgID0gTlVMTDsNCj4gIA0KPiAgICAvLw0KPiBA QCAtMjMyNSw4ICsyNDMyLDggQEAgVmVyaWZ5VGltZUJhc2VkUGF5bG9hZCAoDQo+ICAgICAgICAg ICAgICAgICAgICAgICBTaWdEYXRhU2l6ZSwNCj4gICAgICAgICAgICAgICAgICAgICAgICZTaWdu ZXJDZXJ0cywNCj4gICAgICAgICAgICAgICAgICAgICAgICZDZXJ0U3RhY2tTaXplLA0KPiAtICAg ICAgICAgICAgICAgICAgICAgJlJvb3RDZXJ0LA0KPiAtICAgICAgICAgICAgICAgICAgICAgJlJv b3RDZXJ0U2l6ZQ0KPiArICAgICAgICAgICAgICAgICAgICAgJlRvcExldmVsQ2VydCwNCj4gKyAg ICAgICAgICAgICAgICAgICAgICZUb3BMZXZlbENlcnRTaXplDQo+ICAgICAgICAgICAgICAgICAg ICAgICApOw0KPiAgICAgIGlmICghVmVyaWZ5U3RhdHVzKSB7DQo+ICAgICAgICBnb3RvIEV4aXQ7 DQo+IEBAIC0yMzQ4LDggKzI0NTUsOCBAQCBWZXJpZnlUaW1lQmFzZWRQYXlsb2FkICgNCj4gICAg ICB9DQo+ICAgICAgQ2VydExpc3QgPSAoRUZJX1NJR05BVFVSRV9MSVNUICopIERhdGE7DQo+ICAg ICAgQ2VydCAgICAgPSAoRUZJX1NJR05BVFVSRV9EQVRBICopICgoVUlOVDggKikgQ2VydExpc3Qg KyBzaXplb2YgKEVGSV9TSUdOQVRVUkVfTElTVCkgKyBDZXJ0TGlzdC0+U2lnbmF0dXJlSGVhZGVy U2l6ZSk7DQo+IC0gICAgaWYgKChSb290Q2VydFNpemUgIT0gKENlcnRMaXN0LT5TaWduYXR1cmVT aXplIC0gKHNpemVvZiAoRUZJX1NJR05BVFVSRV9EQVRBKSAtIDEpKSkgfHwNCj4gLSAgICAgICAg KENvbXBhcmVNZW0gKENlcnQtPlNpZ25hdHVyZURhdGEsIFJvb3RDZXJ0LCBSb290Q2VydFNpemUp ICE9IDApKSB7DQo+ICsgICAgaWYgKChUb3BMZXZlbENlcnRTaXplICE9IChDZXJ0TGlzdC0+U2ln bmF0dXJlU2l6ZSAtIChzaXplb2YgKEVGSV9TSUdOQVRVUkVfREFUQSkgLSAxKSkpIHx8DQo+ICsg ICAgICAgIChDb21wYXJlTWVtIChDZXJ0LT5TaWduYXR1cmVEYXRhLCBUb3BMZXZlbENlcnQsIFRv cExldmVsQ2VydFNpemUpICE9IDApKSB7DQo+ICAgICAgICBWZXJpZnlTdGF0dXMgPSBGQUxTRTsN Cj4gICAgICAgIGdvdG8gRXhpdDsNCj4gICAgICB9DQo+IEBAIC0yMzYwLDggKzI0NjcsOCBAQCBW ZXJpZnlUaW1lQmFzZWRQYXlsb2FkICgNCj4gICAgICBWZXJpZnlTdGF0dXMgPSBQa2NzN1Zlcmlm eSAoDQo+ICAgICAgICAgICAgICAgICAgICAgICBTaWdEYXRhLA0KPiAgICAgICAgICAgICAgICAg ICAgICAgU2lnRGF0YVNpemUsDQo+IC0gICAgICAgICAgICAgICAgICAgICBSb290Q2VydCwNCj4g LSAgICAgICAgICAgICAgICAgICAgIFJvb3RDZXJ0U2l6ZSwNCj4gKyAgICAgICAgICAgICAgICAg ICAgIFRvcExldmVsQ2VydCwNCj4gKyAgICAgICAgICAgICAgICAgICAgIFRvcExldmVsQ2VydFNp emUsDQo+ICAgICAgICAgICAgICAgICAgICAgICBOZXdEYXRhLA0KPiAgICAgICAgICAgICAgICAg ICAgICAgTmV3RGF0YVNpemUNCj4gICAgICAgICAgICAgICAgICAgICAgICk7DQo+IEBAIC0yMzk0 LDggKzI1MDEsOCBAQCBWZXJpZnlUaW1lQmFzZWRQYXlsb2FkICgNCj4gICAgICAgICAgICAvLw0K PiAgICAgICAgICAgIC8vIEl0ZXJhdGUgZWFjaCBTaWduYXR1cmUgRGF0YSBOb2RlIHdpdGhpbiB0 aGlzIENlcnRMaXN0IGZvciBhIHZlcmlmeQ0KPiAgICAgICAgICAgIC8vDQo+IC0gICAgICAgICAg Um9vdENlcnQgICAgICA9IENlcnQtPlNpZ25hdHVyZURhdGE7DQo+IC0gICAgICAgICAgUm9vdENl cnRTaXplICA9IENlcnRMaXN0LT5TaWduYXR1cmVTaXplIC0gKHNpemVvZiAoRUZJX1NJR05BVFVS RV9EQVRBKSAtIDEpOw0KPiArICAgICAgICAgIFRydXN0ZWRDZXJ0ICAgICAgPSBDZXJ0LT5TaWdu YXR1cmVEYXRhOw0KPiArICAgICAgICAgIFRydXN0ZWRDZXJ0U2l6ZSAgPSBDZXJ0TGlzdC0+U2ln bmF0dXJlU2l6ZSAtIChzaXplb2YgKEVGSV9TSUdOQVRVUkVfREFUQSkgLSAxKTsNCj4gIA0KPiAg ICAgICAgICAgIC8vDQo+ICAgICAgICAgICAgLy8gVmVyaWZ5IFBrY3M3IFNpZ25lZERhdGEgdmlh IFBrY3M3VmVyaWZ5IGxpYnJhcnkuDQo+IEBAIC0yNDAzLDggKzI1MTAsOCBAQCBWZXJpZnlUaW1l QmFzZWRQYXlsb2FkICgNCj4gICAgICAgICAgICBWZXJpZnlTdGF0dXMgPSBQa2NzN1ZlcmlmeSAo DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTaWdEYXRhLA0KPiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgU2lnRGF0YVNpemUsDQo+IC0gICAgICAgICAgICAgICAgICAgICAgICAg ICBSb290Q2VydCwNCj4gLSAgICAgICAgICAgICAgICAgICAgICAgICAgIFJvb3RDZXJ0U2l6ZSwN Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgIFRydXN0ZWRDZXJ0LA0KPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgVHJ1c3RlZENlcnRTaXplLA0KPiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgTmV3RGF0YSwNCj4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5ld0RhdGFT aXplDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KPiBAQCAtMjQyOCw4ICsyNTM1 LDggQEAgVmV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DYWxjdWxhdGVQcml2 QXV0aFZhclNpZ25DaGFpblNIQTI1NkRpZ2VzdCgNCj4gKyAgICAgICAgICAgICAgICAgICBTaWdu ZXJDZXJ0cyArIHNpemVvZihVSU5UOCkgKyBzaXplb2YoVUlOVDMyKSwNCj4gKyAgICAgICAgICAg ICAgICAgICBSZWFkVW5hbGlnbmVkMzIgKChVSU5UMzIgKikoU2lnbmVyQ2VydHMgKyBzaXplb2Yo VUlOVDgpKSksDQo+ICsgICAgICAgICAgICAgICAgICAgVG9wTGV2ZWxDZXJ0LA0KPiArICAgICAg ICAgICAgICAgICAgIFRvcExldmVsQ2VydFNpemUsDQo+ICsgICAgICAgICAgICAgICAgICAgU2hh MjU2RGlnZXN0DQo+ICsgICAgICAgICAgICAgICAgICAgKTsNCj4gKyAgICAgICAgaWYgKEVGSV9F UlJPUihTdGF0dXMpIHx8IENvbXBhcmVNZW0gKFNoYTI1NkRpZ2VzdCwgQ2VydHNJbkNlcnREYiwg Q2VydHNTaXplaW5EYikgIT0gMCl7DQo+ICsgICAgICAgICAgZ290byBFeGl0Ow0KPiArICAgICAg ICB9DQo+ICsgICAgICB9IGVsc2Ugew0KPiArICAgICAgICAgLy8NCj4gKyAgICAgICAgIC8vIEtl ZXAgYmFja3dhcmQgY29tcGF0aWJsZSB3aXRoIHByZXZpb3VzIHNvbHV0aW9uIHdoaWNoIHNhdmVz IHdob2xlIHNpZ25lciBjZXJ0cyBzdGFjayBpbiBDZXJ0RGINCj4gKyAgICAgICAgIC8vDQo+ICsg ICAgICAgICBpZiAoKENlcnRTdGFja1NpemUgIT0gQ2VydHNTaXplaW5EYikgfHwNCj4gKyAgICAg ICAgICAgICAoQ29tcGFyZU1lbSAoU2lnbmVyQ2VydHMsIENlcnRzSW5DZXJ0RGIsIENlcnRzU2l6 ZWluRGIpICE9IDApKSB7DQo+ICsgICAgICAgICAgICAgIGdvdG8gRXhpdDsNCj4gKyAgICAgICAg IH0NCj4gICAgICAgIH0NCj4gICAgICB9DQ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pZ25lcnMgKFJvb3RD ZXJ0KTsNCj4gKyAgICBQa2NzN0ZyZWVTaWduZXJzIChUb3BMZXZlbENlcnQpOw0KPiAgICAgIFBr Y3M3RnJlZVNpZ25lcnMgKFNpZ25lckNlcnRzKTsNCj4gICAgfQ0KPiAgDQo+IC0tIA0KPiAxLjku NS5tc3lzZ2l0LjENCj4gDQo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fDQo+IGVkazItZGV2ZWwgbWFpbGluZyBsaXN0DQo+IGVkazItZGV2ZWxAbGlzdHMu MDEub3JnDQo+IGh0dHBzOi8vbGlzdHMuMDEub3JnL21haWxtYW4vbGlzdGluZm8vZWRrMi1kZXZl bA0KPiANCg==