From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2055.outbound.protection.outlook.com [40.107.7.55]) by sourceware.org (Postfix) with ESMTPS id 27F013858D28 for ; Wed, 12 Apr 2023 09:26:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 27F013858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=esmxeQIiWk/WWAqWhnhj+JEygZj9Mk9zRQQvEgOrtYw=; b=NRmmCesaofLzsgVsI+rZv+iojSHMxJmtoRKOTWTkrhnk9eJxFHpCiK7aQlO5p7+DXctxVuM4qJedZuuu9Yi8M2lZiu7zqBdGINVHRtnSPZUPaDQqbTU9/B5YGBd1FUHdQO6FJK+nNVbn72+kaT82FcTWVDfo6JXSgZEuxXqBX0g= Received: from DB6P193CA0020.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::30) by AS8PR08MB7321.eurprd08.prod.outlook.com (2603:10a6:20b:440::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.28; Wed, 12 Apr 2023 09:26:06 +0000 Received: from DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::2a) by DB6P193CA0020.outlook.office365.com (2603:10a6:6:29::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30 via Frontend Transport; Wed, 12 Apr 2023 09:26:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT010.mail.protection.outlook.com (100.127.142.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30 via Frontend Transport; Wed, 12 Apr 2023 09:26:05 +0000 Received: ("Tessian outbound 3570909035da:v136"); Wed, 12 Apr 2023 09:26:05 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b77fd50869a5903a X-CR-MTA-TID: 64aa7808 Received: from b0404a2f554c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DBF5E037-69B8-4F43-AA39-DCD6426C4362.1; Wed, 12 Apr 2023 09:25:59 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b0404a2f554c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 12 Apr 2023 09:25:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oV+U53+rLWFZRsaLg21UJmrJYUzmXvJF6pb6eNzvN9s4la5uZuzEQh0g3h0m6AqGfmE2J7LHexTSfwJXtdD/gj+B1mH0LYeo5SyTdE+AqgesxV/ipXRssjiPobv/IxORGU9KDghbgI9BSb6Eot/+chmaBboaWZFNYvdN+6fRubNUNFo+bMh/XTog6TnyjltPpansxkmD0c+eogpm/GGL8jk45m1MYkWJH/dYZjGibCTh8uAIl/jhi7b7FXeoxdCHmtM8ZA6Yu2kss6vQgg46ijPA0eH17ATLeMTGJrNKRGh4rCNdON2Y0kHFAgg9BHZqLyMlHu/a6vjjIT7477dVuw== 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=esmxeQIiWk/WWAqWhnhj+JEygZj9Mk9zRQQvEgOrtYw=; b=W0WSmPs8dyaQq9uz3tcOzKm2aTlPYlKrBz1sdnKmpBykcs3UZ6yiEPXmsHDim9wR1x40Iuth0MuKIxialPe3J6gV0n34+YVQFkTY06DGSbaO9CSFffN7eM+4VKMvQxjGFEYCGmBnBQMOloXHV7Ua4Aq5qg0CFhDTKfrVqzIy9DIuL3XQbetQZKJ9AL+4LcDiId3IlCUGNQkYRFMkZflZGLWcFlydStL5eXwZUdEIIeioDd2ONMZ6K6OKI9Yc4BlaBqzBbiOEm0E19IMqoFuDkdXDOjMN9yqsqp436Sy+DV4epWLy7R/eDOCKvBkeeihJ90AseVvK/LnX8kFFcRtsBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=esmxeQIiWk/WWAqWhnhj+JEygZj9Mk9zRQQvEgOrtYw=; b=NRmmCesaofLzsgVsI+rZv+iojSHMxJmtoRKOTWTkrhnk9eJxFHpCiK7aQlO5p7+DXctxVuM4qJedZuuu9Yi8M2lZiu7zqBdGINVHRtnSPZUPaDQqbTU9/B5YGBd1FUHdQO6FJK+nNVbn72+kaT82FcTWVDfo6JXSgZEuxXqBX0g= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by GV2PR08MB10383.eurprd08.prod.outlook.com (2603:10a6:150:b0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Wed, 12 Apr 2023 09:25:57 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::ff70:5431:70fa:34bf]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::ff70:5431:70fa:34bf%4]) with mapi id 15.20.6277.038; Wed, 12 Apr 2023 09:25:57 +0000 Message-ID: <9ae7c1bd-64d3-7444-fbc7-e536f8b2f971@arm.com> Date: Wed, 12 Apr 2023 10:25:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] [gdb/aarch64] pauth: Create new feature string for pauth to prevent crashing older gdb's Content-Language: en-US To: Eli Zaretskii Cc: gdb-patches@sourceware.org, alex.bennee@linaro.org, richard.henderson@linaro.org, peter.maydell@linaro.org References: <20230411224327.2142994-1-luis.machado@arm.com> <83mt3d8wkf.fsf@gnu.org> <63c2cf2c-692c-7737-d0ee-b8cb30439b4c@arm.com> <831qkp8nin.fsf@gnu.org> From: Luis Machado In-Reply-To: <831qkp8nin.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0421.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::25) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|GV2PR08MB10383:EE_|DBAEUR03FT010:EE_|AS8PR08MB7321:EE_ X-MS-Office365-Filtering-Correlation-Id: aeaaaaeb-e8b5-4b58-dc56-08db3b37f143 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: JLEgZfgCFE3W5cZKNfHjXdL2tZ78ZQIxiZQlTR/VAEMEaXS/wbkwvCJ3XVekCA2O7ELwbXxpuYOMHhHLpWyt6ILURpvCeYxfu57e/wPMAM6g7pQndBpw9d7KaBOa8eLO0lodc1R5mj29wPQo5j2XRzWCU79OOg7NztFmHcKi2r8EtSZtICvk/6PIRDRJJCxGHvkS0DhJSF0qYmti2ZYCNZPPI/gxozs2WORM/cHto99LCeWCp5xwoLYnPQ648ckjQjkV6S0zAdicHAhCGd+x3yl3wcOOIy67GgAYbVeM6Xbr6ddQxq9NAXpSo/I28FsRC8+Fxyjn04nyqDlB6WAoO1+ikSKOlOi4xTopAgUvFDqDEKObfoipFZJEgWaYtQIz/pjjMGaI1xJuKlvxMWm2GRz09Zot9T9BNhO2uOuWY++UhDeB4ebgJuv+RAxjeBIrVtetHBgXvXXNglg6QfA4U/MdPZUee2dnQyIhMqNnM+YimmTN7LYvEK2gtbeEBRZk1wi98BhryXlfunGDbjRIz8Qr+BEOns6QSRAdiFjaPmik87O0MhrKif1dfev7y2+7W/LMF+mLCz9uSNmMEv598JvKL9+eCRrbUSEeJDqUZ9zmR1wQcXEbaD791uGSIA1Gcn2FSXuKEZANe1h42iD5WQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB3919.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(376002)(396003)(366004)(39860400002)(451199021)(53546011)(66946007)(4326008)(86362001)(26005)(66556008)(6512007)(6506007)(316002)(66476007)(6916009)(186003)(36756003)(6486002)(478600001)(8676002)(8936002)(2616005)(38100700002)(41300700001)(5660300002)(2906002)(83380400001)(44832011)(31686004)(31696002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB10383 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e7c9c053-e956-467c-09d2-08db3b37ebda X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jZZRkiocuvOckEschyirkgHxlEe6B9XwiC23AYiY9/EmTKIErih0TUuWeXsT1sk/C7NGVqGyWjM6fqOlwTzkQYGhOXI6p23srrnlFYkfQEG/iB0EqjSuA3O8DcyjkoAB/pmgBda4JN+5U3Wt2wLPbBKJGLzC7DvcdGXLk4Nz6iYYcNl38wc6ayJnFgRDbYQ5LV0H2roAL7zf2Czl3wU4iARIyujnAb1H1vlbh78+D1Yd70GEmkdrTOzefHXPz2t4PwtiSqv8qG+Wx/ShG8v7dz9GRn2etouHoynCC+X37VKeex8nRJACdA4B4xuBaXOLgBWg/d/g7d+wr9B8zJIHrojovroOqV0YmMwbP7Vc/7ffpT4lPSsfinS27NjDzkY/ZDkEwJUaMc3Wv6LE8W5VJJcvLjm/EeC8GLv9GlAVENs/bjqfXXW4GN4lOwPVgHugUni/ZsPhIT5Duaipz2prdK3HFPnQFM+fjvbDAlYJi5s/MkUoXXZOU3/hMCyFnvqOyHnQqfk1Ob36Ci2rwakL2N+XfHXytiB977WjIp7h9br9MX5shUK9rWgiAux33SnjwIXncgc1GEqrbE47GUfegKu+nFx95Enqjgq5WsFvRcRcgarq7qtNLryksSfWDL7PgEE+iGNb0poA+K+gorFeUPaXI29+L5XibFhiUvavfdbZiI2QwlBApfuqP9boeRbwTLE0x1i1nBvVswZRlXSlceuWBREORx08mgLrh6yxIeo= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(36756003)(8676002)(6862004)(336012)(8936002)(31686004)(41300700001)(2616005)(83380400001)(82310400005)(186003)(316002)(6506007)(6512007)(26005)(53546011)(44832011)(70206006)(4326008)(70586007)(107886003)(5660300002)(36860700001)(82740400003)(31696002)(81166007)(86362001)(47076005)(2906002)(40460700003)(6486002)(478600001)(356005)(40480700001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 09:26:05.9897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aeaaaaeb-e8b5-4b58-dc56-08db3b37f143 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7321 X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 4/12/23 10:20, Eli Zaretskii wrote: >> Date: Wed, 12 Apr 2023 09:46:31 +0100 >> Cc: gdb-patches@sourceware.org, alex.bennee@linaro.org, >> richard.henderson@linaro.org, peter.maydell@linaro.org >> From: Luis Machado >> >> How about the following flow? >> >> In the future the @samp{org.gnu.gdb.aarch64.pauth} feature string might be >> deprecated in favor of feature string @samp{org.gnu.gdb.aarch64.pauth_v2}. >> >> The @samp{org.gnu.gdb.aarch64.pauth_v2} feature has the exact same contents >> as feature @samp{org.gnu.gdb.aarch64.pauth}. >> >> Targets reporting Pointer Authentication support via the remote protocol >> should always use the newer feature string >> @samp{org.gnu.gdb.aarch64.pauth_v2}. >> >> The reason for having feature @samp{org.gnu.gdb.aarch64.pauth_v2} is a bug in >> previous versions of @value{GDBN} (versions 9, 10, 11 and 12). This bug >> caused @value{GDBN} to crash whenever the target reported support for Pointer >> Authentication (using feature string @samp{org.gnu.gdb.aarch64.pauth}) and also >> reported additional system registers that were not accounted for by >> @value{GDBN}. This is common when using emulators and on bare-metal debugging >> scenarios. > > The flow is OK, but the last paragraph is too long. The main reason > of this text is to tell people to use the v2 feature, not to explain > why it exists. So the explanation of the reason should be shorter > like Though it is documentation for users, it is also one of the only documents providing guidance for developers of debugging stubs (like QEMU's, openOCD etc). So I feel like it should include a bit more information rather than the bare minimum. I don't think this particular section (XML target descriptions) is geared towards the common debugger users. > > We recommend always using the @samp{org.gnu.gdb.aarch64.pauth_v2} > feature because using @samp{org.gnu.gdb.aarch64.pauth} could crash > older versions of @value{GDBN} due to a known bug in those versions. I think the above is sane. It just has less detail, which, as explained above, might not be too useful for developers of debugging stubs. > > Is it really important to say that the bug happens only when > additional system registers are reported? We could make it shorter by only mentioning this is only an issue when using emulators.