Re: [PATCH v3] Make PTRACE_SEIZE set ptrace options specified in'data'

From: Denys Vlasenko
Date: Fri Sep 09 2011 - 08:29:11 EST


On Fri, 2011-09-09 at 12:12 +0100, Pedro Alves wrote:
> On Thursday 08 September 2011 19:22:04, Denys Vlasenko wrote:
> > Make PTRACE_SEIZE set ptrace options specified in 'data' parameter
> >
> > This can be used to close a few corner cases in strace where we get
> > unwanted racy behavior after attach, but before we have a chance
> > to set options (the notorious post-execve SIGTRAP comes to mind),
>
> I'm still confused on why you're raising the SIGTRAP argument. Did you see
>
> https://lkml.org/lkml/2011/9/8/7
>
> From previous discussions, I understood that PTRACE_SEIZE _always_
> disables
> the post-execve SIGTRAP, so I don't believe that race actually exists.
> Or is that not the case?


I believe it is not the case. And I object to making it the case.
My sense of taste says the approach "you need to use SEIZE to affect
feature <foo>" for various unrelated <foo> makes ptrace API ugly.
Especially that in this case, we already have a method in API
to suppress post-execve SIGTRAP.

--
vda


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/