From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 005023858D38 for ; Wed, 11 Jan 2023 14:27:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 005023858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673447277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UfzLcigc0QxiEsJbKGDr3O8eV/opR8kWmJiflV0o+/U=; b=QhVZ2KbI8gRsaOSnx9eFPQryEMPdPyRdkP86L6osvzEEB2F5TMqfiN/7kPfJ5Vpw7GQ6Lb hkQOZrbmKOzP4JoxHJqzTPUvM8xNlRu9zECjBiP794f8ybgxxJaucE7FQjGeImgd0WNEQs fJ3wC+QDHDwkU13B4rllM/PjZX2UZ3I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-491-E-QywDUSP5WmMcNcqd0k3A-1; Wed, 11 Jan 2023 09:27:56 -0500 X-MC-Unique: E-QywDUSP5WmMcNcqd0k3A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BAFBC858F0E; Wed, 11 Jan 2023 14:27:55 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8CD8A492C18; Wed, 11 Jan 2023 14:27:54 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Yago =?utf-8?Q?Guti=C3=A9rrez?= , John Paul Adrian Glaubitz , "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] References: <20230103143011.3836234-1-adhemerval.zanella@linaro.org> Date: Wed, 11 Jan 2023 15:27:53 +0100 In-Reply-To: <20230103143011.3836234-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Tue, 3 Jan 2023 11:30:11 -0300") Message-ID: <87a62pcfiu.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * 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 > #include > #include > +#include /* For DL_PLATFORM_AUXV */ > > typedef ElfW(Addr) dl_parse_auxv_t[AT_MINSIGSTKSZ + 1]; Why is this change needed? Thanks, Florian