summaryrefslogtreecommitdiffstats
path: root/lib/libkvm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply format __attribute__ to _kvm_err() and fix the errors that it detects.guenther2013-11-123-43/+57
| | | | | | | Treat failure to KREAD teh pcredd or ucreds to be errors insteading of continuing with bogus data. ok deraadt@ millert@
* a missing prototypesderaadt2013-11-121-1/+6
| | | | and don't act like an unknown vnode type is "ok"
* reduce use of <sys/user.h>deraadt2013-11-0114-28/+16
| | | | ok guenther millert
* - add UNIX-domain socket info to struct kinfo_file2guenther2013-10-229-273/+97
| | | | | | | | | | - convert netstat from kvm_getfiles() to kvm_getfile2() using that - delete kvm_getfiles() and KERN_FILE as no longer used (bump libkvm's major) - rename kvm_getfile2() to kvm_getfiles(), kinfo_file2 to kinfo_file and KERN_FILE2 to KERN_FILE. ok deraadt@, millert@ ports scan sthen@
* Remove support for a.out and ecoff. We only do elf now.deraadt2013-10-172-4/+4
| | | | ok miod
* some Bx/Ox conversion;jmc2013-08-142-8/+16
| | | | From: Jan Stary
* Switch time_t, ino_t, clock_t, and struct kevent's ident and dataguenther2013-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
* KERN_PROC_BYPID --> KERN_FILE_BYPIDguenther2013-08-031-3/+3
| | | | pointed out by Dominique Laigle (dlaigle (at) gmail.com)
* use fancy .In macro for includes. from Jan Klemkow. ok jmc schwarzetedu2013-06-058-31/+31
|
* Avoid using PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK defines, since we alreadyderaadt2013-03-289-34/+32
| | | | | know it from the machine. ok miod
* do not need udf_extern.hderaadt2013-03-231-2/+1
|
* spacesderaadt2013-03-204-8/+8
|
* When non-root asks sysctl for kinfo proc or file requests, do not fill inderaadt2013-03-201-3/+3
| | | | | any kernel addresses information. ok guenther
* No longer need the "miniproc" glue, as we only have kinfo_proc now.guenther2013-01-141-40/+13
| | | | ok deraadt@ pirofti@ kettenis@
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-052-6/+2
| | | | ok guenther millert kettenis
* Fix pid matching on kernel crashdumps in kvm_getprocs(KERN_PROC_PID)guenther2012-11-121-2/+2
|
* knowledge of nnpfs can be removedderaadt2012-08-231-26/+1
|
* remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.okan2012-08-021-2/+1
| | | | ok guenther@
* Use the PAGE_* forms (instead of the ancient BSD forms) in param.h,deraadt2012-07-094-19/+19
| | | | | | | because param.h will get a kick in the head sometime in the future. One day, maybe both can become invisible, but we boot one of them first. ok guenter
* 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 it optional for kvm_getprocs() (and related sysctl) to returnpirofti2012-04-171-1/+9
| | | | | | | | | | | | thread information. Add a KERN_PROC_SHOW_THREADS flag that has to be set in order to get the thread info and make it off by default. This creates backwards compatibility for applications that relied on a given size/number of items to be returned. Modify ps(1) and top(1) accordingly. Okay guenther@.
* Make kvm_getfile2() have a fighting change to work correctly on crashguenther2012-04-141-91/+88
| | | | dumps
* Update to match nprocs-->nprocess/nthreads changesguenther2012-04-141-16/+17
|
* Need to read in the vmspace to dig out the root of the rb-treeguenther2012-04-141-2/+5
|
* Add per thread accounting, mainly for usage & friends.pirofti2012-04-122-5/+40
| | | | | | | | | | | | | | This expands the already bloated FILL_KPROC macro to take an extra parameter that indicates if the callee is a thread or a process. The userland bits are adjusted accordingly and ps(1) and top(1) now display per thread usage times when -H is used. Also pkill(1) had to be adjusted so that duplicates don't pop up. libkvm does basically the same thing as the kernel bits. Okay guenther@.
* libkvm: minor bumpariane2012-04-111-1/+1
| | | | Due to the struct size of vm_map_entry having grown by sizeof(vsize_t).
* 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@
* 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;