public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org,
	"Yago Gutiérrez" <yagogl@protonmail.com>,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
	"debian-alpha @ lists . debian . org"
	<debian-alpha@lists.debian.org>,
	gentoo-alpha@lists.gentoo.org
Subject: Re: [PATCH] elf: Fix GL(dl_phdr) and GL(dl_phnum) for static builds [BZ #29864]
Date: Wed, 11 Jan 2023 15:27:53 +0100	[thread overview]
Message-ID: <87a62pcfiu.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20230103143011.3836234-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Tue, 3 Jan 2023 11:30:11 -0300")

* Adhemerval Zanella:

> diff --git a/elf/dl-support.c b/elf/dl-support.c
> index 614b5b3e0c..b5ec5bd6d1 100644
> --- a/elf/dl-support.c
> +++ b/elf/dl-support.c
> @@ -250,12 +250,27 @@ _dl_aux_init (ElfW(auxv_t) *av)
>  #endif
>  
>    _dl_auxv = av;
> -  dl_parse_auxv_t auxv_values;
> -  /* Use an explicit initialization loop here because memset may not
> -     be available yet.  */
> -  for (int i = 0; i < array_length (auxv_values); ++i)
> -    auxv_values[i] = 0;
> +  dl_parse_auxv_t auxv_values = { 0, };

Is this really safe?  If so, it should still be in a separate commit.

> diff --git a/sysdeps/unix/sysv/linux/dl-parse_auxv.h b/sysdeps/unix/sysv/linux/dl-parse_auxv.h
> index bf9374371e..2bf3a0ca6b 100644
> --- a/sysdeps/unix/sysv/linux/dl-parse_auxv.h
> +++ b/sysdeps/unix/sysv/linux/dl-parse_auxv.h
> @@ -21,6 +21,7 @@
>  #include <fpu_control.h>
>  #include <ldsodefs.h>
>  #include <link.h>
> +#include <dl-auxv.h>  /* For DL_PLATFORM_AUXV  */
>  
>  typedef ElfW(Addr) dl_parse_auxv_t[AT_MINSIGSTKSZ + 1];

Why is this change needed?

Thanks,
Florian


  reply	other threads:[~2023-01-11 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 14:30 Adhemerval Zanella
2023-01-11 14:27 ` Florian Weimer [this message]
2023-01-11 17:49   ` Adhemerval Zanella Netto

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=87a62pcfiu.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=debian-alpha@lists.debian.org \
    --cc=gentoo-alpha@lists.gentoo.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=libc-alpha@sourceware.org \
    --cc=yagogl@protonmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).