On 08/03, Roland McGrath wrote: > > > So. For the first version of CONFIG_PTRACE_UTRACE I'd suggest to use > > ->ptrace to keep the single bit, PT_PTRACED (well, PT_PTRACE_CAP too). > > All other PT_ bits should go into engine->data. > > Ok.
Actually the very first "for utrace-devel only" version should be just your utrace-ptrace.patch + attach/detach fixes. Not that I can verify this, but I hope that ptrace_utrace_ops's methods are more or less right. (but of course, we should recheck them as much is possible). Than we can move some things into engine->data. Right now my only concern is attach/detach, and the only method which needs the immediate attention is ptrace_resumed() which (afaics wrongly) does the "deferred" detach. > > Also. Either we have to add a lot of #ifdef's into tracehook.h, or we > > can add a single #ifdef into task_ptrace() (like your utrace-ptrace.patch > > does). In the last case, do you think something like below makes sense? > > There is no plan for #ifdef's. What hch et al upstream told us is that > there should be only one ptrace implementation, no options (and so utrace > has to be rock solid, which is why I'm getting you to do all the hard parts > ;-). AFAIK this is our plan now. Old ptrace goes away and only the > utrace-based implementation exists at the end. Hmm. Confused... I agree, CONFIG_UTRACE_PTRACE should die. But what about !CONFIG_UTRACE case? What should we do with arches which doesn't use tracehooks or play with ptrace internals? > > But this patch was needed for child-data cleanups. However, I think we > > should forget about these cleanups for now. > > What?!? The whole point of tracee data structure cleanup was to fit it > cleanly with utrace. i.e., to have a thing to hang off engine->data. > I don't understand why you'd want to abandon that now. Firstly, these changes can't be applied until we fix arch/ which play with ->ptrace. Also. Currently I do not see how these cleanups can really help for the first working version of utrace-ptrace. For example, if we kill task->parent, we need more changes for the first version. Instead, I think it makes sense to do these cleanups on top of utrace-ptrace. Oleg.