|From:||Oleg Nesterov <oleg-AT-redhat.com>|
|To:||Andrew Morton <akpm-AT-linux-foundation.org>|
|Subject:||Re: linux-next: add utrace tree|
|Date:||Fri, 22 Jan 2010 18:45:41 +0100|
|Cc:||"Frank Ch. Eigler" <fche-AT-redhat.com>, Fr??d??ric-AT-redhat.com, Stephen Rothwell <sfr-AT-canb.auug.org.au>, Peter Zijlstra <peterz-AT-infradead.org>, Weisbecker <fweisbec-AT-gmail.com>, LKML <linux-kernel-AT-vger.kernel.org>, Steven Rostedt <rostedt-AT-goodmis.org>, Arnaldo Carvalho de Melo <acme-AT-redhat.com>, linux-next-AT-vger.kernel.org, "H. Peter Anvin" <hpa-AT-zytor.com>, utrace-devel-AT-redhat.com, Linus <torvalds-AT-linux-foundation.org>, Thomas Gleixner <tglx-AT-linutronix.de>, Peter Zijlstra <a.p.zijlstra-AT-chello.nl>|
On 01/21, Andrew Morton wrote: > > ptrace is a nasty, complex part of the kernel which has a long history > of problems, but it's all been pretty quiet in there for the the past few > years. Well, yes, I'd say ptrace is "frozen". Nobody add new features/improvements, only bugfixes. > This leads one to expect that a rip-out-n-rewrite is a > high-risk prospect. So, quite reasonably, one looks for a good reason > for taking such risk. As it was already said, utrace was not created to just replace the current ptrace. However, speaking of ptrace, imho even ptrace-utrace is more flexible and allows to improve this api easily. Just for example, even attach and detach are not trivial to use from user-space when it comes to multithread tracees. A one-liner patch for ptrace-utrace can implement PTRACE_DETACH which doesn't need TASK_TRACED, it is easy to avoid the initial SIGSTOP from attach (which doesn't always work but strace/gdb relies on it). Of course, I do not profess this is not posible with the current implementation. But this will need more changes, and these changes will touch the code outside of ptrace.c. And in fact I think that any enhancements in this area will lead to rewrite of the current ptrace code. I must admit that personally I think the current ptrace api is unfixable, we need the new one in the long term. It would be nice to just kill ptrace, but this is not possible and that is why ptrace-utrace exists. And, if nothing more, utrace allows to have both old and new ones without any changes outside of ptrace/utrace code. Oleg.
Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds