Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1475095
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach |
| Date | 2016-09-02 14:30 +0200 |
| Message-ID | <scVLA-7Si-31@gated-at.bofh.it> (permalink) |
| References | <scDlE-4lf-57@gated-at.bofh.it> <scHph-70l-81@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 09/01, Ales Novak wrote: > > On __ptrace_detach(), called from do_exit()->exit_notify()-> > forget_original_parent()->exit_ptrace(), the TIF_SYSCALL_TRACE in > thread->flags of the tracee is not cleared up. This results in the > tracehook_report_syscall_* being called (though there's no longer a > tracer listening to that) upon its further syscalls. > > Example scenario - attach "strace" to a running process and kill it (the > strace) with SIGKILL. You'll see that the syscall trace hooks are still > being called. To clarify, this patch can't really fix the problem(s), The tracee can be killed by SIGTRAP in this case. Again, we do not care too much, a lot of bad things can happen if the tracer dies. But I agree, this patch makes the things better for free, Acked-by: Oleg Nesterov <oleg@redhat.com>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach Ales Novak <alnovak@suse.cz> - 2016-09-01 16:00 +0200
Re: [PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach Oleg Nesterov <oleg@redhat.com> - 2016-09-01 18:50 +0200
Re: [PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach Ales Novak <alnovak@suse.cz> - 2016-09-01 23:10 +0200
[PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach Ales Novak <alnovak@suse.cz> - 2016-09-01 23:10 +0200
Re: [PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach Oleg Nesterov <oleg@redhat.com> - 2016-09-02 14:30 +0200
csiph-web