From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 27C3421B02822 for ; Wed, 26 Sep 2018 01:55:12 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 01:55:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,305,1534834800"; d="scan'208";a="77378446" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 26 Sep 2018 01:54:14 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 01:54:07 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by shsmsx102.ccr.corp.intel.com ([169.254.2.140]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 16:54:05 +0800 From: "Wang, Jian J" To: Laszlo Ersek , "Justen, Jordan L" , "edk2-devel@lists.01.org" , "Kinney, Michael D" , "Gao, Liming" CC: "Wu, Hao A" , "Bi, Dandan" , "Dong, Eric" Thread-Topic: [edk2] [PATCH] UefiCpuPkg/CpuMpPei: fix unsafe way to get stack pointer Thread-Index: AQHUTy68dbvzRFiZWU23OOPmG6gJqaT1zyeAgAEhAQCACu300P//46yAgACHwQA= Date: Wed, 26 Sep 2018 08:54:05 +0000 Message-ID: References: <20180918090448.7324-1-jian.j.wang@intel.com> <153729377116.1021.13677753557698494356@jljusten-skl> <47392a62-419a-45e2-6a09-5cec8b35cd55@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjM1YjBmZmMtNTczNC00MzczLTljNzUtN2UxMzgxMDIxODk1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiemQ1TnNXV3pFNk4zOXBnWDdVdTI2ZGhtQU9XZGZtSzZ5TkQ5UndcL1o4aDZIUkhYUFJBdGYxZkhTdDRZVkg0bEoifQ== 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, 26 Sep 2018 08:55:12 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 TGFzemxvLA0KDQpZb3UgbWVhbiB0byBhZGQgYSBzcGVjaWZpYyBpbnRlcmZhY2UgdG8gZ2V0IHN0 YWNrIHBvaW50ZXIsIHJpZ2h0PyBJIHRoaW5rIGl0IHdvcmsgZm9yIG1lIHRvby4NCkJ1dCBJIGd1 ZXNzIHRoZXJlIG1pZ2h0IGJlIGRpc2N1c3Npb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