CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2014/12/04 21:12:48

Modified files:
        sys/kern       : kern_sysctl.c 
        sys/sys        : sysctl.h 
        sys/uvm        : uvm_glue.c uvm_extern.h uvm_map.c uvm_map.h 
        lib/libc/gen   : sysctl.3 

Log message:
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@

Reply via email to