[PATCH] sysdeps: linux: Fix output of LD_SHOW_AUXV=1 for AT_RSEQ_*

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Nov 25 13:24:27 GMT 2024



On 25/11/24 10:12, Yannick Le Pennec wrote:
> The constants themselves were added to elf.h back in 8754a4133e but the
> array in _dl_show_auxv wasn't modified accordingly, resulting in the
> following output when running LD_SHOW_AUXV=1 /bin/true on recent Linux:
> 
>     AT_??? (0x1b): 0x1c
>     AT_??? (0x1c): 0x20
> 
> With this patch:
> 
>     AT_RSEQ_FEATURE_SIZE: 28
>     AT_RSEQ_ALIGN:        32
> 
> Tested on Linux 6.11 x86_64
> 
> Signed-off-by: Yannick Le Pennec <yannick.lepennec@live.fr>

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
> Considering this patch is trivial I did not bother with the FSF copyright
> assignment thing. Please keep me in CC as I am not subscribed.
> 
>  sysdeps/unix/sysv/linux/dl-sysdep.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c
> index a8ec2d7c18..4352549f01 100644
> --- a/sysdeps/unix/sysv/linux/dl-sysdep.c
> +++ b/sysdeps/unix/sysv/linux/dl-sysdep.c
> @@ -200,6 +200,8 @@ _dl_show_auxv (void)
>  	  [AT_HWCAP2 - 2] =		{ "HWCAP2:            0x", hex },
>  	  [AT_HWCAP3 - 2] =		{ "HWCAP3:            0x", hex },
>  	  [AT_HWCAP4 - 2] =		{ "HWCAP4:            0x", hex },
> +	  [AT_RSEQ_FEATURE_SIZE - 2] =	{ "RSEQ_FEATURE_SIZE: ", dec },
> +	  [AT_RSEQ_ALIGN - 2] =		{ "RSEQ_ALIGN:        ", dec },
>  	  [AT_MINSIGSTKSZ - 2] =	{ "MINSIGSTKSZ:       ", dec },
>  	  [AT_L1I_CACHESIZE - 2] =	{ "L1I_CACHESIZE:     ", dec },
>  	  [AT_L1I_CACHEGEOMETRY - 2] =	{ "L1I_CACHEGEOMETRY: 0x", hex },



More information about the Libc-alpha mailing list