diff options
author | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2014-12-05 04:12:49 +0000 |
---|---|---|
committer | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2014-12-05 04:12:49 +0000 |
commit | c8525d7f58e30cc7e582a014d2ed096379ccbe9e (patch) | |
tree | ec1d9e9fd25511db56d8684473978444d773b6fb /sys/uvm/uvm_map.h | |
parent | 70eb0676761b32588c52742bb357451ea0d0c95d (diff) |
Introduce a new sysctl to retrieve VM map entries
This adds a new sysctl KERN_PROC_VMMAP, which returns an array of VM map
entries of a specified process. This prevents debuggers from iterating
vm_map_entry RB tree via kvm(3).
The name KERN_PROC_VMMAP and struct kinfo_vmentry are chosen from the same
function in FreeBSD. struct kinfo_vmentry is revised to reduce size, because
OpenBSD does not keep track of filepaths. The semantic is also changed to
return max buffer size as a hint, and start iteration at the specified base
address.
Much valuable input from deraadt@, guenther@, tedu@
OK tedu@ deraadt@
Diffstat (limited to 'sys/uvm/uvm_map.h')
-rw-r--r-- | sys/uvm/uvm_map.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/uvm/uvm_map.h b/sys/uvm/uvm_map.h index c69c5f9e6d3..70c23e8c56b 100644 --- a/sys/uvm/uvm_map.h +++ b/sys/uvm/uvm_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.h,v 1.51 2014/07/11 16:35:40 jsg Exp $ */ +/* $OpenBSD: uvm_map.h,v 1.52 2014/12/05 04:12:48 uebayasi Exp $ */ /* $NetBSD: uvm_map.h,v 1.24 2001/02/18 21:19:08 chs Exp $ */ /* @@ -400,6 +400,11 @@ void uvm_unmap_detach(struct uvm_map_deadq*, int); void uvm_unmap_remove(struct vm_map*, vaddr_t, vaddr_t, struct uvm_map_deadq*, boolean_t, boolean_t); +struct kinfo_vmentry; + +int uvm_map_fill_vmmap(struct vm_map *, struct kinfo_vmentry *, + size_t *); + #endif /* _KERNEL */ /* |