From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 F31FB3858D1E for ; Tue, 23 Aug 2022 21:36:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F31FB3858D1E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-516-2cnr0Q0JNHK3eb0IE4yq2Q-1; Tue, 23 Aug 2022 17:36:44 -0400 X-MC-Unique: 2cnr0Q0JNHK3eb0IE4yq2Q-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 742B785A585 for ; Tue, 23 Aug 2022 21:36:44 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1A90403349; Tue, 23 Aug 2022 21:36:43 +0000 (UTC) From: Florian Weimer To: Carlos O'Donell Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v2] Detect ld.so and libc.so version inconsistency during startup References: <87h722276j.fsf@oldenburg.str.redhat.com> Date: Tue, 23 Aug 2022 23:36:41 +0200 In-Reply-To: (Carlos O'Donell's message of "Tue, 23 Aug 2022 17:26:51 -0400") Message-ID: <87zgfuzlp2.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_BLACK 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.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2022 21:36:47 -0000 * Carlos O'Donell: > I can't see this causes serious problems crossing container, chroot or > namespace boundaries because we load libc.so.6 early before doing any > kind of transition. Where it might have impact is in the developer > workflow and we can adjust as required. dlmopen after chroot may now fail due to ABI mismatch, but I think this is correct. >> - [Add new features here] >> +* The dynamic loader now prints an error message, "ld.so/libc.so >> + mismatch detected (upgrade in progress?)" if it detects that the >> + version of libc.so it loaded comes from a different build of glibc. >> + The new configure option --with-extra-version-id can be used to >> + specify an arbitrary string that affects the comptuation of the > > s/comptuation/computation/g >> + /* Detect a libc.so loaded into this namespace. The >> + __libc_early_init lookup below means that we have to do this >> + after parsing the version data. */ >> + if (GL(dl_ns)[map->l_ns].libc_map =3D=3D NULL >> + && map->l_info[DT_SONAME] !=3D NULL >> + && strcmp (((const char *) D_PTR (map, l_info[DT_STRTAB]) >> +=09=09 + map->l_info[DT_SONAME]->d_un.d_val), LIBC_SO) =3D=3D 0) >> + { >> + /* Look up this symbol error to trigger a mismatch error before > > s/error//g Both fixed and reposted. In the second case, I meant to type =E2=80=9Cearl= y=E2=80=9D. Thanks, Florian