From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id D9A603858D35 for ; Wed, 18 Jan 2023 18:39:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9A603858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4Nxvgq51nvz3fBS; Wed, 18 Jan 2023 18:39:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nxvgq49QHz3ptG; Wed, 18 Jan 2023 18:39:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674067191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p5xmeKPUhElj6pYnugab8nU25OIIAuMFeOUXrzAAGio=; b=d9qWL+kKLpooCWmJwqaGusbh6NrkeLLVHkv1yowMCCPLFEd6bohI4AlRkKZMt86bxUloqT slBt9adpl3HfHpqo55brmzkgtZLEi214TSizwsWAWEb3M7OgGJZPwvGl6Rm42vd3FUNfX6 2EmjqjCNsdxt7kEs58RNm4kV3TBcuKV+MAJ2Bi8wCM3YkrPtMwl2WP0/Gi+fPlQO82PdPf dHT5/TQK0xwEhUqXC8zJbUwYTs2g/ql5TpZMr33jMCpbYT7VIAdCcbl/uuiXAfXEEepztl BOg3UgNAUlxJcG+r5ixzIr4SCVZjEsFprTsfW1KGlNvhL0H/6wxQ2Bm2cH4Www== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674067191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p5xmeKPUhElj6pYnugab8nU25OIIAuMFeOUXrzAAGio=; b=xiM2l/P8W46/6Ps3NJ6xikwQlsJMQ8KVnxb52OddU7rDS8aTVWTdHejZNsaym6fxNHDj0p dcKEwXR1UC1KOltNOKueP3bxF25E8GHO9Q7C1PVPYYN39l5XuuTJFBKxE0GuKAuv//2f2G WnF5TetIoBVEgHZ0vtb9TlIajOcDcFVKA0dj5JhxsRG2p62I1iVJ66PTuEmhfE0ahEeheW uDhehnaHjI/M9s/Sp1liu9R44sLIuEw1LdrGMF1YtbJ1zP5DaNN/ooMmeSpkGJ7WSeTOoy fXXjcFx08s7gDcg/5LIem/Lqstg9/3riLGXby0/eW8ewRDz1IhN3iAvOhc4Y+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674067191; a=rsa-sha256; cv=none; b=yiwnTh6Amc+mc3Xpyb+Z6MMu5yDfw/FMFV+Do5yBeAWn6VlF3O7sJnoC9o9nq9/GfEa1Rd I4HyydkrKed+q3xqohKC1CvtcfdqJDHwb3Dw3st/KGbEN7UTu4/YlUPTw5hSVo2HLGDBOE dFx56U8SlJSBKe7YFCC0p8PzV+Rs8EeFkq/FMj4/dydQMLXW/3r3bOItcZQSJ4XueD4mJT Mna8KcXAiWr9ssrLV0xcBS2OKK34XwCXekshq3QnkwXdveVawfevsomdu6xJ7zADjMruaL oWdCz/XqJcfKt8h35QbOxpCuOj4hOYREeQ6opQos2+0Kml7YmZo0XzGiQa83rw== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Nxvgq0Tz7zP8q; Wed, 18 Jan 2023 18:39:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 18 Jan 2023 10:39:49 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] [AArch64] Enable pointer authentication support for aarch64 bare metal/kernel mode addresses Content-Language: en-US To: Luis Machado , gdb-patches@sourceware.org Cc: thiago.bauermann@linaro.org References: <20221216105722.1413765-1-luis.machado@arm.com> <19302961-c418-a266-567c-d52b87f112f8@arm.com> From: John Baldwin In-Reply-To: <19302961-c418-a266-567c-d52b87f112f8@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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: On 1/5/23 5:16 AM, Luis Machado wrote: > Hi John, > > Any thoughts on this patch from BSD's side? Sorry, I missed the cc earlier. FreeBSD does have support for the userland registers that I haven't yet added for userland PAC and this seems to make that easier as I will just need to add the registers to the tdesc when present/supported. However, one question I have is what does this do if the registers aren't available and kernel addresses are used? I have this use case for existing FreeBSD/aarch64 kernel debugging. The default version of the gdbarch hook seems to always assume TBI and strip the upper bits, but for kernel addresses what I kind of need is to sign-extend addresses based on bit 55. I do have a separate gdbarch for kernels vs userland programs so it might just be I need a custom version of this gdbarch hook for the kernel gdbarch? -- John Baldwin