From: Luis Machado via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Cc: david.spickett@linaro.org, catalin.marinas@arm.com
Subject: Re: [PATCH,v2] [AArch64] MTE corefile support
Date: Mon, 31 May 2021 11:56:53 -0300 [thread overview]
Message-ID: <860e15d8-ed55-d5de-6d72-1aedd9a84f93@linaro.org> (raw)
In-Reply-To: <87af0c4e-7a26-ecde-dc4e-95f96ec2ccc8@polymtl.ca>
On 5/31/21 11:49 AM, Simon Marchi wrote:
> On 2021-05-31 10:12 a.m., Luis Machado wrote:
>>>> @@ -71,4 +72,18 @@ extern CORE_ADDR aarch64_mte_set_ltag (CORE_ADDR address, CORE_ADDR tag);
>>>> It is always possible to get the logical tag. */
>>>> extern CORE_ADDR aarch64_mte_get_ltag (CORE_ADDR address);
>>>> +/* MTE-specific NT_MEMTAG header. */
>>>> +struct tag_dump_mte
>>>> +{
>>>> + /* Size of the tag granule in bytes. */
>>>> + uint16_t granule_byte_size;
>>>> + /* Size of the tag in bits. */
>>>> + uint16_t tag_bit_size;
>>>> + /* Reserved field for the future. */
>>>> + uint16_t __unused;
>>>> +};
>>>
>>> This struct is unused.
>>>
>>
>> I'm inclined to leave that as documentation instead, so it is clear what the header sizes are referring to.
>
> The thing is that somebody reading the code in the .c seeing the
> arbitrary sizeofs will note have a clue to go look at
> arch/aarch64-mte-linux.h for explanations. So another option would be
> to write it as a comment near the code. Something like:
>
> /* The header follows the following format:
>
> struct
> {
> /* Size of the tag granule in bytes. */
> uint16_t granule_byte_size;
> /* Size of the tag in bits. */
> uint16_t tag_bit_size;
> /* Reserved field for the future. */
> uint16_t __unused;
> };
> */
>
> Another option would be to have the structure and refer to its fields in
> sizeof:
>
> store_unsigned_integer (buf, sizeof (tag_dump_mte::granule_byte_size),
> byte_order, AARCH64_MTE_GRANULE_SIZE);
I think that would work as well. I can change it for the next iteration.
next prev parent reply other threads:[~2021-05-31 14:57 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 20:20 [PATCH] " Luis Machado via Gdb-patches
2021-05-19 10:01 ` David Spickett via Gdb-patches
2021-05-19 11:11 ` Luis Machado via Gdb-patches
2021-05-19 12:13 ` Eli Zaretskii via Gdb-patches
2021-05-21 15:12 ` Alan Hayward via Gdb-patches
2021-05-21 15:30 ` Luis Machado via Gdb-patches
2021-05-21 17:20 ` John Baldwin
2021-05-24 13:41 ` Luis Machado via Gdb-patches
2021-05-24 8:07 ` Alan Hayward via Gdb-patches
2021-05-24 12:45 ` Luis Machado via Gdb-patches
2021-05-26 14:08 ` [PATCH,v2] " Luis Machado via Gdb-patches
2021-05-29 3:14 ` Simon Marchi via Gdb-patches
2021-05-31 14:12 ` Luis Machado via Gdb-patches
2021-05-31 14:49 ` Simon Marchi via Gdb-patches
2021-05-31 14:56 ` Luis Machado via Gdb-patches [this message]
2021-05-31 14:15 ` [PATCH,v3][AArch64] " Luis Machado via Gdb-patches
2021-05-31 16:44 ` [PATCH,v4][AArch64] " Luis Machado via Gdb-patches
2021-06-01 17:45 ` [PATCH,v5][AArch64] " Luis Machado via Gdb-patches
2021-06-15 14:10 ` [Ping][PATCH,v5][AArch64] " Luis Machado via Gdb-patches
2021-06-24 14:00 ` [PATCH,v5][AArch64] " Alan Hayward via Gdb-patches
2021-06-24 14:37 ` Luis Machado via Gdb-patches
2021-06-24 15:18 ` Alan Hayward via Gdb-patches
2021-07-01 13:50 ` [PING][PATCH,v5][AArch64] " Luis Machado via Gdb-patches
2021-07-11 14:22 ` Joel Brobecker
2021-07-14 13:07 ` Catalin Marinas via Gdb-patches
2021-07-29 2:26 ` Simon Marchi via Gdb-patches
2021-07-29 16:03 ` John Baldwin
2021-07-29 18:10 ` Catalin Marinas via Gdb-patches
2021-07-29 18:20 ` Simon Marchi via Gdb-patches
2021-08-01 15:44 ` Joel Brobecker
2021-08-02 12:06 ` Luis Machado via Gdb-patches
2021-07-19 19:05 ` Luis Machado via Gdb-patches
2021-07-27 16:10 ` Luis Machado via Gdb-patches
2022-03-31 14:03 [AArch64] " Luis Machado via Gdb-patches
2022-04-21 15:20 ` [PATCH, v2] " Luis Machado via Gdb-patches
2022-04-21 15:52 ` Eli Zaretskii via Gdb-patches
2022-04-22 8:12 ` Luis Machado via Gdb-patches
2022-04-22 8:30 ` Eli Zaretskii via Gdb-patches
2022-04-22 8:37 ` Luis Machado via Gdb-patches
2022-04-22 8:43 ` Eli Zaretskii via Gdb-patches
2022-04-22 8:44 ` Luis Machado via Gdb-patches
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=860e15d8-ed55-d5de-6d72-1aedd9a84f93@linaro.org \
--to=gdb-patches@sourceware.org \
--cc=catalin.marinas@arm.com \
--cc=david.spickett@linaro.org \
--cc=luis.machado@linaro.org \
--cc=simon.marchi@polymtl.ca \
/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