Hi Again,
> Or the child can check getppid() == saved_parent_pid after PTRACE_TRACEME.
In fact that's what I did when I tested the new option - the child ran:
volatile long ready = 0;
int saved_parent_pid = getpid();
if(!(son = fork())
{
On 11/08/2012 12:44 PM, Oleg Nesterov wrote:
> On 11/08, Pedro Alves wrote:
>> 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
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
Hi Amnon,
On 11/08, Amnon Shiloh wrote:
>
> Thanks for the patch, I tried it and it works nicely!
OK, thanks. I'll wait for other comments a bit and then send
the patch to Andrew.
> Also, I just noticed that this new option (PTRACE_O_EXITKILL) is not
> safe with ptrace(PTRACE_TRACEME)+execve,
On 11/07/2012 03:09 PM, Oleg Nesterov wrote:
>> > > > > What I would IDEALLY like to have is a call, probably a ptrace
>> > > > > option,
>> > > > > where the parent can request: "If I am ever to terminate or be
>> > > > > killed,
>> > > > > then my ptraced son MUST die as well".
>> > >
>> > >
On 11/07/2012 03:09 PM, Oleg Nesterov wrote:
What I would IDEALLY like to have is a call, probably a ptrace
option,
where the parent can request: If I am ever to terminate or be
killed,
then my ptraced son MUST die as well.
Perhaps this makes sense...
Chris,
Hi Amnon,
On 11/08, Amnon Shiloh wrote:
Thanks for the patch, I tried it and it works nicely!
OK, thanks. I'll wait for other comments a bit and then send
the patch to Andrew.
Also, I just noticed that this new option (PTRACE_O_EXITKILL) is not
safe with ptrace(PTRACE_TRACEME)+execve,
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
On 11/08/2012 12:44 PM, Oleg Nesterov wrote:
On 11/08, Pedro Alves wrote:
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
Hi Again,
Or the child can check getppid() == saved_parent_pid after PTRACE_TRACEME.
In fact that's what I did when I tested the new option - the child ran:
volatile long ready = 0;
int saved_parent_pid = getpid();
if(!(son = fork())
{
Dear Oleg,
Thanks for the patch, I tried it and it works nicely!
(except that I have no "include/uapi/" directory for
"include/uapi/linux/ptrace.h", so I applied that part
of the patch to "include/linux/ptrace.h" as well).
Also, I just noticed that this new option (PTRACE_O_EXITKILL) is not
(add lkml/cc's)
On 11/07, Amnon Shiloh wrote:
>
> > Quoting Oleg Nesterov (o...@redhat.com):
> > >
> > > On 11/06, Amnon Shiloh wrote:
> > > >
> > > > What I would IDEALLY like to have is a call, probably a ptrace option,
> > > > where the parent can request: "If I am ever to terminate or be
(add lkml/cc's)
On 11/07, Amnon Shiloh wrote:
Quoting Oleg Nesterov (o...@redhat.com):
On 11/06, Amnon Shiloh wrote:
What I would IDEALLY like to have is a call, probably a ptrace option,
where the parent can request: If I am ever to terminate or be killed,
then my
Dear Oleg,
Thanks for the patch, I tried it and it works nicely!
(except that I have no include/uapi/ directory for
include/uapi/linux/ptrace.h, so I applied that part
of the patch to include/linux/ptrace.h as well).
Also, I just noticed that this new option (PTRACE_O_EXITKILL) is not
safe with
14 matches
Mail list logo