From nobody Thu Jul 21 18:12:30 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 4Lpgf62GJcz4XCLn; Thu, 21 Jul 2022 18:12:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lpgf61knNz3Nww; Thu, 21 Jul 2022 18:12:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658427166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IaoEJdL8rHpAPjJOAwXwNb+jd4pXLDQthe7Az/PuPtQ=; b=yXieXqiaVXe/rSu7WAENmEYdWo/ShsD0aJ9F6hcWub8pSLcD92DF2ZjKXPRY++60fSRSVY jwRaugA/BKOuTyOFFyCeV+j522szRxRsMHiB3kX4RU1QUSw3sKxzhvW8sEPs91GjJUZ26C yYmuJdoCdxvogkUTeb5dwRWe0gX3JEVsA58Wev7X31o2JSqE+wA6+U46x2TagCVQ/60WHD lf4JQeuBnW1Ta/1aROucpEW6cmEDDkD4p1isioZ2BsAgwqqmtCa7c/oBNJKdrUOCef/dI+ iHT+TC54wlPFozCfifOBefaMM65LG14atoN4QQfsqxlSpsHtoNReBlA7J5s4Vg== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Lpgf609h4zZ9B; Thu, 21 Jul 2022 18:12:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 187C82D9F9; Thu, 21 Jul 2022 20:12:39 +0200 (CEST) From: Kristof Provost To: Kyle Evans Cc: rlinnemann@netgate.com, src-committers , 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 Date: Thu, 21 Jul 2022 12:12:30 -0600 X-Mailer: MailMate (1.14r5852) Message-ID: In-Reply-To: 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 Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658427166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IaoEJdL8rHpAPjJOAwXwNb+jd4pXLDQthe7Az/PuPtQ=; b=bBucpMFBPnSEeTdVi3mvb0hXm3HYTIzBNcCrnkrvRy9hhNeP/H3vatMMK1k/mcIjTaoPP6 BhvAKg36dWRxj3pIrYgHfAyzISVWGZ5D3+DjL2yULJeeSi7iq1hhAeUgPH7kpofrUjtYQa HwaiqIz40yIAmw+sHiNJdhFOr/AkO55wCU+EHr76fbVSeSsyFA8mDKTts4cAEcsj3S0r2+ c9igXOaIF27Cr8HwM8r7mtXMuSN7UR6C5A24cA1MSzeFQhh5DLgQQP53qsuCLc7zktJIa+ 5drxcnweTdPRflrk+oGZNZgjXA3zsB6h6XkzkRgiF6si0eaMJ8q7c9X4En3Gsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658427166; a=rsa-sha256; cv=none; b=ZwlQ36ZQeF8nH/BLvyoWbWLPwRfNDOi0lR7HwFQdOu39bXQdyeY4Qyl8ne5F+NBZAcSZNF Nm8epZ3sOaA38SzAfUYV93fWMCwnzqcp4thyfa0QF2LMRNJuCqdWDIq0EKX97WvH5ioj5d 3q2QYgLDkr0Jmt29fsSZVVwUpK2GZeBEdz9Q1JmQESjetIQ1rXcfbG+CkRzyhrQk6YBqAY XU2GBiu2L9zrQOUo7uUEtGemDjYAUVsRD0bKz36VHO1/zXb1sNvPKEJrFaNTtP2r/EXohE 6D8Nc4OJ5EWPJUUziwRPII0BXiABszOGzbyCE5Czk3kZxUJYlYx4w3Ooakk2KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 21 Jul 2022, at 11:04, Kyle Evans wrote: > On Thu, Jul 21, 2022 at 9:36 AM Kristof Provost wrote:= >> >> The branch main has been updated by kp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D000321bab7bea3530408b96= 0095a6ea241451175 >> >> 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 an= other to >> libnvpair will wind up with a single set of resolved symbols for t= hose in >> conflict. A source file also cannot include both libnv and libnvpa= ir headers >> because of aliased identifiers. To resolve the situation, libnv ty= pes and >> functions are namespaced via nv_namespace.h, and libnv symbols are= >> versioned. The msgio functions are not namespaced or exported as t= hey 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=3D runtime >> LIB=3D nv >> SHLIB_MAJOR=3D 0 >> >> +VERSION_DEF=3D ${SRCTOP}/lib/libc/Versions.def >> +VERSION_MAP=3D ${.CURDIR}/Version.map >> + >> .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys >> CFLAGS+=3D-I${.CURDIR} >> >> diff --git a/lib/libnv/Version.map b/lib/libnv/Version.map >> new file mode 100644 >> index 000000000000..98349c2356d3 > > IIRC this still needed the SHLIB_MAJOR bump (+ObsoleteFiles.inc for > the old version) that I had talked about because we're adding a symbol > map, but maybe someone else can clarify that. > I missed that comment in the review. Something like this then: https://re= views.freebsd.org/D35875 ? (I fixed the other remarks in the same commit.) Kristof