From: Masami Hiramatsu Fix resume_execution() to handle iret and absolute jump opcode correctly on i386. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: "Keshavamurthy, Anil S" Cc: Prasanna S Panchamukhi Cc: Jim Keniston Cc: Yumiko Sugita Cc: Satoshi Oshima Cc: Hideo Aoki Signed-off-by: Andrew Morton --- arch/i386/kernel/kprobes.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff -puN arch/i386/kernel/kprobes.c~kprobe-fix-resume-execution-on-i386 arch/i386/kernel/kprobes.c --- 25/arch/i386/kernel/kprobes.c~kprobe-fix-resume-execution-on-i386 Wed Apr 26 14:49:56 2006 +++ 25-akpm/arch/i386/kernel/kprobes.c Wed Apr 26 14:49:56 2006 @@ -503,10 +503,11 @@ static void __kprobes resume_execution(s *tos &= ~(TF_MASK | IF_MASK); *tos |= kcb->kprobe_old_eflags; break; - case 0xc3: /* ret/lret */ - case 0xcb: - case 0xc2: + case 0xc2: /* iret/ret/lret */ + case 0xc3: case 0xca: + case 0xcb: + case 0xcf: case 0xea: /* jmp absolute -- eip is correct */ /* eip is already adjusted, no more changes required */ p->ainsn.boostable = 1; @@ -514,10 +515,13 @@ static void __kprobes resume_execution(s case 0xe8: /* call relative - Fix return addr */ *tos = orig_eip + (*tos - copy_eip); break; + case 0x9a: /* call absolute -- same as call absolute, indirect */ + *tos = orig_eip + (*tos - copy_eip); + goto no_change; case 0xff: if ((p->ainsn.insn[1] & 0x30) == 0x10) { - /* call absolute, indirect */ /* + * call absolute, indirect * Fix return addr; eip is correct. * But this is not boostable */ _