lkml.org 
[lkml]   [2011]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] [PATCH 2.6.37-rc5-tip 10/20] 10: uprobes: task specific information.
On 01/25/2011 05:56 AM, Peter Zijlstra wrote:
> Ah, I think I found it while reading patch 13, you need the pre/post_xol
> callbacks, can't you simply synthesize their effect into the replacement
> sequence?
>
> push %rax
> mov $vaddr, %rax
> $INSN
> pop %rax
> jmp $next_insn
>
> like replacements would obviate the need for the pre/post callbacks and
> allow you to run straight through.

For this particular example, you'd better be sure that $INSN doesn't
need %rsp intact.

Control flow in general also makes this challenging. If $INSN is a
call, then any inline fixups won't get a chance until after return. If
$INSN is a jump, then its target must be modified so that both taken and
not-taken paths land in respective fixup locations. I'm sure there are
more cases that I'm not thinking of.

> It would also remove the whole single-step need since they're proper
> boosted probes.

Kprobes has boosting, but it doesn't apply to all opcodes. I would
guess that the same could be done for uprobes, where certain opcodes get
a fixup sequence like you suggest, but the pre/post_xol mechanism is
still needed in general.

Josh


\
 
 \ /
  Last update: 2011-01-25 19:41    [W:0.168 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site