public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "luis.machado at arm dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/28947] GDB does not remove AArch64 pointer signatures before doing memory accesses
Date: Tue, 24 May 2022 08:04:15 +0000	[thread overview]
Message-ID: <bug-28947-4717-3Nt211qtnr@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28947-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28947

--- Comment #3 from Luis Machado <luis.machado at arm dot com> ---
Thinking a bit more about this, I'm not sure if GDB/debuggers should go out of
their way to remove signature bits from the pointers.

Accessing memory using a signed pointer is invalid anyway, and will result in a
fault. Having debuggers remove that information may cause confusion for a
developer that is trying to debug a PAC-related crash of some kind, as it will
not show the signature part of the pointer.

I can imagine a scenario where a pointer wasn't signed properly, but GDB will
strip the signature of that pointer and will show things as if they were
correct, when in fact they are not. Does that make sense?

Accessing memory using a tagged pointer is valid though, but debuggers need to
be cautious not to pass tagged pointers down to syscalls. GDB does this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-05-24  8:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 11:32 [Bug gdb/28947] New: " david.spickett at linaro dot org
2022-03-07 11:45 ` [Bug gdb/28947] " luis.machado at arm dot com
2022-03-07 11:46 ` luis.machado at arm dot com
2022-03-07 13:28 ` luis.machado at arm dot com
2022-05-24  8:04 ` luis.machado at arm dot com [this message]
2022-05-24  8:06 ` luis.machado at arm dot com
2022-05-24  9:06 ` david.spickett at linaro dot org
2022-05-26  8:23 ` luis.machado at arm dot com
2022-09-15  7:58 ` luis.machado at arm dot com
2022-12-16 11:19 ` cvs-commit at gcc dot gnu.org
2022-12-16 11:22 ` luis.machado at arm dot com

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=bug-28947-4717-3Nt211qtnr@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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).