kernel-ark/include
Eric W. Biederman 260ea10132 [PATCH] ptrace: document the locking rules
After a lot of reading the code and thinking about how it behaves I have
managed to figure out what the current ptrace locking rules are.  The
current code is in much better that it appears at first glance.  The
troublesome code paths are actually the code paths that violate the current
rules.

ptrace uses simple exclusive access as it's locking.  You can only touch
task->ptrace if the task is stopped and you are the ptracer, or if the task
is running and are the task itself.

Very simple, very easy to maintain.  It just needs to be documented so
people know not to touch ptrace from elsewhere.

Currently we do have a few pieces of code that are in violation of this
rule.  Particularly the core dump code, and ptrace_attach.  But so far the
code looks fixable.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:43:03 -07:00
..
acpi
asm-alpha
asm-arm
asm-arm26
asm-cris
asm-frv [PATCH] frv: clean frv unistd.h 2006-06-23 07:42:55 -07:00
asm-generic
asm-h8300
asm-i386 [PATCH] x86: compile fix for asm-i386/alternatives.h 2006-06-23 07:42:59 -07:00
asm-ia64 [PATCH] page migration: sys_move_pages(): support moving of individual pages 2006-06-23 07:42:53 -07:00
asm-m32r
asm-m68k [PATCH] m68k: clean up uaccess.h 2006-06-23 07:43:01 -07:00
asm-m68knommu [PATCH] m68k: ptrace.h typo fix 2006-06-23 07:43:01 -07:00
asm-mips [PATCH] Au1550/1200: add missing PSC #define's, make OSS driver use the proper ones 2006-06-23 07:42:56 -07:00
asm-parisc
asm-powerpc
asm-ppc
asm-s390
asm-sh
asm-sh64
asm-sparc
asm-sparc64
asm-um
asm-v850
asm-x86_64 [PATCH] sys_move_pages: x86_64 support 2006-06-23 07:42:53 -07:00
asm-xtensa [PATCH] xtensa: remove verify_area macros 2006-06-23 07:43:02 -07:00
keys
linux [PATCH] ptrace: document the locking rules 2006-06-23 07:43:03 -07:00
math-emu
media
mtd
net
pcmcia
rdma
rxrpc
scsi
sound
video