From nobody Wed Jul 27 09:36:49 2022 X-Original-To: dev-commits-src-branches@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 4Lt7w22n0zz4WwJJ; Wed, 27 Jul 2022 09:36:50 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lt7w20lG0z4Nfg; Wed, 27 Jul 2022 09:36:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658914610; 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=jpVsqZsA7jfDYn4QQ9jcRm43uID94tMaXHQg5R5QSsM=; b=FcMp2fgGKQLBWkTwbAIhFVAiqfSll7l9ZWWEU3w2ruFdA0ySREGC/FsmJM2beZHAuyykIf hxzdWgJbHnWTXE70r2z5cEbdriqfk0SdheIVqaoa9tauz++hjJrRIp+dHGyLQX9eLx8GXZ maK0yn+ORhXN7qE7NjXpsy3DxJnWYUlQL8DzIghkYLBDCLACDTu7qLyvRA0LB9D31TxsN8 BcLNbmcdU52vagNjdm2CXdhFPS3gxFoLHDc2X6JHIEAjz+wQvdox0UMuMMPi+egXuedjXB 5XvW1gpl1hGIxdIGyZXnDnNHHcVpKR5gZNhkbeyhdl6rSZ2b1A5nie4bNNt4Pw== 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 4Lt7w16m3cz1BHJ; Wed, 27 Jul 2022 09:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26R9anFc072697; Wed, 27 Jul 2022 09:36:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26R9anoN072696; Wed, 27 Jul 2022 09:36:49 GMT (envelope-from git) Date: Wed, 27 Jul 2022 09:36:49 GMT Message-Id: <202207270936.26R9anoN072696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 71c5394f6814 - stable/13 - cuse(3): Make some clarifications in the manual page. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 71c5394f68146abc6e6a7022fc1129ee11283b2e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658914610; 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=jpVsqZsA7jfDYn4QQ9jcRm43uID94tMaXHQg5R5QSsM=; b=J3YTX6uexFG00ZL/DbThnzcS7tUWRkfax8pymGvlz33u9yH/4S15hCkINvMqg/o1OlIC6P QHspwHljffwhxlGEVAEUzbNEnFIdkUTuXqJedCUBeDKGEAg0aOHmhrVGQZQMkczhjZ/3fq DaVCuNY9wqM8NfgF4XUaY7+8g6wNdEoYFn8WCNsjGWSm45tYowMdidDADRQWzGJJcw3eEh MHN+hrbk8VeP706QahyZMs/JwHb5zm94tYFCA1/G0OLOL41UBTgLGsgdXtPxhd/28nU94e SzLgDrXbPybCnk1hfH0z9uJARxbrj2HJm8WkCT/gP45yP6XH3IeRaBVZFTuUJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658914610; a=rsa-sha256; cv=none; b=FhdxTs9eSt1O98FdzJTx68ROk2b+ZTH5xn8MsmyNfbX4mO2529Lm6wo9808NiPOUj7ujgo BhI8WqSY6BrFCHUGZDQozCoCgI5E90U+pJBWXPkksfm58rZKfz/skkkwfYTAIc5lAbaCE5 QLEQNLcL7mn6qUOVUySnGVlg5yqX9CGKK7KHtTBSOBXdz9osZcwK3eqQ7+rWGTw2Fx+bs5 ZdU5k2b0U2Crqk/jpd9cK0Fc2wgs06rwGQ49WiGQNVYk6T4avBFAn0iF20DyrpeUvhtQMR d4HAmE6UtfBFyb5oFARd9WGrqaWlC8ETwmInknCTkwqkFBuvMXrwrUfPxDap5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=71c5394f68146abc6e6a7022fc1129ee11283b2e commit 71c5394f68146abc6e6a7022fc1129ee11283b2e Author: Hans Petter Selasky AuthorDate: 2022-07-13 14:30:36 +0000 Commit: Hans Petter Selasky CommitDate: 2022-07-27 09:34:01 +0000 cuse(3): Make some clarifications in the manual page. Sponsored by: NVIDIA Networking (cherry picked from commit 280f34c37cc8947527da23e2612d436f1873fce5) --- lib/libcuse/cuse.3 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/libcuse/cuse.3 b/lib/libcuse/cuse.3 index 0aff43ac2155..52f9ca4d225a 100644 --- a/lib/libcuse/cuse.3 +++ b/lib/libcuse/cuse.3 @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.\" Copyright (c) 2010-2013 Hans Petter Selasky +.\" Copyright (c) 2010-2022 Hans Petter Selasky .\" .\" All rights reserved. .\" @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 17, 2019 +.Dd July 18, 2022 .Dt CUSE 3 .Os .Sh NAME @@ -124,6 +124,11 @@ mapped by This function returns a valid data pointer on success or .Dv NULL on failure. +The returned pointer is always aligned to the system page size. +The number and size of allocations is limited by the +.Xr mmap 2 +offset having to fit into a 32-bit variable typically for 32-bit +applications. .Pp .Ft "int" .Fn "cuse_is_vmalloc_addr" "void *" @@ -137,16 +142,12 @@ Else this function returns zero. This function frees memory allocated by .Fn cuse_vmalloc . This function is NULL safe. -Note that the -cuse library will internally not free the memory until the -.Fn cuse_uninit -function is called and that the number of unique -allocations is limited. .Pp .Ft "unsigned long" .Fn "cuse_vmoffset" "void *" -This function returns the mmap offset that the client must use to +This function returns the mmap offset the client must use to access the allocated memory. +The passed pointer must be aligned to the system page size. .Pp .Ft "struct cuse_dev *" .Fn "cuse_dev_create" "const struct cuse_methods *mtod" "void *priv0" "void *priv1" "uid_t" "gid_t" "int permission" "const char *fmt" "..."