git: 280f34c37cc8 - main - cuse(3): Make some clarifications in the manual page.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Jul 2022 08:47:12 UTC
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=280f34c37cc8947527da23e2612d436f1873fce5 commit 280f34c37cc8947527da23e2612d436f1873fce5 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-07-13 14:30:36 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> 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" "..."