lkml.org 
[lkml]   [2013]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHSET 00/13] tracing/uprobes: Add support for more fetch methods (v6)
Forgot to mention,

On 11/06, Oleg Nesterov wrote:
>
> I meant,
>
> saved_ip = instruction_pointer(regs);
>
> // pass the "ip" which was used to calculate
> // the @addr argument to fetch_*() methods
>
> temp_ip = is_ret_probe(tu) ? func : saved_ip;
> temp_ip -= tu->offset;
> instruction_pointer_set(temp_ip);
>
> store_trace_args(...);

Note that instruction_pointer_set() is not really nice in any case,
this can obviously confuse FETCH_MTD_reg("ip").

But lets ignore this. The solution is simple, we can pass/use this
info via current->utask. We can either add the new member, or add
a union. Or simply reuse xol_vaddr. Doesn't matter.

So the only question is should we rely on instruction_pointer/func
to translate the address or we should do something else (say, vma).

So far I like this approach.

Oleg.



\
 
 \ /
  Last update: 2013-11-06 19:41    [W:0.200 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site