* [PATCH] Support AT_FXRNG and AT_KPRELOAD on FreeBSD.
@ 2021-12-06 21:31 John Baldwin
2021-12-07 11:11 ` Andrew Burgess
0 siblings, 1 reply; 3+ messages in thread
From: John Baldwin @ 2021-12-06 21:31 UTC (permalink / raw)
To: gdb-patches, binutils
FreeBSD's kernel has recently added two new ELF auxiliary vector
entries. AT_FXRNG points to a root seed version for the kernel's
PRNG. Userland can use this to reseed a userland PRNG after the
kernel's PRNG has reseeded. AT_KPRELOAD is the base address of a
kernel-provided vDSO.
This change displays the proper name and description of these entries
in 'info auxv'.
include/ChangeLog:
* elf/common.h (AT_FREEBSD_FXRNG, AT_FREEBSD_KPRELOAD): Define.
---
gdb/fbsd-tdep.c | 2 ++
include/ChangeLog | 4 ++++
include/elf/common.h | 2 ++
3 files changed, 8 insertions(+)
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index 4da7798544b..346ff7b602b 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -1565,6 +1565,8 @@ fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
TAG (ENVC, _("Environment count"), AUXV_FORMAT_DEC);
TAG (ENVV, _("Environment vector"), AUXV_FORMAT_HEX);
TAG (PS_STRINGS, _("Pointer to ps_strings"), AUXV_FORMAT_HEX);
+ TAG (FXRNG, _("Pointer to root RNG seed version"), AUXV_FORMAT_HEX);
+ TAG (KPRELOAD, _("Base address of vDSO"), AUXV_FORMAT_HEX);
}
fprint_auxv_entry (file, name, description, format, type, val);
diff --git a/include/ChangeLog b/include/ChangeLog
index c5b3631ae83..27ddd636c08 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2021-12-06 John Baldwin <jhb@FreeBSD.org>
+
+ * elf/common.h (AT_FREEBSD_FXRNG, AT_FREEBSD_KPRELOAD): Define.
+
2021-12-01 Nick Clifton <nickc@redhat.com>
PR 28630
diff --git a/include/elf/common.h b/include/elf/common.h
index 61cfaacfe6c..66bc06ff326 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1392,6 +1392,8 @@
#define AT_FREEBSD_ENVC 30 /* Environment count. */
#define AT_FREEBSD_ENVV 31 /* Environment vvector. */
#define AT_FREEBSD_PS_STRINGS 32 /* struct ps_strings. */
+#define AT_FREEBSD_FXRNG 33 /* Pointer to root RNG seed version. */
+#define AT_FREEBSD_KPRELOAD 34 /* Base of vdso. */
#define AT_SUN_UID 2000 /* Effective user ID. */
#define AT_SUN_RUID 2001 /* Real user ID. */
--
2.32.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Support AT_FXRNG and AT_KPRELOAD on FreeBSD.
2021-12-06 21:31 [PATCH] Support AT_FXRNG and AT_KPRELOAD on FreeBSD John Baldwin
@ 2021-12-07 11:11 ` Andrew Burgess
2021-12-07 13:13 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Burgess @ 2021-12-07 11:11 UTC (permalink / raw)
To: John Baldwin; +Cc: gdb-patches, binutils
* John Baldwin <jhb@FreeBSD.org> [2021-12-06 13:31:14 -0800]:
> FreeBSD's kernel has recently added two new ELF auxiliary vector
> entries. AT_FXRNG points to a root seed version for the kernel's
> PRNG. Userland can use this to reseed a userland PRNG after the
> kernel's PRNG has reseeded. AT_KPRELOAD is the base address of a
> kernel-provided vDSO.
This all looks good to me. I can only approve the GDB side of things
though.
Thanks,
Andrew
>
> This change displays the proper name and description of these entries
> in 'info auxv'.
>
> include/ChangeLog:
>
> * elf/common.h (AT_FREEBSD_FXRNG, AT_FREEBSD_KPRELOAD): Define.
> ---
> gdb/fbsd-tdep.c | 2 ++
> include/ChangeLog | 4 ++++
> include/elf/common.h | 2 ++
> 3 files changed, 8 insertions(+)
>
> diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
> index 4da7798544b..346ff7b602b 100644
> --- a/gdb/fbsd-tdep.c
> +++ b/gdb/fbsd-tdep.c
> @@ -1565,6 +1565,8 @@ fbsd_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
> TAG (ENVC, _("Environment count"), AUXV_FORMAT_DEC);
> TAG (ENVV, _("Environment vector"), AUXV_FORMAT_HEX);
> TAG (PS_STRINGS, _("Pointer to ps_strings"), AUXV_FORMAT_HEX);
> + TAG (FXRNG, _("Pointer to root RNG seed version"), AUXV_FORMAT_HEX);
> + TAG (KPRELOAD, _("Base address of vDSO"), AUXV_FORMAT_HEX);
> }
>
> fprint_auxv_entry (file, name, description, format, type, val);
> diff --git a/include/ChangeLog b/include/ChangeLog
> index c5b3631ae83..27ddd636c08 100644
> --- a/include/ChangeLog
> +++ b/include/ChangeLog
> @@ -1,3 +1,7 @@
> +2021-12-06 John Baldwin <jhb@FreeBSD.org>
> +
> + * elf/common.h (AT_FREEBSD_FXRNG, AT_FREEBSD_KPRELOAD): Define.
> +
> 2021-12-01 Nick Clifton <nickc@redhat.com>
>
> PR 28630
> diff --git a/include/elf/common.h b/include/elf/common.h
> index 61cfaacfe6c..66bc06ff326 100644
> --- a/include/elf/common.h
> +++ b/include/elf/common.h
> @@ -1392,6 +1392,8 @@
> #define AT_FREEBSD_ENVC 30 /* Environment count. */
> #define AT_FREEBSD_ENVV 31 /* Environment vvector. */
> #define AT_FREEBSD_PS_STRINGS 32 /* struct ps_strings. */
> +#define AT_FREEBSD_FXRNG 33 /* Pointer to root RNG seed version. */
> +#define AT_FREEBSD_KPRELOAD 34 /* Base of vdso. */
>
> #define AT_SUN_UID 2000 /* Effective user ID. */
> #define AT_SUN_RUID 2001 /* Real user ID. */
> --
> 2.32.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Support AT_FXRNG and AT_KPRELOAD on FreeBSD.
2021-12-07 11:11 ` Andrew Burgess
@ 2021-12-07 13:13 ` Alan Modra
0 siblings, 0 replies; 3+ messages in thread
From: Alan Modra @ 2021-12-07 13:13 UTC (permalink / raw)
To: Andrew Burgess; +Cc: John Baldwin, binutils, gdb-patches
On Tue, Dec 07, 2021 at 11:11:55AM +0000, Andrew Burgess via Binutils wrote:
> * John Baldwin <jhb@FreeBSD.org> [2021-12-06 13:31:14 -0800]:
>
> > FreeBSD's kernel has recently added two new ELF auxiliary vector
> > entries. AT_FXRNG points to a root seed version for the kernel's
> > PRNG. Userland can use this to reseed a userland PRNG after the
> > kernel's PRNG has reseeded. AT_KPRELOAD is the base address of a
> > kernel-provided vDSO.
>
> This all looks good to me. I can only approve the GDB side of things
> though.
Oh go on, be brave and claim the include/elf/ changes are obvious.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-07 13:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 21:31 [PATCH] Support AT_FXRNG and AT_KPRELOAD on FreeBSD John Baldwin
2021-12-07 11:11 ` Andrew Burgess
2021-12-07 13:13 ` Alan Modra
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).