diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kprobes.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index f26460700379..850ee871e353 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -157,6 +157,16 @@ struct kretprobe_instance { | |||
157 | struct task_struct *task; | 157 | struct task_struct *task; |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static inline void kretprobe_assert(struct kretprobe_instance *ri, | ||
161 | unsigned long orig_ret_address, unsigned long trampoline_address) | ||
162 | { | ||
163 | if (!orig_ret_address || (orig_ret_address == trampoline_address)) { | ||
164 | printk("kretprobe BUG!: Processing kretprobe %p @ %p\n", | ||
165 | ri->rp, ri->rp->kp.addr); | ||
166 | BUG(); | ||
167 | } | ||
168 | } | ||
169 | |||
160 | extern spinlock_t kretprobe_lock; | 170 | extern spinlock_t kretprobe_lock; |
161 | extern struct mutex kprobe_mutex; | 171 | extern struct mutex kprobe_mutex; |
162 | extern int arch_prepare_kprobe(struct kprobe *p); | 172 | extern int arch_prepare_kprobe(struct kprobe *p); |