All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ptrace: make former thread ID available via PTRACE_GETEVENTMSG after PTRACE_EVENT_EXEC stop (v.2)
Date: Mon, 27 Jun 2011 17:18:27 +0200	[thread overview]
Message-ID: <20110627151827.GA6223@redhat.com> (raw)
In-Reply-To: <20110627135252.GB30101@htj.dyndns.org>

On 06/27, Tejun Heo wrote:
>
> Hello, Oleg.
>
> On Mon, Jun 27, 2011 at 03:47:13PM +0200, Oleg Nesterov wrote:
> > > Do we want to enable this silently?  Wouldn't it be better to make it
> > > dependent on PT_SEIZED?
> >
> > Hmm. Not sure I understand. Why can't PTRACE_SEIZE add PT_TRACE_EXEC
> > (and PT_TRACESYSGOOD) along with PT_SEIZED during attach?
>
> I'm worrying about !PT_SEIZED case.  If we make it solely depend on
> PT_TRACE_EXEC, newer kernels report the old pid while olders ones
> don't

Ah, understood. So you think that the old pid should be only reported
if PT_SEIZED.

May be... Denys, what do you think?

OTOH, it looks simpler if PT_TRACE_EXEC always reports the old pid,
this can't break the applications which do not know about this new
feature.

> and the only way to discover would be either comparing kernel
> version or actually trying it - both aren't too nice.

Fortunately, currently tracehook_report_exec() zeroes ->ptrace_message.
At least this means that anything != 0 means it works.

Oleg.


  reply	other threads:[~2011-06-27 15:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26 19:08 [PATCH] ptrace: make former thread ID available via PTRACE_GETEVENTMSG after PTRACE_EVENT_EXEC stop (v.2) Denys Vlasenko
2011-06-26 20:04 ` Oleg Nesterov
2011-06-27  8:11   ` Tejun Heo
2011-06-27 13:47     ` Oleg Nesterov
2011-06-27 13:52       ` Tejun Heo
2011-06-27 15:18         ` Oleg Nesterov [this message]
2011-06-28  8:25           ` Tejun Heo
2011-06-28 12:30             ` Denys Vlasenko
2011-06-28 12:38               ` Tejun Heo
2011-06-28 16:35                 ` Oleg Nesterov
2011-06-28 16:49                   ` Tejun Heo
2011-06-28  0:31   ` Denys Vlasenko

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=20110627151827.GA6223@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.