From nobody Thu Jul 21 17:04:07 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 4Lpf6Q3nVYz4X4hK; Thu, 21 Jul 2022 17:03:42 +0000 (UTC) (envelope-from kevans@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 4Lpf6Q3JNXz3DZw; Thu, 21 Jul 2022 17:03:42 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658423022; 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: in-reply-to:in-reply-to:references:references; bh=rrAuwVOm/62P90qGOQ1ttMx9yvO8cuM2dmVlWZNP5W4=; b=vT3K38wRNjLiTL2SMFizO6XwMYlU/hegVUEGUsu5vLBaUJSl5nUo26M85q6v8ZDjOo/ZvD FB6tNNloShNyWgIsWjqmvnHONGB9UbCMJv1J+hg4hqKkmsYeuyCbgm+0pXSOPnsCepUDVB dMj6ixQXo+NFkCKeMAT7PnoSryKAlOx6wobWbG9CnUk2RvLNzRI7jtCXLBehLC/v1vP2XJ iCFUvO5apYHytbSArw28l3MpoBSIu4fS3nqlYuoTqV2V1g1DSUxf51J+jCUFWPJ8xkCZSw f5hMOFeC/IpngjyZ+kKk294Li8zlxOtRHBGADe0K/GQF2exsU0PoqykpdqD/kg== Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Lpf6Q2Hq3zXXd; Thu, 21 Jul 2022 17:03:42 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-ej1-f54.google.com with SMTP id ez10so4137174ejc.13; Thu, 21 Jul 2022 10:03:42 -0700 (PDT) X-Gm-Message-State: AJIora9eeEFIyUxcKj1OmAYzmm8lyxAZkLh87fhw5p0nYF0I6ZHqBvVt a3x/p3AEdpXC/F8AQzi6t7KVaWwKZ+FzhhFL7m4= X-Google-Smtp-Source: AGRyM1t4GB+3+NtEP4KXWY+SKBc4155SzCNM2FCWgJnLmOkWG/tVx8b9C8ePHLxvaO3jZf+B2fiNnivn1LyIs7syVMA= X-Received: by 2002:a17:906:8a5b:b0:72b:50a1:a72c with SMTP id gx27-20020a1709068a5b00b0072b50a1a72cmr42268144ejc.152.1658423021204; Thu, 21 Jul 2022 10:03:41 -0700 (PDT) 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 References: <202207211636.26LGaknt034375@gitrepo.freebsd.org> In-Reply-To: <202207211636.26LGaknt034375@gitrepo.freebsd.org> From: Kyle Evans Date: Thu, 21 Jul 2022 10:04:07 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 000321bab7be - main - namespace nv names, version libnv and libnvpair library symbols To: Kristof Provost , rlinnemann@netgate.com Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658423022; 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: in-reply-to:in-reply-to:references:references; bh=rrAuwVOm/62P90qGOQ1ttMx9yvO8cuM2dmVlWZNP5W4=; b=XdQebSCr2fVUrjRFSc8mY2HEkewrUtzvVTiNqZItMED4hT9jayFlZkU2N73KV2ugy9aBLy n2vE5c7NpDcPbRpipQEtNfSMari5jXyYj0g4HZzp/we4MWHM3DbUUnw4mhAIJIGnWyee6q q/xDNYMa+2Dy2GWIH5zKDyBwfItTxlJQyJ0MdhfsdEVxKcyU9Ekwb3j6HCfr7Wk4H513LV yVcTOSFx8Fs7tdC/9cwJ1Fl3q1e01pvIPygJDxURkvOAZsnl+pGaMgc5dzW3kkwKuKYfjt /p+YTJ8GnUx2H9JxY/n+MDOyJGf/SYSfQeMKxf3GLWupzLE2KnfKyR8K/+Iz8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658423022; a=rsa-sha256; cv=none; b=IW2RkS+cOHPKBdHC5jOJcKMJ7RygqoHudnxKs+ACtWQutzfuEFYn+7PPZPeu1Ss+8udeGz 9/uQni1+tryIS9u4sinHijfL9nSiKOh5+grIGGKijs88nShHtydcedM5Tujiz1CUNB/0oQ SHzYFAO4O9iUmDcl3GnxZ2QARKzh6FOrzAoQ+MqtPuij4suRVonYDK+Zd3GnGyy670TAxk Xo2a2F3pJMRItrgQICotPKKC+/l56S405fCDpCi40ZqPYm+CjfomVClm60Yy8XDaD4WWhe ndqSPEU1mJHE9uPWtF49FnRRxd3mc9/tJonouL6AN956RMfBTCc7OQ2NtchfFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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=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 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. Thanks, Kyle Evans