From nobody Wed Jul 20 08:47:12 2022 X-Original-To: dev-commits-src-main@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 4Lnq805Hk5z4WS6v; Wed, 20 Jul 2022 08:47:12 +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 4Lnq80449Qz45TD; Wed, 20 Jul 2022 08:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658306832; 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=Oykche6ZlpoRy2up1wZslSsC/Vojr/YkT2uy3nxVWbk=; b=Lkf2G6Itxw1hnyw8hvbmAC/yuKk2HEOWHOU8nAqLZbXtmdh7Ngj9+/Pu8xmC+B34GpEXrU UOgQY9G9hvEal2xizDXSUEBmqMaO7VepMdYzPHkSgLyQkzmerbg56UUbRm/93nR2RNd0Oq nKZuGpre4DkNgYKzgJHsWAXGWsS7kbGgUpmzDJfpLRTI/6FiGpngdx4z3JHSpt+Q8AuUSl V2FzZungQ+uXOs0Wk83r1acstOwDxhqi5UVpXUhaeAhmR4KWu1K7Nvi3UnoG3jyGtboD/F 4wlg0i+byOqGr4ADh4N69ZMRRpGVyuMKvC81Kexd661mkZBZW/8MgIBB6d3Pfw== 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 4Lnq802ddjzsJn; Wed, 20 Jul 2022 08:47:12 +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 26K8lCIT075534; Wed, 20 Jul 2022 08:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26K8lCp0075533; Wed, 20 Jul 2022 08:47:12 GMT (envelope-from git) Date: Wed, 20 Jul 2022 08:47:12 GMT Message-Id: <202207200847.26K8lCp0075533@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 280f34c37cc8 - main - cuse(3): Make some clarifications in the manual page. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 280f34c37cc8947527da23e2612d436f1873fce5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658306832; 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=Oykche6ZlpoRy2up1wZslSsC/Vojr/YkT2uy3nxVWbk=; b=Y55trxC8TgpvzWbRByYLnuU5Yvyd15FlesChpaUi8aVtJjLDbLRiLKbk7pycfR0vGTPfsE urv9f80E6x7REXafYuVrp+DFW1Y+1BC0No4PFuORw6HZldMHtfRTZmJ34yZpSvvqaYGGLS sCRM+AxlZ6h7XGibUIcjKWSdK3BUPie2CLSDVNyEavPLoQLrrcQ/FnjT6aq5U4Lm4Vh2fN FHwghiFcka9/FTxe+57BNi+oA85EHLxyabNAwlflb1SOkaogH+a0mur7KsFdbyKEsn8vSU NjvFHbmyGnflouFqWTLKaxb5uwSWRkETSO3qlbLdW3PlVqfnVQBrmfpCX1UDhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658306832; a=rsa-sha256; cv=none; b=VMdCc4awMRwmZYN/rw8suJggfYmEXboN1SZW0Nz0gWdnT0UhfxCDbb5nMK0lTAhoPalyNw 4RuzpMQsYPkFktZOTX0qeY8FC22UcXMo/QGOVPuW6+tYh2ndhozB0ghmOm2CB9hGrPMngD u/+j297lAn6D/0ll46PWbdcv75aqMo6g+6TgT4MmW0gVHFlF7Eb3JQIqZTqtaXqHQ0DGsf XRpM25GMeGFNdp4aHm603znbxyK/aXl0pfC9cIleCkIknBA9hEybPNnduImHvW2H5q7bMO j1ZAs6yqvxwG0iVX0xMXtSKXd0424psjxUBrueZu15hHPrBuVU2d6ysXgiy8Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=280f34c37cc8947527da23e2612d436f1873fce5 commit 280f34c37cc8947527da23e2612d436f1873fce5 Author: Hans Petter Selasky AuthorDate: 2022-07-13 14:30:36 +0000 Commit: Hans Petter Selasky CommitDate: 2022-07-20 08:41:11 +0000 cuse(3): Make some clarifications in the manual page. MFC after: 1 week Sponsored by: NVIDIA Networking --- 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" "..."