Re: [PATCH] kprobes: correct regs->ip value in post_hander()

From: Masami Hiramatsu
Date: Wed Mar 19 2008 - 19:21:30 EST


Yakov Lerner wrote:
> From: "Yakov Lerner" <iler.ml@xxxxxxxxx>
>
> This patch corrects the value of regs->ip in post_handler(). Prior to
> this patch, post_handler() was given address meaningless to the user in
> regs->ip. The expected value is address of the next instruction to be
> executed after kprobed instruction. This patch simply swaps the order of
> post_handler() and resume_execution(). post_handler() now sees the
> corrected, expected value in regs->ip. post_handler() is now called after
> after resume_execution(), not before.
>
> Only x86 platform was tested. Arm arch needs no changes.
>
> Signed-off-by: Yakov Lerner <iler.ml@xxxxxxxxx>

Thank you, I tested this on x86-64/x86/ia64.

Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>


--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@xxxxxxxxxx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/