summaryrefslogtreecommitdiff
path: root/sys/kern/sys_process.c
AgeCommit message (Collapse)Author
2003-11-04Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.dsl
Remove p_raslock and rename p_lwplock p_lock (one lock is enough). Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS. Avoid unpredictable branch in i386 locore.S (pad fields left in struct proc to avoid kernel bump)
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-28Pass lwp pointers throughtout the kernel, as required, so that the lwpid candarrenr
be inserted into ktrace records. The general change has been to replace "struct proc *" with "struct lwp *" in various function prototypes, pass the lwp through and use l_proc to get the process pointer when needed. Bump the kernel rev up to 1.6V
2003-05-20Add a ptrace interface for iterating over and collecting informationnathanw
about LWPs. Loosely inspired by a similar interface in HP-UX ttrace(2).
2003-02-07Adapt to the new conventions of proc_unstop() and don't try to callnathanw
setrunnable(NULL).
2003-01-23PT_DUMPCORE support.christos
2003-01-18Merge the nathanw_sa branch.thorpej
2002-08-28Attempt to protect restartable atomic sequences of a traced processgmcgarry
being written to. Breakpoints aren't good in a RAS. This test isn't infallible, since we can't protect memory which will be registered as a RAS in the future. Also, set the PC before attempting to single-step, so we can backout from single-stepping. Just in case we try to single-step into a RAS.
2002-08-25Fix some signed/unsigned comparison warnings from GCC 3.3.thorpej
2002-07-25Make sure that the pointer to old parent process for ptraced childrenjdolecek
gets reset properly when the old parent exits before the child. A flag is set in old parent process when the child is reparented in ptrace(2). If it's set when process is exiting, all running processes have their 'old parent process' pointer checked and reset if appropriate. Also change to use 'struct proc *' pointer directly, rather than pid_t. This fixes security/14444 by David Sainty. Reviewed by Christos Zoulas.
2002-05-09Move code shared by procfs and the kernel proper out of procfs andthorpej
into the kernel proper (renaming functions from procfs_* to process_*).
2002-03-17Add a new ptrace request, PT_IO, as proposed by Artur Grabowskithorpej
on the <bsd-api-discuss@wasabisystems.com> mailing list. PT_IO is a more general inferior I/D space I/O mechanism. FreeBSD and OpenBSD have also added PT_IO. From lha@stacken.kth.se, kern/15945.
2002-01-11Fix a ptrace/execve race that could be used to modify the child process'schristos
image during execve. This is a security issue because one can do that to setuid programs... From FreeBSD.
2001-12-05* Allow machine-dependent code to specify hooks for ptrace(2)thorpej
(__HAVE_PTRACE_MACHDEP) and procfs (__HAVE_PROCFS_MACHDEP). These changes will allow platforms like x86 (XMM) and PowerPC (AltiVec) to export extended register sets in a sane manner. * Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep ptrace request space). * Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via /proc/N/xmmregs in procfs.
2001-11-12add RCSIDslukem
2001-07-22seperate -> separatewiz
2001-06-13The trace_req() function is a no-op; garbage collect it.nathanw
2001-03-17fix typo in commentpooka
2001-01-17Adapt for procfs_valid* argument change.fvdl
2000-09-24Prevent ptrace on system processes. Avoids panic when attempting to ptrace ↵erh
pid 0, which has no parent.
2000-08-20Add a lock around the scheduler, and use it as necessary, includingthorpej
in the non-MULTIPROCESSOR case (LOCKDEBUG requires it). Scheduler lock is held upon entry to mi_switch() and cpu_switch(), and cpu_switch() releases the lock before returning. Largely from Bill Sommerfeld, with some minor bug fixes and machine-dependent code hacking from me.
2000-07-28Fix LP64BE bug.eeh
2000-06-27remove include of <vm/vm.h>mrg
1999-03-25Disallow tracing of processes unless tracer's root directory is at orsommerfe
above tracee's root directory.
1999-03-24completely remove Mach VM support. all that is left is the all themrg
header files as UVM still uses (most of) these.
1998-02-10- add defopt's for UVM, UVMHIST and PMAP_NEW.mrg
- remove unnecessary UVMHIST_DECL's.
1998-02-05initial import of the new virtual memory system, UVM, into -current.mrg
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some minor portions derived from the old Mach code. i provided some help getting swap and paging working, and other bug fixes/ideas. chuck silvers <chuq@chuq.com> also provided some other fixes. this is the rest of the MI portion changes. this will be KNF'd shortly. :-)
1997-04-28Reinstate P_FSTRACE, with different semantics:mycroft
* Never send a SIGCHLD to the parent if P_FSTRACE is set. * Do not permit mixing ptrace(2) and procfs; only permit using the one that was attached.
1997-04-28When checking for init, compare against initproc, rather than comparing themycroft
PID. No functional difference.
1996-05-15fix obscure problem involving ptrace of inittls
1996-02-09More proto fixeschristos
1996-02-04First pass at prototypingchristos
1995-10-07Prefix names of system call implementation functions with `sys_'.mycroft
1995-09-19Make system calls conform to a standard prototype and bring thosethorpej
prototypes into scope.
1995-08-13Lock the process in core before operating on it.mycroft
1995-06-08Fix various signal handling bugs:mycroft
* If we got a stopping signal while already stopped with the same signal, the second signal would sometimes (but not always) be ignored. * Signals delivered by the debugger always pretended to be stopping signals. * PT_ATTACH still didn't quite work right.
1995-06-05If necessary, wake up the child during attach so we always get a SIGCHLD.mycroft
1995-02-09Omit the call to process_sstep() if PT_STEP is not defined.mycroft
1995-02-08undo a part of the last change that mistakenly required PT_STEP.cgd
(i simply undid that part of the change.) also, fix a tyop.
1995-02-03Make attach/detach more safe.mycroft
1995-01-26Remove PT_{READ,WRITE}_U.mycroft
1994-10-30be more careful with types, also pull in headers where necessary.cgd
1994-10-20update for new syscall args description mechanismcgd
1994-09-24Correct test for already being traced.mycroft
1994-09-14ugly (#ifdef) hack to fix m68k alignment differences, etc. Eventually,cgd
should be done with a 'natual alignment' macro, or some such.
1994-08-23replace "ctob(UPAGES)" and "UPAGES * NBPG" with "USPACE"deraadt
(cvs dumped core during previous commit...)
1994-08-21kill errant spacescgd
1994-08-15Minor update to a comment.mycroft
1994-08-15replace with a completely rewritten version, based around the 4.4BSDcgd
procfs. Now the author of the old version will stop complaining that we're using his code.