]> err.no Git - linux-2.6/commitdiff
jprobes: remove JPROBE_ENTRY()
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 19 Jul 2007 08:48:10 +0000 (01:48 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:44 +0000 (10:04 -0700)
AFAICT now that jprobe.entry is a void *, JPROBE_ENTRY doesn't do anything
useful - so remove it ..

I've left a do-nothing version so that out-of-tree jprobes code will still
compile without modifications.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/kprobes.txt
include/asm-i386/kprobes.h
include/asm-ia64/kprobes.h
include/asm-powerpc/kprobes.h
include/asm-s390/kprobes.h
include/asm-sparc64/kprobes.h
include/asm-x86_64/kprobes.h
include/linux/kprobes.h
net/dccp/probe.c
net/ipv4/tcp_probe.c

index da5404ab75691c58e3d69c89ea1a3f8ba1fd993b..cb12ae175aa2de80b3114434c20e64cac4857593 100644 (file)
@@ -247,12 +247,6 @@ control to Kprobes.)  If the probed function is declared asmlinkage,
 fastcall, or anything else that affects how args are passed, the
 handler's declaration must match.
 
-NOTE: A macro JPROBE_ENTRY is provided to handle architecture-specific
-aliasing of jp->entry. In the interest of portability, it is advised
-to use:
-
-       jp->entry = JPROBE_ENTRY(handler);
-
 register_jprobe() returns 0 on success, or a negative errno otherwise.
 
 4.3 register_kretprobe
@@ -518,7 +512,7 @@ long jdo_fork(unsigned long clone_flags, unsigned long stack_start,
 }
 
 static struct jprobe my_jprobe = {
-       .entry = JPROBE_ENTRY(jdo_fork)
+       .entry = jdo_fork
 };
 
 static int __init jprobe_init(void)
index 8774d06689daa3eb53cdbdb2727bc8827b5e09bf..06f7303c30ca15d111061cfcace36ec043b9362d 100644 (file)
@@ -42,7 +42,6 @@ typedef u8 kprobe_opcode_t;
        ? (MAX_STACK_SIZE) \
        : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
 
-#define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)pentry
 #define ARCH_SUPPORTS_KRETPROBES
 #define  ARCH_INACTIVE_KPROBE_COUNT 0
 #define flush_insn_slot(p)     do { } while (0)
index 6382e52ec2272b1ec39f4ea3432e061e75c51b1e..067d9dea68f9d627f41ba634e7169185bafcf5e4 100644 (file)
@@ -82,8 +82,6 @@ struct kprobe_ctlblk {
        struct prev_kprobe prev_kprobe[ARCH_PREV_KPROBE_SZ];
 };
 
-#define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)pentry
-
 #define ARCH_SUPPORTS_KRETPROBES
 #define  ARCH_INACTIVE_KPROBE_COUNT 1
 
index 9537fda238b897a8277be4be6ca76b15ef7ed260..8b08b447d6f31e2e300e39b3813dd090b7c2233f 100644 (file)
@@ -73,12 +73,10 @@ typedef unsigned int kprobe_opcode_t;
        }                                                               \
 }
 
-#define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)((func_descr_t *)pentry)
 #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \
                        IS_TWI(instr) || IS_TDI(instr))
 #else
 /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */
-#define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)(pentry)
 #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr))
 #endif
 
index 830fe4c4eea60a529975b7d78abc98388466fc88..340ba10446ea46d2aeca453903532bc537627610 100644 (file)
@@ -46,8 +46,6 @@ typedef u16 kprobe_opcode_t;
        ? (MAX_STACK_SIZE) \
        : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
 
-#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry)
-
 #define ARCH_SUPPORTS_KRETPROBES
 #define ARCH_INACTIVE_KPROBE_COUNT 0
 
index a331b7b0dff2bd56ef5b6b35d28912838135bee0..7f6774dca5f49f778c434c055ab7355e3711a4c4 100644 (file)
@@ -10,7 +10,6 @@ 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
 #define arch_remove_kprobe(p)  do {} while (0)
 #define  ARCH_INACTIVE_KPROBE_COUNT 0
 
index cf5317898fb0fdc50301ad42123623a448f79262..7db825403e013129655fab261035b1391944c888 100644 (file)
@@ -41,7 +41,6 @@ typedef u8 kprobe_opcode_t;
        ? (MAX_STACK_SIZE) \
        : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
 
-#define JPROBE_ENTRY(pentry)   (kprobe_opcode_t *)pentry
 #define ARCH_SUPPORTS_KRETPROBES
 #define  ARCH_INACTIVE_KPROBE_COUNT 1
 
index f4e53b71d23ff04ed25815c6e33010b49cb2a399..bd892850c94aba7f5389a14de055045760dee4d7 100644 (file)
@@ -119,6 +119,9 @@ struct jprobe {
        void *entry;    /* probe handling code to jump to */
 };
 
+/* For backward compatibility with old code using JPROBE_ENTRY() */
+#define JPROBE_ENTRY(handler)  (handler)
+
 DECLARE_PER_CPU(struct kprobe *, current_kprobe);
 DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
 
index 43a3adb027e7593ba9b15b366f3ae7d1b7843325..bae10b0f2fc3ca5dae81d239245503e034692ad6 100644 (file)
@@ -112,7 +112,7 @@ static struct jprobe dccp_send_probe = {
        .kp     = {
                .symbol_name = "dccp_sendmsg",
        },
-       .entry  = JPROBE_ENTRY(jdccp_sendmsg),
+       .entry  = jdccp_sendmsg,
 };
 
 static int dccpprobe_open(struct inode *inode, struct file *file)
index f37d5928921ad3f156465836f275c38595b9dfbb..b76398d1b4547d291e52051276c80ff7df36880b 100644 (file)
@@ -130,7 +130,7 @@ static struct jprobe tcp_jprobe = {
        .kp = {
                .symbol_name    = "tcp_rcv_established",
        },
-       .entry  = JPROBE_ENTRY(jtcp_rcv_established),
+       .entry  = jtcp_rcv_established,
 };
 
 static int tcpprobe_open(struct inode * inode, struct file * file)