From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sLQPF953NmSwiCkAWB0awg (envelope-from ) for ; Wed, 12 Apr 2023 05:20:30 -0400 Received: by simark.ca (Postfix, from userid 112) id 5104C1E221; Wed, 12 Apr 2023 05:20:30 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Qqd2QH0M; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D4A101E0D2 for ; Wed, 12 Apr 2023 05:20:29 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 747F93858C53 for ; Wed, 12 Apr 2023 09:20:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 747F93858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681291228; bh=FVgscbbDgou/FykvejjidUAn/LzXM/bmg6jU8FTp3yU=; h=Date:To:Cc:In-Reply-To:Subject:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Qqd2QH0MST1C01Jm3wGCdywv9wV7i+KZz0zHfqLdMdd16lEaJSXwhSQqZ3K/i4M3F ljGr8j3qU5k6BtP3qdInLcXsAKZqJTUHelU2//2UlL7LMlqieuoUFOrdvPeOL+Pd90 h25J4jAASa9Mhf4Si3mOX5YtfXpifo2ZMVQq/yrw= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id F28653858D28 for ; Wed, 12 Apr 2023 09:20:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F28653858D28 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmWe7-0005Ao-Gv; Wed, 12 Apr 2023 05:20:07 -0400 Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmWe5-0002Z2-7T; Wed, 12 Apr 2023 05:20:06 -0400 Date: Wed, 12 Apr 2023 12:20:48 +0300 Message-Id: <831qkp8nin.fsf@gnu.org> To: Luis Machado Cc: gdb-patches@sourceware.org, alex.bennee@linaro.org, richard.henderson@linaro.org, peter.maydell@linaro.org In-Reply-To: <63c2cf2c-692c-7737-d0ee-b8cb30439b4c@arm.com> (message from Luis Machado on Wed, 12 Apr 2023 09:46:31 +0100) Subject: Re: [PATCH] [gdb/aarch64] pauth: Create new feature string for pauth to prevent crashing older gdb's References: <20230411224327.2142994-1-luis.machado@arm.com> <83mt3d8wkf.fsf@gnu.org> <63c2cf2c-692c-7737-d0ee-b8cb30439b4c@arm.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > 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 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. Is it really important to say that the bug happens only when additional system registers are reported?