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=jian.j.wang@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 3617D21142FE2 for ; Tue, 18 Sep 2018 17:46:11 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2018 17:46:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,391,1531810800"; d="scan'208";a="84685168" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 18 Sep 2018 17:46:11 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 17:46:10 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 17:46:10 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.16]) with mapi id 14.03.0319.002; Wed, 19 Sep 2018 08:46:08 +0800 From: "Wang, Jian J" To: Laszlo Ersek , "edk2-devel@lists.01.org" CC: "Bi, Dandan" , "Wu, Hao A" , "Dong, Eric" , "Justen, Jordan L" , Ard Biesheuvel , "Gao, Liming" , "Kinney, Michael D" Thread-Topic: [PATCH] UefiCpuPkg/CpuMpPei: fix unsafe way to get stack pointer Thread-Index: AQHUT26HuSTSX0idaUeFulJGbXY5zaT2xGIg Date: Wed, 19 Sep 2018 00:46:07 +0000 Message-ID: References: <20180918090448.7324-1-jian.j.wang@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzBlOGRkMTItZDIxMC00MGYzLTg1ZjgtYmIzZjJiNTMyMDI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWjQxTE9CclN2OVI3UE16UnplZlhnR05BTHI0a1NST3lTa1ZVZkRqaVBaTFNianA2VWRKVFE0Vmc4NE15YjUzeSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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 00:46:12 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SSBrbm93IHRoZSBydWxlLiBCdXQgSSBzYXcgaXQgdXNlZCBpbiBDcHVEeGUvQ3B1R2R0LmggYW5k IEkgdGhvdWdodCBpdCBjb3VsZA0KaGF2ZSBleGNlcHRpb25zLiBBbnl3YXksIEkgYWdyZWUga2Vl cGluZyBjb25zaXN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