From owner-svn-src-all@freebsd.org Sat Dec 7 19:36:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C0731CAEEE; Sat, 7 Dec 2019 19:36:41 +0000 (UTC) (envelope-from markj@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Vfpd2jVtz48Y2; Sat, 7 Dec 2019 19:36:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BF161EA0E; Sat, 7 Dec 2019 19:36:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB7JafGk002223; Sat, 7 Dec 2019 19:36:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB7Jafk0002222; Sat, 7 Dec 2019 19:36:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912071936.xB7Jafk0002222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 7 Dec 2019 19:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355505 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 355505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2019 19:36:41 -0000 Author: markj Date: Sat Dec 7 19:36:40 2019 New Revision: 355505 URL: https://svnweb.freebsd.org/changeset/base/355505 Log: Provide vm_map_entry traversal routines to userspace. This is required for now to allow libprocstat to compile. Discussed with: dougm Modified: head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sat Dec 7 19:05:48 2019 (r355504) +++ head/sys/vm/vm_map.h Sat Dec 7 19:36:40 2019 (r355505) @@ -402,27 +402,6 @@ long vmspace_resident_count(struct vmspace *vmspace); #define VM_MAP_WIRE_WRITE 4 /* Validate writable. */ -#ifdef _KERNEL -boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); -vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); -int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); -int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, - vm_offset_t, int, vm_prot_t, vm_prot_t, int); -int vm_map_find_min(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, - vm_size_t, vm_offset_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); -int vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, - vm_prot_t, vm_prot_t, int); -vm_offset_t vm_map_findspace(vm_map_t, vm_offset_t, vm_size_t); -int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); -void vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); -int vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); -int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, - vm_pindex_t *, vm_prot_t *, boolean_t *); -int vm_map_lookup_locked(vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, - vm_pindex_t *, vm_prot_t *, boolean_t *); -void vm_map_lookup_done (vm_map_t, vm_map_entry_t); -boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); - static inline vm_map_entry_t vm_map_entry_first(vm_map_t map) { @@ -448,6 +427,27 @@ vm_map_entry_succ(vm_map_entry_t entry) for ((it) = vm_map_entry_first(map); \ (it) != &(map)->header; \ (it) = vm_map_entry_succ(it)) + +#ifdef _KERNEL +boolean_t vm_map_check_protection (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t); +vm_map_t vm_map_create(pmap_t, vm_offset_t, vm_offset_t); +int vm_map_delete(vm_map_t, vm_offset_t, vm_offset_t); +int vm_map_find(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t, + vm_offset_t, int, vm_prot_t, vm_prot_t, int); +int vm_map_find_min(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t *, + vm_size_t, vm_offset_t, vm_offset_t, int, vm_prot_t, vm_prot_t, int); +int vm_map_fixed(vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_size_t, + vm_prot_t, vm_prot_t, int); +vm_offset_t vm_map_findspace(vm_map_t, vm_offset_t, vm_size_t); +int vm_map_inherit (vm_map_t, vm_offset_t, vm_offset_t, vm_inherit_t); +void vm_map_init(vm_map_t, pmap_t, vm_offset_t, vm_offset_t); +int vm_map_insert (vm_map_t, vm_object_t, vm_ooffset_t, vm_offset_t, vm_offset_t, vm_prot_t, vm_prot_t, int); +int vm_map_lookup (vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, + vm_pindex_t *, vm_prot_t *, boolean_t *); +int vm_map_lookup_locked(vm_map_t *, vm_offset_t, vm_prot_t, vm_map_entry_t *, vm_object_t *, + vm_pindex_t *, vm_prot_t *, boolean_t *); +void vm_map_lookup_done (vm_map_t, vm_map_entry_t); +boolean_t vm_map_lookup_entry (vm_map_t, vm_offset_t, vm_map_entry_t *); int vm_map_protect (vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t); int vm_map_remove (vm_map_t, vm_offset_t, vm_offset_t); void vm_map_try_merge_entries(vm_map_t map, vm_map_entry_t prev,