From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 909 invoked from network); 5 Apr 2023 12:25:39 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Apr 2023 12:25:39 -0000 Received: (qmail 23614 invoked by uid 550); 5 Apr 2023 12:25:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 23591 invoked from network); 5 Apr 2023 12:25:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680697524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zslTXgGz1sYJKuWgKeuIJuY61OgQG1I4b8jVhbNo8+Q=; b=HciDUpYMRlafV2NTh9tfMOyhrOHwayaMVIuggIAWzrdfVhOC1uTvQq1slV9QyOtQJSjOVE a7m+R84YZbiuEDcdUR/0oqj6TRhuybj/S5e/SOBxg2dvStIiUajCNZOW3ugkGlkx62UHBp XMUlYZ79PPiZJsmB6W6ubyrg9lterBY= X-MC-Unique: XvuGJo2RM1Ci4e4YoVGgQQ-1 From: Florian Weimer To: Rich Felker Cc: musl@lists.openwall.com References: <20230405115445.GG3298@brightrain.aerifal.cx> <874jpule77.fsf@oldenburg.str.redhat.com> <20230405122044.GG4163@brightrain.aerifal.cx> Date: Wed, 05 Apr 2023 14:25:20 +0200 In-Reply-To: <20230405122044.GG4163@brightrain.aerifal.cx> (Rich Felker's message of "Wed, 5 Apr 2023 08:20:44 -0400") Message-ID: <87zg7mjz2n.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Subject: Re: [musl] Re: [PATCH v9 0/13] implement dlmem() function (fwd) * Rich Felker: > On Wed, Apr 05, 2023 at 02:13:16PM +0200, Florian Weimer wrote: >> * Rich Felker: >> >> > Well this is disturbing. We probably need to fix gcc here (and a lot >> > of code in the wild may be broken) because musl has no such locking >> > where it doesn't belong. >> >> We have a helper function in glibc (_dl_find_object) that replaces all >> the previous object traversal logic and caching in libgcc, so it's no >> longer an issue with current gcc and glibc. > > Does gcc automatically detect and use this if available? What gcc > versions does that cover? We could certainly add it, but I suspect > coverage will be incomplete... :/ It's using a macro from as a proxy to indicate libc support: + /* Use DLFO_STRUCT_HAS_EH_DBASE as a proxy for the existence of a glibc-style + _dl_find_object function. */ +#ifdef DLFO_STRUCT_HAS_EH_DBASE It's not dependent upon __GLIBC__. >> Unfortunately that means that the generic dl_iterate_phdr code will >> be fixed by adding its own locking. > > Not sure why that's unfortunate; it's what it should have been doing > all along. I missed a negation. I meant that It's unlikely that it's going to be fixed, unless you write a patch yourself. 8-> Thanks, Florian