From nobody Fri May 10 20:45:33 2024 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 4VbgrG0hyQz5KP6p; Fri, 10 May 2024 20:45:34 +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 4VbgrF5Vqrz4XSP; Fri, 10 May 2024 20:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715373933; 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=kh1n0f4lw2ovAa/1XX55lOVaWNbJSindQKi/4oYQvwg=; b=GihwCjCJHCT1LO8Oqeo2xIrJ51TwvIhfzDyVrl57vW7eSKTvQELpOahiBWMzMfk2g6xpa7 k1ng5pfm6mLQUSOKzBqb+jAn+iMUXWsrFfBwDmObX9rsm2PQFPZFw0u52iLfskPCOfl7j+ zrubbzqbvVXKJ/AwAlH1xW7HqC+eZtbn8oTvk3kkQKo2LE4e1mA2cAPwDQipLYsgE7DCia MdDlqiFsWMP2jkbLV2pyYZjE6t9sENNFWPCWbx8SuHmkKRmqV1Fl1ISKIUBSQweUmWxapv min6O4eWO/YY2bEErVXvT/gSbwNQ9uxftQ19SrFHYyHdMkct1netn+WArRv9rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715373933; a=rsa-sha256; cv=none; b=jM5cfTwljNj/ckclUvG3UljdAq0xAz86sDA+T5QqrA89IqIrYmfG4zudF+OFA+I988bEbq f9icruwJeSJcoVa6MfPoEiPVUfhfYV/fNPvHt0g2QkXx40xBbj4vZTAO0gLCwdyiqRY7F0 z8qrB2xjyB1oK6kSoJoj7smQj0MEgovey0j+SLAKnXl+HqVPWghrMqy7Q6ZDWBt+iKysE2 uS9ZPzUtCGlPV2d/e3y40qN+HEaR+aQCc2sI162sIdi9NN1oY9lEwtXg3mvxml3pF65Oke TAWy6VWmhHrH7R5elPwwX05goxeP0Nb2g53YgcaQzQN7CUKGRYrsSyabkESXfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715373933; 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=kh1n0f4lw2ovAa/1XX55lOVaWNbJSindQKi/4oYQvwg=; b=vJ71LgX0Zb7IQ4iWhkXVDoQqripmUvVVmz29GrC9MYVrfLrgxXT+XDG9VV5sswajCxzlBf OEIoA/koXs/WsjpFIApuDOhbaZMwdSk97jBGgjCyRNDFASHkWfp7oLyBqraOYlc0G3/Vsh LEjhR/ambPXqhG7mGTD0q+wpN2fMNh17hXkz2TUN1u40xcTTkWOUVTzJz9wZeLy93nhDI0 pmuv/OP6S84vgSR5VmMlZBUipuffHRYuuCXZd5854V8ncPT0jIgtLAV8wmbScPgv2cETs6 vfV/awG7l0V32plw3SD9heBdaWsBwqB+wpt1ZQ3SI5+RkAV+TsPf48RJKjgcvA== 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 4VbgrF4CL9zsbs; Fri, 10 May 2024 20:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44AKjXHT030921; Fri, 10 May 2024 20:45:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44AKjX8J030918; Fri, 10 May 2024 20:45:33 GMT (envelope-from git) Date: Fri, 10 May 2024 20:45:33 GMT Message-Id: <202405102045.44AKjX8J030918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9e0164087cbf - main - vm: Change the return types of kernacc and useracc to bool 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e0164087cbf395624f63a5343357e2f6bd0370c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9e0164087cbf395624f63a5343357e2f6bd0370c commit 9e0164087cbf395624f63a5343357e2f6bd0370c Author: John Baldwin AuthorDate: 2024-05-10 20:43:56 +0000 Commit: John Baldwin CommitDate: 2024-05-10 20:43:56 +0000 vm: Change the return types of kernacc and useracc to bool Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45156 --- sys/vm/vm_extern.h | 4 ++-- sys/vm/vm_glue.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index b50abab7380c..8c9addda1196 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -83,8 +83,8 @@ void kmem_init(vm_offset_t, vm_offset_t); void kmem_init_zero_region(void); void kmeminit(void); -int kernacc(void *, int, int); -int useracc(void *, int, int); +bool kernacc(void *, int, int); +bool useracc(void *, int, int); int vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold); void vm_fault_copy_entry(vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t, diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 979a0fc27120..641800413e68 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -122,7 +122,7 @@ * just checking the vm_map_entry is sufficient within the kernel's address * space. */ -int +bool kernacc(void *addr, int len, int rw) { boolean_t rv; @@ -134,7 +134,7 @@ kernacc(void *addr, int len, int rw) if ((vm_offset_t)addr + len > vm_map_max(kernel_map) || (vm_offset_t)addr + len < (vm_offset_t)addr) - return (FALSE); + return (false); prot = rw; saddr = trunc_page((vm_offset_t)addr); @@ -154,7 +154,7 @@ kernacc(void *addr, int len, int rw) * vm_fault_quick(), or copyin()/copout()/su*()/fu*() functions should be * used in conjunction with this call. */ -int +bool useracc(void *addr, int len, int rw) { boolean_t rv; @@ -167,7 +167,7 @@ useracc(void *addr, int len, int rw) map = &curproc->p_vmspace->vm_map; if ((vm_offset_t)addr + len > vm_map_max(map) || (vm_offset_t)addr + len < (vm_offset_t)addr) { - return (FALSE); + return (false); } vm_map_lock_read(map); rv = vm_map_check_protection(map, trunc_page((vm_offset_t)addr),