From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 1BFD3220EE103 for ; Tue, 12 Dec 2017 00:39:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2017 00:44:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,394,1508828400"; d="scan'208";a="11612883" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 12 Dec 2017 00:43:52 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Dec 2017 00:43:51 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Tue, 12 Dec 2017 16:43:51 +0800 From: "Ni, Ruiyu" To: "Song, BinX" , "edk2-devel@lists.01.org" CC: "lersek@redhat.com" , "Dong, Eric" Thread-Topic: [edk2] [PATCH] UefiCpuPkg: Check invalid RegisterCpuFeature parameter Thread-Index: AdNyWEaEvGgYJVSAQvqp+Guyv2HCDQAC7+uA//9/lID//f2HsA== Date: Tue, 12 Dec 2017 08:43:50 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BAF9678@SHSMSX104.ccr.corp.intel.com> References: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CB5@shsmsx102.ccr.corp.intel.com> <03c857ea-b316-5307-5489-e5ddf967b295@Intel.com> <559D2DF22BC9A3468B4FA1AA547F0EF1025C1D4F@shsmsx102.ccr.corp.intel.com> In-Reply-To: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1D4F@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg: Check invalid RegisterCpuFeature parameter 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: Tue, 12 Dec 2017 08:39:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBTb25nLCBCaW5YDQo+IFNlbnQ6 IE1vbmRheSwgRGVjZW1iZXIgMTEsIDIwMTcgNjowMCBQTQ0KPiBUbzogTmksIFJ1aXl1IDxydWl5 dS5uaUBpbnRlbC5jb20+OyBlZGsyLWRldmVsQGxpc3RzLjAxLm9yZw0KPiBDYzogbGVyc2VrQHJl ZGhhdC5jb207IERvbmcsIEVyaWMgPGVyaWMuZG9uZ0BpbnRlbC5jb20+DQo+IFN1YmplY3Q6IFJF OiBbZWRrMl0gW1BBVENIXSBVZWZpQ3B1UGtnOiBDaGVjayBpbnZhbGlkIFJlZ2lzdGVyQ3B1RmVh dHVyZQ0KPiBwYXJhbWV0ZXINCj4gDQo+IEhpIFJheSwNCj4gDQo+IEJlbG93IGlzIG15IG9waW5p b25zIGZvciB5b3VyIDIgcXVlc3Rpb25zOg0KPiAxLiBDYW4gd2UgcmVuYW1lIHRoaXMgZnVuY3Rp b24gbmFtZSB0bw0KPiAiUmVnaXN0ZXJDcH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