From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 1993481F9B for ; Wed, 25 Jan 2017 18:00:08 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 25 Jan 2017 18:00:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,287,1477983600"; d="scan'208";a="1117924755" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 25 Jan 2017 18:00:07 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 25 Jan 2017 18:00:07 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 25 Jan 2017 18:00:07 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Thu, 26 Jan 2017 10:00:05 +0800 From: "Zeng, Star" To: "Zhang, Chao B" , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] SecurityPkg: Tcg2Dxe: Update PCR[4] measure logic Thread-Index: AQHSds3WzaL6O5/2OUu631fgHS/gWqFKAfvg Date: Thu, 26 Jan 2017 02:00:04 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B81A417@shsmsx102.ccr.corp.intel.com> References: <20170125054228.15256-1-chao.b.zhang@intel.com> In-Reply-To: <20170125054228.15256-1-chao.b.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg: Tcg2Dxe: Update PCR[4] measure logic X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2017 02:00:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 UmV2aWV3ZWQtYnk6IFN0YXIgWmVuZyA8c3Rhci56ZW5nQGludGVsLmNvbT4NCg0KVGhhbmtzLA0K U3Rhcg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IGVkazItZGV2ZWwgW21haWx0 bzplZGsyLWRldmVsLWJvdW5jZXNAbGlzdHMuMDEub3JnXSBPbiBCZWhhbGYgT2YgWmhhbmcsIENo YW8gQg0KU2VudDogV2VkbmVzZGF5LCBKYW51YXJ5IDI1LCAyMDE3IDE6NDIgUE0NClRvOiBlZGsy LWRldmVsQGxpc3RzLjAxLm9yZw0KQ2M6IFlhbywgSmlld2VuIDxqaWV3ZW4ueWFvQGludGVsLmNv bT47IFpoYW5nLCBDaGFvIEIgPGNoYW8uYi56aGFuZ0BpbnRlbC5jb20+OyBaZW5nLCBTdGFyIDxz dGFyLnplbmdAaW50ZWwuY29tPg0KU3ViamVjdDogW2VkazJdIFtQQVRDSF0gU2VjdXJpdHlQa2c6 IFRjZzJEeGU6IFVwZGF0ZSBQQ1JbNF0gbWVhc3VyZSBsb2dpYw0KDQpVcGRhdGUgUENSWzRdIG1l YXN1cmUgbG9naWMgZm9yIGVhY2ggYm9vdCBhdHRlbXB0Lg0KMS4gTWVhc3VyZSBldmVudCB0byBQ Q1JbNF0gaW5zdGVhZCBvZiBQQ1JbNV0gMi4gTWVhc3VyZSDigJxDYWxsaW5nIFVFRkkgQXBwbGlj YXRpb24gZnJvbSBCb290IE9wd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Zmlyc3QgYm9vdCBhdHRlbXB0Lg0KICAgICAvLw0KICAg ICBTdGF0dXMgPSBUY2dNZWFzdXJlQWN0aW9uICgNCisgICAgICAgICAgICAgICA0LA0KICAgICAg ICAgICAgICAgIEVGSV9DQUxMSU5HX0VGSV9BUFBMSUNBVElPTg0KICAgICAgICAgICAgICAgICk7 DQogICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCkBAIC0yMjEzLDExICsyMjE2LDI0IEBA IE9uUmVhZHlUb0Jvb3QgKA0KICAgICAvLyA2LiBOb3QgZmlyc3QgYXR0ZW1wdCwgbWVhbmluZyBh IHJldHVybiBmcm9tIGxhc3QgYXR0ZW1wdA0KICAgICAvLw0KICAgICBTdGF0dXMgPSBUY2dNZWFz dXJlQWN0aW9uICgNCisgICAgICAgICAgICAgICA0LA0KICAgICAgICAgICAgICAgIEVGSV9SRVRV Uk5JTkdfRlJPTV9FRklfQVBQTElDQVRPSU4NCiAgICAgICAgICAgICAgICApOw0KICAgICBpZiAo RUZJX0VSUk9SIChTdGF0dXMpKSB7DQogICAgICAgREVCVUcgKChFRklfRF9FUlJPUiwgIiVhIG5v dCBNZWFzdXJlZC4gRXJyb3IhXG4iLCBFRklfUkVUVVJOSU5HX0ZST01fRUZJX0FQUExJQ0FUT0lO KSk7DQogICAgIH0NCisNCisgICAgLy8NCisgICAgLy8gNy4gTmV4dCBib290IGF0dGVtcHQsIG1l YXN1cmUgIkNhbGxpbmcgRUZJIEFwcGxpY2F0aW9uIGZyb20gQm9vdCBPcHRpb24iIGFnYWluDQor ICAgIC8vIFRDRyBQQyBDbGllbnQgUEZQIHNwZWMgU2VjdGlvbiAyLjQuNC41IFN0ZXAgNA0KKyAg ICAvLw0KKyAgICBTdGF0dXMgPSBUY2dNZWFzdXJlQWN0aW9uICgNCisgICAgICAgICAgICAgICA0 LA0KKyAgICAgICAgICAgICAgIEVGSV9DQUxMSU5HX0VGSV9BUFBMSUNBVElPTg0KKyAgICAgICAg ICAgICAgIC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