aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2008-01-30 13:31:21 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:21 +0100
commitaa470140e86e45723cf8387292edbce9106ddc1f (patch)
tree4fed04db688672f3c1094eee8aea894b90b21667 /include
parent314cdbefd1fd0a7acf3780e9628465b77ea6a836 (diff)
x86: kprobe-booster for x86-64
This patch adds kprobe-booster to kprobes_64.c. - Changes are based on x86-32. - Add REX prefix checking code. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/kprobes_64.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-x86/kprobes_64.h b/include/asm-x86/kprobes_64.h
index 8c919d35cdd..e7e921dac7c 100644
--- a/include/asm-x86/kprobes_64.h
+++ b/include/asm-x86/kprobes_64.h
@@ -34,6 +34,7 @@ struct kprobe;
typedef u8 kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION 0xcc
+#define RELATIVEJUMP_INSTRUCTION 0xe9
#define MAX_INSN_SIZE 15
#define MAX_STACK_SIZE 64
#define MIN_STACK_SIZE(ADDR) (((MAX_STACK_SIZE) < \
@@ -52,6 +53,15 @@ extern void arch_remove_kprobe(struct kprobe *p);
struct arch_specific_insn {
/* copy of the original instruction */
kprobe_opcode_t *insn;
+ /*
+ * boostable = -1: This instruction type is not boostable.
+ * boostable = 0: This instruction type is boostable.
+ * boostable = 1: This instruction has been boosted: we have
+ * added a relative jump after the instruction copy in insn,
+ * so no single-step and fixup are needed (unless there's
+ * a post_handler or break_handler).
+ */
+ int boostable;
};
struct prev_kprobe {