The patch titled kprobe: cleanup resume_execute against 2.6.16-rc5 for i386 has been removed from the -mm tree. Its filename is kprobes-clean-up-resume_execute-update.patch This patch was dropped because it is obsolete ------------------------------------------------------ Subject: kprobe: cleanup resume_execute against 2.6.16-rc5 for i386 From: Masami Hiramatsu <hiramatu@xxxxxxxxxxxxxxxxx> Hi, Andrew The kprobe-booster's patches in current -mm tree (kprobes-clean-up-resume_execute.patch and x86-kprobes-booster.patch) are under the influence of the NX-protection support patch which was merged into linus tree(2.6.16-rc5). So I fixed those patches. Here is a patch to clean up kprobe's resume_execute() for i386 arch against linux-2.6.16-rc5. This patch makes resume_execute() simple, and useful to simplify the kprobe-booster patch. Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/kernel/kprobes.c | 26 ++++++++++---------------- 1 files changed, 10 insertions(+), 16 deletions(-) diff -puN arch/i386/kernel/kprobes.c~kprobes-clean-up-resume_execute-update arch/i386/kernel/kprobes.c --- devel/arch/i386/kernel/kprobes.c~kprobes-clean-up-resume_execute-update 2006-02-27 18:37:25.000000000 -0800 +++ devel-akpm/arch/i386/kernel/kprobes.c 2006-02-27 18:37:25.000000000 -0800 @@ -362,10 +362,10 @@ static void __kprobes resume_execution(s struct pt_regs *regs, struct kprobe_ctlblk *kcb) { unsigned long *tos = (unsigned long *)®s->esp; - unsigned long next_eip = 0; unsigned long copy_eip = (unsigned long)p->ainsn.insn; unsigned long orig_eip = (unsigned long)p->addr; + regs->eflags &= ~TF_MASK; switch (p->ainsn.insn[0]) { case 0x9c: /* pushfl */ *tos &= ~(TF_MASK | IF_MASK); @@ -375,9 +375,9 @@ static void __kprobes resume_execution(s case 0xcb: case 0xc2: case 0xca: - regs->eflags &= ~TF_MASK; - /* eip is already adjusted, no more changes required*/ - return; + case 0xea: /* jmp absolute -- eip is correct */ + /* eip is already adjusted, no more changes required */ + goto no_change; case 0xe8: /* call relative - Fix return addr */ *tos = orig_eip + (*tos - copy_eip); break; @@ -385,27 +385,21 @@ static void __kprobes resume_execution(s if ((p->ainsn.insn[1] & 0x30) == 0x10) { /* call absolute, indirect */ /* Fix return addr; eip is correct. */ - next_eip = regs->eip; *tos = orig_eip + (*tos - copy_eip); + goto no_change; } else if (((p->ainsn.insn[1] & 0x31) == 0x20) || /* jmp near, absolute indirect */ ((p->ainsn.insn[1] & 0x31) == 0x21)) { /* jmp far, absolute indirect */ /* eip is correct. */ - next_eip = regs->eip; + goto no_change; } - break; - case 0xea: /* jmp absolute -- eip is correct */ - next_eip = regs->eip; - break; default: break; } - regs->eflags &= ~TF_MASK; - if (next_eip) { - regs->eip = next_eip; - } else { - regs->eip = orig_eip + (regs->eip - copy_eip); - } + regs->eip = orig_eip + (regs->eip - copy_eip); + +no_change: + return; } /* _ Patches currently in -mm which might be from hiramatu@xxxxxxxxxxxxxxxxx are origin.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html