Re: [PATCH v1 7/10] Uprobes Implementation

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Wednesday, March 24, 2010 - 6:00 am

On Wed, 2010-03-24 at 13:28 +0530, Srikar Dronamraju wrote:

I'm not sure, currently all the tracing bits require root. One of the
complications is that dynamic trace events (kprobes and uprobes) share a
global namespace, so making that accessible to users might be
interesting.

So one thing we can do to avoid some of the trap overhead is to
de-couple the trace event creation from trace event enable (pretty much
already so for existing implementations), so while you define a dynamic
trace event as dso:sym, you provide ways to enable it globally and per
task.

We'd basically need a global and per-task refcount on enable and make
sure the breakpoint is installed properly for (global || task).

That way a perf per-cpu event will do the global enable, and a perf
per-task event will do the task enable.


A double scribble will be an issue for the current generation of
debuggers anyway, right?

But yes, I suppose if you want to use uprobes for debuggers then yes it
makes sense to allow to put the task to sleep. One way would be to
provide means for the handler to detect the context and simply always
return -EFAULT from the trap context.


Before NX there simply was no option, anyway, I guess the writable
requirement comes from being stack, and I'm not sure how TLS is done,
but I guess that has similar constraints on being writable, right?

I've heard from people that some other OS does indeed have the
trampoline in TLS.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v1 0/10] Uprobes patches., Srikar Dronamraju, (Sat Mar 20, 7:24 am)
[PATCH v1 1/10] Move Macro W to insn.h, Srikar Dronamraju, (Sat Mar 20, 7:25 am)
[PATCH v1 2/10] Move replace_page() to mm/memory.c, Srikar Dronamraju, (Sat Mar 20, 7:25 am)
[PATCH v1 3/10] Enhance replace_page() to support pagecache, Srikar Dronamraju, (Sat Mar 20, 7:25 am)
[PATCH v1 4/10] User Space Breakpoint Assistance Layer, Srikar Dronamraju, (Sat Mar 20, 7:25 am)
[PATCH v1 5/10] X86 details for user space breakpoint assi ..., Srikar Dronamraju, (Sat Mar 20, 7:25 am)
[PATCH v1 6/10] Slot allocation for Execution out of line, Srikar Dronamraju, (Sat Mar 20, 7:26 am)
[PATCH v1 7/10] Uprobes Implementation, Srikar Dronamraju, (Sat Mar 20, 7:26 am)
[PATCH v1 8/10] X86 details for uprobes., Srikar Dronamraju, (Sat Mar 20, 7:26 am)
[PATCH v1 9/10] Uprobes Documentation patch, Srikar Dronamraju, (Sat Mar 20, 7:26 am)
[PATCH v1 10/10] Uprobes samples., Srikar Dronamraju, (Sat Mar 20, 7:26 am)
Re: [PATCH v1 1/10] Move Macro W to insn.h, Masami Hiramatsu, (Sat Mar 20, 8:50 am)
Re: [PATCH v1 9/10] Uprobes Documentation patch, Randy Dunlap, (Sun Mar 21, 8:00 pm)
Re: [PATCH v1 9/10] Uprobes Documentation patch, Srikar Dronamraju, (Sun Mar 21, 10:34 pm)
Re: [PATCH v1 1/10] Move Macro W to insn.h, Srikar Dronamraju, (Sun Mar 21, 11:24 pm)
Re: [PATCH v1 1/10] Move Macro W to insn.h, Masami Hiramatsu, (Mon Mar 22, 7:11 am)
Re: [PATCH v1 9/10] Uprobes Documentation patch, Randy Dunlap, (Mon Mar 22, 7:51 am)
Re: [PATCH v1 0/10] Uprobes patches., Andrew Morton, (Mon Mar 22, 6:38 pm)
Re: [PATCH v1 0/10] Uprobes patches., Srikar Dronamraju, (Tue Mar 23, 3:55 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Peter Zijlstra, (Tue Mar 23, 4:01 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Peter Zijlstra, (Tue Mar 23, 4:04 am)
Re: [PATCH v1 4/10] User Space Breakpoint Assistance Layer, Srikar Dronamraju, (Tue Mar 23, 4:26 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Srikar Dronamraju, (Tue Mar 23, 5:23 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Peter Zijlstra, (Tue Mar 23, 6:46 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Masami Hiramatsu, (Tue Mar 23, 7:20 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Ananth N Mavinakayan ..., (Tue Mar 23, 8:05 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Peter Zijlstra, (Tue Mar 23, 8:15 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Peter Zijlstra, (Tue Mar 23, 8:15 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Frank Ch. Eigler, (Tue Mar 23, 8:26 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Masami Hiramatsu, (Tue Mar 23, 10:36 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Ananth N Mavinakayan ..., (Tue Mar 23, 10:59 pm)
Re: [PATCH v1 7/10] Uprobes Implementation, Srikar Dronamraju, (Wed Mar 24, 12:58 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Srikar Dronamraju, (Wed Mar 24, 3:22 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Peter Zijlstra, (Wed Mar 24, 6:00 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Srikar Dronamraju, (Thu Mar 25, 12:56 am)
Re: [PATCH v1 7/10] Uprobes Implementation, Srikar Dronamraju, (Thu Mar 25, 1:41 am)