From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by sourceware.org (Postfix) with ESMTPS id 807AB3857016 for ; Mon, 5 Sep 2022 18:08:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 807AB3857016 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=otheo.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=otheo.eu Received: (Authenticated sender: #01#@otheo.eu) by mail.gandi.net (Postfix) with ESMTPSA id DEA7B20004 for ; Mon, 5 Sep 2022 18:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=otheo.eu; s=gm1; t=1662401283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYQ6/oXkfOYghEK+a+MDUYGjh0RTGlEnaIxk8Q9sG8g=; b=Gdt9i+SpWCS88/EnW7LVMKf8v6tgQo+R07ESrcTx6sG7E7ShzhefVTvQW7dTcxZ+W+coeR 5lAckq8RWVU20uC0/VdxSpAYbYXtK9yVf91BgROPkZQjKjyp22a9A1jBTAev042iow3I+z ufe8swDFZxSina70BXSvYbTYZ4vaM5pBP9hlLK9jkgmyTPO1cQs/PBilldqQGBX2Gb2pqY +PlYWIWROYM6wip+W4FmspSbla/eWuzxI9sU5x9ldDUpZ4clZte711wLjvYqdLVdOI1Ify wGgaZiVt3g0kPDx3GT3a2myY69l6B0G2Xn+poyFDHphi8W7YZTVyLvb+/lJt3w== Date: Mon, 5 Sep 2022 20:06:52 +0200 From: Javier Pello To: libc-alpha@sourceware.org Subject: [PATCH 0/4] elf: Fix hwcaps string size overestimation Message-Id: <20220905200652.d69204581d15c64647da5cd2@otheo.eu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Dear list, Here is a series of patches related to the construction of the hwcaps power set strings in function _dl_important_hwcaps in elf/dl-hwcaps.c. The first patch is the main one. It fixes an overallocation of memory for the subdirectory strings in _dl_important_hwcaps that was introduced when adding glibc-hwcaps support for LD_LIBRARY_PATH. This overallocation does not have any user-visible impact (extra space is simply unused) but it would be nice to have it fixed. The other patches are small changes, also in _dl_important_hwcaps, that I have been carrying around for some time now, and I am submitting them in case there is interest in having them merged. The last one improves generation of the hwcaps power set strings by using a single pass over all needed strings, instead of two, resulting in shorter code. The third and fourth patches could conceivably be squashed together. Regards, Javier Javier Pello (4): elf: Fix hwcaps string size overestimation elf: Simplify hwcaps masked value bit counting elf: Remove unneeded conditional in _dl_important_hwcaps elf: Simplify hwcaps power set string construction elf/dl-hwcaps.c | 98 +++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 60 deletions(-) -- 2.36.0