public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Tom Tromey <tom@tromey.com>, Gustavo Romero <gustavo.romero@linaro.org>
Cc: gdb-patches@sourceware.org, thiago.bauermann@linaro.org
Subject: Re: [PATCH v3 7/7] gdb: Document qMemTagCheckAddr packet
Date: Tue, 9 Apr 2024 16:52:09 +0100	[thread overview]
Message-ID: <e373b073-4789-4002-b172-05c4deeb33b4@arm.com> (raw)
In-Reply-To: <878r1m5z64.fsf@tromey.com>

On 4/9/24 16:33, Tom Tromey wrote:
>>>>>> "Gustavo" == Gustavo Romero <gustavo.romero@linaro.org> writes:
> 
>>> Is querying really needed in this case?
>>> Like, if there is some user feature that requires knowing whether this
>>> work before ever trying it, then I guess that would be a good
>>> justification.  In other cases, it seems to me that simply trying to use
>>> a packet is better than a qSupported response; or at least I don't know
>>> why it wouldn't be.
> 
> Gustavo> That's right, I think we are in sync here. Luis communicated to me last week
> Gustavo> (private conversation) about this possibility, hence for v4 we just try to
> Gustavo> send the qMemTagCheckAddr packet, and if it fails (empty reply) there is a
> Gustavo> fallback to the current code path, which reads the smaps. So I'm dropping
> Gustavo> the memory-tagging-check-addr feature.
> 
> Great, thank you.
> 
> TBH I am not sure if my view on the desirability of probing versus
> qSupported is the correct one.  Like, there may be counterexamples I'm
> unaware of.

We already have a qSupported string that reports if memory tagging is
supported by the remote (memory-tagging+). So before we send this new
packet, gdb can check if it makes sense to send it. If the target
supports memory tagging, then the answer is yes. Otherwise no.

If we didn't have "memory-tagging+", I think it would make sense to
have a feature string in place, because then a remote can support
the packet itself, but not necessarily support checking if a particular
address is within a tagged memory range.

So probing seems fine in this case. In the future gdbserver may implement
it as well. Until then, an empty reply from gdbserver will tell gdb this method
of querying is not supported.

      reply	other threads:[~2024-04-09 15:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04  6:48 [PATCH v3 0/7] Add another way to check tagged addresses on remote targets Gustavo Romero
2024-04-04  6:48 ` [PATCH v3 1/7] gdb: aarch64: Remove MTE address checking from get_memtag Gustavo Romero
2024-04-04 14:11   ` Luis Machado
2024-04-04  6:48 ` [PATCH v3 2/7] gdb: aarch64: Move MTE address check out of set_memtag Gustavo Romero
2024-04-04 14:17   ` Luis Machado
2024-04-06 23:07     ` Gustavo Romero
2024-04-04  6:48 ` [PATCH v3 3/7] gdb: aarch64: Remove MTE address checking from memtag_matches_p Gustavo Romero
2024-04-04 14:19   ` Luis Machado
2024-04-04  6:48 ` [PATCH v3 4/7] gdb: Use passed gdbarch instead of calling current_inferior Gustavo Romero
2024-04-04 14:20   ` Luis Machado
2024-04-04  6:48 ` [PATCH v3 5/7] gdb: Introduce is_address_tagged target hook Gustavo Romero
2024-04-04 15:45   ` Luis Machado
2024-04-04 16:12     ` Gustavo Romero
2024-04-04 16:20       ` Luis Machado
2024-04-08 20:47     ` Gustavo Romero
2024-04-04  6:48 ` [PATCH v3 6/7] gdb: Add qMemTagAddrCheck packet Gustavo Romero
2024-04-04 16:18   ` Luis Machado
2024-04-04  6:48 ` [PATCH v3 7/7] gdb: Document qMemTagCheckAddr packet Gustavo Romero
2024-04-04  7:40   ` Eli Zaretskii
2024-04-08 19:37   ` Tom Tromey
2024-04-09 13:23     ` Gustavo Romero
2024-04-09 15:33       ` Tom Tromey
2024-04-09 15:52         ` Luis Machado [this message]

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=e373b073-4789-4002-b172-05c4deeb33b4@arm.com \
    --to=luis.machado@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gustavo.romero@linaro.org \
    --cc=thiago.bauermann@linaro.org \
    --cc=tom@tromey.com \
    /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).