Message ID | cover.1719420465.git.fweimer@redhat.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8517F387542D for <patchwork@sourceware.org>; Wed, 26 Jun 2024 16:50:30 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 91CDA387103B for <libc-alpha@sourceware.org>; Wed, 26 Jun 2024 16:49:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 91CDA387103B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 91CDA387103B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719420599; cv=none; b=ftQCxk6lyxtTTwqCZg1VktSCO9LxTOecfnFI+KfakOJrnInuV4nNVBQY74DRjmTvUep/0WuBAP2u9eaUrIGR+od/Zkn/L32ReAxmpC37H7pk0VOs6c3quz62M3fDgVb80byOFrIzeEcbzyhAtR+1nOF88Na3JxumT5ZT8NsvQRc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719420599; c=relaxed/simple; bh=GhshEfznfZVWELuzhye/3jDrZXbqdK/1NaUPOSk+LlA=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=VBdpIU89yus6fCj374/iHlk3gmPKLsVAu09G24BBxl0/5zLuABebv0dGtqvy0Twbk6GoDs1N7pP5FxrqbnMJWs9HdibVC2Xtnr5gECk9ZtkU+xpuYmM9b6ENLHMRxp6acp4NHRXDrjWsD5MoUGIAoOe5tN/UkFOjM1ORU7MDmBE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1719420595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=U+VL1SYFkHXks+ckTIxB0Yy8CKMDC0xWFjfDr2pgd2s=; b=dnztfHrdw99mn3zRlOy4snF8K2De9Gq7yQgGdssacsaLCrHwOBeqlUaOBdgfgnXBlc0MrH Cf4c1gqPpjwvSfpPYnXz8u0EpQMZrFUSvhbrNUji7LXNWUy2eD5NRAMjybETkn54YJ0chi f29Zw6vFPcDF28m9p4BuprskMk3RI7Y= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-596-1IWpouGPMQC48KUgaV1O6g-1; Wed, 26 Jun 2024 12:49:53 -0400 X-MC-Unique: 1IWpouGPMQC48KUgaV1O6g-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BFF0619560B6 for <libc-alpha@sourceware.org>; Wed, 26 Jun 2024 16:49:52 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.72]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B39191956050 for <libc-alpha@sourceware.org>; Wed, 26 Jun 2024 16:49:51 +0000 (UTC) From: Florian Weimer <fweimer@redhat.com> To: libc-alpha@sourceware.org Subject: [PATCH v5 0/2] elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717) Message-ID: <cover.1719420465.git.fweimer@redhat.com> X-From-Line: 809d87eaa9d92d7681f777644546b06cea34ad94 Mon Sep 17 00:00:00 2001 Date: Wed, 26 Jun 2024 18:49:48 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org |
Series |
elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717)
|
|
Message
Florian Weimer
June 26, 2024, 4:49 p.m. UTC
This version fixes an unexpected interaction with the handling of l_need_tls_init for initially-loaded objects, and fixes the tests accordingly. Tested on x86_64-linux-gnu. Thanks, Florian Florian Weimer (2): elf: Clarify and invert second argument of _dl_allocate_tls_init elf: Avoid re-initializing already allocated TLS in dlopen (bug 31717) elf/Makefile | 30 ++++++++++ elf/dl-open.c | 35 ++--------- elf/dl-tls.c | 34 ++++++----- elf/rtld.c | 2 +- elf/tst-dlopen-tlsreinit1.c | 40 +++++++++++++ elf/tst-dlopen-tlsreinit2.c | 39 +++++++++++++ elf/tst-dlopen-tlsreinit3.c | 2 + elf/tst-dlopen-tlsreinit4.c | 2 + elf/tst-dlopen-tlsreinitmod1.c | 20 +++++++ elf/tst-dlopen-tlsreinitmod2.c | 30 ++++++++++ elf/tst-dlopen-tlsreinitmod3.c | 102 +++++++++++++++++++++++++++++++++ include/link.h | 1 + nptl/allocatestack.c | 2 +- sysdeps/generic/ldsodefs.h | 39 ++++++++++--- 14 files changed, 325 insertions(+), 53 deletions(-) create mode 100644 elf/tst-dlopen-tlsreinit1.c create mode 100644 elf/tst-dlopen-tlsreinit2.c create mode 100644 elf/tst-dlopen-tlsreinit3.c create mode 100644 elf/tst-dlopen-tlsreinit4.c create mode 100644 elf/tst-dlopen-tlsreinitmod1.c create mode 100644 elf/tst-dlopen-tlsreinitmod2.c create mode 100644 elf/tst-dlopen-tlsreinitmod3.c base-commit: a10b6ad471d7b528149f5ff32eef2f1c1dc1213c