From nobody Thu Jul 21 17:23:34 2022 X-Original-To: dev-commits-src-all@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 4LpfYg4sD6z4X6hJ; Thu, 21 Jul 2022 17:23:51 +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 4LpfYf5TS3z3GBj; Thu, 21 Jul 2022 17:23:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 26LHNYuF063085 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 21 Jul 2022 20:23:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 26LHNYY6063084; Thu, 21 Jul 2022 20:23:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 21 Jul 2022 20:23:34 +0300 From: Konstantin Belousov To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 000321bab7be - main - namespace nv names, version libnv and libnvpair library symbols Message-ID: References: <202207211636.26LGaknt034375@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202207211636.26LGaknt034375@gitrepo.freebsd.org> 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=3.4.5 X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on tom.home X-Rspamd-Queue-Id: 4LpfYf5TS3z3GBj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.04 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.980]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_MEDIUM(-0.06)[-0.061]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; HAS_XAW(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Jul 21, 2022 at 04:36:46PM +0000, Kristof Provost wrote: > The branch main has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=000321bab7bea3530408b960095a6ea241451175 > > commit 000321bab7bea3530408b960095a6ea241451175 > Author: Reid Linnemann > AuthorDate: 2022-05-17 19:49:41 +0000 > Commit: Kristof Provost > CommitDate: 2022-07-21 16:35:23 +0000 > > namespace nv names, version libnv and libnvpair library symbols > > libnv and libnvpair have aliased symbols, and as a result a single process which > dlopens a shared object that is dynamically linked to libnv and another to > libnvpair will wind up with a single set of resolved symbols for those in > conflict. A source file also cannot include both libnv and libnvpair headers > because of aliased identifiers. To resolve the situation, libnv types and > functions are namespaced via nv_namespace.h, and libnv symbols are > versioned. The msgio functions are not namespaced or exported as they are not > part of the external API. > > Reviewed by: kevans > Sponsored by: Rubicon Communications, LLC ("Netgate") > Differential Revision: https://reviews.freebsd.org/D35261 > --- > lib/libnv/Makefile | 3 + > lib/libnv/Version.map | 256 +++++++++++++++++++++++++++++++++++++++++++ > sys/sys/cnv.h | 1 + > sys/sys/dnv.h | 1 + > sys/sys/nv.h | 1 + > sys/sys/nv_namespace.h | 286 +++++++++++++++++++++++++++++++++++++++++++++++++ > tools/build/Makefile | 2 +- > 7 files changed, 549 insertions(+), 1 deletion(-) > > diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile > index b13758931c4e..933dacb3eac6 100644 > --- a/lib/libnv/Makefile > +++ b/lib/libnv/Makefile > @@ -8,6 +8,9 @@ PACKAGE= runtime > LIB= nv > SHLIB_MAJOR= 0 > > +VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def > +VERSION_MAP= ${.CURDIR}/Version.map > + > .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys > CFLAGS+=-I${.CURDIR} > > diff --git a/lib/libnv/Version.map b/lib/libnv/Version.map > new file mode 100644 > index 000000000000..98349c2356d3 > --- /dev/null > +++ b/lib/libnv/Version.map > @@ -0,0 +1,256 @@ > +# $FreeBSD$ > + > +FBSD_1.0 { This should be FBSD_1.7, the current HEAD FreeBSD namespace. And as Kyle pointed out, the dso version needs to be bumped because you changed dso ABI.