From nobody Mon Mar 3 16:56:54 2025 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 4Z64jM5gngz5pnV3; Mon, 03 Mar 2025 16:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z64jM0xrfz46DJ; Mon, 03 Mar 2025 16:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741021015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8eaCogNpW6/QdRfs+0F3wag/UbcM2Gsyd3vZbH549dU=; b=huJKqgJ0NEUoS2XWawfcQOskR/T+1gnj87sT2+IEIx6iC5/GoIQdAYz3axB4uIUwl7dRBY a5lDej1Pxt/AOKGfCrNVxw/qo2ebEqv1FPAko/Vh67ETt1RuYW/x4/npcHZ7OubE1SgdrH IxLBubmqq3krO1CAwLCgE/cIwx0yBB8R/1rLRU0oH+de6EZg34XgKQYmLtv4ZMAwEyVWHm rgK3FUjjr6pSeKPagWHxQzZumvOsOOcU1AC3yCOEOYjAwwBvVLSH/w7JKppB0MFpsJ+u+4 KyOaoG4WFvisHfBLPg41NX7QR42feUO99FLzDeAHMXqD2JbWd1lrS6XAcoUibw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741021015; a=rsa-sha256; cv=none; b=CI5OgfarJjd4yPh822DW6deJSntySXOLqsZM0zZ1pHuHxFUgw9pd+m093cPQzO46Vu7PiF jYMh1DWx3SxRZK7SOAxU35We0MgmnpcHnxhqdtSH1v2Coi0hcJNVqu25Z3m2PPkPoiYuCz Tft7AYpVae2ZICV9igZ1xN4OmEFM3Xiw7q1pe2DRqoAn8ZfFX7BFtASm6L6p5H0aUMRkXf 8TmpefOXWzcYPlJ0RJFAD+XD2g63R5uPGeRqdhwmOnBzRCTJpjOzyiVE7+sLejp/0L4K99 l//rLDNQscrjqqjPqQw8DD1WX2IFQCW0Tbu039xr+3GjJZyb72ur7vmqer2fbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741021015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8eaCogNpW6/QdRfs+0F3wag/UbcM2Gsyd3vZbH549dU=; b=o9Q9zhPXQJQgfzQH7qasEjgyzOLGCUDtxPaKKz+K1JfIz7Ny+6kPj+3hH5aR5PAbkrq/uF 0PyM0zglekkVY2Z6kxbd0y7GS1oQmDIbNxl+1drvr0MjD0QzAiKXiR/h6nHflyho2uw5ke RUy2tbrtbxjVaecrHuIYt42wj3Hsw6CvaoalEnssuifS8UN4AH2X7ORyx8mxkeUG+YAjOa ioKxDzB4pMKtA95ZoE0sNOtOhI4ZmA7IqwUmNPWMM2Az4H4cnyjNl9GMdAya8Lx7yIl/9e /LKCxKeRQAEbHcTCy+tsfXKUhgeuMlIAHFRKideh12mAuHJA3CNplJsBlJldkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Z64jM0VHYzwrD; Mon, 03 Mar 2025 16:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 523GusJS083578; Mon, 3 Mar 2025 16:56:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 523GusO0083575; Mon, 3 Mar 2025 16:56:54 GMT (envelope-from git) Date: Mon, 3 Mar 2025 16:56:54 GMT Message-Id: <202503031656.523GusO0083575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a088781bc36d - stable/14 - nv.9: Add a new subsection documenting kernel-specific behavior 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a088781bc36d6a4aba053c3a94f810fec9d9f899 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a088781bc36d6a4aba053c3a94f810fec9d9f899 commit a088781bc36d6a4aba053c3a94f810fec9d9f899 Author: John Baldwin AuthorDate: 2025-01-03 15:51:51 +0000 Commit: John Baldwin CommitDate: 2025-03-03 16:56:20 +0000 nv.9: Add a new subsection documenting kernel-specific behavior Reviewed by: emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D48257 (cherry picked from commit ecb5fe3c5e483e09544645ba84281b4a8cba4edf) --- share/man/man9/nv.9 | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/share/man/man9/nv.9 b/share/man/man9/nv.9 index 4e4542c146ef..8c99f1d12200 100644 --- a/share/man/man9/nv.9 +++ b/share/man/man9/nv.9 @@ -859,7 +859,7 @@ If no element named .Fa name with the appropriate type exists, the program aborts. The nvlist must not be in the error state. -.Sh NOTES +.Ss Notes The .Fn nvlist_pack and @@ -873,6 +873,36 @@ The and .Fn nvlist_xfer functions can transfer nvlists between hosts with different endianness. +.Ss Kernel Considerations +The +.Nm nv , +.Nm cnv , +and +.Nm dnv +APIs can be used in the kernel with the following differences: +.Bl -bullet +.It +File descriptor and file descriptor array value types are not supported. +.It +.Fn nvlist_recv , +.Fn nvlist_send , +and +.Fn nvlist_xfer +are not supported. +.It +All memory allocations use the +.Dv M_NVLIST +memory type with +.Xr malloc 9 +and +.Xr free 9 . +As a result, any allocated buffers moved into an nvlist must be allocated with +.Dv M_NVLIST , +and buffers returned by functions such as +.Fn nvlist_pack +must be freed with +.Dv M_NVLIST . +.El .Sh EXAMPLES The following example demonstrates how to prepare an nvlist and send it over a .Xr unix 4