[RFC PATCH 3/8] jump label v4 - move opcode definitions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jason Baron
Date: Tuesday, January 12, 2010 - 9:26 am

Move x86 opcode macros from arch/x86/include/asm/kprobes.h to
arch/x86/include/asm/alternative.h so they are useful outside of kprobes.

Signed-off-by: Jason Baron <jbaron@redhat.com>
---
 arch/x86/include/asm/alternative.h |    5 +++++
 arch/x86/include/asm/kprobes.h     |    4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index 9b856b7..7a7d457 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -166,6 +166,11 @@ static inline void apply_paravirt(struct paravirt_patch_site *start,
  */
 extern void *text_poke(void *addr, const void *opcode, size_t len);
 
+#define BREAKPOINT_INSTRUCTION  0xcc
+#define RELATIVEJUMP_OPCODE 0xe9
+#define RELATIVEJUMP_SIZE 5
+#define MAX_INSN_SIZE 16
+
 /*
  * Setup int3 trap and fixup execution for cross-modifying on SMP case.
  * If the other cpus execute modifying instruction, it will hit int3
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
index febab97..15b1b12 100644
--- a/arch/x86/include/asm/kprobes.h
+++ b/arch/x86/include/asm/kprobes.h
@@ -31,10 +31,6 @@ struct pt_regs;
 struct kprobe;
 
 typedef u8 kprobe_opcode_t;
-#define BREAKPOINT_INSTRUCTION	0xcc
-#define RELATIVEJUMP_OPCODE 0xe9
-#define RELATIVEJUMP_SIZE 5
-#define MAX_INSN_SIZE 16
 #define MAX_STACK_SIZE 64
 #define MIN_STACK_SIZE(ADDR)					       \
 	(((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \
-- 
1.6.5.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 0/8] jump label v4 , Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 3/8] jump label v4 - move opcode definitions, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 5/8] jump label v4 - base patch, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 6/8] jump label v4 - x86 support, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 7/8] jump label v4 - tracepoint support, Jason Baron, (Tue Jan 12, 9:26 am)
[RFC PATCH 8/8] jump label v4 - add module support, Jason Baron, (Tue Jan 12, 9:26 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Tue Jan 12, 7:06 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Tue Jan 12, 10:38 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Wed Jan 13, 7:30 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Wed Jan 13, 11:57 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Thu Jan 14, 8:39 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Thu Jan 14, 11:45 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Sun Jan 17, 11:55 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Arjan van de Ven, (Sun Jan 17, 12:16 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 9:52 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 9:54 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Masami Hiramatsu, (Mon Jan 18, 11:21 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 11:33 am)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Mon Jan 18, 2:32 pm)
Re: [RFC PATCH 2/8] jump label v4 - x86: Introduce generic ..., Mathieu Desnoyers, (Tue Apr 13, 10:16 am)