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=192.55.52.151; helo=mga17.intel.com; envelope-from=binx.song@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 735802214E338 for ; Mon, 11 Dec 2017 01:55:56 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2017 02:00:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="1594410" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga008.fm.intel.com with ESMTP; 11 Dec 2017 02:00:33 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 02:00:33 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 02:00:32 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Mon, 11 Dec 2017 18:00:28 +0800 From: "Song, BinX" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "lersek@redhat.com" , "Dong, Eric" Thread-Topic: [edk2] [PATCH] UefiCpuPkg: Check invalid RegisterCpuFeature parameter Thread-Index: AdNyWEaEvGgYJVSAQvqp+Guyv2HCDf//kWOA//94i9A= Date: Mon, 11 Dec 2017 10:00:27 +0000 Message-ID: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1D4F@shsmsx102.ccr.corp.intel.com> References: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CB5@shsmsx102.ccr.corp.intel.com> <03c857ea-b316-5307-5489-e5ddf967b295@Intel.com> In-Reply-To: <03c857ea-b316-5307-5489-e5ddf967b295@Intel.com> 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] 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: Mon, 11 Dec 2017 09:55:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgUmF5LA0KDQpCZWxvdyBpcyBteSBvcGluaW9ucyBmb3IgeW91ciAyIHF1ZXN0aW9uczoNCjEu IENhbiB3ZSByZW5hbWUgdGhpcyBmdW5jdGlvbiBuYW1lIHRvICJSZWdpc3RlckNwdUZlYXR1cmVM aWJJc0ZlYXR1cmVWYWxpZCI/DQpbQmVsbF06IEluIGNvbnRlbnQgb2YgUmVnaXN0ZXJDcHVGZWF0 dXJlc0xpYi5jLCB0aGVyZSBpcyBhIGZ1bmN0aW9uIG5hbWVkIElzQml0TWFza01hdGNoQ2hlY2so KSwgaXQncyBteSBmdW5jdGlvbidzIGJhc2UsIHRoZXkgaGF2ZSBzaW1pbGFyIGZ1bmN0aW9uIC0g YSBzbWFsbCB2YWxpZC9pbnZhbGlkIGNoZWNrLA0KU28gSSB0aGluayBpdCBpcyBiZXR0ZXIgdG8g a2VlcCB0aGVtIGFsaWduLg0KMi4gQ2FuIHdlIGp1c3Qgc2F5ICJD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