From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web11.568.1663880809059398471 for ; Thu, 22 Sep 2022 14:06:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=GES6jFLQ; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0264a030cf=brian.johnson@hpe.com) Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28MIhNaJ028802; Thu, 22 Sep 2022 21:06:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=content-type : message-id : date : subject : to : references : from : in-reply-to : mime-version; s=pps0720; bh=FcmjAy0od18XNo4EDXmOsVgAxilhDASJ9LbVI/4J4qo=; b=GES6jFLQ5PQNkwSCxB2DWGOZJ4e7rDW+eAkLNjKzHYJguIGjqL75vaLeMQ1hdh04LP5g kUA9Zwj6HTFQgw6ILMC9Vwt9NM7vswsxdq89/nPK7g+6Q12Vqlt0CJ1jePiinVvMDNJm rdVKfpn8Qm3HgZ4Sv3QwEI4MZjzWl+SbTM9IvvG/ADCTy0fFWmOoIzOVMbzSTcIUI5N8 3Js2qdx7CiVUJOpbsAmQ3YGkg9Mnqs2Kcl8GgoDEDidJMpXIEpxN1SD/WxW5cZn7uAAw s+Hvn1hXsDEqOrKH7fGF/6lrCrYGTgcplVu1WdL9VnndMxbyioEWgmKfzmuE9DYmZb4h IQ== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3jrw7w9050-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 21:06:47 +0000 Received: from p1wg14926.americas.hpqcorp.net (unknown [10.119.18.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14881.it.hpe.com (Postfix) with ESMTPS id 2C83780793D; Thu, 22 Sep 2022 21:06:46 +0000 (UTC) Received: from p1wg14928.americas.hpqcorp.net (10.119.18.116) by p1wg14926.americas.hpqcorp.net (10.119.18.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 22 Sep 2022 09:06:46 -1200 Received: from p1wg14921.americas.hpqcorp.net (16.230.19.124) by p1wg14928.americas.hpqcorp.net (10.119.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Thu, 22 Sep 2022 09:06:46 -1200 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 22 Sep 2022 09:06:46 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hv4qVeQ+WUXpzL9dnrSvzgbM98r3DEpQdXbKk5HXIwjEo2dWcDvZB8RUhlO5Ka8NPqXvaEmQeiFxc8fWQulAxQXtl01fnDnFl6HeC0ST3jbpkeJ4EVFmXStPAJ+EK2wKDDltJjohNiyl8g7KP/+rTuuf9RAzlSNx6adbureas9cNTA22/CLEF8Tuyp3NvWCta4ApO9QxIi8h18/pmCLmBJHgKD/uZcQpHWT3abar4lkL6hv0I6RY3vZsXYDeF6LJc4VUl/S2vh9Cd2cuvGtd3eLBmXh8DltB+QLSE6pe4+ZQpDOxu9SH/Ea9UCJYBzrreEAfgLmUIB2ZYUVFCe9guQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YfyNyCo1sgPbbae3jOiQ4adln+lKXt1YMKdu6sTXOos=; b=bJs/1GBWbe5Opzd5N8z0oGV5gkGdCiC56DPhaneSV0WGeU0l301dSnNx29MVpkxeCPItbq6590XVB53QITISP41tQyMvaiZ2ewcpuc5oJcQlawxt5KAFjqK7Rvi+lyn96SZwoY72b55tS3VJ73sedZmirL81dPYbS0lFo/x+YZv03bbyTlFtY2Z38kf2MWSZ+yNyHrX0weXLoMx2XxcibSXscvzQzS83/K4LwnscihQQ4edzIdMdEFEeC0FVqQcSY6jukAwCUXJKwXaDd8YM9xzPPzoNWZQe1p497YtZDQSakwFmzXeZJJLTUQUXz2fBwgWuLFE0ln1XPpgG5l/VVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1c0::21) by MW4PR84MB1777.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1b0::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.18; Thu, 22 Sep 2022 21:06:44 +0000 Received: from MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c057:5a77:540f:1cf4]) by MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c057:5a77:540f:1cf4%5]) with mapi id 15.20.5654.018; Thu, 22 Sep 2022 21:06:44 +0000 Message-ID: Date: Thu, 22 Sep 2022 16:06:41 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [edk2-devel] How to guard CAR's stack overflow To: "Tiger Liu(BJ-RD)" , "devel@edk2.groups.io" , "Ni, Ray" References: From: "Brian J. Johnson" Organization: HPE In-Reply-To: X-ClientProxiedBy: CH2PR15CA0021.namprd15.prod.outlook.com (2603:10b6:610:51::31) To MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1c0::21) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW5PR84MB1354:EE_|MW4PR84MB1777:EE_ X-MS-Office365-Filtering-Correlation-Id: a28c0ace-334e-47c1-1557-08da9cde5ab4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y+IXGkEyAowEj2EGopQLUI2XDSB5PpfLT3T8sn7VlNoqKml4akpxSAM3/BLH9GM7wqfXmnYKf2UoWlqvreahr3vezGHRFDumPrQX3b6b36icGgARdODHDKfWSVOOnjDBvu3bh2oVUSKoKUZVL5drk7N6I1HK4k0vQHRRYKgmJQ3q9gvtPPEplO3FjLFnJj8SRNbsJA0oYtK6jjrilocUlSzecv2sbRtDnV0ORizCUKpcKVVTZGGbwavLlhn8FQf7m8jBbS1HflSk8Vg5AJXNrXgScIUq/AEpJOs7b15nZiinyAAQc9BiuEk6jHYt6IJ/knoceVm4pgHujlFPPcG2tTdm3D70t/UMQEY9Zc4ARyuEf5vVdBJGkC/JPgiHCXioLymfUk72gdsxTdKuRG1rpWZn/h1PC70JN5KJtCFPdAykqhxjzuD91sEHCVFhYeyw+ktVSUHgmPl7NUOLfuF3UjqSp9KEN52aB2cbAZzxaRnkXzPBGnGQ+8l8RXMmNYYEySPPkQA62EoUPGagVWGEt12QwqunKy8vrQ7lJTPjTWgyvNg51i/Ub5QNflkFzXCpypOa7dtFUm/cCWIE/QTwNR8Ze5KXOxeOgUbvFacee6mkMeuhfBvhp9L+zJtM30V9DjZ+fYqL3GMZPWZ6wm5ai/Bzl0H+ITZSCdRuz0ZoKOw/UskfnfGPpCEIIjcdkz3h0b3L+UWJTJiMLi8mmKAicVOWT+6T5rGZ4GTqmoatGiaxOXCvv8WpBY/JcsWJq8wSLS7JlV/faDcecI5WHebykX9ekC+0Z8CeLuwgGqB2ZW7F2cWZ6lTRl1nUORnRyq/1eKJUUn02onkrFgb4AI5jQwrgUoUBwMng29gatXZOM3A= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(136003)(396003)(39860400002)(346002)(366004)(376002)(451199015)(26005)(316002)(6512007)(36756003)(2616005)(36916002)(478600001)(53546011)(33964004)(6506007)(6666004)(110136005)(6486002)(38100700002)(166002)(82960400001)(83380400001)(186003)(31696002)(86362001)(31686004)(76236004)(2906002)(8936002)(5660300002)(8676002)(41300700001)(66556008)(66946007)(66476007)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b3grYzcraWp1eGFQK0NPZzQwckpmbWFZVm5QS2ttdHhGN21KcUpwVzI3NENv?= =?utf-8?B?Vndnc3c3M1RUUHlBQWlJTWVhVVMwK0lja1VkNHptRm80OXh3YjdUOVdtMUR2?= =?utf-8?B?UEhjdjVML2J3blByclhtQkRjeHlianFQMjlBQ2p5aWdobGxCYXByWHVuVWxQ?= =?utf-8?B?RWNjYU03UnZvbGZ0MEVPd21JV0tuaVRPMW5vYktIa1lTSktrU2N2YW43dk9X?= =?utf-8?B?MUdZYkpROWRpYnMyN1p4MmRZeXphRURRYmdKTkYrdEpTWlVuSSthRzA5RlRh?= =?utf-8?B?cGYvR3V0b3FOUXFTNTcwZXJpYmhHNFJqTVB3cTFBTjltYXBUV2tCMTI2dXky?= =?ut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kBZAL4huUzjymd?= X-MS-Exchange-CrossTenant-Network-Message-Id: a28c0ace-334e-47c1-1557-08da9cde5ab4 X-MS-Exchange-CrossTenant-AuthSource: MW5PR84MB1354.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2022 21:06:44.6176 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7TDwgeQY9joluMtsSqvm+3iBg8TCykLm3H/y1ni53XQULnDF54YVH+SfEMbHvdmxofJU6fHFhe59yRAelWqFZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR84MB1777 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: 2W3QDHTePH3ZnrilwfavDZjCqmlx83zp X-Proofpoint-GUID: 2W3QDHTePH3ZnrilwfavDZjCqmlx83zp X-Proofpoint-UnRewURL: 10 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-22_14,2022-09-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 impostorscore=0 mlxscore=0 phishscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209220136 Content-Type: multipart/alternative; boundary="------------IMfi0zjqtyQSQWN7UXL8TNSq" Content-Language: en-US --------------IMfi0zjqtyQSQWN7UXL8TNSq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SSd2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xODExPg0KPiAgICAgfCBDb250YWN0 IEdyb3VwIE93bmVyIDxtYWlsdG86ZGV2ZWwrb3duZXJAZWRrMi5ncm91cHMuaW8+IHwNCj4gICAg IFVuc3Vic2NyaWJlDQo+ICAgICA8aHR0cHM6Ly9lZGsyLmdyb3Vwcy5pby9nL2RldmVsL3Vuc3Vi Pg0KPiAgICAgW2JyaWFuLmpvaG5zb25AaHBlLmNvbV0NCj4NCj4gICAgIF8NCj4NCj4NCj4NCj4g 5L+d5a+G5aOw5piO77yaDQo+IOacrOmCruS7tuWQq+acieS/neWvhuaIluS4k+acieS/oeaBr++8 jOS7heS+m+aMh+WumuaUtuS7tuS6uuS9v+eUqOOAguS4peemgeWvueacrOmCruS7tuaIluWFtuWG heWuueWBmuS7u+S9leacque7j+aOiOadg+eahOafpemYheOAgeS9v+eUqOOAgeWkjeWItuaIlui9 rOWPkeOAgg0KPiAvQ09ORklERU5USUFMIE5PVEU6IC8NCj4gL1RoaXMgZW1haWwgY29udGFpbnMg Y29uZmlkZW50aWFsIG9yIGxlZ2FsbHkgcHJpdmlsZWdlZCBpbmZvcm1hdGlvbiANCj4gYW5kIGlz IGZvciB0aGUgc29sZSB1c2Ugb2YgaXRzIGludGVuZGVkIHJlY2lwaWVudC4gQW55IHVuYXV0aG9y aXplZCANCj4gcmV2aWV3LCB1c2UsIGNvcHlpbmcgb3IgZm9yd2FyZGluZyBvZiB0aGlzIGVtYWls IG9yIHRoZSBjb250ZW50IG9mIA0KPiB0aGlzIGVtYWlsIGlzIHN0cmljdGx5IHByb2hpYml0ZWQu Lw0KDQo= --------------IMfi0zjqtyQSQWN7UXL8TNSq Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've never tried protecting the stack like this, so I'm not sure exactly what you're running in to.  The documentation says the base address is specified a bit differently for expand-down descriptors.  It needs to point to the page below the stack (lower addresses.)  The descriptors f= or the other segments would still need to cover the entire address space (limit 0xFFFF, page-granular, expand-up.)  And you'd need to use a different segment selector (and hence a different GDT entry) for the stack segment (ss register) than for the regular data segments.  Most of the early PEI code I've seen uses the same selector for ds, ef, fs, gs, and ss.

