From: Oleg Nesterov <oleg@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: Amnon Shiloh <u3557@miso.sublimeip.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
Chris Evans <scarybeasts@gmail.com>,
David Howells <dhowells@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andrew Morton <akpm@linux-foundation.org>,
u3557@dialix.com.au, security@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: PT_EXITKILL (Was: pdeath_signal)
Date: Thu, 8 Nov 2012 13:44:24 +0100 [thread overview]
Message-ID: <20121108124424.GB20917@redhat.com> (raw)
In-Reply-To: <509BA2B0.2080204@redhat.com>
On 11/08, Pedro Alves wrote:
>
> On 11/07/2012 03:09 PM, Oleg Nesterov wrote:
>
> > OK. Please see the untested/uncompiled (but trivial) patch below
> >
> > - it adds PTRACE_O_EXITKILL. A better name?
> >
> > - A better numeric value? Note that the new option is not equal to
> > the last-ptrace-option << 1. Because currently all options have
> > the event, and the new one starts the eventless group. 1 << 16
> > means we have the room for 8 more events.
> >
> > - it needs the convincing changelog for akpm
>
>
> If this isn't inherited by the ptrace child's children, a fork child can
> end up detached if the tracer dies before it had a chance of setting
> the PTRACE_O_EXITKILL on the new auto-attached child.
It is copied like the other options.
> Which sounds like another argument for PTRACE_O_INHERIT, as in:
> http://sourceware.org/ml/archer/2011-q1/msg00026.html
The point of PTRACE_O_INHERIT would be to attach newly-created threads and
children without causing an event stop and the attendant overhead.
this is another thing, I guess.
> (it sounds like you need to use PTRACE_SEIZE+options too to plug
> the race between PTRACE_ME/PTRACE_ATTACH and
> setting PTRACE_SETOPTIONS).
Agreed, PTRACE_SEIZE+options is better.
> (For completeness, Windows' age old equivalent,
> DebugSetProcessKillOnExit, it a tracer option, not tracee option, though
> that's not as flexible.)
Thanks ;)
Oleg.
next prev parent reply other threads:[~2012-11-08 12:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20121106152050.GA18218@sergelap>
[not found] ` <20121106201428.9D72959201A@miso.sublimeip.com>
2012-11-07 15:09 ` PT_EXITKILL (Was: pdeath_signal) Oleg Nesterov
2012-11-08 6:29 ` Amnon Shiloh
2012-11-08 12:37 ` Oleg Nesterov
2012-11-08 13:03 ` Amnon Shiloh
2012-11-18 20:21 ` [PATCH 0/1] ptrace: introduce PTRACE_O_EXITKILL Oleg Nesterov
2012-11-18 20:21 ` [PATCH 1/1] " Oleg Nesterov
2012-11-08 12:48 ` PF_NO_SIGSTOP (Was: PT_EXITKILL) Oleg Nesterov
2012-11-08 14:05 ` Amnon Shiloh
2012-11-08 12:16 ` PT_EXITKILL (Was: pdeath_signal) Pedro Alves
2012-11-08 12:44 ` Oleg Nesterov [this message]
2012-11-08 13:00 ` Pedro Alves
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=20121108124424.GB20917@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dvlasenk@redhat.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=palves@redhat.com \
--cc=scarybeasts@gmail.com \
--cc=security@kernel.org \
--cc=serge.hallyn@canonical.com \
--cc=u3557@dialix.com.au \
--cc=u3557@miso.sublimeip.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.