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-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2A3271F619 for ; Thu, 27 Feb 2020 16:31:13 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=TbBMUb77Abf70r5ivMHwi8cmjmxUeH8a9jhCVDVS/IE 41YhDclFfF9N2k9Y25st5uwEOMUM00X1uPmvBzAnrN0WGPM31zoUEooYHEhVqHXM EfKflQhvt8Q762aYWP5OKQUzL6h7zY95yqDG4p3ogHC82cRBTjkhXK/IQUMGJhbw = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=xh6jhHFMWF4G0t2w5TusDkM02+k=; b=g7kR/lXNisJxzMkIH X5CQVJLmeiyf++AxamXWVJPPTg7Ka6mS8WBM1manYT/IS8ao2j4Rs41uN2aSOpn7 YihnMWLmhFtVIRckzOVIfR381V/1MLBhyJwbSWX7u1IB3UK9k849BRjYsUsIDyXz 3bve29RvHY7rdoqWI8xxLCitIo= Received: (qmail 75361 invoked by alias); 27 Feb 2020 16:31:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 75351 invoked by uid 89); 27 Feb 2020 16:31:10 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582821068; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=smPV5cA3yy16kgqsJT+C7jQ9Nh+x2yoGz0bUMX663N0=; b=Zd59alv3O2x5m432wm53JGpypaTb23T7Fok+xKdx45R4noIqEx8vcKvcloyeVwwhNlSquO iSf/szBg63Cj4gDkOKk1/zw3/pdMtXH9JoNltnebGINZAzSGZgo+a2ai6FJfdHoHFivw7i ly9vS1ULFOFa9AFZxSU1OD7lZ1RTmiI= From: Florian Weimer To: Szabolcs Nagy Cc: Carlos O'Donell , nd@arm.com, GNU C Library Subject: Re: [PATCH] Reserve static TLS for dynamically loaded initial-exec TLS only [BZ #25051] References: <44eaccc2-f760-88c0-989a-e413e328b051@arm.com> <87lfqjv56h.fsf@oldenburg2.str.redhat.com> <5533fb62-c336-45b3-71ec-30c5e7d7ac4c@arm.com> <5474f68c-b093-8791-ca0b-b4b715174e2c@redhat.com> <87k14lmcct.fsf@oldenburg2.str.redhat.com> <043f4682-d009-0365-9bdc-f9bd402683b5@redhat.com> <87d0a8hzbi.fsf@oldenburg2.str.redhat.com> Date: Thu, 27 Feb 2020 17:31:02 +0100 In-Reply-To: (Szabolcs Nagy's message of "Thu, 27 Feb 2020 16:21:17 +0000") Message-ID: <87lfoovvp5.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * Szabolcs Nagy: > it has correctness implications too, e.g. in case of > errno or soft-float fenv emulation (ppc only?) tls > access may happen in signal handlers and i think > currently only initial (and local) exec tls is > guaranteed to be as-safe. I think you are probably right. (I don't have the performance numbers yet.) > libc also has struct pthread, i wonder if any of that > needs to be duplicated for dlmopen (is it valid to > dlmopen a different version of libc.so.6 ?) Not a different version, but you get a different copy, including a fresh set of TLS variables (hence the dlmopen limitation). But obviously not of struct pthread and the TCB. Now that Hurd supports THREAD_GETMEM, we can make a choice whether we want to share per-thread data across the dlmopen boundary or not. Thanks, Florian