From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2089.outbound.protection.outlook.com [40.107.20.89]) by sourceware.org (Postfix) with ESMTPS id C3C613857C5F for ; Fri, 9 Oct 2020 11:04:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C3C613857C5F Received: from AM5PR1001CA0003.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::16) by AM4PR08MB2803.eurprd08.prod.outlook.com (2603:10a6:205:5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21; Fri, 9 Oct 2020 11:04:05 +0000 Received: from AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:2:cafe::96) by AM5PR1001CA0003.outlook.office365.com (2603:10a6:206:2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21 via Frontend Transport; Fri, 9 Oct 2020 11:04:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT050.mail.protection.outlook.com (10.152.17.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23 via Frontend Transport; Fri, 9 Oct 2020 11:04:04 +0000 Received: ("Tessian outbound 7fc8f57bdedc:v64"); Fri, 09 Oct 2020 11:04:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0abbb637ad22b0d0 X-CR-MTA-TID: 64aa7808 Received: from e482e136450a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 78B6210B-35A4-4D26-B6EC-473E67109BA3.1; Fri, 09 Oct 2020 11:03:59 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e482e136450a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 09 Oct 2020 11:03:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kb/fsIqbFsAcWpBg8yslQGc/4RiszUp7wyglRdoPDRN2G7MnIaKnr03guoU232kOHo46vTX/C8lykEn/QiMeAuZJWx/pnye8EdeCP1AuwDt9xhOaFnlTsRcHoRU9hHWL16WUC9/dGJWzrIjwUBOtdoi6USOCV06Sj8ZpEv4vaRqqvr5QnV5tdkd/QGfMCci6autQdwQehEU45usWnf7NT+EwyBiKzeqK4bT/Sek8y0D7T3Ld8mB1QddNs5RHCBLFRQSbtFuuSGQKxzT9cbrzZHIDM74de25bSrlrrGv9ygqNGRRudSyr5/4tbNRpiWca9OYZQkpCPbcbuV9R78cnSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=afalsbIPt7jO4mXpDGFvzBWSLOKxTilnismpyx0Ifjc=; b=eXlq3oz3RBtDaCGrgV/R8Uf7QbFDs9pL5n3Nb4GPKW5PhwmXL2gozN8SkxG+bFhnfCfcnl1NLVA9tlIBoWeu21I5B9EFTj8n/lQAZFlE2fpBWh5dQL6fBR5tOwJgOlreXWS1DmGizBRnwgQ4vBzUbC1ogxzpLbVEEkLH1dE/3BWEEPgyKksNrGqRVeFvPezXKWRcbqpf7mwNuadyTTDI8rQLgcJBD+ggJ6gLTRyEuY+0UZqM2mDbMAYuxf6sDXl8+jp4bloxwJC6wqsfJm6cjvCfSgYoSEqXQPkfnrISn2NCU5pP9spoXKR+zGKukJ/DxhfGiLyH5ozXr7r6uvYmUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) by PR3PR08MB5769.eurprd08.prod.outlook.com (2603:10a6:102:91::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.24; Fri, 9 Oct 2020 11:03:58 +0000 Received: from PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::957e:c80e:98f4:23d6]) by PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::957e:c80e:98f4:23d6%6]) with mapi id 15.20.3455.023; Fri, 9 Oct 2020 11:03:58 +0000 Date: Fri, 9 Oct 2020 12:03:56 +0100 From: Szabolcs Nagy To: Florian Weimer Cc: Szabolcs Nagy via Libc-alpha Subject: Re: [PATCH 16/28] elf: Add glibc-hwcaps support for LD_LIBRARY_PATH Message-ID: <20201009110356.GS29000@arm.com> References: <47cb6998ed91f70f122de115b2e03ea5e82e5884.1601569371.git.fweimer@redhat.com> <20201008101305.GP29000@arm.com> <87ft6ndavy.fsf@oldenburg2.str.redhat.com> <20201009105056.GR29000@arm.com> <878scfd5xg.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <878scfd5xg.fsf@oldenburg2.str.redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: LO2P265CA0411.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::15) To PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.54) by LO2P265CA0411.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22 via Frontend Transport; Fri, 9 Oct 2020 11:03:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 20d11b71-d0b6-4c2d-20e0-08d86c430957 X-MS-TrafficTypeDiagnostic: PR3PR08MB5769:|AM4PR08MB2803: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: of+nlU/CVQQC4zt3Ynh9TexIjpkmwOep5SPEU0Nl0D1Yi9EVlIwb1X9lcM0gMAkE6Tx+GKuj3OKEAADKYHLfaahq6AxpSueDdYP4nyHcegsuAkNuOIyL495k1iH5g5EWBIb/jya3rYCcE99Ic7PebmBXaYW5UvMHm/Okz1taEV7rhZtUgHP9bWt508vIpFlH6zQ+yK678ZYLxK7KOzSG6rdpAhtCtHUuuWJ8H3vUye3ngV8p1pYkJR5BinZwLRr2Fe3f/lJ6KD/7lWQGjpFKyWZoUja1ZOtn9miOW5jPEHsBIZV7bgEdWg8ty5dNNMY9usKsRSzkuo4kEMXi2hygzA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5564.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(366004)(376002)(136003)(39860400002)(66556008)(66476007)(55016002)(44832011)(86362001)(36756003)(5660300002)(2906002)(1076003)(316002)(4326008)(26005)(8886007)(8936002)(66946007)(33656002)(7696005)(52116002)(186003)(16526019)(2616005)(478600001)(956004)(8676002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: LhGui8Xn4Wqp04dpAtXsmqdQJ4p9Le63EoTk90TKekpgqYVosO43RsksDZbqHoyQRtA7NCuPsdpLWcujBuAuYOJIin0YYhR9cuOpFmh7ffhJ81uXKJSTH4295wqZleEKX/j0ZFcQHZF/TWWjUGDihKI6Z70D8ThYcoPhq5K5H8IxprUdNR7q5tKMNjwFgd7g1s0SEIEngLTa+pSuax+83CwUzYFuBOiZkE0wims0DUQbd1U43ofWADbmcsbXH/vXn8eyJZk01r6jLUyJ114i/4xUubOBeE1c3N3pto/RgVWvrpZV3/9erpTcLDSO9g1mi46QH0FHkoW4XW0z/NT1Q4aHJFxcXkSgRmDryuujBecyM+fEl0+NC/VWoA6h/I9wKkPp32o0bm38tjHrzMVU98TfGieXb7YboY1DR52Zh2p10XvE+lgwW4xQYFibXsHq5XEfZZjEJAtEqKw2pDDAs0/2KFvZ5lttkHOhDGau1ipop4AgBGoVyvUEmZaH/n53mKW9G8RPmTLY7Kem90lwuVbatZgw5kvub/fdv9EbCM9UHAczDV6z0KZHbQjW+H6Zph/kXxLXQDs6ge1Vn12ur3xaRUn144/+OCT7GezEfKIkx8uAnT1c0ZUaiI329cnTYSp+jvEGUQ8pK8KACUFXVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5769 Original-Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ab1fcbf1-b310-40a6-e841-08d86c43054a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7BPBhlI/athTz1RvNs/dHijIRct85Es4VwEU4PtCT8A4GWbyLRY8PMLcIyXf4Nb5UttNouNwYjeL85L8rhUId4wg+IMbleOd/WOEsbxrBclfo0KH5HFAG5hLFyx2mfvKoWxpd0f8oqsTH9/J82TESYpHp7bfhUCmzOwGf/Dz27bx0U10YXB0apA7DBthAZXoxvBs6B9QODLNQ2P/GFB98hBLziVO5QWB2Q2g5cIzcI92OroclyWCUEupYZSwEYdlN3RSIq/+/fJMx+wCldJLV71X0bMvEWpu7XT7nojiazbmgqytCn/BkkSJqiMaosj6keJT4RcLFpKnY3hcwf8gFE5SbD97kAt8AMgIpFHZlBbPDUk9NL1o1OR9mW+fYSzY4W+6X6OiF/euxE7tQ5PVKA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(396003)(376002)(46966005)(82310400003)(8886007)(2616005)(5660300002)(44832011)(55016002)(4326008)(956004)(70586007)(47076004)(70206006)(356005)(316002)(8676002)(1076003)(81166007)(8936002)(36906005)(7696005)(82740400003)(2906002)(478600001)(86362001)(6862004)(336012)(186003)(26005)(16526019)(33656002)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2020 11:04:04.7679 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 20d11b71-d0b6-4c2d-20e0-08d86c430957 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2803 X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Fri, 09 Oct 2020 11:04:08 -0000 The 10/09/2020 12:55, Florian Weimer wrote: > * 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. > >> > >> 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 “all > >> ones”). But I guess I can turn this into a typedef and use an unsigned > >> 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? looking at code locally, it is easier to see what operations are valid if i know the signedness and bit width of the integer types involved. typedef does not help with typesafety, it sometimes helps documenting the intent, but in this case i think uint32_t is appropriate for the internal bit mask.