From nobody Wed Jul 27 09:36:48 2022 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 4Lt7w11521z4WwFm; Wed, 27 Jul 2022 09:36:49 +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 4Lt7w10QS1z4NW3; Wed, 27 Jul 2022 09:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658914609; 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=1Bc6IIpCZJ9UPlFJ9sS4dvhc6jENVSid4GvpZHon4Cc=; b=DezAsJQ2QkFzOwKQOoaoClGrCrJ+aQQyfoxb8WlO+bcNm2bc2FSGTXyIm3wyD3xBtE3E9k ObQgaqsA5gOKWommxMf/i+Q8I5+KG/pKqqPOi4kP5yyvV/SzapKbmU4+pEioC+36IoRUoD 7kmSL7DNWKGJEw0ecEpBVByY47pN5Ct3xogInY5HwhMxZZcPQBW/iqYva1/wSMDteadFre al4qVxFHeEyo0b0lRC1t3kXIu66xoJg6nknXLT1qdTgyVv4Rhm1Lc6RJlbIK7XvLy/P9eU PJkhvTGqisvaFJgVVPp3vI4VQ4CKvoV8M7XimWl7zvk84k1CncGA20ev1zDFsg== 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 4Lt7w06MFYz1BdQ; Wed, 27 Jul 2022 09:36:48 +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 26R9amMD072673; Wed, 27 Jul 2022 09:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26R9amBv072672; Wed, 27 Jul 2022 09:36:48 GMT (envelope-from git) Date: Wed, 27 Jul 2022 09:36:48 GMT Message-Id: <202207270936.26R9amBv072672@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: b95d9d3b863d - stable/13 - cuse(3): Allow allocating a memory buffer of exactly 2 GBytes. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: b95d9d3b863dd60d915371579bb9a1be98cecdac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658914609; 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=1Bc6IIpCZJ9UPlFJ9sS4dvhc6jENVSid4GvpZHon4Cc=; b=vJhBJs6fNb/AeX6S4nDGYzz0ixTEFVvm+l4yQr2jzs4QI9pu1EsRQ3qz2Anx+joBWQ4i6M YyIlG7ERhogq+gkJ8j8+6h/D7Q4qTz5RpvAcfqrB88cPg1ihFfNadDbKvJ6TAdN5I9OAjG WaDmgdot8ORPOvfVDdbNrVvVbmaErq1Zw5xPIJII6qbDWTvbe9FHlrfiVtqFdNogTKtGKH R58cjoucIKQQ43v3gMdiWbp4qgAjHsU0ExDY4ppIqxPj09JQWtS85hOVAN69UQc4Zg1TTT AGKoNScodMMmTjSqqzG4bnCp0BVvlA2Eog0OZ7FqWA/yTyzqe1ih7blZjGmYgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658914609; a=rsa-sha256; cv=none; b=BfQndlxEE+/tSahOijEhiBqhZCtsk0flDevWVdT3+mcxVr4DmQ3WM+mfGR//kJ9GhdGSh5 FaK/56eKmCWiKuoi1vYSC4mPgbjoHYWQlV9stATKRf4bDklMABOrAYKY7gbpQ6jOh3WpYH 90hG/F8UAiXOWhxjYzo5VKZRpj36EwLRcd5UtHHU2pan9kNgbX1JIp2S2DgJKHcQoSk4c2 Oi4Km5Sim13HeWY0lyBhlBUagysexoURsZLB3dG/hEGevLBxAJwaGqxaoogAjZuWs3pa6r wa3FQxDiW9ZGlB+imk7h1tES7Ibd7MkFe8LBZ/FKwQwWT/ja/P4W+3QwKsodUw== 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=b95d9d3b863dd60d915371579bb9a1be98cecdac commit b95d9d3b863dd60d915371579bb9a1be98cecdac Author: Hans Petter Selasky AuthorDate: 2022-07-18 15:13:27 +0000 Commit: Hans Petter Selasky CommitDate: 2022-07-27 09:33:58 +0000 cuse(3): Allow allocating a memory buffer of exactly 2 GBytes. The manual page date will be bumped separately. Sponsored by: NVIDIA Networking (cherry picked from commit 58a8f6e9ecabba975f2cda8416bcc36c2073a7a8) --- 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));