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>
Showing
- arch/x86/include/asm/ds.h 9 additions, 0 deletionsarch/x86/include/asm/ds.h
- arch/x86/include/asm/ptrace.h 7 additions, 0 deletionsarch/x86/include/asm/ptrace.h
- arch/x86/kernel/ds.c 11 additions, 0 deletionsarch/x86/kernel/ds.c
- arch/x86/kernel/process_32.c 9 additions, 11 deletionsarch/x86/kernel/process_32.c
- arch/x86/kernel/process_64.c 9 additions, 11 deletionsarch/x86/kernel/process_64.c
- arch/x86/kernel/ptrace.c 40 additions, 10 deletionsarch/x86/kernel/ptrace.c
- include/linux/ptrace.h 22 additions, 0 deletionsinclude/linux/ptrace.h
- kernel/fork.c 2 additions, 0 deletionskernel/fork.c
- kernel/ptrace.c 12 additions, 0 deletionskernel/ptrace.c
Loading
Please register or sign in to comment