• Masami Hiramatsu's avatar
    kprobes: Checks probe address is instruction boudary on x86 · b46b3d70
    Masami Hiramatsu authored
    Ensure safeness of inserting kprobes by checking whether the specified
    address is at the first byte of an instruction on x86.
    This is done by decoding probed function from its head to the probe
    point.
    Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
    Acked-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
    Cc: Avi Kivity <avi@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Frank Ch. Eigler <fche@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Jason Baron <jbaron@redhat.com>
    Cc: Jim Keniston <jkenisto@us.ibm.com>
    Cc: K.Prasad <prasad@linux.vnet.ibm.com>
    Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
    Cc: Li Zefan <lizf@cn.fujitsu.com>
    Cc: Przemysław Pawełczyk <przemyslaw@pawelczyk.it>
    Cc: Roland McGrath <roland@redhat.com>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    Cc: Vegard Nossum <vegard.nossum@gmail.com>
    LKML-Reference: <20090813203428.31965.21939.stgit@localhost.localdomain>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    b46b3d70
kprobes.c 33.4 KB