summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add `_PATH_DEVZERO'.obrien2000-12-091-1/+2
| | | | Use _PATH_* where where possible.
* remove unneded sys/ucred.h includealfred2000-11-301-1/+0
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-104-4/+0
|
* Good, fixing the header showed incorrect usage of it! #define _KERNELgreen2000-08-061-0/+3
| | | | here for the include of sys/select.h.
* Limit the amount of data copied to the error buffer to _POSIX2_LINE_MAX.kris2000-08-041-2/+2
| | | | This is the documented size which the user-provided buffer must be.
* Remove obsolete reference to /var/db/kvm_kernel.dbkris2000-05-071-4/+0
| | | | Reviewed by: peter
* Introduce .Lb macro to libkvm manpages.phantom2000-04-229-1/+19
| | | | Use .Pa macro for "enlighting" path
* Remove unneeded #includejlemon2000-04-161-1/+0
|
* Change the return value of kvm_read/kvm_write to be -1 on error, tonectar2000-03-311-6/+6
| | | | | | | | match the documented interface. Previously it returned 0 on error. PR: bin/10511
* -Wall, which caught a real bug where buflen wasn't being set properly.obrien2000-03-273-16/+16
|
* Correct an error message presumably as a result of cut/paste.peter2000-02-181-1/+1
| | | | kvm_getfiles() referred to itself as kvm_getprocs().
* Repair misspelled `.Pp' directive:chris2000-02-141-1/+1
| | | | .PP -> .Pp
* Replace beforeinstall target with new variables used by .mk system.rgrimes2000-01-141-4/+1
| | | | Reviewed by: marcel, and make world
* Fixed missing includes in synopsis. <sys/file.h> went missing when KERNELbde2000-01-051-2/+3
| | | | | was not updated to _KERNEL. Actually including <sys/file.h> as specified never actually worked, since a prerequisite was missing.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Use kldsym(2) to lookup symbol values. This avoids the kvm_mkdb jugglingpeter1999-12-2711-129/+60
| | | | | | and is module aware. Yes, this means that kvm_nlist(3) will find symbols in loaded modules. The emulation of the nlist struct is pretty crude but seems to work well enough for all the users in the tree that I found.
* Report swapdevices as cdevs rather than bdevs.phk1999-11-291-1/+1
| | | | Remove unused dev2budev() function.
* Introduce commandline caching in the kernel.phk1999-11-161-0/+48
| | | | | | | | | | | This fixes some nasty procfs problems for SMP, makes ps(1) run much faster, and makes ps(1) even less dependent on /proc which will aid chroot and jails alike. To disable this facility and revert to previous behaviour: sysctl -w kern.ps_arg_cache_limit=0 For full details see the current@FreeBSD.org mail-archives.
* Delete the sf (swapfile) arg to an internal function that used to point topeter1999-10-111-6/+8
| | | | | /dev/drum but has not been used for a LONG time. Add $FreeBSD$
* Install <kvm.h> from here (after repo copy) so it's all in one package.peter1999-10-041-0/+5
|
* $Id$ -> $FreeBSD$peter1999-08-2811-11/+11
|
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Don't open the swap file. The open descriptor for it hasn't been usedbde1999-08-252-9/+1
| | | | | | for over 5 years since we switched to using procfs for kvm_uread(). This cleanup was motivated by recent breakage of the default swap file (/dev/drum) when swapon() has not been called.
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-128-0/+8
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Tidy up references to <sys/rlist.h> and support for the old swap managementpeter1999-05-111-88/+9
| | | | that went away in January.
* Oops, the previous log message should have been:bde1999-04-101-1/+1
| | | | | | | | Include <machine/ansi.h> so that this file is self-sufficient again. Rev.1.6 doesn't do this as claimed unless <nlist.h> has nonstandard pollution. Cleaned up includes.
* Declare mkstemps().bde1999-04-091-4/+5
|
* make libkvm capable of dealing with a crashdump on alphasgallatin1999-03-121-50/+65
| | | | Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Don't use u_long in the synopsis, since u_long is not part of the kvmbde1999-03-051-2/+2
| | | | interface.
* From rev. 1.12 of usr.sbin/pstat/pstat.c by phk:dt1999-02-141-3/+6
| | | | | Reflect the fact that we do not swap on the first <dmmax> blocks of a swapdev, to protect disklabels and other such magic stuff.
* Handle case where no swap is configureddillon1999-02-061-3/+10
|
OpenPOWER on IntegriCloud