Hope that helps.  This is mostly theoretical.  I don= 't actually have a lot of experience with x86 segment programming.

Brian J. Johnson

From: Tiger Liu(BJ-RD) [mailto:TigerLiu@zhaoxin.com]
Sent: Wednesday, September 21, 2022, 10:32 PM
Subject: [edk2-devel] How to guard CAR's stack overflow

=20=20=20=20=20=20

Hi, Johnson:

Thanks for your reply!=

 

I tried and found it seemed causing some other problems.

 

It hang in eary pei stage.

 

It seems below code could also cause an exception if using expand-down mode in CAR phase=E2=80=99s stack established.

mov eax, ss:[ebx]  

 mov eax, [ebp]

  mov eax, [esp]

 

Thanks

=E5=8F=91=E4=BB=B6=E4=BA=BA: Brian J. Johnson <brian.johnson@hpe.com
=E5=8F=91=E9=80=81= =E6=97=B6=E9=97=B4: 2022=E5=B9=B49=E6=9C=8820=E6=97=A5 7:10
=E6=94=B6=E4=BB=B6=E4=BA=BA:= = devel@edk2.groups.io; ray.ni@intel.com; Tiger Liu(BJ-RD) <TigerLiu@zhaox= in.com
=E6=8A=84=E9=80=81: Fan, Jeff <fanjianfe= ng@byosoft.com.cn
=E4=B8=BB=E9=A2=98: Re: [edk2-devel] How to guard CAR's stack overflow

 

