summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
Commit message (Collapse)AuthorAgeFilesLines
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-281-26/+0
| | | | Submitted by: keramida
* Catch up to tte.h changes.jake2002-05-211-2/+2
|
* Stub out _kvm_mdopen, we don't the same constants as NetBSDobrien2002-05-151-0/+2
|
* Add a PowerPC machdep for kvm.obrien2002-05-151-0/+101
| | | | Obtained from: NetBSD (rev 1.4, pre-UVM)
* Fix (for the second time) kvm_getprocs() for the case where nodd2002-04-071-0/+26
| | | | | | | | | | | | processes match the given criteria. Since revision 1.60 of malloc.c, malloc() and friends return an invalid pointer when given a size of 0. kvm_getprocs() uses sysctl() with a NULL oldp argument to get an initial size, but does not check whether it's 0 before passing it to realloc() (via _kvm_realloc()). Before the aforementioned malloc() change, this resulted in a minimal allocation made and a valid poitner returned, but now results in an invalid, but non-NULL, pointer being returned. When this is passed to sysctl(), the latter returns EFAULT (as it should).
* Remove multi-line __P() usage.obrien2002-03-221-3/+4
|
* Remove __P() usage.obrien2002-03-213-22/+22
|
* Remove 'register' keyword.obrien2002-03-214-46/+46
|
* Also blindly attempt to fix broken world with respect to proc.p_runtimegreen2002-02-221-1/+3
| | | | changes.
* I THINK this fixes 'make world'julian2002-02-131-1/+4
| | | | | | I'll know as soon as I re-import it and compile it.. :-) There is no longer a 'pri' strict in the proc struct. the fields are scattered between the ksegrp and thread in question.
* pre-emptively fix a KSE/M3 problem.julian2002-02-071-7/+14
| | | | | | | Make a slight change so that libkvm reaches the main thread via the linked list, rather than assuming it is in the proc structure. Both conditions are true in -current but only the first will be true in the KSE M3 world.
* Finish cleanup in kvm.c revisions 1.10 and 1.11 -- mark sf (swapfile)ru2002-01-222-6/+4
| | | | | | | | | argument to kvm_open() and kvm_openfiles() as unused. BSD didn't read swap since kvm.c CSRG revision 5.21 (u-area is pageable under new VM. no need to read from swap.) The old !NEWVM code was removed in CSRG revision 5.23 (~ten years ago).
* Adapt to new kernel tsb structure.jake2001-12-291-16/+9
|
* s/processes/files/ inherited from kvm_getprocs(3).ru2001-11-241-1/+1
| | | | | PR: docs/32252 Submitted by: tobez
* Include sys/param.h instead of sys/types.h to get the definition of thejhb2001-11-201-1/+1
| | | | | | MIN() macro. Pointy hat to: rwatson
* o Cleanup of includes: user.h may be a catch-all, but that's notrwatson2001-11-191-4/+3
| | | | | | | entirely desirable. Back out previous commit, and clean up includes to be more minimal. Submitted by: bde
* #include <sys/user.h> rather than individually including a plethorarwatson2001-11-191-4/+1
| | | | | | | of kernel include files, reducing the replication of kernel include dependency information in userland. Obtained from: TrustedBSD Project
* libkvm for sparc64. Only works for kernel memory so far.jake2001-11-181-0/+157
|
* kern.ps_arg_max_cache is a long, not an int. I believe this is half ofpeter2001-11-081-1/+1
| | | | | | what broke ps on ia64. It probably also broke on alpha, but the fallback method of using lseek/read on /proc/*/mem to read ps_strings seems to work there. It doesn't on ia64 yet.
* Implement va->pa translation for kernel virtual addresses. This isdfr2001-10-251-30/+59
| | | | untested - it only seems to be used for crashdumps.
* Partially port kvm to ia64 - virtual to physical translation is incomplete.dfr2001-10-231-0/+167
|
* Backed out "Compensate for header dethreading [mistakes]" mistakes inbde2001-10-131-2/+0
| | | | alpha files too.
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-107-14/+0
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-018-14/+14
|
* Implement __FBSDID()dillon2001-09-169-29/+26
|
* KSE Milestone 2julian2001-09-121-15/+16
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Make ps -M corefile work again. This has been broken for quite some time.peter2001-08-241-6/+11
| | | | kvm_proclist() was aborting when it saw the ithreads with no pgrp.
* Dynamically adjust to the value of KERNBASE in a crashdump, withpeter2001-08-242-4/+24
| | | | a fallback for old kernels without the "kernbase" symbol.
* Mark some functions as __printflike() and/or taking const char * argumentskris2001-08-201-2/+2
| | | | | | instead of char *. MFC after: 2 weeks
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-142-4/+12
|
* mdoc(7) police: fixed the "new sentence" bogons.ru2001-08-101-1/+1
|
* Remove whitespace at EOL.dd2001-07-155-27/+27
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-093-3/+0
|
* Change this to support the new way swap device information is exportedtmm2001-06-011-77/+66
| | | | via sysctl, and clean up some style and (size_t != int) issues.
* o Merge contents of struct pcred into struct ucred. Specifically, add therwatson2001-05-251-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the real uid, only rename it to cr_ruidinfo so as not to conflict with cr_uidinfo, which corresponds to the effective uid. o Remove p_cred from struct proc; add p_ucred to struct proc, replacing original macro that pointed. p->p_ucred to p->p_cred->pc_ucred. o Universally update code so that it makes use of ucred instead of pcred, p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo, cr_{r,sv}{u,g}id instead of p_*, etc. o Remove pcred0 and its initialization from init_main.c; initialize cr_ruidinfo there. o Restruction many credential modification chunks to always crdup while we figure out locking and optimizations; generally speaking, this means moving to a structure like this: newcred = crdup(oldcred); ... p->p_ucred = newcred; crfree(oldcred); It's not race-free, but better than nothing. There are also races in sys_process.c, all inter-process authorization, fork, exec, and exit. o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid; remove comments indicating that the old arrangement was a problem. o Restructure exec1() a little to use newcred/oldcred arrangement, and use improved uid management primitives. o Clean up exit1() so as to do less work in credential cleanup due to pcred removal. o Clean up fork1() so as to do less work in credential cleanup and allocation. o Clean up ktrcanset() to take into account changes, and move to using suser_xxx() instead of performing a direct uid==0 comparision. o Improve commenting in various kern_prot.c credential modification calls to better document current behavior. In a couple of places, current behavior is a little questionable and we need to check POSIX.1 to make sure it's "right". More commenting work still remains to be done. o Update credential management calls, such as crfree(), to take into account new ruidinfo reference. o Modify or add the following uid and gid helper routines: change_euid() change_egid() change_ruid() change_rgid() change_svuid() change_svgid() In each case, the call now acts on a credential not a process, and as such no longer requires more complicated process locking/etc. They now assume the caller will do any necessary allocation of an exclusive credential reference. Each is commented to document its reference requirements. o CANSIGIO() is simplified to require only credentials, not processes and pcreds. o Remove lots of (p_pcred==NULL) checks. o Add an XXX to authorization code in nfs_lock.c, since it's questionable, and needs to be considered carefully. o Simplify posix4 authorization code to require only credentials, not processes and pcreds. Note that this authorization, as well as CANSIGIO(), needs to be updated to use the p_cansignal() and p_cansched() centralized authorization routines, as they currently do not take into account some desirable restrictions that are handled by the centralized routines, as well as being inconsistent with other similar authorization instances. o Update libkvm to take these changes into account. Obtained from: TrustedBSD Project Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
* Removed -I${.CURDIR}/.../sys from CFLAGS.ru2001-05-181-1/+1
|
* Avoid dividing by zero if kd->procbase->ki_structsize is uninitalised.dwmalone2001-05-031-1/+1
| | | | | (I'm testing the numerator rather than the denominator, which looks weird, but is the right thing to do here).
* Do the alpha dance for the change MarkM hath made on the i386 side.mjacob2001-05-021-0/+2
|
* Don't give a warning about "proc size mismatch" if no struct weredwmalone2001-05-011-1/+2
| | | | | | | returned. (This arose on a list about a month ago when someone found bogus warnings if they used "ps -Uuser_with_no_processes".) Approved by: mckusick
* Compensate for header dethreading.markm2001-05-017-0/+14
|
* MAN[1-9] -> MAN.ru2001-03-271-1/+1
|
* Find <libkvm.h> in the source tree. This helps standalone builds.peter2001-03-211-1/+1
|
* Adapt libkvm_getswapinfo() to make use of recently committed vm and swaprwatson2001-02-231-60/+254
| | | | | | | | | | | | | | | | sysctls exporting swap information. When running on a live kernel, the sysctl's will now be used instead of kvm_read, allowing consumers of this interface to run without privilege (setgid kmem). Retain the ability to run on coredumps, or on a kernel using kmem if explicitly pointed at one. A side effect of this change is that kvm_getswapinfo() is faster now in the general case. If the SWIF_DUMP_TREE flag is given (pstat -ss does this), the radix tree walker, which still uses kvm_read in any case, is invoked, and therefore does require privilege. Submitted by: Thomas Moestl <tmoestl@gmx.net> Reviewed by: freebsd-audit
* Catch up to new priority interface.jake2001-02-121-4/+1
|
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-013-18/+44
|
* Add a new item to kinfo_proc: ki_sflag to mirror p_sflag.jhb2001-01-241-1/+2
|
* Revert rev. 1.27. This file only included <sys/select.h> because ofwollman2001-01-201-3/+0
| | | | | brokenness introduced in <sys/select.h> rev. 1.8 which is now OBE. <sys/tty.h> and <sys/selinfo.h> together do the right thing.
* Prepare for mdoc(7)NG.ru2001-01-161-1/+1
|
* Use macro API to <sys/queue.h>ben2000-12-302-4/+4
|
* Change the proc information returned from the kernel so that itmckusick2000-12-122-74/+160
| | | | | | | | | | | | no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced.
OpenPOWER on IntegriCloud