From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D39D674003A for ; Wed, 4 Oct 2023 11:12:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=NxC1gH29b92ZBadXFRtx5Ne8SgedHbq5n9RoMEH/7Pc=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1696417941; v=1; b=PmVICouYyb3I3FwwavAuswOaP1Nn/JKInsJ62FNR+yNlrTyxN6kb1jHKey5OTjUVu0Pi+4NY aeOhS7tmC/0krWDBgEXLYSVfndeIVoZf2ZR090pE7PcQXCdh9sEo34QEZn5Ow7kcIufxaVCwrW6 +mkvkAwlcHsQNywHOXRVofng= X-Received: by 127.0.0.2 with SMTP id ei0WYY7687511xEFJERvVqFu; Wed, 04 Oct 2023 04:12:21 -0700 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.15705.1696417940511645259 for ; Wed, 04 Oct 2023 04:12:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PqUlJOaGry3zwiSiKqY2vZAnXH8duN2E4zkb98b9X0+sHSGgtDND+w6WTMUQ0tbhc71V5nv/izyxF2F8RZYjhVruQ9OrB7NHUYV1FGY1amOaG12ZgMh3fPTfi5pNszPmNlQTgEcbI75F9BporvJzumZJZvt6h2nAOuvnZOOb05CsrhSvgIhE7wcnkAiKZ2OVOzLLPn/LJbt87fxSqRGIy0HmPjkLL07jNKTfzR+vf8aVsOWAI6pwG/8GlgpbMrYBp85RnvtX8/xmZFw1ikYSkwiDxSJKs7wKcgYj6YbK6y3HbwsMqF7jIjB9v1IA7vdE6prlRr2mzfX4VIWCaSgwrw== 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=JCpQz+/tsU0iaj+pBqBVWCwrd6gVIULQiXtzXiRVlYE=; b=d1FyHhPlOUD4Z5SGolpjxJOaD8s8fW0r4uZEc4adzh7fEPlsDZvwsyaJ2+Mj050FbeYKP4vSp4UhLBlW2A7LM2BJmFW+BYDIXBatmeOsY0Tc/c/N/XNnIXKyj1Ukf2CLiMn6DGWm8YKoc9lwnsGERYTF4vB8p4KOv259vnQ03xsAWoScfCWzrEEcj4sRwG9JOByNnjuhizqBayv6zoU2GM33qi3a9vQgH0eaHAjpkjXufoUjH40oZfqi9py0k0iVXkV+/zsMxhbiJhB0jJG2qh32VKMkPFnpODVfnjMCYogf8rTpWRTfQdR2wqFR3ltPsZWF8cwDShNkh4oxC0zkPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from PH0PR12MB7888.namprd12.prod.outlook.com (2603:10b6:510:28b::20) by DM4PR12MB7528.namprd12.prod.outlook.com (2603:10b6:8:110::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Wed, 4 Oct 2023 11:12:17 +0000 X-Received: from PH0PR12MB7888.namprd12.prod.outlook.com ([fe80::2f8f:33f:d954:2d4c]) by PH0PR12MB7888.namprd12.prod.outlook.com ([fe80::2f8f:33f:d954:2d4c%4]) with mapi id 15.20.6838.033; Wed, 4 Oct 2023 11:12:15 +0000 From: "Jake Garver via groups.io" To: "Kinney, Michael D" , "Name jake@nvidia.com" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Liu, Zhiguang" Subject: Re: [edk2-devel] [PATCH] BaseStackCheckLib: Fix STACK FAULT message Thread-Topic: [PATCH] BaseStackCheckLib: Fix STACK FAULT message Thread-Index: AQHZ9fxbURoJ1rRMMku1qP1pwfGPBrA4OXkAgAFBub8= Date: Wed, 4 Oct 2023 11:12:15 +0000 Message-ID: References: <20d06e654e1acf8f910f3c02d2f38ce121f769bf.1696339000.git.jake@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR12MB7888:EE_|DM4PR12MB7528:EE_ x-ms-office365-filtering-correlation-id: 49f0337e-a240-4e57-c2e1-08dbc4cac438 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: HSo5kRy+7pTvxzQZCP5bhZLfpL+BDAOvYRhNTPIOvRr0sqLTqDCJJ/4ahrcTJfPyIq4fX46xiUOdgydj8hlB12UeIrVe7iWjRKrRyYGiJu0UJKOGgzLacNCTAPUdKc1MJhupOS6t7hCfnEpARLic+MmklVI0kbeUyp5Z+SZBcJPcN1apckRzTEEMTS8w4BT0FPqdne20Pd0ucmINVGlnlZuUX/kwv1XID74WyoBKohnaVEn4xCTtuU03aNqxPhqlNNic2EuR2GH4m/f3RWwq2LVIPAUY+syv4j3N2bz53LfX9uXWhE/06nCD/nEYjaQYMLXSF4mDvIrvfTuBd3Cn64+M5YXCsjHnlHd8+YtAbCJN5R3sHGLEy7aIviBPKa4jJDhJZ/ZJcHC6r1lNU1VP+w8ILfyweXCJEfwPewxRXl4+SVoA0FpGqu6WAYltKhNu0xnR3zLrFDu3c1YG+dK0mlFeiv/26ElzEjrhQGeuJVLq/CSoF4Gs3pRJdb2zOGV/GTuEfnNl4fLYrbfM9OdUFgSjXCMv1M3s+n7e3oJ1y+PFe9xCjcgBgvwypQS1ud/O/3xwkta12n8yhLTe5cTRiJKQherAAh044mot0kdfYuaRSR1G60gOlqzdtcAFOHhA x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZYzKkEkQaAZIeoRkpp5LU//7SpB2PIkKq24dOaud1oefEbaKqVdBR5aZsTT8?= =?us-ascii?Q?O5yzPcByzUWeZ2WUzsX81bGKxKy3WcDzW6r3qH85uC4uftz4XLKYX8KzPZkm?= =?us-ascii?Q?E9DZ8BBm6P/vt2uQdhSSsL/HZDbQP/E4q0zlIQvJp8LM1MRBUzNguwp4hWmd?= =?us-ascii?Q?ScL39wr6GeIHzNCsYPs0+wy74IhOr2IosNAKWf9qI5miqN+JOU9Hai3eYCIT?= =?us-ascii?Q?hqzb8sEbumhdULDR02FvXoP2V0WABYfkiIu5xpSbjwq/7ziqoX6/kvkOMzLI?= =?us-ascii?Q?b92qaPBp1Ah1nfjhIOZqdiDTf3W4SZpFyxacbIi+Y8ytElQoDVpi0PKKGdzE?= =?us-ascii?Q?GiNPsuvUH3SSiAb6A5J02rG1/daw0fjXYh7jtiknO+TgJOBhT/KQ9vMLFRdX?= =?us-ascii?Q?By/4GZmj7Xuo9JGLE8SpLn6PPQZu9bx9CaA/OHkI7qBCdEv3jOG29UWaenUr?= =?us-ascii?Q?7SxgbR/8AQTfDjb8zswYvOPIK4R6Qg5jX9OYPxMBIhxIkvFvYtAgoPYNlecy?= =?us-ascii?Q?M3GxISDahZzazkoBZAamscb934mKSpla8D01F+c/7eOTn3w3HJ5P0U3tHLsC?= =?us-ascii?Q?3BlZjn9x8tuF5h5XBPNDqEScqdob5p0IiRNwi1TzOs7U25PPIDt81HR4bf5t?= =?us-ascii?Q?opuSQmUT1S4PLry6WwBkQsJhnB8phFfNZZuZyf9QgTfyW9ry8oS6k5qOzVzh?= =?us-ascii?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Org: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR12MB7888.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49f0337e-a240-4e57-c2e1-08dbc4cac438 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2023 11:12:15.7483 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: r2CYCgLZa0xMwC61YT8jItEt8HqiOueGxY4pvB6V/VGbuQcquFMpqphtXk97Qbmo X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7528 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jake@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: oSvgAQomJEzVZgrxvngpyfw4x7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH0PR12MB7888BEF2CA8298EB99B41CF5ADCBAPH0PR12MB7888namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PmVICouY; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") --_000_PH0PR12MB7888BEF2CA8298EB99B41CF5ADCBAPH0PR12MB7888namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks. I'll submit a v2 with that change. ________________________________ From: Kinney, Michael D Sent: Tuesday, October 3, 2023 12:00 PM To: Name jake@nvidia.com ; devel@edk2.groups.io Cc: Gao, Liming ; Liu, Zhiguang ; Jake Garver ; Kinney, Michael D Subject: RE: [PATCH] BaseStackCheckLib: Fix STACK FAULT message External email: Use caution opening links or attachments I think the macro RETURN_ADDRESS from Base.h should be used instead of direct use of the builtin. Mike > -----Original Message----- > From: Name jake@nvidia.com > Sent: Tuesday, October 3, 2023 6:20 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang ; Jake > Garver > Subject: [PATCH] BaseStackCheckLib: Fix STACK FAULT message > > From: Jake Garver > > __builtin_return_address returns a pointer, not a string. Fix the STACK > FAULT message in BaseStackCheckLib appropriately. > > Signed-off-by: Jake Garver > --- > MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > index 0d2918668e..3b970391b7 100644 > --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c > @@ -34,7 +34,7 @@ __stack_chk_fail ( > { > UINT8 DebugPropertyMask; > > - DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", > __builtin_return_address (0))); > + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow at 0x%p.\n", > __builtin_return_address (0))); > > // > // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even = if > -- > 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109313): https://edk2.groups.io/g/devel/message/109313 Mute This Topic: https://groups.io/mt/101736789/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_PH0PR12MB7888BEF2CA8298EB99B41CF5ADCBAPH0PR12MB7888namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Thanks.  I'll submit a v2 with that change.