You could also try modifying the Ia32 segment descriptors to mark the stack segment as an "expand down" type with= a limit set just below the low end of the stack area= .  That should generate a stack-fault exception if the stack overflows, and wouldn't require building page tables.  See sections 5.1 - 5.3 of the Intel SDM, volume 3.

 

Brian J. Johnson

It=E2=80=99s doable.

You need to enable paging = and mark the very low 4K area of the stack as not-present.

You could use the UefiCpuPkg/Library/CpuPageTableLib to help you create the 1:1 page table with the specific
4K area as not-present (if you are using x86 processors).

 

Thanks,

Ray

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf= Of Tiger Liu(BJ-RD)
Sent: Thursday, September 15, 2022 8:50 AM
To: devel@edk2.groups.io=
Subject: [edk2-devel] How to guard CAR's stack overflow

<= span lang=3D"EN-US"> 

Hi, Experts:

Usually, we use Cache As Ram to setup stack and heap for C language running environment before permanent memory has been initialized.

 

So, is there a method to guard this phase=E2=80=99s sta= ck overflow?

 

Note:

I find udk has introduced a method to guard stack overflow after memory has been initialized and discovered.

 

Thanks

 

=E4=BF=9D=E5=AF=86=E5=A3=B0=E6=98=8E=EF=BC=9A

