From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=hao.a.wu@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 649C521125007 for ; Tue, 18 Sep 2018 18:22:04 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2018 18:22:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,392,1531810800"; d="scan'208";a="263801185" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 18 Sep 2018 18:21:55 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 18:21:55 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 18:21:54 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.143]) by shsmsx102.ccr.corp.intel.com ([169.254.2.226]) with mapi id 14.03.0319.002; Wed, 19 Sep 2018 09:21:52 +0800 From: "Wu, Hao A" To: "Wang, Jian J" , "Justen, Jordan L" , "edk2-devel@lists.01.org" CC: "Bi, Dandan" , Laszlo Ersek , "Dong, Eric" , "Kinney, Michael D" Thread-Topic: [edk2] [PATCH] UefiCpuPkg/CpuMpPei: fix unsafe way to get stack pointer Thread-Index: AQHUTy640DXjSlmZskeJbRdzOAi3U6T1zyeAgAB4JICAAIe9cA== Date: Wed, 19 Sep 2018 01:21:51 +0000 Message-ID: References: <20180918090448.7324-1-jian.j.wang@intel.com> <153729377116.1021.13677753557698494356@jljusten-skl> In-Reply-To: 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] UefiCpuPkg/CpuMpPei: fix unsafe way to get stack pointer X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 01:22:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBXYW5nLCBKaWFuIEoNCj4gU2Vu dDogV2VkbmVzZGF5LCBTZXB0ZW1iZXIgMTksIDIwMTggOToxMyBBTQ0KPiBUbzogSnVzdGVuLCBK b3JkYW4gTDsgZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmcNCj4gQ2M6IFd1LCBIYW8gQTsgQmksIERh bmRhbjsgTGFzemxvIEVyc2VrOyBEb25nLCBFcmljOyBLaW5uZXksIE1pY2hhZWwgRA0KPiBTdWJq ZWN0OiBSRTogW2VkazJdIFtQQVRDSF0gVWVmaUNwdVBrZy9DcHVNcFBlaTogZml4IHVuc2FmZSB3 YXkgdG8gZ2V0IHN0YWNrDQo+IHBvaW50ZXINCj4gDQo+IEpvcmRhbiwNCj4gDQo+IE5vLCBpdCBk aWRuJ3QgaGVscC4gQnV0IHRoYW5rcyBmb3IgdGhlIGhlbHAgYmVmb3JlLiBBbmQgSSBzYXcgdGhl cmUncyBhbm90aGVyIGd1eQ0KPiBoYXZpbmcgdGhlIHNhbWUgaXNzdWUgYXMgbWluZS4gSSB0ZW5k IHRvIGJlbG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