Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

jprobes: remove JPROBE_ENTRY()

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>

authored by

Michael Ellerman and committed by
Linus Torvalds
9e367d85 81eae375

+6 -18
+1 -7
Documentation/kprobes.txt
··· 247 247 fastcall, or anything else that affects how args are passed, the 248 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 250 register_jprobe() returns 0 on success, or a negative errno otherwise. 257 251 258 252 4.3 register_kretprobe ··· 512 518 } 513 519 514 520 static struct jprobe my_jprobe = { 515 - .entry = JPROBE_ENTRY(jdo_fork) 521 + .entry = jdo_fork 516 522 }; 517 523 518 524 static int __init jprobe_init(void)
-1
include/asm-i386/kprobes.h
··· 42 42 ? (MAX_STACK_SIZE) \ 43 43 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) 44 44 45 - #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 46 45 #define ARCH_SUPPORTS_KRETPROBES 47 46 #define ARCH_INACTIVE_KPROBE_COUNT 0 48 47 #define flush_insn_slot(p) do { } while (0)
-2
include/asm-ia64/kprobes.h
··· 82 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 85 #define ARCH_SUPPORTS_KRETPROBES 88 86 #define ARCH_INACTIVE_KPROBE_COUNT 1 89 87
-2
include/asm-powerpc/kprobes.h
··· 73 73 } \ 74 74 } 75 75 76 - #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) 77 76 #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ 78 77 IS_TWI(instr) || IS_TDI(instr)) 79 78 #else 80 79 /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ 81 - #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) 82 80 #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) 83 81 #endif 84 82
-2
include/asm-s390/kprobes.h
··· 46 46 ? (MAX_STACK_SIZE) \ 47 47 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) 48 48 49 - #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) 50 - 51 49 #define ARCH_SUPPORTS_KRETPROBES 52 50 #define ARCH_INACTIVE_KPROBE_COUNT 0 53 51
-1
include/asm-sparc64/kprobes.h
··· 10 10 #define BREAKPOINT_INSTRUCTION_2 0x91d02071 /* ta 0x71 */ 11 11 #define MAX_INSN_SIZE 2 12 12 13 - #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 14 13 #define arch_remove_kprobe(p) do {} while (0) 15 14 #define ARCH_INACTIVE_KPROBE_COUNT 0 16 15
-1
include/asm-x86_64/kprobes.h
··· 41 41 ? (MAX_STACK_SIZE) \ 42 42 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) 43 43 44 - #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 45 44 #define ARCH_SUPPORTS_KRETPROBES 46 45 #define ARCH_INACTIVE_KPROBE_COUNT 1 47 46
+3
include/linux/kprobes.h
··· 119 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 125 DECLARE_PER_CPU(struct kprobe *, current_kprobe); 123 126 DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 124 127
+1 -1
net/dccp/probe.c
··· 112 112 .kp = { 113 113 .symbol_name = "dccp_sendmsg", 114 114 }, 115 - .entry = JPROBE_ENTRY(jdccp_sendmsg), 115 + .entry = jdccp_sendmsg, 116 116 }; 117 117 118 118 static int dccpprobe_open(struct inode *inode, struct file *file)
+1 -1
net/ipv4/tcp_probe.c
··· 130 130 .kp = { 131 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 136 static int tcpprobe_open(struct inode * inode, struct file * file)