Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e367d85 authored by Michael Ellerman's avatar Michael Ellerman Committed by Linus Torvalds
Browse files

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: default avatarMichael Ellerman <michael@ellerman.id.au>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Acked-by: default avatarAnanth 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 81eae375
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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)
+0 −1
Original line number Diff line number Diff line
@@ -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)
+0 −2
Original line number Diff line number Diff line
@@ -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

+0 −2
Original line number Diff line number Diff line
@@ -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

+0 −2
Original line number Diff line number Diff line
@@ -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

Loading