Commit Graph

15 Commits

Author SHA1 Message Date
Warner Losh
86cb007f9f /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
David Schultz
46ec41ecb4 Fix the following race:
1. Process p1 is currently being swapped in.
  2. Process p2 calls linux_ptrace(PTRACE_GETFPXREGS, p1_pid, ...)
  3. After acquiring a reference to FIRST_THREAD_IN_PROC(p1),
     p2 blocks in faultin() while p1 finishes being swapped in.
     This means p2 won't get back the lock on p1 until after p1's
     threads are runnable.
  4. After p1 is swapped in, the first thread in p1 exits.
  5. p2 now uses its dangling reference to p1's first thread.
2004-10-01 05:01:00 +00:00
Stefan Farfeleder
5908d366fb Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
David E. O'Brien
27e0099c4a Use __FBSDID(). 2003-06-02 16:56:40 +00:00
John Baldwin
eeec6bab2e Prefer the proc lock to sched_lock when testing PS_INMEM now that it is
safe to do so.
2003-04-22 20:01:56 +00:00
John Baldwin
f265002902 Sync up with changes to ptrace() and use P_SHOULDSTOP instead of
a duplicate P_TRACED check.

Submitted by:	marcel
2003-04-15 16:29:39 +00:00
Dag-Erling Smørgrav
1d062e2be8 Clean up whitespace and remove register keyword. 2003-03-03 09:17:12 +00:00
Dag-Erling Smørgrav
4b7ef73d71 More caddr_t removal, in conjunction with copy{in,out}(9) this time.
Also clean up some egregious casts and incorrect use of sizeof.
2003-03-03 09:14:26 +00:00
Bruce Evans
e9a6d3b44c Removed unused includes. Sorted includes. This is part of removing
includes of <sys/user.h> for its pollution only.  <sys/user.h> wasn't
even used for its pollution here.
2002-09-15 17:45:10 +00:00
Bruce Evans
8a1a68fa84 Include <machine/pcb.h> instead of depending on namespace pollution in
<sys/user.h>.
2002-09-07 14:32:22 +00:00
Peter Wemm
f7749f924c Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions)
if compiling with I686_CPU as a target.  CPU_DISABLE_SSE will prevent
this from happening and will guarantee the code is not compiled in.

I am still not happy with this, but gcc is now generating code that uses
these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
2002-09-07 07:02:12 +00:00
Ian Dowse
012e544f12 Split up ptrace() into a wrapper that does the copying to and from
user space and a kern_ptrace() implementation. Use the kern_*()
version in the Linux emulation code to remove more stack gap uses.

Approved by:	des
2002-09-05 01:02:50 +00:00
Julian Elischer
e602ba25fd Part 1 of KSE-III
The ability to schedule multiple threads per process
(one one cpu) by making ALL system calls optionally asynchronous.
to come: ia64 and power-pc patches, patches for gdb, test program (in tools)

Reviewed by:	Almost everyone who counts
	(at various times, peter, jhb, matt, alfred, mini, bernd,
	and a cast of thousands)

	NOTE: this is still Beta code, and contains lots of debugging stuff.
	expect slight instability in signals..
2002-06-29 17:26:22 +00:00
Marcel Moolenaar
1b5aeb4347 o Fix race condition caused by doing ptrace() for permission
checking, followed by a lookup of the process. Do not call
   ptrace() for permission checking, but do it inline.
   Spotted by: rwatson

o  While here, copy-in arguments before we lock. This fixes
   a possible permanent lock.

Reviewed by: rwatson
2002-05-19 19:35:36 +00:00
Marcel Moolenaar
6b5a528e88 Sparkling new implementation of linux_ptrace. Slight tweaking by
yours truly.

PR: 33299
Submitted by: Alexander N. Kabaev <ak03@gte.com>
2002-05-19 01:21:55 +00:00