RE: [patch] x86_64 specific function return probes

From: Lynch, Rusty
Date: Fri Jun 03 2005 - 11:41:47 EST


From: Andi Kleen [mailto:ak@xxxxxxx]
>On Thu, Jun 02, 2005 at 01:58:50PM -0700, Rusty Lynch wrote:
>> The following patch adds the x86_64 architecture specific
implementation
>
>[....]
>
>Thanks for the long description.
>
>but...
>
>> +struct task_struct *arch_get_kprobe_task(void *ptr)
>> +{
>> + return ((struct thread_info *) (((unsigned long) ptr) &
>> + (~(THREAD_SIZE -1))))->task;
>> +}
>
>and
>
>
>> + tsk = arch_get_kprobe_task(sara);
>
>
>This is still wrong when the code is not executing on the process
>stack, but on a interrupt/Exception stack. Any reason you cannot
>just use current here?
>
>-Andi

Ah... you are talking about if someone registers a return probe on
something like an interrupt handler, right?

I was under the impression that I could not always count on the current
I get from interrupt context to map to the current seen by the target
function (that triggers the breakpoint.) It sounds like an invalid
assumption lead to some extra complexity that isn't correct for all
cases.

--rusty



-
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/