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=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3939 invoked from network); 25 Jun 2022 09:48:25 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 25 Jun 2022 09:48:25 -0000 Received: (qmail 17465 invoked by uid 550); 25 Jun 2022 09:48:23 -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 17427 invoked from network); 25 Jun 2022 09:48:22 -0000 Date: Sat, 25 Jun 2022 11:48:10 +0200 From: Szabolcs Nagy To: =?utf-8?B?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= Cc: Musl , mesa-dev@lists.freedesktop.org Message-ID: <20220625094810.GT1320090@port70.net> Mail-Followup-To: =?utf-8?B?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= , Musl , mesa-dev@lists.freedesktop.org References: <20220625044724.GB2408@voyager> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Subject: Re: [musl] Fwd: mesa | Remove USE_ELF_TLS macro (!17213) * =E7=BD=97=E5=8B=87=E5=88=9A(Yonggang Luo) [2022-0= 6-25 13:25:31 +0800]: > On Sat, Jun 25, 2022 at 12:47 PM Markus Wichmann wrote: > > > > On Sat, Jun 25, 2022 at 11:36:09AM +0800, =E7=BD=97=E5=8B=87=E5=88=9A(Y= onggang Luo) wrote: > > > So I am confused. What's the situation about ELF-TLS support in musl? > > > Is that still broken now? > > > > musl has always supported ELF-TLS anywhere except in libc itself. That > > was also never the problem. The problem was that the mesa people select > > the initial-exec TLS model explicitly, even though libGL ends up being > > dlopen()ed quite often, and then you should be using the general-dynamic > > model instead. >=20 > My question is does musl support ELS-TLS when using dl-open. >=20 musl supports ELF TLS with or without dlopen. if something crashes that's most likely a bug in mesa. >=20 > > > > According to [1], Rich proposed dropping the initial-exec attribute and > > replacing it with -mtls-dialect=3Dgnu2 eight years ago. Has that happen= ed > > yet? If so, dlopen()ing libGL with musl ought to work. >=20 > `initial-exec` are only specified for __GLIBC__, If musl not predefined > macro ` __GLIBC__` note: initial-exec tls is wrong for both glibc and musl. (glibc reserves initial tls for ld_audit and dlmopen namespaces, it's not there for mesa. i.e. this only happens to work because it's unlikely that a process uses all the glibc features for which static tls is reserved, but if that happens then mesa will fail to load.)