From nobody Fri May 16 15:00:26 2025 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZzVcz5WgQz5vrTp for ; Fri, 16 May 2025 15:00:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZzVcz2Tpvz3VQr; Fri, 16 May 2025 15:00:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 54GF0QQn095069; Fri, 16 May 2025 18:00:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 54GF0QQn095069 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 54GF0QPr095068; Fri, 16 May 2025 18:00:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 May 2025 18:00:26 +0300 From: Konstantin Belousov To: Mark Johnston Cc: Andriy Gapon , FreeBSD Current Subject: Re: RTLD_DEEPBIND question Message-ID: References: <900c8521-559a-47b5-acaa-ae941f6852c4@freebsd.org> <7c4e1682-d797-493c-8326-08d51dde3359@FreeBSD.org> <59db8ace-770f-4f73-976f-411f6de0885a@FreeBSD.org> <5b887290-a6aa-49ff-aa92-f335ed09b9a5@freebsd.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4ZzVcz2Tpvz3VQr X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Spamd-Bar: ---- On Fri, May 16, 2025 at 10:11:12AM -0400, Mark Johnston wrote: > On Fri, May 16, 2025 at 03:22:52PM +0300, Andriy Gapon wrote: > > On 27/04/2025 17:26, Mark Johnston wrote: > > > On Thu, Apr 24, 2025 at 08:56:44AM +0300, Andriy Gapon wrote: > > > > On 23/04/2025 21:56, Andriy Gapon wrote: > > > > > BTW, I've been wondering how illumos avoids the problem even though they > > > > > do not use any special dlopen flags. > > > > > It turns out that they link almost all system shared libraries with > > > > > -Bdirect option (which is Solaris/illumos specific). > > > > > It's somewhat similar to, but different from, -Bsymbolic. > > > > > https://docs.oracle.com/cd/E23824_01/html/819-0690/aehzq.html#scrolltoc > > > > > https://docs.oracle.com/cd/E36784_01/html/E36857/gejfe.html > > > > > > > > Oh, and it looks like there is an even better explanation for illumos. > > > > There is a version map file for libdtrace which explicitly lists API > > > > functions and makes everything else local. > > > > https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libdtrace/common/mapfile-vers > > > > > > > > I wonder why we didn't do the same when porting. > > > > Maybe we should do that now? > > > > > > I don't have any objection, but I believe adding a version map after the > > > fact doesn't accomplish much, assuming that we care deeply about ABI > > > stability in libdtrace.so (I'm not sure we do though). > > > > My primary goal here is not ABI stability, but hiding symbols that really > > should not be exported. See more at the end. > > > > At the same time I am not sure why it could be too late to start caring > > about ABI stability now. Assuming we actually would want to do that. > > I just mean that the version map helps only helps provide stability for > binaries linked to libdtrace.so after the version map is introduced. This is one of the reason why versioning the library requires bumping the .so file version.