Re: [PATCH] for 2 kernel bugs due to ptrace_attach() side effects

Eric Paire (e.paire@opengroup.org)
Thu, 28 Jan 1999 07:41:35 +0100


>
> On Wed, 27 Jan 1999, Eric PAIRE wrote:
> >
> > Now that the 2.2.0 is output, perhaps you will have some time to have a look
> > at the fixes for the 2 bugs I found last summer when I finalized the gdb
> > fixes to debug Linux multithreaded applications.
>
> I didn't like the approach then, and I don't like it now. I don't believe
> that adding another child list and a "nchildren" counter is the right
> solution. The solution makes the _common_ case of not having a debugger
> the more complex one, as far as I can see.
>
> If anything, I think that the solution would be to not do the silly
> re-parenting for debugging at all, so that the child list is always the
> original one - and that _debugging_ would then use a separate list. That,
> I feel, puts the onus where it belongs: in the debugging code rather than
> on the normal parenting code. It would also get rid of p_opptr, because it
> would no longer be needed (you'd instead have a "p_debugptr" pointing to
> the debugging process, along with a "debuglist" that contains the list of
> processes debugged by that debugger).
>
> Think of debugging as a "secondary parent" thing, which it really is, and
> if you think the current re-parenting is buggy (it certainly has some
> nasty side effects, I'll agree), then you should just get rid of it rather
> than add workaround code.
>
I really agree with the way you think the fix should be. I didn't take
this approach, since I just wished to fix a bug and not the architecture
of original and current parents you built. Since now you clearly state
that this was not the right approach, then I feel more comfortable to
fix it is a cleaner way. Unfortunately, I am somewhat busy until end of
February, and I don't think that the patch will be ready before (testing
take sometimes more time than developing ;-). If you can wait until, then
I will resend a better fix then.

Best regards,
-Eric
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ Eric PAIRE
Web : http://www.gr.opengroup.org/~paire | THE Open GROUP - Research Institute
Email: e.paire@gr.opengroup.org | 2, avenue de Vignate
Phone: +33 (0) 476 63 48 71 | F-38610 Gieres
Fax : +33 (0) 476 51 05 32 | FRANCE

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