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.120; helo=mga04.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 BB12721AE30DB for ; Tue, 18 Sep 2018 18:13:00 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2018 18:13:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,392,1531810800"; d="scan'208";a="89981783" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 18 Sep 2018 18:12:55 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 18:12:54 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) 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:12:54 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Wed, 19 Sep 2018 09:12:52 +0800 From: "Wang, Jian J" To: "Justen, Jordan L" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" , "Bi, Dandan" , Laszlo Ersek , "Dong, Eric" , "Kinney, Michael D" Thread-Topic: [edk2] [PATCH] UefiCpuPkg/CpuMpPei: fix unsafe way to get stack pointer Thread-Index: AQHUTy68dbvzRFiZWU23OOPmG6gJqaT1zyeAgAD20yA= Date: Wed, 19 Sep 2018 01:12:51 +0000 Message-ID: References: <20180918090448.7324-1-jian.j.wang@intel.com> <153729377116.1021.13677753557698494356@jljusten-skl> In-Reply-To: <153729377116.1021.13677753557698494356@jljusten-skl> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDBjNGEzMjUtYjMwMi00ODhhLTlmZjctNjhjNWI5NWZmNWMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMjBiM1JCbG5KclZoM3VrU2tFRG9RQ24zM0pTSXJSYmpQZ1FcL2VFRmN2ZjlzWTVxMTdYQ01OcUdFSEtwdWs5aEoifQ== 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 01:13:01 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sm9yZGFuLA0KDQpObywgaXQgZGlkbid0IGhlbHAuIEJ1dCB0aGFua3MgZm9yIHRoZSBoZWxwIGJl Zm9yZS4gQW5kIEkgc2F3IHRoZXJlJ3MgYW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