Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matthieu Longo <matthieu.longo@arm.com>
To: gdb-patches@sourceware.org
Cc: Luis Machado <luis.machado@amd.com>,
	Luis Machado <luis.machado.foss@gmail.com>,
	Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
	Srinath Parvathaneni <srinath.parvathaneni@arm.com>,
	"Maciej W . Rozycki" <macro@orcam.me.uk>,
	Andreas Schwab <schwab@suse.de>
Subject: Re: [PATCH v5] gdb: align siginfo_t with the Linux kernel definition
Date: Mon, 3 Aug 2026 09:23:44 +0100	[thread overview]
Message-ID: <edaa91f6-c3c6-41a4-9bf4-fcaea705a12e@arm.com> (raw)
In-Reply-To: <20260728123239.211813-1-matthieu.longo@arm.com>

On 28/07/2026 13:32, Matthieu Longo wrote:
> GDB's current definition of siginfo_t is missing many fields present in
> the Linux kernel definition [1].
> 
> These fields are useful for providing detailed, user-friendly diagnostics
> when a fault occurs. Some new AArch64 extensions, such as Permission
> Overlay Enhancement used to implement Protection Keys [2], require the
> debugger to inspect 'si_pkey' alongside 'si_addr' to help the user identify
> the problematic key.
> 
> This patch aligns GDB's definition of the __sifields._sigfault member of
> siginfo_t with the definition from the Linux kernel master branch.
> 
> To avoid hardcoding the field access paths throughout the codebase, this
> patch also introduces compile-time accessors for the siginfo_t attributes,
> centralizing their definitions in a single location and making future
> updates easier.
> 
> Finally, extend the testsuite to verify access to the new si_pkey field
> and its preservation when modifying $_siginfo and when reading core files.
> The tests in siginfo-obj.exp rely on the siginfo_t definition provided by
> glibc's <signal.h>, which does not yet expose all of the fields present in
> the kernel definition. As a result, the tests cannot exercise every newly
> added field and therefore focus on si_pkey, the field motivating this change.
> The test validates that GDB can read and modify the field correctly; it does
> not attempt to generate a real protection-key fault.
> 
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
>      tree/include/uapi/asm-generic/siginfo.h#n69
> [2]: https://lore.kernel.org/all/20160212210213.ABC488FA@viggo.jf.intel.com/
> 
> Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Ping.

@Luis: I addressed your suggestion for compile time accessors. I think that it is cleaner than a
hard-coded string anyway. Please let me know what you if you are happy with the current state.

Regarding the GDB users' accessors, I haven't implemented them because the scope of this patch would
increase too much. Please see my response in v3 [1].

[1]: https://inbox.sourceware.org/gdb-patches/5c623005-2b19-48a6-9bd5-bb3dfb3166b0@arm.com/

Matthieu

  reply	other threads:[~2026-08-03  8:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 12:32 Matthieu Longo
2026-08-03  8:23 ` Matthieu Longo [this message]
2026-08-12 21:55   ` Luis
2026-08-12 19:08 ` Simon Marchi
2026-08-13 14:48   ` Matthieu Longo
2026-08-13 15:49     ` Simon Marchi
2026-08-14 10:05       ` Matthieu Longo
2026-08-17 16:59         ` Simon Marchi
2026-08-17  9:33     ` Matthieu Longo
2026-08-17 16:42       ` Simon Marchi
2026-08-17 21:37         ` Matthieu Longo

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=edaa91f6-c3c6-41a4-9bf4-fcaea705a12e@arm.com \
    --to=matthieu.longo@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=luis.machado@amd.com \
    --cc=macro@orcam.me.uk \
    --cc=schwab@suse.de \
    --cc=srinath.parvathaneni@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