From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 89FA51F4B4 for ; Fri, 9 Oct 2020 10:56:04 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 368DE3854825; Fri, 9 Oct 2020 10:56:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 368DE3854825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1602240963; bh=wd39QMtrWRbWfmRFo+UKM044J2fAb3NA4CKzvdU//SY=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=YTN6fg9kobb012TlJUDTpre5P3nDv0r8JVnMw6D+IsDDx3r3A9CsRgfosT/SxBy0w 6MeHlc/SSCQ4Qk80iQ93rCi0HhswS0/VlhJNhiZzLWBF95U0FWKM73OIJ+kbdp6VRq cIAUVhnLhIqeCed7EUxQ/Bf25PvddUZc2nS9MQqM= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 012EE3857C63 for ; Fri, 9 Oct 2020 10:56:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 012EE3857C63 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-L110dqdKO7K2vqHF8ACb3g-1; Fri, 09 Oct 2020 06:55:59 -0400 X-MC-Unique: L110dqdKO7K2vqHF8ACb3g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F7C91019625; Fri, 9 Oct 2020 10:55:58 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-113-154.ams2.redhat.com [10.36.113.154]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 32B0E19936; Fri, 9 Oct 2020 10:55:57 +0000 (UTC) To: Szabolcs Nagy Subject: Re: [PATCH 16/28] elf: Add glibc-hwcaps support for LD_LIBRARY_PATH References: <47cb6998ed91f70f122de115b2e03ea5e82e5884.1601569371.git.fweimer@redhat.com> <20201008101305.GP29000@arm.com> <87ft6ndavy.fsf@oldenburg2.str.redhat.com> <20201009105056.GR29000@arm.com> Date: Fri, 09 Oct 2020 12:55:55 +0200 In-Reply-To: <20201009105056.GR29000@arm.com> (Szabolcs Nagy's message of "Fri, 9 Oct 2020 11:50:56 +0100") Message-ID: <878scfd5xg.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Szabolcs Nagy via Libc-alpha Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Szabolcs Nagy: > The 10/09/2020 11:08, Florian Weimer wrote: >> * Szabolcs Nagy via Libc-alpha: >> > The 10/01/2020 18:33, Florian Weimer via Libc-alpha wrote: >> >> This hacks non-power-set processing into _dl_important_hwcaps. >> >> Once the legacy hwcaps handling goes away, the subdirectory >> >> handling needs to be reworked, but it is premature to do this >> >> while both approaches are still supported. >> > ... >> >> +/* Returns a bitmap of active subdirectories in _dl_hwcaps_subdirs. >> >> + Bit 0 (the LSB) corresponds to the first substring in >> >> + _dl_hwcaps_subdirs, bit 1 to the second substring, and so on. >> >> + There is no direct correspondence between HWCAP bitmasks and this >> >> + bitmask. */ >> >> +int32_t _dl_hwcaps_subdirs_active (void) attribute_hidden; >> > >> > if this returns a bitmask i would use uint32_t >> > >> > to avoid overflowing shifts and have 32bits available. >>=20 >> I did this for alignment with _dl_hwcaps_split_masked_init, where it >> would convenient to shift in one bits (so that -1 always means =E2=80=9C= all >> ones=E2=80=9D). But I guess I can turn this into a typedef and use an u= nsigned >> type. > > -1 converted to uint32_t is "all ones" so i don't see a problem there. > > i don't think this should be a typedef (that hides > important details about the type where it is used) I don't have a strong opinion on this, but could you please elaborate? Are you concerned that it would hide the number of available bits? Thanks, Florian --=20 Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'N= eill