From: Kinney, Michael D <= ;michael.d.kinney@intel.com>
Sent: Tuesday, October 3, 2023 12:00 PM
To: Name jake@nvidia.com <Name jake@nvidia.com>; devel@edk2.gr= oups.io <devel@edk2.groups.io>
Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <= zhiguang.liu@intel.com>; Jake Garver <jake@nvidia.com>; Kinney, Mi= chael D <michael.d.kinney@intel.com>
Subject: RE: [PATCH] BaseStackCheckLib: Fix STACK FAULT message
 
External email: Use caution opening links or attac= hments


I think the macro RETURN_ADDRESS from Base.h should be used instead of
direct use of the builtin.

Mike

> -----Original Message-----
> From: Name jake@nvidia.com <Name jake@nvidia.com>
> Sent: Tuesday, October 3, 2023 6:20 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming<= br> > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel= .com>; Jake
> Garver <jake@nvidia.com>
> Subject: [PATCH] BaseStackCheckLib: Fix STACK FAULT message
>
> From: Jake Garver <jake@nvidia.com>
>
> __builtin_return_address returns a pointer, not a string.  Fix th= e STACK
> FAULT message in BaseStackCheckLib appropriately.
>
> Signed-off-by: Jake Garver <jake@nvidia.com>
> ---
>  MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
> b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
> index 0d2918668e..3b970391b7 100644
> --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
> +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
> @@ -34,7 +34,7 @@ __stack_chk_fail (
>  {
>    UINT8  DebugPropertyMask;
>
> -  DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in fun= ction %a.\n",
> __builtin_return_address (0)));
> +  DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow at 0x%= p.\n",
> __builtin_return_address (0)));
>
>    //
>    // Generate a Breakpoint, DeadLoop, or NOP based on = PCD settings even if
> --
> 2.34.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#109313) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_PH0PR12MB7888BEF2CA8298EB99B41CF5ADCBAPH0PR12MB7888namp_--