From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id 1ACD33858C83 for ; Wed, 11 Jan 2023 17:50:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1ACD33858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x22b.google.com with SMTP id e205so13307948oif.11 for ; Wed, 11 Jan 2023 09:50:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=TJ+uxuJWZtO1MdkbOghVw/vlIywdNC54vuwyQXe97uc=; b=J1WFikZkpBVhlM/yFry8pYWLN9hsddWN7+/JutEP7JIAT58hK6Y0muJgr7f8k+z34R RVskQVxH4SGLRpnhVDXXHjIKmC5T0rNaQvQrmfs9qcvbRHT8PoznsPyG+1CiPoSnUiwr gCirzSMhLFHSwevR/IBQjKQZhnT52ZhYst7ggVHcn766mRzJOm/cBKAeH0vC0W9jtCx4 NxE37vGX87giUDDioHqu7rjM3YudZCfsKSfV2cF30J2sKuzIgaHRor4wyaS53X3VFUEE wesBJSZpr/se/lJcmaJyAU8buyZpIZmswSLTYFIVg3V3WQwbJvmS5muHYprx09IibeOe 2MWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TJ+uxuJWZtO1MdkbOghVw/vlIywdNC54vuwyQXe97uc=; b=qEo+9Irtnj6WN0lNHLN73wl4DtPbz1mnWaP5WNMQGJVkGdBzmgyGwDNr8iIzZIpMBn RBY0AswJrLzJe/9C4nU5aJj+tnPOzBcR4iiMKasA+qSQAw9m26BCWiPOOYZc5c8dEGMa MkF7DlKm6004f3VXZPt91oVszj2jm4W4bmNndj3RZJEGi56vSezmHzDJPHkcWZyZZVn/ RT5FKvtES+pNQKgeoma6PwfMQ/q7f6iC8CyjlCfnTzHtATqhTIT7oLmhn2hElbW/HgmX 3aMrUmERkVCSOFJkqgTjmlYkoEjeyxZGA8l6OVzVZWMe3P72o5BODLANctW62E1wN3Zq Rw5g== X-Gm-Message-State: AFqh2kqd1MXtJEEQmGaN968UcSw+bQf0cvuQ95T2yrVJzSyYfhzq79DO F2FTUJlF85q4yQkQVpGcjn2bcA== X-Google-Smtp-Source: AMrXdXtpmv8i06yl09eNKI2IsA5NI4n6eWTRC0CfqUm3BuzSkG7Kbu7TJlT+KG8qvtAp5OpiO70+Kg== X-Received: by 2002:aca:ac94:0:b0:364:5f6b:16a6 with SMTP id v142-20020acaac94000000b003645f6b16a6mr2812910oie.13.1673459403353; Wed, 11 Jan 2023 09:50:03 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c0:a93a:9160:47f0:6805:e35d? ([2804:1b3:a7c0:a93a:9160:47f0:6805:e35d]) by smtp.gmail.com with ESMTPSA id ez12-20020a0568082a0c00b0035a64076e0bsm6932793oib.37.2023.01.11.09.50.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Jan 2023 09:50:02 -0800 (PST) Message-ID: <509e3070-51ca-8a9f-e5f4-1b4475f7117f@linaro.org> Date: Wed, 11 Jan 2023 14:49:59 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] elf: Fix GL(dl_phdr) and GL(dl_phnum) for static builds [BZ #29864] Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org, =?UTF-8?Q?Yago_Guti=c3=a9rrez?= , John Paul Adrian Glaubitz , "debian-alpha @ lists . debian . org" , gentoo-alpha@lists.gentoo.org References: <20230103143011.3836234-1-adhemerval.zanella@linaro.org> <87a62pcfiu.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87a62pcfiu.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On 11/01/23 11:27, Florian Weimer wrote: > * 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. It should be since 5355f9ca7b10183ce06e8a18003ba30f43774858, but I will recheck. I can move it to another patch, but I think it is a lefover of the -fno-tree-loop-distribute-patterns removal. > >> 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? Hum, it might a leftover of development. I will check.