From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 923703858022 for ; Tue, 25 May 2021 03:22:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 923703858022 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6A0B8340B28; Tue, 25 May 2021 03:22:31 +0000 (UTC) Date: Mon, 24 May 2021 23:22:31 -0400 From: Mike Frysinger To: Fergus Dall Cc: libc-alpha@sourceware.org, clumptini , chromeos-toolchain@google.com Subject: Re: [PATCH] rtld: Add --no-default-paths option Message-ID: Mail-Followup-To: Fergus Dall , libc-alpha@sourceware.org, clumptini , chromeos-toolchain@google.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP 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: Tue, 25 May 2021 03:22:33 -0000 On 25 May 2021 12:25, Fergus Dall via Libc-alpha wrote: > This option implies --inhibit-cache, as there is no point > in searching a cache of system libraries when we are not using the > system libraries at all. i'm on the fence about this. i don't disagree with your logic, but it still seems like we have a dedicated --inhibit-cache option, so might as well leave it at that. logic-wise, code seems OK. would be nice to add a test, but this is a bit hard as it relies on the installed / paths. > +int _dl_no_default_paths; i try to avoid negative variables as it makes reading code harder. how about "_dl_search_default_paths" ? > --- a/elf/dl-usage.c > +++ b/elf/dl-usage.c > > + --no-default-paths Do not use the default library search path\n\a > + This option implies --inhibit-cache\n\ prob should read: --no-default-paths do not use the default library search path\n\a (this option implies --inhibit-cache)\n\ -mike