]> git.baikalelectronics.ru Git - kernel.git/commit
x86, bts: add fork and exit handling
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 19 Dec 2008 14:10:24 +0000 (15:10 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 20 Dec 2008 08:15:46 +0000 (09:15 +0100)
commit8c271b5915e9dd6eaedc0155bfac3594a9491463
tree738a07a8b4b22f7bb8ec2029c9ea9c635db6c62a
parente2223a0d3126a5301c526c3380433840334a14c0
x86, bts: add fork and exit handling

Impact: introduce new ptrace facility

Add arch_ptrace_untrace() function that is called when the tracer
detaches (either voluntarily or when the tracing task dies);
ptrace_disable() is only called on a voluntary detach.

Add ptrace_fork() and arch_ptrace_fork(). They are called when a
traced task is forked.

Clear DS and BTS related fields on fork.

Release DS resources and reclaim memory in ptrace_untrace(). This
releases resources already when the tracing task dies. We used to do
that when the traced task dies.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/ds.h
arch/x86/include/asm/ptrace.h
arch/x86/kernel/ds.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/ptrace.c
include/linux/ptrace.h
kernel/fork.c
kernel/ptrace.c