diff options
-rw-r--r-- | Documentation/kprobes.txt | 8 | ||||
-rw-r--r-- | include/asm-i386/kprobes.h | 1 | ||||
-rw-r--r-- | include/asm-ia64/kprobes.h | 2 | ||||
-rw-r--r-- | include/asm-powerpc/kprobes.h | 2 | ||||
-rw-r--r-- | include/asm-s390/kprobes.h | 2 | ||||
-rw-r--r-- | include/asm-sparc64/kprobes.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/kprobes.h | 1 | ||||
-rw-r--r-- | include/linux/kprobes.h | 3 | ||||
-rw-r--r-- | net/dccp/probe.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_probe.c | 2 |
10 files changed, 6 insertions, 18 deletions
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index da5404ab756..cb12ae175aa 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -247,12 +247,6 @@ control to Kprobes.) If the probed function is declared asmlinkage, | |||
247 | fastcall, or anything else that affects how args are passed, the | 247 | fastcall, or anything else that affects how args are passed, the |
248 | handler's declaration must match. | 248 | handler's declaration must match. |
249 | 249 | ||
250 | NOTE: A macro JPROBE_ENTRY is provided to handle architecture-specific | ||
251 | aliasing of jp->entry. In the interest of portability, it is advised | ||
252 | to use: | ||
253 | |||
254 | jp->entry = JPROBE_ENTRY(handler); | ||
255 | |||
256 | register_jprobe() returns 0 on success, or a negative errno otherwise. | 250 | register_jprobe() returns 0 on success, or a negative errno otherwise. |
257 | 251 | ||
258 | 4.3 register_kretprobe | 252 | 4.3 register_kretprobe |
@@ -518,7 +512,7 @@ long jdo_fork(unsigned long clone_flags, unsigned long stack_start, | |||
518 | } | 512 | } |
519 | 513 | ||
520 | static struct jprobe my_jprobe = { | 514 | static struct jprobe my_jprobe = { |
521 | .entry = JPROBE_ENTRY(jdo_fork) | 515 | .entry = jdo_fork |
522 | }; | 516 | }; |
523 | 517 | ||
524 | static int __init jprobe_init(void) | 518 | static int __init jprobe_init(void) |
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 8774d06689d..06f7303c30c 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t; | |||
42 | ? (MAX_STACK_SIZE) \ | 42 | ? (MAX_STACK_SIZE) \ |
43 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 43 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
44 | 44 | ||
45 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
46 | #define ARCH_SUPPORTS_KRETPROBES | 45 | #define ARCH_SUPPORTS_KRETPROBES |
47 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 46 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
48 | #define flush_insn_slot(p) do { } while (0) | 47 | #define flush_insn_slot(p) do { } while (0) |
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 6382e52ec22..067d9dea68f 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -82,8 +82,6 @@ struct kprobe_ctlblk { | |||
82 | struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ]; | 82 | struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ]; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
86 | |||
87 | #define ARCH_SUPPORTS_KRETPROBES | 85 | #define ARCH_SUPPORTS_KRETPROBES |
88 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 86 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
89 | 87 | ||
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 9537fda238b..8b08b447d6f 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -73,12 +73,10 @@ typedef unsigned int kprobe_opcode_t; | |||
73 | } \ | 73 | } \ |
74 | } | 74 | } |
75 | 75 | ||
76 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) | ||
77 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ | 76 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ |
78 | IS_TWI(instr) || IS_TDI(instr)) | 77 | IS_TWI(instr) || IS_TDI(instr)) |
79 | #else | 78 | #else |
80 | /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ | 79 | /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ |
81 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) | ||
82 | #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) | 80 | #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) |
83 | #endif | 81 | #endif |
84 | 82 | ||
diff --git a/include/asm-s390/kprobes.h b/include/asm-s390/kprobes.h index 830fe4c4eea..340ba10446e 100644 --- a/include/asm-s390/kprobes.h +++ b/include/asm-s390/kprobes.h | |||
@@ -46,8 +46,6 @@ typedef u16 kprobe_opcode_t; | |||
46 | ? (MAX_STACK_SIZE) \ | 46 | ? (MAX_STACK_SIZE) \ |
47 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 47 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
48 | 48 | ||
49 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) | ||
50 | |||
51 | #define ARCH_SUPPORTS_KRETPROBES | 49 | #define ARCH_SUPPORTS_KRETPROBES |
52 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 50 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
53 | 51 | ||
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index a331b7b0dff..7f6774dca5f 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -10,7 +10,6 @@ typedef u32 kprobe_opcode_t; | |||
10 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ | 10 | #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ |
11 | #define MAX_INSN_SIZE 2 | 11 | #define MAX_INSN_SIZE 2 |
12 | 12 | ||
13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
14 | #define arch_remove_kprobe(p) do {} while (0) | 13 | #define arch_remove_kprobe(p) do {} while (0) |
15 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | 14 | #define ARCH_INACTIVE_KPROBE_COUNT 0 |
16 | 15 | ||
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h index cf5317898fb..7db825403e0 100644 --- a/include/asm-x86_64/kprobes.h +++ b/include/asm-x86_64/kprobes.h | |||
@@ -41,7 +41,6 @@ typedef u8 kprobe_opcode_t; | |||
41 | ? (MAX_STACK_SIZE) \ | 41 | ? (MAX_STACK_SIZE) \ |
42 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 42 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
43 | 43 | ||
44 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | ||
45 | #define ARCH_SUPPORTS_KRETPROBES | 44 | #define ARCH_SUPPORTS_KRETPROBES |
46 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 45 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
47 | 46 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index f4e53b71d23..bd892850c94 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -119,6 +119,9 @@ struct jprobe { | |||
119 | void *entry; /* probe handling code to jump to */ | 119 | void *entry; /* probe handling code to jump to */ |
120 | }; | 120 | }; |
121 | 121 | ||
122 | /* For backward compatibility with old code using JPROBE_ENTRY() */ | ||
123 | #define JPROBE_ENTRY(handler) (handler) | ||
124 | |||
122 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); | 125 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); |
123 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 126 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
124 | 127 | ||
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 43a3adb027e..bae10b0f2fc 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -112,7 +112,7 @@ static struct jprobe dccp_send_probe = { | |||
112 | .kp = { | 112 | .kp = { |
113 | .symbol_name = "dccp_sendmsg", | 113 | .symbol_name = "dccp_sendmsg", |
114 | }, | 114 | }, |
115 | .entry = JPROBE_ENTRY(jdccp_sendmsg), | 115 | .entry = jdccp_sendmsg, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static int dccpprobe_open(struct inode *inode, struct file *file) | 118 | static int dccpprobe_open(struct inode *inode, struct file *file) |
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index f37d5928921..b76398d1b45 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -130,7 +130,7 @@ static struct jprobe tcp_jprobe = { | |||
130 | .kp = { | 130 | .kp = { |
131 | .symbol_name = "tcp_rcv_established", | 131 | .symbol_name = "tcp_rcv_established", |
132 | }, | 132 | }, |
133 | .entry = JPROBE_ENTRY(jtcp_rcv_established), | 133 | .entry = jtcp_rcv_established, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static int tcpprobe_open(struct inode * inode, struct file * file) | 136 | static int tcpprobe_open(struct inode * inode, struct file * file) |