From patchwork Thu Aug 8 11:39:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1970513 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=f/NYhCLV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WflWj2RFJz1yfC for ; Thu, 8 Aug 2024 21:42:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F5BC3858420 for ; Thu, 8 Aug 2024 11:42:07 +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 ESMTP id 7EE6D3858D28 for ; Thu, 8 Aug 2024 11:41:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7EE6D3858D28 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 7EE6D3858D28 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=1723117312; cv=none; b=BUiFo0frcRxalur9y4zg1tQeYo+YfgdcgNt7Y58qrhYNmMZ6Mf3xwhtoE7z8V0Cd0pDkXjm81AjAJDHSq6d/ziCL3AMOvqkZedSQdVY4YAGYlEI5kbNUFOBhepesNi9B69ZEg5txYn6axreHkqcJUViW8S5y0tYeDxBMFY/wGcE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723117312; c=relaxed/simple; bh=vBETfkx3i7+NvnlXSlQiJW1t9BDf7CEtyIztzW8Cmdo=; h=DKIM-Signature:From:To:Subject:Message-ID:Date:MIME-Version; b=iX8LRPYKMynLcgy0MurFGi8GMoSiwVxzoWalvyK/n5Au0viAL8BvySRnumU9VnCMS+q4bTV/GRWQxjlKl/4pqZUS8QJYiXmuBIFyD9g+X+O/dYdh7BwSGbWIxdDWymJRbyCrC2BEpn0kLRvUUVuP2pqX9IWHfjljraYMmZYJJA8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723117311; 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=6sc37YDlZKBwuOuMroJ6uoAu3qjbt/XkQYD8IW0gfM4=; b=f/NYhCLVSPHbBUVuD7yzuRP3xbWpPZ6/8ZBk/OU88LyA456TlrZzKgEPXK9Tesj8wWAmj6 Z+YjZbkjQty1fc8KYPPSxQRIMkikC4/kE5jLTwz7XuH6mcoMPqIskpyOYxhYJl9bsk5qOB nG/eaM6TaiTrqnccd37wF7LyhFv3svE= Received: from mx-prod-mc-02.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-134-pqSyK26LNiuAtXNpq1VVEg-1; Thu, 08 Aug 2024 07:41:50 -0400 X-MC-Unique: pqSyK26LNiuAtXNpq1VVEg-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 74C3619772CC for ; Thu, 8 Aug 2024 11:40:01 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.45.224.76]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0F8543000229 for ; Thu, 8 Aug 2024 11:39:55 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH v2 0/3] Fixes for recursive dlopen (bug 31986) Message-ID: X-From-Line: 3f67c06b3421fd6a45181f3d46060bc8bda96d5c Mon Sep 17 00:00:00 2001 Date: Thu, 08 Aug 2024 13:39:53 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.8 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, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org The original series triggered an assert in dlfcn/tst-static4 on non-static-PIE targets. First flagged by the Linaro 32-bit Arm CI bot. Fixed by disabling the assert for static builds. The first patch has already been applied. Thanks, Florian Florian Weimer (3): elf: Run constructors on cyclic recursive dlopen (bug 31986) elf: Signal LA_ACT_CONSISTENT to auditors after RT_CONSISTENT switch elf: Signal RT_CONSISTENT after relocation processing in dlopen (bug 31986) elf/Makefile | 12 ++++ elf/dl-close.c | 10 +-- elf/dl-open.c | 50 +++++++++++---- elf/dl-support.c | 1 + elf/rtld.c | 6 +- elf/tst-dlopen-auditdup-auditmod.c | 100 +++++++++++++++++++++++++++++ elf/tst-dlopen-auditdup.c | 36 +++++++++++ elf/tst-dlopen-auditdupmod.c | 48 ++++++++++++++ elf/tst-dlopen-recurse.c | 34 ++++++++++ elf/tst-dlopen-recursemod1.c | 50 +++++++++++++++ elf/tst-dlopen-recursemod2.c | 66 +++++++++++++++++++ 11 files changed, 391 insertions(+), 22 deletions(-) create mode 100644 elf/tst-dlopen-auditdup-auditmod.c create mode 100644 elf/tst-dlopen-auditdup.c create mode 100644 elf/tst-dlopen-auditdupmod.c create mode 100644 elf/tst-dlopen-recurse.c create mode 100644 elf/tst-dlopen-recursemod1.c create mode 100644 elf/tst-dlopen-recursemod2.c base-commit: 2d14f72c9abf188f4e25462b99024798b5acb5ec