From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Y7OSe7kBOaR+W1ICFdo9DfsegDR9oRsw/WH+7cXls/8=; b=ojzT32XmgE7A 3fA/yYI4XQEC3nkdtbKpFaxiVnJKUSqYxhJI9lutODY4ei6WKX57o+0n4Esf8m9gUYT7OE7qntXYh xqmbrzzylHYc3aB8qu/YR7MrGieVEMAvt7WfMpxwfWY4XnwDlMgMY8Za5RkriXtVk66d4tDLQnH4i ViKHGnuK0yhlGbocWnMpT8iBBb6Z4BYUEiIAGkBkH5eG5kRCl0csfE0cZPpK3MN4YzyffM+G90C51 prIdHi6xx7XqO+w6740Qcc8CGQwh72HQdeJpbSAI5rWMgLWlrMBNMyBq9kTBgI1O18/ku+oHSerIn b0Rvdm30I3pHuiRetuN3mw==; 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> From: Eli Zaretskii 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > 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