public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>,
	Tejun Heo <tj@kernel.org>,
	jan.kratochvil@redhat.com, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org, akpm@linux-foundation.org,
	indan@nul.nu
Subject: Re: execve-under-ptrace API bug (was Re: Ptrace documentation, draft #3)
Date: Thu, 2 Jun 2011 11:57:12 +0100	[thread overview]
Message-ID: <201106021157.13367.pedro@codesourcery.com> (raw)
In-Reply-To: <20110531135116.GA4799@redhat.com>

On Tuesday 31 May 2011 14:51:16, Oleg Nesterov wrote:

> The main problem is: it is not clear do we really want EVENT_EXIT
> in this case. I think we do, Roland thought we do not. OTOH I never
> really the purpose of EVENT_EXIT, but this doesn't matter.
> 
> If we decide we do want this notification (in this case), then we
> need fixes. EVENT_EXIT is not reliable. Say, the thread can exit
> before it dequeues SIGKILL and in this case it doesn't stop.
> Also. If we guarantee EVENT_EXIT in this case, then probably the
> implicit SIGKILL should not wakeup the TASK_TRACED tracee (except
> the new PTRACE_LISTEN case).
> 
> In short: currently I do not know what should be documented. I do
> not know the original intent, I can only see what the code actually
> does. 

Daniel Jacobowitz said when he submitted it:

<http://lkml.indiana.edu/hypermail/linux/kernel/0302.0/1051.html>

"PTRACE_EVENT_EXIT, which triggers in do_exit().  This is useful to quickly
 find out where a program is making an exit syscall from, etc. - it
 triggers before the mm is released, so we can still get backtraces et
 cetera."

That said, GDB was never made to use it:

  /* Do not enable PTRACE_O_TRACEEXIT until GDB is more prepared to support
     read-only process state.  */

-- 
Pedro Alves

  reply	other threads:[~2011-06-02 10:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 19:23 Ptrace documentation, draft #3 Denys Vlasenko
2011-05-25 14:32 ` Tejun Heo
2011-05-30  3:08   ` Denys Vlasenko
2011-05-30  3:28   ` execve-under-ptrace API bug (was Re: Ptrace documentation, draft #3) Denys Vlasenko
2011-05-30  8:49     ` Tejun Heo
2011-05-30 11:40       ` Denys Vlasenko
2011-05-30 14:27         ` Denys Vlasenko
2011-05-30 16:42           ` Oleg Nesterov
2011-05-30 23:43             ` Denys Vlasenko
2011-05-31 13:51               ` Oleg Nesterov
2011-06-02 10:57                 ` Pedro Alves [this message]
2011-06-02 14:59                   ` Denys Vlasenko
2011-06-02 15:12                 ` Denys Vlasenko
2011-05-30 18:11           ` Denys Vlasenko
2011-05-30 13:56       ` Oleg Nesterov
2011-05-30 13:49     ` Oleg Nesterov
2011-05-30 13:35 ` Ptrace documentation, draft #3 Oleg Nesterov

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=201106021157.13367.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=akpm@linux-foundation.org \
    --cc=indan@nul.nu \
    --cc=jan.kratochvil@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vda.linux@googlemail.com \
    /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