elad
eb3ad821f0
PR/35506: Chuck Silvers: ps doesn't work on crash dumps, libkvm doesn't
...
know about kauth
Implemented _kvm_convertcred() to handle copying kauth_cred_t to userspace
and converting it to the appropriate 'struct eproc' members ('pcred' and
'ucred' respectively).
Okay mlelstv@.
2007-02-06 21:21:51 +00:00
chs
f4850e655c
fill in p_stat for crashdumps like the kernel does for the sysctl.
2007-01-28 21:31:13 +00:00
yamt
daa6d99693
kvm_getproc2: retry on ENOMEM.
...
it happens when the number of processes are changed in the mean time.
2006-12-31 16:20:18 +00:00
yamt
060eacec48
#include a necessary header directly, rather than via user.h.
2006-05-11 12:00:20 +00:00
christos
0213791d0c
1. Eliminate some unnecessary to kvm_{m,re}alloc.
...
2. Don't malloc/free procbase/procbase2/lwpbase continuously. Keep track
of the size, and only do it if necessary.
3. Write a macro to malloc/realloc and set the size of members so that it
is done correctly. Previous open coded version in kvm_file.c always
set the length, which is incorrect.
4. Remove bogus check against INT_MAX.
5. use NULL to initialize pointers instead of 0.
2006-02-16 20:48:42 +00:00
yamt
6cae8c8d70
as swap is now optional, ENXIO on /dev/drum is normal.
2005-07-30 16:32:29 +00:00
jmc
2c8974a914
Fix fallout from vm_anon changes
2005-05-11 17:41:52 +00:00
toshii
ac142bbda7
Fix typos.
2004-05-12 17:20:01 +00:00
atatat
42d379d041
Use new PTRTOUINT64() macro instead of local PTRTOINT64() macro.
2004-02-19 03:57:56 +00:00
christos
895d7dee51
zero out nl, from Todd Miller. thanks!
2003-11-17 20:41:54 +00:00
wiz
37ac1db454
available, not avaliable. From miod@openbsd.
2003-09-29 09:50:21 +00:00
agc
eb7c1594f1
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
christos
9d952b3742
remove scanning of deadproc, since zombproc should contain all the processes
...
in deadproc according to the comment in kern_proc.c. deadproc is not a
struct proclist anymore, so it would require more work to scan anyway, and
this is unnecessary.
2003-03-28 14:01:32 +00:00
ross
f80c89ab02
fix LP64 and other warnings
2003-03-20 22:53:12 +00:00
dsl
9be8ac5294
Alternative pid/proc allocater, removes all searches associated with pid
...
lookup and allocation, and any dependency on NPROC or MAXUSERS.
NO_PID changed to -1 (and renamed NO_PGID) to remove artificial limit
on PID_MAX.
As discussed on tech-kern.
2003-03-19 11:36:32 +00:00
atatat
40f3045957
Add p_svuid and p_svgid to kinfo_proc2. Populate them in the kernel
...
and in libkvm. Then teach ps how to show them to you.
Also, teach ps how to show the names for all the uids, the rest of the
group numbers, and the "group access list".
2003-03-01 05:41:55 +00:00
enami
b7577d634c
Use _kvm_freeprocs() rather than free() so that kvm_close() won't
...
free already free'ed region.
2003-02-26 23:05:53 +00:00
enami
30fca248b5
Cosmetic changes.
2003-02-26 23:04:37 +00:00
christos
45103cd2c0
delint (unsigned long long) -> (unsigned long) casts.
2003-02-02 02:29:59 +00:00
thorpej
c62a74e6d5
Merge the nathanw_sa branch.
2003-01-18 10:32:11 +00:00
jdolecek
10b43f7cd4
kvm_doargv2(): make sure the string ends with '\0'; sysctl() might not
...
properly end it if the data would be longer than the supplied
buffer
This fixes lib/11467 by SAITOH Masanobu and lib/12389, maybe also
lib/12439.
2001-03-24 10:02:45 +00:00
jdolecek
233eee3634
Minor fix to kvm_doargv2() - if the kd->argv is reallocated, reinitialize
...
'ap' too. This doesn't seem to have any effect either way; seems like the
condition is never met?
2001-03-24 09:54:52 +00:00
jdolecek
38f7c1d48b
adapt to latest struct proc, struct sigacts, struct sigctx changes
2000-12-22 23:11:19 +00:00
enami
3cc984aab8
Make this file compiles on alpha.
2000-10-05 03:21:01 +00:00
sommerfeld
f9d3ae0fbb
format-string audit cleanups
2000-10-04 16:11:27 +00:00
christos
4678acf4ff
revert part of previous; u_long -> uintptr_t now that uintptr_t is u_long.
2000-07-16 02:20:03 +00:00
christos
2d9658e4f7
de-lint. Most important problem was the cast from pointer to uintptr_t to
...
u_int64_t; changed the uintptr_t to u_long.
2000-07-16 02:04:11 +00:00
mrg
3b8ac18da2
<vm/vm.h> -> <uvm/uvm_extern.h>
2000-06-29 06:34:22 +00:00
mrg
10a6db97ee
remove redundant vm includes
2000-06-26 15:34:55 +00:00
tron
be033824b6
Use "NULL" instead of "0" in pointer assignments and comparisons.
2000-06-04 23:03:27 +00:00
thorpej
d36becd30f
p_schedflags doesn't exist anymore; just set it to zero for now,
...
although we'll be able to get the correct info through kmem
groveling later.
2000-05-27 01:03:00 +00:00
simonb
a9f690ae2a
Add kvm interface to the new sysctls:
...
kvm_getproc2() -> sysctl(KERN_PROC2)
kvm_getargv2() -> sysctl(KERN_PROC_ARGS, KERN_PROC_ARGV)
kvm_getenvv2() -> sysctl(KERN_PROC_ARGS, KERN_PROC_ENV)
Add new KVM_NO_FILES flag to kvm_open*() - set up enough state to
use the above calls without having to open any kernel files.
XXX: kvm_getprocs.3 and kvm_open.3 to be updated soon.
2000-05-26 02:42:21 +00:00
simonb
21bd11df50
Fill in e_sid when building the eproc from a crash dump.
2000-04-15 15:52:52 +00:00
chs
e0acecf117
in kvm_getprocs(), check for error from kvm_deadprocs().
2000-01-15 19:16:32 +00:00
simonb
f68ec00b50
More trailing white space.
1999-07-02 15:28:49 +00:00
mrg
d2397ac5f7
completely remove Mach VM support. all that is left is the all the
...
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
mrg
5f0216fd45
catch up with the UVM amap changes.. tested by nathanw@mit.edu, thanks.
1999-01-25 03:38:57 +00:00
christos
cc7ffa0da4
Remove lint
1998-09-27 18:15:58 +00:00
thorpej
f45860f9b4
Adjust for the reaper process.
...
XXX Would really like to use proclists[] here, but not right now.
1998-09-09 00:31:25 +00:00
mycroft
3748c7c959
Assign my copyrights to TNF.
1998-08-15 09:16:27 +00:00
perry
a843f0f8a5
bzero->memset, bcopy->memcpy, bcmp->memcmp
1998-08-10 02:43:08 +00:00
thorpej
55c7ea7c28
Use pread(2) and pwrite(2) rather than lseek(2)/{read,write}(2).
1998-06-30 20:29:39 +00:00
chs
a6f9c2eab5
add UVM support.
1998-02-12 06:55:29 +00:00
mrg
0e91aec6e2
while it is still kinda broken, at least let it compile -DUVM...
1998-02-11 12:00:37 +00:00
perry
0b7831a37b
remove obsolete register declarations
1998-02-03 19:12:13 +00:00
drochner
cda7302736
Fix compiler warnings.
1997-08-15 17:52:45 +00:00
mikel
b4119f6b37
use <sys/cdefs.h> __RCSID() macro
1997-08-15 02:21:56 +00:00
gwr
99694d7c30
Instead of: USRSTACK, VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS
...
Use these: kd->usrstack, kd->min_uva, kd->max_uva
1997-08-12 16:30:15 +00:00
mikel
7241b0ff92
fix some printf() formats
1997-06-20 05:18:22 +00:00
thorpej
346e67f879
RCS id police.
1996-03-18 22:33:07 +00:00