diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-01-02 13:20:06 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-01-02 13:20:06 -0500 |
commit | 44c0b42e6f3e50f4ef8d1eaac1f22e5c15ae715a (patch) | |
tree | 1c62ee58044de73c4703dfb61053869404458952 | |
parent | 618c8d759d7c8e13e5801970cc4c97746c2daff6 (diff) | |
parent | 212fcc465abe7e7806a9b0a21385bd645cd13177 (diff) | |
download | systemtap-steved-44c0b42e6f3e50f4ef8d1eaac1f22e5c15ae715a.tar.gz systemtap-steved-44c0b42e6f3e50f4ef8d1eaac1f22e5c15ae715a.tar.xz systemtap-steved-44c0b42e6f3e50f4ef8d1eaac1f22e5c15ae715a.zip |
Merge branch 'master' of git://sources.redhat.com/git/systemtap
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | runtime/uprobes/uprobes_x86_64.c | 15 |
2 files changed, 16 insertions, 5 deletions
@@ -1,3 +1,9 @@ +2007-12-27 Jim Keniston <jkenisto@us.ibm.com> + + * runtime/uprobes/uprobes_x86_64.c: Fix handling of indirect + jmps and calls that use rip-relative addressing. Allow probing + of opcode 0x63. + 2007-12-13 Masami Hiramatsu <mhiramat@redhat.com> * stap.1.in: Document about relay buffer sharing. diff --git a/runtime/uprobes/uprobes_x86_64.c b/runtime/uprobes/uprobes_x86_64.c index 23dcdadb..78969248 100644 --- a/runtime/uprobes/uprobes_x86_64.c +++ b/runtime/uprobes/uprobes_x86_64.c @@ -43,7 +43,7 @@ static const unsigned long good_insns_64[256 / 64] = { W(0x30, 1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0), /* 30 */ W(0x40, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)| /* 40 */ W(0x50, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)| /* 50 */ - W(0x60, 0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0)| /* 60 */ + W(0x60, 0,0,0,1,0,0,0,0,1,1,1,1,0,0,0,0)| /* 60 */ W(0x70, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), /* 70 */ W(0x80, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)| /* 80 */ W(0x90, 1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1)| /* 90 */ @@ -603,8 +603,13 @@ void uprobe_post_ssout(struct uprobe_task *utask, struct uprobe_probept *ppt, regs->rax = utask->arch_info.saved_scratch_register; else regs->rcx = utask->arch_info.saved_scratch_register; - regs->rip += (4 + correction); - return; + /* + * The original instruction includes a displacement, and so + * is 4 bytes longer than what we've just single-stepped. + * Fall through to handle stuff like "jmpq *...(%rip)" and + * "callq *...(%rip)". + */ + correction += 4; } /* @@ -613,8 +618,8 @@ void uprobe_post_ssout(struct uprobe_task *utask, struct uprobe_probept *ppt, * ppt->arch_info.flags. * * We don't bother skipping prefixes here because none of the - * non-rip-relative instructions that require special treatment - * involve prefixes. + * instructions that require special treatment (other than + * rip-relative instructions, handled above) involve prefixes. */ switch (*insn) { |