[PATCH] kprobes: fix single-step out of line

Paul Mackerras paulus at samba.org
Fri Jun 10 11:41:30 EST 2005


Ananth N Mavinakayanahalli writes:

> On Power4 and above, single-step out of line when the instruction copy
> is on a kmalloc'ed memory area, fails with an Instruction Access
> exception. Here is a patch that fixes it.

> +static kprobe_opcode_t stepped_insn;

Hmmm... you are putting the instruction in a location in the data
segment, which may not be mapped executable.  You would get away with
it if the kernel is mapped with large pages (which is the default) and
the kernel text + data fits into 16MB (which I hope would be the
case).  But still, it's not a really clean solution.  However, I'm not
sure what would be better; you need some storage that is both writable
and executable, which we try to avoid having.

Paul.



More information about the Linuxppc64-dev mailing list