diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-12-30 15:21:22 +0100 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2013-02-08 17:47:11 +0100 |
commit | cf31ec3f7fece93f3fce3ee5964e27857141ea47 (patch) | |
tree | c2cc4c968fdd9fa0c02fb0c6f4f452a826947df4 | |
parent | da1816b1caeccdff04531e763bb35d7caa3ed19f (diff) |
uprobes/x86: Change __skip_sstep() to actually skip the whole insn
__skip_sstep() doesn't update regs->ip. Currently this is correct
but only "by accident" and it doesn't skip the whole insn. Change
it to advance ->ip by the length of the detected 0x66*0x90 sequence.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
-rw-r--r-- | arch/x86/kernel/uprobes.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index c71025b6746..4e33a35d659 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c @@ -680,8 +680,11 @@ static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) if (auprobe->insn[i] == 0x66) continue; - if (auprobe->insn[i] == 0x90) + if (auprobe->insn[i] == 0x90) { + regs->ip = uprobe_get_swbp_addr(regs); + regs->ip += i + 1; return true; + } break; } |