public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Luis Machado <luis.machado@arm.com>, gdb-patches@sourceware.org
Cc: thiago.bauermann@linaro.org
Subject: Re: [PATCH] [AArch64] Enable pointer authentication support for aarch64 bare metal/kernel mode addresses
Date: Thu, 19 Jan 2023 10:35:32 -0800	[thread overview]
Message-ID: <2084cc2c-877f-36f2-e4a8-ec97eeddf411@FreeBSD.org> (raw)
In-Reply-To: <2fbe4596-17fa-1962-66ae-8b4b9f4edd22@arm.com>

On 1/19/23 1:34 AM, Luis Machado wrote:
> Hi,
> 
> On 1/18/23 18:39, John Baldwin wrote:
>> 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?>
> 
> The default behavior in the absence of the PAC registers for the kernel addresses is to
> assume TBI, remove the top bits and sign-extend based on bit 55.
> 
> This is done by aarch64_remove_top_bits.
> 
> I suppose that would work for you then.

That sounds perfect then, thanks!

-- 
John Baldwin


  reply	other threads:[~2023-01-19 18:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 10:57 Luis Machado
2022-12-20  3:20 ` Thiago Jung Bauermann
2022-12-20  9:17   ` Luis Machado
2023-01-05 13:16 ` Luis Machado
2023-01-18 18:39   ` John Baldwin
2023-01-19  9:34     ` Luis Machado
2023-01-19 18:35       ` John Baldwin [this message]
2023-02-21  9:11 ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2084cc2c-877f-36f2-e4a8-ec97eeddf411@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@arm.com \
    --cc=thiago.bauermann@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).