summaryrefslogtreecommitdiffstats
path: root/lib/libkvm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make rusage totals, itimers, and profile settings per-process insteadguenther2012-03-231-8/+2
| | | | | | | of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
* pull in more .h (spotted since struct vnode was not in scope)deraadt2012-03-161-1/+12
|
* 0 is a valid uid for files sysctl, don't skip it. reminded by guenthertedu2012-03-131-2/+2
|
* Major bump, since struct vm_map and vm_map_entry changed size and layout.ariane2012-03-091-1/+1
|
* Userspace counterpart of new vmmap.ariane2012-03-091-13/+14
| | | | Allows memory walks to function.
* Add rtable id and thread id to struct kinfo_proc (and fix process id)guenther2012-01-076-65/+53
| | | | | | | | | | | 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@
* where a man page has multiple links, only reference that pagejmc2011-08-187-53/+24
| | | | | | once in SEE ALSO; also prefer Xr to Fn where relevant; diff started by Martin Pelikan
* Copied from hppa; should work for hppa64 as well.kettenis2011-07-091-0/+76
|
* Recommit the reverted sigacts change now that the NFS use-after-freeguenther2011-07-051-2/+14
| | | | | | | | problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
* move the specfs code to a place people can see it; ok guenther thib krwderaadt2011-07-042-6/+4
|
* Userland counterpart of the vmmap backout; cranks major version of libkvm.ariane2011-06-062-15/+14
|
* Reimplement uvm/uvm_map.ariane2011-05-241-13/+14
| | | | | | | | | | | | | vmmap is designed to perform address space randomized allocations, without letting fragmentation of the address space go through the roof. Some highlights: - kernel address space randomization - proper implementation of guardpages - roughly 10% system time reduction during kernel build Tested by alot of people on tech@ and developers. Theo's machines are still happy.
* Revert the sigacts diff: NFS can apparently retain pointers to processesguenther2011-04-181-14/+2
| | | | | | until they're zombies and then send them signals (for intr mounts). Until that is untangled, the sigacts change is unsafe. sthen@ was the victim for this one
* p_sigacts is NULL for zombies, so FILL_KPROC() and kvm_proclist() haveguenther2011-04-151-7/+12
| | | | | | to handle that with the sigacts change. problem observed and diagnosed by claudio@ and kettenis@
* Correct the sharing of the signal handling state: stuff that shouldguenther2011-04-151-2/+9
| | | | | | | | | | | | be shared (p_sigignore, p_sigcatch, P_NOCLDSTOP, P_NOCLDWAIT) moves to struct sigacts, wihle stuff that should be per rthread (ps_oldmask, SAS_OLDMASK, ps_sigstk) moves to struct proc. Treat the coredumping state bits (ps_sig, ps_code, ps_type, ps_sigval) as per-rthread until our locking around coredumping is better. Oh, and remove the old SunOS-compat ps_usertramp member. "I like the sound of this" tedu@
* Pull more headers to avoid warnings about structs being undefined.miod2011-04-101-1/+2
|
* Pull more headers to avoid warnings about structs being undefined.miod2011-04-101-1/+2
|
* missing word;jmc2011-03-121-1/+2
|
* Replace the old, broken KERN_PROC ABI and its matching functionsguenther2011-03-126-370/+66
| | | | | | | | | in libkvm with the stable-ABI versions that are currently named KERN_PROC2, kvm_get{proc,argv,envv}2(). The latter names and symbols will continue to be supported for a few releases. Committing now that they ports people have had a couple releases to update pkgs that usd the old functions
* according to ingo, it isn;t a problem to have empty [BDS]q macros, sojmc2010-09-201-3/+3
| | | | revert that part of yesterday's diffs;
* more wacky macro fixing;jmc2010-09-191-3/+3
|
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-262-20/+34
| | | | | | | | | so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
* 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-292-2/+13
| | | | | | | KERN_FILE2 (or their libkvm wrappers) for more information than the running implementation knows how to provide. ok millert@ deraadt@
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-031-2/+7
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* the comment is right, this can indeed go away.jasper2010-01-121-2/+1
| | | | | | it's unused inside libkvm, and nothing else is allowed to use it. ok guenther@ "sure" deraadt@
* Reimplement kvm_getproc2()'s support for reading crash dumps andguenther2010-01-104-204/+383
| | | | | | | | | | | | | | /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.
* Get page size information by reading the kernel image' struct uvmexp, insteadmiod2009-12-071-22/+44
| | | | of the value of PAGE_SIZE found in the standard headers when compiling.
* Oops, KSEG -> CKSEG.miod2009-11-221-4/+4
|
* Allow mips ports to override VM_{MIN,MAX}_KERNEL_ADDRESS, and provide themiod2009-11-221-3/+15
| | | | | | | address as a kernel variable for use by libkvm. On sgi IP27 and IP30 kernels, use XKSEG instead of CKSSEG; this will allow kernel KVM size to grow in the future if necessary.
* Do not need -DLIBC_SCCS anymorederaadt2009-10-281-2/+1
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-2712-92/+12
| | | | | | | 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
* this is happier if it pulls in a few more includesderaadt2009-07-281-1/+4
|
* 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-244-9/+101
| | | | adapted from NetBSD fstat. OK deraadt@
* Move KREAD define to kvm_private.hmillert2009-06-209-41/+20
|
* Split out cd9660 bits into their own .c file to avoid #define collisionsmillert2009-06-205-28/+193
| | | | 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-076-8/+908
| | | | back on kmem grovelling for non-live kernels. OK deraadt@
* Mop up after oga@ and unbreak the tree. The direct uncached map is gone sokettenis2009-03-301-6/+1
| | | | remove the code from libkvm that dealt with it.
* All operation on live kernels uses sysctl interface, there is no reason tomiod2009-01-213-14/+10
| | | | | | access the swap area. Change kvm_open() to no longer require a swap area, and to not consider failure to open() it as fatal. Post-mortem analysis would need an image of the swap area at the time of the crash, anyway.
* Sync _kvm_kvatop with existing pmap code: handle direct mappings andmiod2009-01-021-2/+24
| | | | level 2 large pages.
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-9/+2
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@