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 0E1F5740034 for ; Wed, 13 Dec 2023 14:58:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2eTZ8FoYBjFOj/o8k5zjYr+UrOevLe4JG/GfajHjgPI=; 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=1702479483; v=1; b=JBVagR/xQMCO/EbcDrSzrwcbzBNA1lpvcxydAL7+ZRG58Mtdf45eTT+HRqxeBq3dzsUP7Jpe xWu+haN+48SrQpw1BTSNRjNFHzDSOeHLKBtsdpu+zfYHTw79BinR8wl1/8kAqkKo3ZsVenZedTY tgv/E4pUjo+Q/zif0WJVJeXg= X-Received: by 127.0.0.2 with SMTP id vYCTYY7687511xey4Cl5xDHR; Wed, 13 Dec 2023 06:58:03 -0800 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.60]) by mx.groups.io with SMTP id smtpd.web11.37744.1702479482910567011 for ; Wed, 13 Dec 2023 06:58:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HJqjvMyc6YZszluedgWX0mgTC1UzDZS/1i6JU7Q57hMXpNYY+RDph6vZ8M5YPT7P3vqzYTai/EIGIDvkJ4gHwazN/IXdcc5vYMjWlhKCTY5gvRrwOGOzVY6xd+wz5zKVU8oIklQj+NBGxYI1Y9MBZeptb8/n9PkBEV5562dqgb2gjCPABox9YYgWAM85+Mmclh1jEiM3y5WY7jVJeK4oT4p0Xt1KwbBkA0KyoXkx9kXpsIbzCESzUA3Ynn6JHQeLL140jnE+HoqtPy51nz1HM0/bJy9qS52UL4xIKzTLkgWCqtnE/wZztgkfg3+3I6P0GThK+RExw4SFg/3JHms4Iw== 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=GunBW0XmwjuNSfDc4hNN9QX+1yropHjoGe7EJgOuMKc=; b=JEbxzEUn9Cssc/1rlYJJod9DrvGelvyU0wa2EIIyIbP1tiy60rArxkPqfkbABfu/2KPom3qhvowSQbaDvVIi6cW4ZVKwWtRdC95PzSXtz+rlUDbivYjNYmb7aEfY9lGQxO8OAS0rxtXjpHWXLslTCR6x2iS4VMwSMAI8m0514F6DIKGKKIhDPeXbwSFOzO5Od+Th74Ot/g0ateWDCQMOeuSKjrJwzWZUmS/GZfO+Aa19Lr+RsAwINflX3vMOFZfKwRHH7qgX+Lb9Yhak2fyTLylAIMstxHnf0HCboPFTgJ3H9LuBk7ZqPl7dXsGDygX16Fo/ak54acgC3tJzPa62bQ== 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 MN6PR12MB8567.namprd12.prod.outlook.com (2603:10b6:208:478::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Wed, 13 Dec 2023 14:57:59 +0000 X-Received: from PH0PR12MB7888.namprd12.prod.outlook.com ([fe80::b697:2fd4:b925:1180]) by PH0PR12MB7888.namprd12.prod.outlook.com ([fe80::b697:2fd4:b925:1180%2]) with mapi id 15.20.7068.033; Wed, 13 Dec 2023 14:57:59 +0000 From: "Jake Garver via groups.io" To: Ard Biesheuvel CC: Pedro Falcato , "devel@edk2.groups.io" , "rebecca@bsdio.com" , "gaoliming@byosoft.com.cn" , "bob.c.feng@intel.com" , "yuwei.chen@intel.com" Subject: Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP Thread-Topic: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when converting ADR to ADRP Thread-Index: AQHaCCGXXJud8/CY+kui35MyEcdpB7BcaUqAgAEpkI6AABTxgIAABQWEgAACdwCAAAN5AIAABMAAgAAOgFSACSyI1YAAEq+AgDWv/DmACPQTgIAB7ESL Date: Wed, 13 Dec 2023 14:57:59 +0000 Message-ID: References: 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_|MN6PR12MB8567:EE_ x-ms-office365-filtering-correlation-id: 1bb42b07-ac26-4842-81ea-08dbfbebe60b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 1T+/D/e9ZjO9SGKTJvaEL/kvIp4HfM+YLYn5O2HfFmSAH/cfABJodKJT9trqRAGPk5H22/RJrWCO7O9eClsFdFLbTxCFwPrgDdcttkqU5O81RO/0K6pc2/Orfm5gzT5XWKQI+xSHvHXZS3mEgdXpkEzQEyq99xisuoChHLRclC7fc0tVPQHz2Q8gI4SXGf5cF+sNM5jV5IKd8OJDI4mquIkIMNhMxqIPe+5RyxUcvh+a6XMGpEs6jC+8ZYL9gAZLxz6kvnB3HyoVnYeM9+qvBaSLicOZE5HQCKrDSRcxqdBCGt3hEDxA+tEbIITpkOFcrYv1rENdZTFD/7/S1HNpFXySInknLoC9WdEVq+/BnL93ah8wAFcrSjJ06n++Sd9E9smsqeygT3f/jolBJH8A2UX0drLrfOAO4QvSx1f99pVIFWPFDq2pqDkMGVus85xAZGkayDvQDwVQ+w162b7GAQKwsFClYOHnFV0rmwkiIVjCuXs913xzaoq2wPUd9zS8xTyWce7sYEMenpUOEVZlnZRZZg3jwNJwi79C5BFyriP7ib2E3JJuxO2crqbtiZo4poY6ZqnkySZgfWO3nA7wUwzWKPtFnRZT6F4PSx9+AZ5HE2/ZjhdBplAaTw1LUlSJHY8GZcNUDapwCx1iVmKgm00zNNvNfdNODPVyFdeG5Ng= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?exWLoE2YRIJCXvQmD81whYVSs7NrxpZD3mNuDqY4lNWYy0XksUj00Qqs85l7?= =?us-ascii?Q?m5FRAbXD81enPo32VwXlG9aww1UAPDUmgEFLv+CcXuMv1vl8IFfeALA4/Fjl?= =?us-ascii?Q?ts33WoD3oQ/66rp67u0nMMkHP3s9L0UfLrb21VwXONJDE7P4LT5r14NDF0EB?= =?us-ascii?Q?J8KJXYbMoohhaELlkvehFjELC9PdAAz/rCMAagoQhJkOedttphStVg7Cd6Ll?= =?us-ascii?Q?T0p59Wan00Tp2ZNhH+WturaAbELajWoi5azHGsTT4ugYW031KFloX2gGAVY4?= =?us-ascii?Q?K9i3L3kw8CWIpluleHE79fTm5zL5fAMaWZeOC/UN92u4KDdO2H60lmpgNZ9M?= =?us-ascii?Q?pj2EyoTh1iDDJRg3aDx2cYnlMTMoQHtsfSbAVFLO6KKA24H4tEunNTd8nn96?= =?us-ascii?Q?5o9qQQVpZcwvRYje4jo/c+KMnxxgxTdRzuox4BoI6bKqwP6kDNgG+6W1zZPX?= =?us-ascii?Q?d1MwsKN48OBS1X7TRu85G9xXylB+63cbSGrXZOUy7Kb4zcqO/1U3DcJhDTqQ?= =?us-ascii?Q?eGR4gjRu6ktLg6jgG+kihK05n6qS1BgwCHkR/vffq48xH4ikPvlcYu247Lwg?= =?us-ascii?Q?RacYaHwLU7QJMnZRAT361xq98M1ee567fQnhlk+JjIS9xrU801ocDxjd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4rGFC+OjcJG6jXlYY070fWbaknrlF6q2nGo13tDObCZpr?= =?us-ascii?Q?owngNoCl+NZMpDRLdXo=3D?= MIME-Version: 1.0 X-OriginatorOrg: 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: 1bb42b07-ac26-4842-81ea-08dbfbebe60b X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Dec 2023 14:57:59.8322 (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: m+5Xrk60woLks5uNcMGzQinUp+bFf0IVMBeAmI7Hbt4xC1uBQbEj6D9QSeJAvySe X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8567 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: IkrQyi6EIGbaLQBNH7ij4ejEx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH0PR12MB78883870D9DD49AB6022C49CAD8DAPH0PR12MB7888namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="JBVagR/x"; 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_PH0PR12MB78883870D9DD49AB6022C49CAD8DAPH0PR12MB7888namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Totally understand and agree, Ard. In the meantime, I've now experienced the issue with Ubuntu22's GCC 12.3. = Originally, we didn't see the issue on this toolchain, but a developer ran = into when preparing a change. Even more concerning, when I instrumented th= at change, it went away. So, it seems to be very sensitive to the input, w= hich will make it hard to reproduce. Specifically, like the Ubuntu20 10.5 toolchain, the Ubuntu 12.3 toolchain g= enerated an R_AARCH64_ADR_GOT_PAGE relocation against an ADR instruction. = Further, it was when loading the value of __stack_chk_guard. I was again unable to reproduce this using a crosstool-ng build of GCC 12.3= , even when matching the ./configure arguments. Since it's now reproducible in a toolchain we're actively using, I'll conti= nue looking at it. I'll let you know what I find. Thanks, Jake ________________________________ From: Ard Biesheuvel Sent: Tuesday, December 12, 2023 4:22 AM To: Jake Garver Cc: Pedro Falcato ; devel@edk2.groups.io ; rebecca@bsdio.com ; gaoliming@byosoft.com= .cn ; bob.c.feng@intel.com = ; yuwei.chen@intel.com Subject: Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode when conve= rting ADR to ADRP External email: Use caution opening links or attachments On Wed, 6 Dec 2023 at 17:51, Jake Garver wrote: > > Thanks, Pedro and Ard, > > An update on this issue: > > It seems to be very specific to Ubuntu20's 10.5 build of GCC. > I could not reproduce it using a crosstool-ng build of 10.5, even after t= rying to configure it identically to Ubuntu20's. It might be something in = Ubuntu's patchset, but nothing stuck out to me there. > We have migrated to Ubuntu22 as a preferred platform. Their build of GCC= 12.1 and 12.3 do not have this issue. As a result, this issue is no longe= r a high runner for us. > > > Next step: Try reproducing it by rebuilding Ubuntu's GCC debs. I still w= ant to get to the bottom of this, just to make sure it doesn't pop-up in la= ter builds on GCC on Ubuntu. > > Pedro: I haven't attempted to build without LTO yet. That looked painful= to setup, so I didn't make it a priority. > Thanks for the update. If this appears to be specific to Ubuntu's GCC build, and the issue is no longer reproducible on more recent builds, I'd be inclined not to bother. But if you do insist and find the culprit, I'd be happy to take another look. -- Ard. -=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 (#112477): https://edk2.groups.io/g/devel/message/112477 Mute This Topic: https://groups.io/mt/102202314/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_PH0PR12MB78883870D9DD49AB6022C49CAD8DAPH0PR12MB7888namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Totally understand and agree, Ard.

In the meantime, I've now experienced the issue = with Ubuntu22's GCC 12.3.  Originally, we didn't see the issue on this toolchain, but= a developer ran into when preparing a change.  Even more concerning, = when I instrumented that change, it went away.  So, it seems to be ver= y sensitive to the input, which will make it hard to reproduce.

Specifically, like the Ubuntu20 10.5 toolchain, = the Ubuntu 12.3 toolchain generated an R_AARCH64_ADR_GOT_PAGE relocation against an ADR instruction.  Further, it was when loading the value o= f __stack_chk_guard.

I was again unable to reproduce this using a cro= sstool-ng build of GCC 12.3, even when matching the ./configure arguments.

Since it's now reproducible in a toolchain we're= actively using, I'll continue looking at it.  I'll let you know what I find.

Thanks,
Jake

From: Ard Biesheuvel <ar= db@kernel.org>
Sent: Tuesday, December 12, 2023 4:22 AM
To: Jake Garver <jake@nvidia.com>
Cc: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups= .io <devel@edk2.groups.io>; rebecca@bsdio.com <rebecca@bsdio.com&g= t;; gaoliming@byosoft.com.cn <gaoliming@byosoft.com.cn>; bob.c.feng@i= ntel.com <bob.c.feng@intel.com>; yuwei.chen@intel.com <yuwei.chen@= intel.com>
Subject: Re: [edk2-devel] [PATCH] BaseTools/GenFw: Change opcode whe= n converting ADR to ADRP
 
External email: Use caution opening links or attac= hments


On Wed, 6 Dec 2023 at 17:51, Jake Garver <jake@nvidia.com> wrote:
>
> Thanks, Pedro and Ard,
>
> An update on this issue:
>
> It seems to be very specific to Ubuntu20's 10.5 build of GCC.
> I could not reproduce it using a crosstool-ng build of 10.5, even afte= r trying to configure it identically to Ubuntu20's.  It might be somet= hing in Ubuntu's patchset, but nothing stuck out to me there.
> We have migrated to Ubuntu22 as a preferred platform.  Their buil= d of GCC 12.1 and 12.3 do not have this issue.  As a result, this issu= e is no longer a high runner for us.
>
>
> Next step: Try reproducing it by rebuilding Ubuntu's GCC debs.  I= still want to get to the bottom of this, just to make sure it doesn't pop-= up in later builds on GCC on Ubuntu.
>
> Pedro: I haven't attempted to build without LTO yet.  That looked= painful to setup, so I didn't make it a priority.
>

Thanks for the update. If this appears to be specific to Ubuntu's GCC
build, and the issue is no longer reproducible on more recent builds,
I'd be inclined not to bother. But if you do insist and find the
culprit, I'd be happy to take another look.

--
Ard.
_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_PH0PR12MB78883870D9DD49AB6022C49CAD8DAPH0PR12MB7888namp_--