#
ab92666f |
| 01-Jun-2000 |
simonb <simonb@NetBSD.org> |
Fix a possible kernel memory leak - if the cmdline of a process was requested after it had started to exit but before it became a zombie a page of kernel memory wouldn't be free'd.
|
#
0c59b3c3 |
| 16-May-2000 |
simonb <simonb@NetBSD.org> |
Apply patch from Robert Elz in PR kern/10113. This fixes two problems with procfs's cmdline - from the PR:
The cmdline implementation in procfs is bogus. It's possible that part of the fix is a
Apply patch from Robert Elz in PR kern/10113. This fixes two problems with procfs's cmdline - from the PR:
The cmdline implementation in procfs is bogus. It's possible that part of the fix is a workaround of a UVM problem - that is, when (internally) accessing the top of the process VM (the end of the args) a request for I/0 of a PAGE_SIZE'd block starting at less than a PAGE_SIZE from the end of the mem space returns EINVAL rather than the data that is available. Whether this is a bug in UVM or not depends upon how it is defined to work, and I was unable to determine that. (Simon Burge found that problem, and provided the basis of the workaround/fix).
Then, the cmdline function is unable to read more than one page of args, and a good thing too, as the way it is written attempting to get more than that would reference into lala land.
And, on an attempt to read a lot of data when the above is fixed, most of the data won't be returned, only the final block of any read.
Tested on alpha, pmax, i386 and sparc.
show more ...
|
#
2715b812 |
| 22-Jul-1999 |
thorpej <thorpej@NetBSD.org> |
Rework the process exit path, in preparation for making process exit and PID allocation MP-safe. A new process state is added: SDEAD. This state indicates that a process is dead, but not yet a zomb
Rework the process exit path, in preparation for making process exit and PID allocation MP-safe. A new process state is added: SDEAD. This state indicates that a process is dead, but not yet a zombie (has not yet been processed by the process reaper).
SDEAD processes exist on both the zombproc list (via p_list) and deadproc (via p_hash; the proc has been removed from the pidhash earlier in the exit path). When the reaper deals with a process, it changes the state to SZOMB, so that wait4 can process it.
Add a P_ZOMBIE() macro, which treats a proc in SZOMB or SDEAD as a zombie, and update various parts of the kernel to reflect the new state.
show more ...
|
#
ce5ede55 |
| 27-Apr-1999 |
thorpej <thorpej@NetBSD.org> |
Fix excessive memory usage, and fix handling of SZOMB processes. PR #7164, Jaromir Dolecek.
|
#
d2397ac5 |
| 24-Mar-1999 |
mrg <mrg@NetBSD.org> |
completely remove Mach VM support. all that is left is the all the header files as UVM still uses (most of) these.
|
#
195403fe |
| 13-Mar-1999 |
thorpej <thorpej@NetBSD.org> |
malloc the arg temporary buffer, rather than declaring it as an automatic array of ARG_MAX size. ARG_MAX is currently 256k, which causes a rather serious stack overflow (kernel stacks are not very l
malloc the arg temporary buffer, rather than declaring it as an automatic array of ARG_MAX size. ARG_MAX is currently 256k, which causes a rather serious stack overflow (kernel stacks are not very large, usually 8k).
Fixes memory corruption problems observed after accessig /proc/1/cmdline during tests. Problem in my case manifested itself as massive lossage in ffs_sync(), resulting in a crash, and sometimes, pooched file systems.
XXX This could, and probably should, be rewritten to use a much smaller temporary buffer, and a loop around uiomove().
show more ...
|
#
4865d6ff |
| 13-Mar-1999 |
thorpej <thorpej@NetBSD.org> |
Some changes to `cmdline' to make it work properly: - Don't error out on P_SYSTEM or SZOMB processes; instead, do what ps(1) would do, i.e. the p_comm in parenthesis. - Use uvm_io() (or procfs_rwme
Some changes to `cmdline' to make it work properly: - Don't error out on P_SYSTEM or SZOMB processes; instead, do what ps(1) would do, i.e. the p_comm in parenthesis. - Use uvm_io() (or procfs_rwmem() if !UVM) to read the target process's psstrings and argument vector. Using copyin() is problematic, because it operates on the current processes! That is, the old code would always get the `cmdline' of the process reading the file, not that of the target process.
show more ...
|
#
8aa2fc5a |
| 12-Mar-1999 |
christos <christos@NetBSD.org> |
PR/7143: Jaromir Docelek: Add procfs/cmdline from Linux emulation
|