=E6=9C=AC=E9=82=AE=E4=BB=B6=E5=90=AB=E6=9C=89=E4= =BF=9D=E5=AF=86=E6=88=96=E4=B8=93=E6=9C=89=E4=BF=A1=E6=81=AF=EF=BC=8C=E4=BB= =85=E4=BE=9B=E6=8C=87=E5=AE=9A=E6=94=B6=E4=BB=B6=E4=BA=BA=E4=BD=BF=E7=94=A8= =E3=80=82=E4=B8=A5=E7=A6=81=E5=AF=B9=E6=9C=AC=E9=82=AE=E4=BB=B6=E6=88=96=E5= =85=B6=E5=86=85=E5=AE=B9=E5=81=9A=E4=BB=BB=E4=BD=95=E6=9C=AA=E7=BB=8F=E6=8E= =88=E6=9D=83=E7=9A=84=E6=9F=A5=E9=98=85=E3=80=81=E4=BD=BF=E7=94=A8=E3=80=81= =E5=A4=8D=E5=88=B6=E6=88=96=E8=BD=AC=E5=8F=91=E3=80=82

CONF= IDENTIAL NOTE:

This= email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

_._,_._,_


<= span style=3D"font-size:12.0pt;font-family:=E5=AE=8B=E4=BD=93" lang=3D"EN-U= S">Groups.io Links:

You receive all messages sent to this group.

View/Reply Onlin= e (#93797) | | Mute This Topic | New Topic
Your Subscription | Contact Group Ow= ner | Unsubscribe [brian.johnson@hpe.com= ]

_

 



=E4=BF=9D=E5=AF=86=E5=A3=B0=E6= =98=8E=EF=BC=9A
=E6=9C=AC=E9=82=AE=E4=BB=B6=E5= =90=AB=E6=9C=89=E4=BF=9D=E5=AF=86=E6=88=96=E4=B8=93=E6=9C=89=E4=BF=A1=E6=81= =AF=EF=BC=8C=E4=BB=85=E4=BE=9B=E6=8C=87=E5=AE=9A=E6=94=B6=E4=BB=B6=E4=BA=BA= =E4=BD=BF=E7=94=A8=E3=80=82=E4=B8=A5=E7=A6=81=E5=AF=B9=E6=9C=AC=E9=82=AE=E4= =BB=B6=E6=88=96=E5=85=B6=E5=86=85=E5=AE=B9=E5=81=9A=E4=BB=BB=E4=BD=95=E6=9C= =AA=E7=BB=8F=E6=8E=88=E6=9D=83=E7=9A=84=E6=9F=A5=E9=98=85=E3=80=81=E4=BD=BF= =E7=94=A8=E3=80=81=E5=A4=8D=E5=88=B6=E6=88=96=E8=BD=AC=E5=8F=91=E3=80=82
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

--------------IMfi0zjqtyQSQWN7UXL8TNSq--