[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130619163234.GA12029@redhat.com>
Date: Wed, 19 Jun 2013 18:32:34 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Denys Vlasenko <dvlasenk@...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, 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().
And flush_ptrace_hw_breakpoint() can race with the exiting task.
And the setting of ->exit_code is racy too.
And this makes the ptrace_unfreeze_traced() logic more confusing...
but probably this is fine.
Oleg.
--
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