summaryrefslogtreecommitdiff
path: root/lib/libkvm
AgeCommit message (Collapse)Author
2014-03-30Eliminates struct pcred by moving the real and saved ugids intoPhilip Guenther
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
2014-03-22Unbreak tree; p_sigacts moved from struct proc to struct processFlorian Obser
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingMiod Vallat
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2014-02-05More crash dump parsing fixes: correct paddr in process info and pidsPhilip Guenther
in file info. Drop some unnecessary casts and unused variables too. ok millert@
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2014-01-20Threads can't be zombies, only processes, so change zombproc to zombprocess,Philip Guenther
make it a list of processes, and change P_NOZOMBIE and P_STOPPED from thread flags to process flags. Add allprocess list for the code that just wants to see processes. ok tedu@
2014-01-20p_textvp moved from struct proc to struct processPhilip Guenther
2013-11-17Mark internal symbols as hidden. This removes symbols from the ABI,Philip Guenther
albeit ones no one should be using, so major bump the shlib. ok kettenis@ ports testing by landry@
2013-11-16_kvm_syserr() is printf-like tooPhilip Guenther
2013-11-16ANSIfy a declarationPhilip Guenther
2013-11-16Prep for hidden visibility: move the vnode/file related functionPhilip Guenther
declarations, including _kvm_getftype(), into a new header, kvm_file.h, so that we don't have to pull <sys/vnode.h> into all the .c files. No more extern function declaration in .c files. ok millert@
2013-11-12Apply format __attribute__ to _kvm_err() and fix the errors that it detects.Philip Guenther
Treat failure to KREAD teh pcredd or ucreds to be errors insteading of continuing with bogus data. ok deraadt@ millert@
2013-11-12a missing prototypesTheo de Raadt
and don't act like an unknown vnode type is "ok"
2013-11-01reduce use of <sys/user.h>Theo de Raadt
ok guenther millert
2013-10-22- add UNIX-domain socket info to struct kinfo_file2Philip Guenther
- 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@
2013-10-17Remove support for a.out and ecoff. We only do elf now.Theo de Raadt
ok miod
2013-08-14some Bx/Ox conversion;Jason McIntyre
From: Jan Stary
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
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@
2013-08-03KERN_PROC_BYPID --> KERN_FILE_BYPIDPhilip Guenther
pointed out by Dominique Laigle (dlaigle (at) gmail.com)
2013-06-05use fancy .In macro for includes. from Jan Klemkow. ok jmc schwarzeTed Unangst
2013-03-28Avoid using PAGE_SHIFT, PAGE_SIZE, and PAGE_MASK defines, since we alreadyTheo de Raadt
know it from the machine. ok miod
2013-03-23do not need udf_extern.hTheo de Raadt
2013-03-20spacesTheo de Raadt
2013-03-20When non-root asks sysctl for kinfo proc or file requests, do not fill inTheo de Raadt
any kernel addresses information. ok guenther
2013-01-14No longer need the "miniproc" glue, as we only have kinfo_proc now.Philip Guenther
ok deraadt@ pirofti@ kettenis@
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-11-12Fix pid matching on kernel crashdumps in kvm_getprocs(KERN_PROC_PID)Philip Guenthe
2012-08-23knowledge of nnpfs can be removedTheo de Raadt
2012-08-02remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.Okan Demirmen
ok guenther@
2012-07-09Use the PAGE_* forms (instead of the ancient BSD forms) in param.h,Theo de Raadt
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
2012-06-02Committed the wrong version (an earlier try) of the KERN_FILE2 vsPhilip Guenthe
rthreads fix. Update to the correct one.
2012-05-01Eliminate the f_usecount ref count in struct file; instead of sleepingPhilip Guenthe
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@
2012-04-20Fix kvm_deadfile2_byid()'s handling of kernel vs user addresses forPhilip Guenthe
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@
2012-04-17Make it optional for kvm_getprocs() (and related sysctl) to returnPaul Irofti
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@.
2012-04-14Make kvm_getfile2() have a fighting change to work correctly on crashPhilip Guenthe
dumps
2012-04-14Update to match nprocs-->nprocess/nthreads changesPhilip Guenthe
2012-04-14Need to read in the vmspace to dig out the root of the rb-treePhilip Guenthe
2012-04-12Add per thread accounting, mainly for usage & friends.Paul Irofti
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@.
2012-04-11libkvm: minor bumpAriane van der Steldt
Due to the struct size of vm_map_entry having grown by sizeof(vsize_t).
2012-03-28The kinfo_file2 structure's f_wbytes member was being filled with thePhilip Guenthe
read byte count instead of the written byte count. pointed out by paulm at tetrardus.net, ok dcoppa@
2012-03-23Make rusage totals, itimers, and profile settings per-process insteadPhilip Guenthe
of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it. ok kettenis@
2012-03-16pull in more .h (spotted since struct vnode was not in scope)Theo de Raadt
2012-03-130 is a valid uid for files sysctl, don't skip it. reminded by guentherTed Unangst
2012-03-09Major bump, since struct vm_map and vm_map_entry changed size and layout.Ariane van der Steldt
2012-03-09Userspace counterpart of new vmmap.Ariane van der Steldt
Allows memory walks to function.
2012-01-07Add rtable id and thread id to struct kinfo_proc (and fix process id)Philip Guenthe
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@
2011-12-14The ktrace vnode has moved to struct process and changed name.Philip Guenthe
Missed commit pointed out by mikeb@
2011-08-18where a man page has multiple links, only reference that pageJason McIntyre
once in SEE ALSO; also prefer Xr to Fn where relevant; diff started by Martin Pelikan
2011-07-09Copied from hppa; should work for hppa64 as well.Mark Kettenis
2011-07-05Recommit the reverted sigacts change now that the NFS use-after-freePhilip Guenthe
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@