OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
CVS: cvs.openbsd.org: src

From: Philip Guenther (guenthercvs.openbsd.org)
Date: Sat Jan 09 2010 - 21:37:50 CST


CVSROOT: /cvs
Module name: src
Changes by: guenthercvs.openbsd.org 2010/01/09 20:37:50

Modified files:
        lib/libkvm : Makefile kvm_file2.c kvm_proc.c
        sys/kern : kern_sysctl.c
        sys/sys : sysctl.h
        sbin/sysctl : Makefile
Added files:
        lib/libkvm : kvm_proc2.c

Log message:
Reimplement kvm_getproc2()'s support for reading crash dumps and
/dev/mem to be direct instead of going through kvm_getprocs(), as
that function is going to get more an more broken as we move stuff
from struct proc to struct process for rthreads. To minimize the
code copying, put the common logic of filling in a kinfo_proc2
structure into a macro FILL_KPROC2() in <sys/sysctl.h> for use from
both the kernel and user-space. This also hides the KERN_PROC
#define behind "#if defined(_KERNEL)||defined(_LIBKVM)", as it's
deprecated.

Positive feedback from millert and blambert; so committing to unblock
further rthreads work.