X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Flinux%2Fkprobes.h;h=23adf6075ae435a1c421fe7991e30b2bd64ebc27;hb=bf8f6e5b3e51ee0c64c2d1350c70198ddc8ad3f7;hp=769be39b96810414ebdec4fec05d94e997eba5eb;hpb=2fd8507d14ef7af3ae05316b3277044cf6daa381;p=deliverable%2Flinux.git diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 769be39b9681..23adf6075ae4 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -78,7 +78,7 @@ struct kprobe { kprobe_opcode_t *addr; /* Allow user to indicate symbol name of the probe point */ - char *symbol_name; + const char *symbol_name; /* Offset into the symbol */ unsigned int offset; @@ -123,12 +123,18 @@ DECLARE_PER_CPU(struct kprobe *, current_kprobe); DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); #ifdef ARCH_SUPPORTS_KRETPROBES -extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); +extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, + struct pt_regs *regs); +extern int arch_trampoline_kprobe(struct kprobe *p); #else /* ARCH_SUPPORTS_KRETPROBES */ static inline void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs) { } +static inline int arch_trampoline_kprobe(struct kprobe *p) +{ + return 0; +} #endif /* ARCH_SUPPORTS_KRETPROBES */ /* * Function-return probe - @@ -157,6 +163,16 @@ struct kretprobe_instance { struct task_struct *task; }; +static inline void kretprobe_assert(struct kretprobe_instance *ri, + unsigned long orig_ret_address, unsigned long trampoline_address) +{ + if (!orig_ret_address || (orig_ret_address == trampoline_address)) { + printk("kretprobe BUG!: Processing kretprobe %p @ %p\n", + ri->rp, ri->rp->kp.addr); + BUG(); + } +} + extern spinlock_t kretprobe_lock; extern struct mutex kprobe_mutex; extern int arch_prepare_kprobe(struct kprobe *p); @@ -199,8 +215,6 @@ void jprobe_return(void); int register_kretprobe(struct kretprobe *rp); void unregister_kretprobe(struct kretprobe *rp); -struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); -void add_rp_inst(struct kretprobe_instance *ri); void kprobe_flush_task(struct task_struct *tk); void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); #else /* CONFIG_KPROBES */