[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51C23C7E.8000400@redhat.com>
Date: Thu, 20 Jun 2013 01:19:26 +0200
From: Denys Vlasenko <dvlasenk@...hat.com>
To: Oleg Nesterov <oleg@...hat.com>
CC: linux-kernel@...r.kernel.org,
Jan Kratochvil <jan.kratochvil@...hat.com>,
"Dmitry V. Levin" <ldv@...linux.org>
Subject: Re: [PATCH] ptrace: make PTRACE_DETACH work on non-stopped tracees.
On 06/19/2013 06:32 PM, Oleg Nesterov wrote:
> On 06/19, Denys Vlasenko wrote:
>>
>> This is a user-visible behavior change.
>> Do we really have to introduce a separate
>> PTRACE_NOT_STUPID_DETACH? I hope not.
>
> Oh, I think yes.
>
>> @@ -1062,7 +1060,8 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
>> }
>>
>> ret = ptrace_check_attach(child, request == PTRACE_KILL ||
>> - request == PTRACE_INTERRUPT);
>> + request == PTRACE_INTERRUPT ||
>> + request == PTRACE_DETACH);
>
> There doesn't look right.
>
> For example ptrace_disable(). See the comment set_task_blockstep().
I see the comment. I think it implies that TF-induced debug
interrupt may happen on the running task after it is detached,
which will result in SIGTRAP being sent to it.
Correct me if I'm wrong.
If so, do we have the same problem if tracer exits
and implicit detach is performed?
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists