summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_file2.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Committed the wrong version (an earlier try) of the KERN_FILE2 vsguenther2012-06-021-2/+4
| | | | rthreads fix. Update to the correct one.
* Eliminate the f_usecount ref count in struct file; instead of sleepingguenther2012-05-011-2/+2
| | | | | | | | | at the top of closef() until all in-progress calls finish, just do the advisory locking bits required of close() by POSIX and let whichever thread has the last reference do the call to the file's fo_close() method and the final cleanup. lots of discussion with deraadt@ and others; worked out with and ok krw@
* Fix kvm_deadfile2_byid()'s handling of kernel vs user addresses forguenther2012-04-201-14/+43
| | | | | | | | fd_ofiles and fd_ofileflags, reading in the separate allocation when necessary. Lets fstat -p and fstat -u work on kernel crash dumps again. ok millert@
* Make kvm_getfile2() have a fighting change to work correctly on crashguenther2012-04-141-91/+88
| | | | dumps
* The kinfo_file2 structure's f_wbytes member was being filled with theguenther2012-03-281-2/+2
| | | | | | read byte count instead of the written byte count. pointed out by paulm at tetrardus.net, ok dcoppa@
* 0 is a valid uid for files sysctl, don't skip it. reminded by guenthertedu2012-03-131-2/+2
|
* Add rtable id and thread id to struct kinfo_proc (and fix process id)guenther2012-01-071-11/+32
| | | | | | | | | | | and add an 'rtableid' keyword to ps. Add rtable id, thread id, and socket splice info to struct kinfo_file2 and make fstat display socket splice information. Remove old KVM_PROC2 and kinfo_proc2 interfaces; bump libkvm major Socket splice info and corrections from bluhm@ "Lovely" deraadt@
* The ktrace vnode has moved to struct process and changed name.guenther2011-12-141-3/+3
| | | | Missed commit pointed out by mikeb@
* move the specfs code to a place people can see it; ok guenther thib krwderaadt2011-07-041-3/+2
|
* Move some macros in <msdosfs/denode.h> to outside the #ifdef _KERNELguenther2010-07-171-3/+1
| | | | | | so that libkvm doesn't need to define that, thereby avoiding some warnings. ok miod@
* Fail instead of lying if a process asks sysctl()'s KERN_PROC2 orguenther2010-06-291-1/+6
| | | | | | | KERN_FILE2 (or their libkvm wrappers) for more information than the running implementation knows how to provide. ok millert@ deraadt@
* Reimplement kvm_getproc2()'s support for reading crash dumps andguenther2010-01-101-3/+1
| | | | | | | | | | | | | | /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.
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-5/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Support KERN_FILE_TEXT here toomillert2009-07-211-2/+13
|
* Handle the case where so_pcb is NULL.millert2009-07-211-2/+4
|
* correct kvm_getfile2 error stringmillert2009-07-081-4/+4
|
* Install ntfs includes and add libkvm (fstat) support. ntfs bitsmillert2009-06-241-6/+9
| | | | adapted from NetBSD fstat. OK deraadt@
* Move KREAD define to kvm_private.hmillert2009-06-201-5/+2
|
* Split out cd9660 bits into their own .c file to avoid #define collisionsmillert2009-06-201-25/+6
| | | | with ufs and add also udf support. OK miod@
* Add msdosfs support now that we have the headers.millert2009-06-201-40/+59
|
* Quiet a gcc warningmillert2009-06-191-4/+4
|
* add missing headers needed by free(), memset(), getuid() and strlcpy().chl2009-06-111-2/+5
| | | | ok millert@
* Define _KERNEL for the bare minimum. We can include sys/proc.hmillert2009-06-071-6/+9
| | | | | normally as long as we define __need_process and use a local definition of struct proclist.
* Avoid including machine/cpu.hmillert2009-06-071-4/+4
|
* Add kvm_getfile2 which uses KERN_FILE2 when possible, fallingmillert2009-06-071-0/+839
back on kmem grovelling for non-live kernels. OK deraadt@