From nobody Wed Jul 20 08:47:11 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 4Lnq7z65f4z4WRqC; Wed, 20 Jul 2022 08:47:11 +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 4Lnq7z2m26z44wb; Wed, 20 Jul 2022 08:47:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658306831; 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=yd4C6hmqwqbpCrsEWyEjMuZdpexsO5uVQB2awlWYOq8=; b=UFmMUOIcGuFjJS1CFdMRIgHaXbNdh+AECsuS/UskqNHNPVIUldnnXdMS2eA4IXthzRkMUV dFfmI+45zZkXCV6NAsNyqFnpqYRysEwdmALd306E+JZ8NZAyAXI08bKeVNsZF913YY6bsH fIqVeAeeT80KgurVBXH2Zy9bStjHEUJgDyIAmOED10HxJ/lkkDcBo3mSjOMq4qJL9lSxcE W9oYQfYlVK8z3bpGpBqXAaQMIPddtKG10kmsqf0RadjP3u+k/RSw6WwNpoxmcg/MT6Xjro kMsQ9APA+GAIpZcwRJtp8UVQ1WqYz0tbCmbwYqj6dXwqrSO9buI+l2Q/T2C3Lg== 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 4Lnq7z1tV4zsJm; Wed, 20 Jul 2022 08:47:11 +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 26K8lBP6075503; Wed, 20 Jul 2022 08:47:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26K8lBMt075502; Wed, 20 Jul 2022 08:47:11 GMT (envelope-from git) Date: Wed, 20 Jul 2022 08:47:11 GMT Message-Id: <202207200847.26K8lBMt075502@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: 58a8f6e9ecab - main - cuse(3): Allow allocating a memory buffer of exactly 2 GBytes. 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: 58a8f6e9ecabba975f2cda8416bcc36c2073a7a8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658306831; 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=yd4C6hmqwqbpCrsEWyEjMuZdpexsO5uVQB2awlWYOq8=; b=uliA8jssoov0CBVVO6gH7xLzr1Lem0iS/VEiVm4S9BhzTKb00Io1tMcbZ0bWa6RJksCtUN L0K8TmdA03h0yfLLRSwPN5Td0i4A1SOoux3xg7uM403UNtcOc3MEEgiokRMtZBtxhNudo0 cvCdjvqA3Z8O4yXzxjc9aK/52uG2PD/7IAE2icmR5dzKt2jckRK5pxiYCToJEOxbKH/jfB zt4zOaCxOVFOkvI/bf46IF975Fnzla8PRzSlwsUrUlWEBgRxrg+2JOQ6dnO8vVAPWRWw9h esc/TerQ4Gc0/9Ay2xH2R7dIv8WwjmXv5EtWvxPYvcZnRZS/7057mKeefbK2gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658306831; a=rsa-sha256; cv=none; b=RZpz8DBKJOV4dlUQmLNHqrlYKdlwcpR8t+XRiFVoGzjRMok1qR5Cbk2AyuR/Hhi0ukA0Kq Ir3B100HZjSXVuEZHhqb/KwefGtA7qEND7JFdW1n1Jn1SGmKgIpEehtivQGAAQni/Ljwzt OA+7GxQ8wfB0IBND/8j9vZBLVPLRKvQgN0C5gPuytpBNlIeExvdHyIJfdeQ/dsBiXE3xGC 9UlYoYl6Qns4wnAdoG2tciM7kLSkIUcSZ2qs+QHYfZsc+fxhtP9NwBll/tbKMeu324Aj6b T43uIOBFx2j+NPbOXqcQ7rw+T4TZEOYKrYxQZV11IgHmIGad5tE1ppJHl+ENaQ== 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=58a8f6e9ecabba975f2cda8416bcc36c2073a7a8 commit 58a8f6e9ecabba975f2cda8416bcc36c2073a7a8 Author: Hans Petter Selasky AuthorDate: 2022-07-18 15:13:27 +0000 Commit: Hans Petter Selasky CommitDate: 2022-07-20 08:41:11 +0000 cuse(3): Allow allocating a memory buffer of exactly 2 GBytes. The manual page date will be bumped separately. MFC after: 1 week Sponsored by: NVIDIA Networking --- lib/libcuse/cuse.3 | 2 +- lib/libcuse/cuse.h | 2 +- lib/libcuse/cuse_lib.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcuse/cuse.3 b/lib/libcuse/cuse.3 index aab8ebb4d4f4..0aff43ac2155 100644 --- a/lib/libcuse/cuse.3 +++ b/lib/libcuse/cuse.3 @@ -114,7 +114,7 @@ See for known error codes. .Sh LIBRARY USAGE .Ft "void *" -.Fn "cuse_vmalloc" "int size" +.Fn "cuse_vmalloc" "unsigned size" This function allocates .Ar size bytes of memory. diff --git a/lib/libcuse/cuse.h b/lib/libcuse/cuse.h index d502c5bd5415..f82401b98bf3 100644 --- a/lib/libcuse/cuse.h +++ b/lib/libcuse/cuse.h @@ -54,7 +54,7 @@ struct cuse_methods { int cuse_init(void); int cuse_uninit(void); -void *cuse_vmalloc(int); +void *cuse_vmalloc(unsigned); int cuse_is_vmalloc_addr(void *); void cuse_vmfree(void *); unsigned long cuse_vmoffset(void *ptr); diff --git a/lib/libcuse/cuse_lib.c b/lib/libcuse/cuse_lib.c index ec300add5903..2653ed3067d5 100644 --- a/lib/libcuse/cuse_lib.c +++ b/lib/libcuse/cuse_lib.c @@ -163,7 +163,7 @@ cuse_vmoffset(void *_ptr) } void * -cuse_vmalloc(int size) +cuse_vmalloc(unsigned size) { struct cuse_alloc_info info; unsigned long pgsize; @@ -174,7 +174,7 @@ cuse_vmalloc(int size) int error; /* some sanity checks */ - if (f_cuse < 0 || size < 1 || (unsigned long)size > CUSE_ALLOC_BYTES_MAX) + if (f_cuse < 0 || size < 1 || size > CUSE_ALLOC_BYTES_MAX) return (NULL); memset(&info, 0, sizeof(info));