From patchwork Wed Jun 9 11:15:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1489804 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=KEwcSdeo; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G0Pfz2FWbz9sCD for ; Wed, 9 Jun 2021 21:15:55 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 22F7B3959C23 for ; Wed, 9 Jun 2021 11:15:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22F7B3959C23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623237353; bh=fL6a0x3R3j7DU2kwJR/XcGqwu6ddYoXOw0q1hEopVGI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KEwcSdeoBijjABTFluax68hmPn1tICiLyOyIL420iXtyHM+n0EXpT2sbrKR0VcXaC pdfLQjl9jtZvCcKlvla19PsLLLrkRMsYVseIqvEctt7MhGiyyYq3ACHOvWf0nNPhz1 djjSohy2rBTFc2I2vI6DLOJlqFt9D2AIZPapUhtg= 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 C6263385E019 for ; Wed, 9 Jun 2021 11:15:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C6263385E019 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-XbD7-uyEMwetIW2i69ZXmg-1; Wed, 09 Jun 2021 07:15:18 -0400 X-MC-Unique: XbD7-uyEMwetIW2i69ZXmg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BB42802B4F for ; Wed, 9 Jun 2021 11:15:17 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-60.ams2.redhat.com [10.36.115.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDD9A19C45 for ; Wed, 9 Jun 2021 11:15:16 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 0/4] Add --disable-major-minor-libraries configure option X-From-Line: 476bfc2e0c41a91a37d945ae2af29e931801b0f7 Mon Sep 17 00:00:00 2001 Message-Id: Date: Wed, 09 Jun 2021 13:15:14 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" This is a repost of an older patch series. RPM-based distributions tend to have issues around glibc downgrades across major glibc versions because RPM deletes removed files very later, after the transaction is complete. This can result in a broken system because if ldconfig runs after the downgraded glibc has been unpacked, it will put the newer glibc's DSOs in to the ld.so cache, which are generally incompatible with the downgraded dynamic loader. The name-based DSO recognition patch is new. Originally, I went with a fancy Python script to gather ld.so names, but then I saw that only two new patterns are required for generic detection. The patterns are quite specific, so I wrote a _dl_is_dso function instead of a table. I'm attaching the Python script for posterity in case it is useful for something else. I fixed a cut-and-past error in elf/Makefile which broke targets like aarch64-linux-gnu and s390x-gnu-linux, where $(inst_slibdir) and $(inst_rtlddir) are distinct. My preference would be to avoid the new configure option and just drop the versions unconditionally, but I'm worried that it's difficult to obtain consensus around that. My patch rebased cleanly over 18 months of development, so there seems to be little varience in these Makefile parts, so I don't think we need new build-many-glibcs.py targets for this configuration. I'm going to switch Fedora rawhide to it, so we get some regular testing of these configurations anyway. Tested on i686-linux-gnu, x86_64-linux-gnu; built with build-many-glibcs.py. Both with and without --disable-major-minor-libraries. Thanks, Florian Florian Weimer (4): nptl_db: Install libthread_db under a regular implementation name Makerules: Remove lib-version, $(subdir-version) elf: Generalize name-based DSO recognition in ldconfig Add --disable-major-minor-libraries configure option INSTALL | 10 ++++++++++ Makefile | 4 +++- Makerules | 38 ++++++++++++++++++++++---------------- config.make.in | 1 + configure | 15 +++++++++++++++ configure.ac | 7 +++++++ elf/Makefile | 10 ++++++++-- elf/dl-is_dso.h | 33 +++++++++++++++++++++++++++++++++ elf/ldconfig.c | 5 ++--- elf/tst-dl-is_dso.c | 35 +++++++++++++++++++++++++++++++++++ manual/install.texi | 9 +++++++++ nptl_db/Makefile | 2 -- 12 files changed, 145 insertions(+), 24 deletions(-) create mode 100644 elf/dl-is_dso.h create mode 100644 elf/tst-dl-is_dso.c