From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 0BQQBCFKNmQAZikAWB0awg (envelope-from ) for ; Wed, 12 Apr 2023 02:05:21 -0400 Received: by simark.ca (Postfix, from userid 112) id ECE541E221; Wed, 12 Apr 2023 02:05:20 -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=FJQxWWmp; 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=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 6A4A71E110 for ; Wed, 12 Apr 2023 02:05:20 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC175385772A for ; Wed, 12 Apr 2023 06:05:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC175385772A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681279519; bh=Y7OSe7kBOaR+W1ICFdo9DfsegDR9oRsw/WH+7cXls/8=; 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=FJQxWWmp9n3wKAVT0lGn/i447CYGNwVgwID55Ih83Cbqt453p4X44ZUObUqNE1gX4 FjQ8zYTsjELcI39kbEun+CP92roOCG/8ODUalJCxG6A+53Sac2DYmEfYtYDnFfCYRw nqU8WwR0EZmp4sgJxF0shCoCLkYVCNJA68FEsoig= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 6034D3858D28 for ; Wed, 12 Apr 2023 06:05:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6034D3858D28 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 1pmTbF-00046E-8F; Wed, 12 Apr 2023 02:04:57 -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 1pmTav-0003Uq-LI; Wed, 12 Apr 2023 02:04:55 -0400 Date: Wed, 12 Apr 2023 09:05:20 +0300 Message-Id: <83mt3d8wkf.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: <20230411224327.2142994-1-luis.machado@arm.com> (message from Luis Machado via Gdb-patches on Tue, 11 Apr 2023 23:43:27 +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> 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" > CC: , , > > Date: Tue, 11 Apr 2023 23:43:27 +0100 > From: Luis Machado via Gdb-patches > > I've added some documentation to explain the situation. > --- > gdb/aarch64-tdep.c | 15 ++++++++++++++- > gdb/doc/gdb.texinfo | 16 ++++++++++++++++ > 2 files changed, 30 insertions(+), 1 deletion(-) Thanks. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 45a0580bc29..aefeb63f75c 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -47980,6 +47980,22 @@ has a signed link register value that needs to be unmasked/decoded. > Extra registers are allowed in this feature, but they will not affect > @value{GDBN}. > > +Due to a bug in previous versions of @value{GDBN} (versions 9, 10, 11 and 12), > +a new feature string was created to prevent targets causing a @value{GDBN} > +crash whenever they reported support for Pointer Authentication 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 new feature string is @samp{org.gnu.gdb.aarch64.pauth_v2}, and it has > +the same contents as feature string @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}. > + > +In the future the @samp{org.gnu.gdb.aarch64.pauth} feature string might be > +deprecated in favor of @samp{org.gnu.gdb.aarch64.pauth_v2}. > + Since this is the manual for GDB users, it should describe the feature first, and explain its use and rationale after that. So this description is backwards: it starts with the reason for introduction of this feature, something that doesn't necessarily make sense to the reader of the manual. Instead, we should first say that 'org.gnu.gdb.aarch64.pauth' will be deprecated in favor of 'org.gnu.gdb.aarch64.pauth_v2', then introduce 'org.gnu.gdb.aarch64.pauth_v2' saying that it has the same contents as the former, and finally explain that targets should use 'org.gnu.gdb.aarch64.pauth_v2' to avoid the danger of crashing older GDBs. OK? Reviewed-By: Eli Zaretskii