From: Oleg Nesterov <oleg@redhat.com>
To: Ales Novak <alnovak@suse.cz>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach
Date: Fri, 2 Sep 2016 14:25:39 +0200 [thread overview]
Message-ID: <20160902122538.GD26495@redhat.com> (raw)
In-Reply-To: <1472759493-20554-1-git-send-email-alnovak@suse.cz>
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>
prev parent reply other threads:[~2016-09-02 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 13:54 [PATCH] ptrace: clear TIF_SYSCALL_TRACE on ptrace detach Ales Novak
2016-09-01 16:46 ` Oleg Nesterov
2016-09-01 19:50 ` Ales Novak
2016-09-01 19:51 ` Ales Novak
2016-09-02 12:25 ` Oleg Nesterov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160902122538.GD26495@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alnovak@suse.cz \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).