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 3535B1F45E for ; Thu, 20 Feb 2020 15:05:18 +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:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=jlQu65SzCt6Kszh2 3ZuIsyBe88AeR3WCcCyJHaEhxZAHqVrBgKvFWf2KgzzNyP6qYre+v89qiM4kxh1j 4foflnzt0IMj65WiwtqoLOl2tp2ybLe1ZpTAKOgUck7yplRAcS+U0vY08wOSOIf1 fXjz1lrFPb91GBu/9JNHQgI5y9c= 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:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=DKQ045hXhuSP4bE3IQ/sCA KgyIk=; b=oVIZGSDLKrpysBuYAgUZjhoW9h1A2AQBIzRbxxwU3R5nPJUdcrpxsL sFULn219vNj/c9eu4ZfhrFQ6QYP0Ozb016jY6T7JlSpVDW7QAFH119u1E3zcuNbC +ViglRuyunuQon3uGMqzxkWsQRQYuwveCopDdXHKoARaC794wI0hI= Received: (qmail 83253 invoked by alias); 20 Feb 2020 15:05:15 -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 83239 invoked by uid 89); 20 Feb 2020 15:05:15 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582211112; 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=tRWWk3+JZvHng+FF0l5F95XfXl5A4RqpUQd+3Q2NQcQ=; b=TeZAtsHGFEuO7GsFhN6f2DPOACGzKst0VZ1fQpvZt3IzuyOsjlBgqymcGy/gsxB+tth58S SS1fl4ZTTJ+J2nEOAVP4QRF+bue1hxqW1t0P4N/9IPMFuKwnfYy4sldDW393nbKc9pihHB +sQ4wScwh/NP0903F6WVDwDjOQZwGtg= Subject: Re: [PATCH] Reserve static TLS for dynamically loaded initial-exec TLS only [BZ #25051] To: Florian Weimer Cc: Szabolcs Nagy , nd@arm.com, GNU C Library 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> From: Carlos O'Donell Message-ID: <043f4682-d009-0365-9bdc-f9bd402683b5@redhat.com> Date: Thu, 20 Feb 2020 10:05:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <87k14lmcct.fsf@oldenburg2.str.redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 2/17/20 11:01 AM, Florian Weimer wrote: > * Carlos O'Donell: > >> Let me take a stab at this: >> >> (1) File a bug to indicate all libraries must stop using >> TLS IE to fix dlmopen issues with TLS IE. > > Do you mean glibc components, or do you view this as a distribution-wide > change? All glibc libraries should stop using TLS IE and we should file bugs for fixing these instances where TLS IE was used to work around startup ordering problems. I did not intend to imply a distribution-wide policy. Other packages can do what they want, and their use of TLS IE will limit dlmopen capabilities including causing it to fail. >> (2) Set DL_NNS to 4, and add a tunable that lets you change >> the limit to reduce surplus memory allocated. >> >> (2.a) send linux man-pages a patch to make dlmopen(3) >> ambiguous about how many namespaces are supported and >> to point at the tunable to increase the memory used. >> >> (3) I think that the surplus should be split into two >> blocks: >> (3.a) Some reserved for TLS IE libs. >> (3.b) Some reserved for tlsdesc optimization. >> >> My opinion is that any library that is loaded and >> needs TLS IE should be able to use (3.a). We should >> reserve enough for (3.a) to be able to load glibc >> libraries, libgomp, and libgl (as you note). > > There's also a potential for not letting audit libraries consume > namespace slots (once they are dynamic). This will enable lower DL_NNS > defaults. I don't quite follow what you mean here, can you expand on that? -- Cheers, Carlos.