* [PATCH] gdb: support rseq auxvs
@ 2023-06-21 23:03 Ilya Leoshkevich
2023-10-03 19:05 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Ilya Leoshkevich @ 2023-06-21 23:03 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches, Ilya Leoshkevich
Linux kernel commit commit 317c8194e6ae ("rseq: Introduce feature size
and alignment ELF auxiliary vector entries") introduced two new auxvs:
AT_RSEQ_FEATURE_SIZE and AT_RSEQ_ALIGN. Support them in GDB. This
fixes auxv.exp on kernels >= v6.3.
---
gdb/auxv.c | 4 ++++
include/elf/common.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 812b2807554..3ce5ccd3342 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -493,6 +493,10 @@ default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
AUXV_FORMAT_STR);
TAG (AT_RANDOM, _("Address of 16 random bytes"), AUXV_FORMAT_HEX);
TAG (AT_HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
+ TAG (AT_RSEQ_FEATURE_SIZE, _("rseq supported feature size"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_RSEQ_ALIGN, _("rseq allocation alignment"),
+ AUXV_FORMAT_HEX);
TAG (AT_EXECFN, _("File name of executable"), AUXV_FORMAT_STR);
TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), AUXV_FORMAT_DEC);
TAG (AT_SYSINFO, _("Special system info/entry points"), AUXV_FORMAT_HEX);
diff --git a/include/elf/common.h b/include/elf/common.h
index ffa6b60bd2b..3ebaebfb34b 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1374,6 +1374,8 @@
may differ from AT_PLATFORM. */
#define AT_RANDOM 25 /* Address of 16 random bytes. */
#define AT_HWCAP2 26 /* Extension of AT_HWCAP. */
+#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size */
+#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment */
#define AT_EXECFN 31 /* Filename of executable. */
/* Pointer to the global system page used for system calls and other
nice things. */
--
2.40.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb: support rseq auxvs
2023-06-21 23:03 [PATCH] gdb: support rseq auxvs Ilya Leoshkevich
@ 2023-10-03 19:05 ` Tom Tromey
2023-10-07 1:30 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2023-10-03 19:05 UTC (permalink / raw)
To: Ilya Leoshkevich via Gdb-patches; +Cc: Tom Tromey, Ilya Leoshkevich
>>>>> "Ilya" == Ilya Leoshkevich via Gdb-patches <gdb-patches@sourceware.org> writes:
Ilya> Linux kernel commit commit 317c8194e6ae ("rseq: Introduce feature size
Ilya> and alignment ELF auxiliary vector entries") introduced two new auxvs:
Ilya> AT_RSEQ_FEATURE_SIZE and AT_RSEQ_ALIGN. Support them in GDB. This
Ilya> fixes auxv.exp on kernels >= v6.3.
Thank you for the patch. I didn't see a review of this. The patch
looks good to me.
Can you add this trailer the commit?
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30540
Thanks.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb: support rseq auxvs
2023-10-03 19:05 ` Tom Tromey
@ 2023-10-07 1:30 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2023-10-07 1:30 UTC (permalink / raw)
To: Tom Tromey, Ilya Leoshkevich via Gdb-patches; +Cc: Ilya Leoshkevich
On 10/3/23 15:05, Tom Tromey wrote:
>>>>>> "Ilya" == Ilya Leoshkevich via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Ilya> Linux kernel commit commit 317c8194e6ae ("rseq: Introduce feature size
> Ilya> and alignment ELF auxiliary vector entries") introduced two new auxvs:
> Ilya> AT_RSEQ_FEATURE_SIZE and AT_RSEQ_ALIGN. Support them in GDB. This
> Ilya> fixes auxv.exp on kernels >= v6.3.
>
> Thank you for the patch. I didn't see a review of this. The patch
> looks good to me.
>
> Can you add this trailer the commit?
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30540
>
> Thanks.
>
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
I stumbled on this problem, so I went ahead and pushed the patch. I
made a little change, I used AUXV_FORMAT_DEC for both values, I think
it's more natural.
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-07 1:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 23:03 [PATCH] gdb: support rseq auxvs Ilya Leoshkevich
2023-10-03 19:05 ` Tom Tromey
2023-10-07 1:30 ` Simon Marchi
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).