Commit 3cb8ef47 authored by Ananth N. Mavinakayanahalli's avatar Ananth N. Mavinakayanahalli Committed by Linus Torvalds

[PATCH] Kprobes: wrapper to define jprobe.entry

Here is a patch that adds a wrapper for defining jprobe.entry to make
t easy to handle the three dword function descriptors defined by the
PowerPC ELF ABI.

x86, ppc64 and x86_64 are also updated.
Signed-off-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 64ec66bb
......@@ -38,6 +38,8 @@ typedef u8 kprobe_opcode_t;
? (MAX_STACK_SIZE) \
: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
/* Architecture specific copy of original instruction*/
struct arch_specific_insn {
/* copy of the original instruction */
......
......@@ -35,6 +35,8 @@ typedef unsigned int kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION 0x7fe00008 /* trap */
#define MAX_INSN_SIZE 1
#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry)
/* Architecture specific copy of original instruction */
struct arch_specific_insn {
/* copy of original instruction */
......
......@@ -10,6 +10,8 @@ typedef u32 kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */
#define MAX_INSN_SIZE 2
#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
/* Architecture specific copy of original instruction*/
struct arch_specific_insn {
/* copy of the original instruction */
......
......@@ -37,6 +37,8 @@ typedef u8 kprobe_opcode_t;
? (MAX_STACK_SIZE) \
: (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
/* Architecture specific copy of original instruction*/
struct arch_specific_insn {
/* copy of the original instruction */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment