diff options
Diffstat (limited to 'include/linux/kprobes.h')
| -rw-r--r-- | include/linux/kprobes.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 32851eef48f0..2ec6cc14a114 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -182,6 +182,14 @@ struct kprobe_blackpoint { | |||
| 182 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); | 182 | DECLARE_PER_CPU(struct kprobe *, current_kprobe); |
| 183 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 183 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
| 184 | 184 | ||
| 185 | /* | ||
| 186 | * For #ifdef avoidance: | ||
| 187 | */ | ||
| 188 | static inline int kprobes_built_in(void) | ||
| 189 | { | ||
| 190 | return 1; | ||
| 191 | } | ||
| 192 | |||
| 185 | #ifdef CONFIG_KRETPROBES | 193 | #ifdef CONFIG_KRETPROBES |
| 186 | extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, | 194 | extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 187 | struct pt_regs *regs); | 195 | struct pt_regs *regs); |
| @@ -271,8 +279,16 @@ void unregister_kretprobes(struct kretprobe **rps, int num); | |||
| 271 | void kprobe_flush_task(struct task_struct *tk); | 279 | void kprobe_flush_task(struct task_struct *tk); |
| 272 | void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); | 280 | void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); |
| 273 | 281 | ||
| 274 | #else /* CONFIG_KPROBES */ | 282 | #else /* !CONFIG_KPROBES: */ |
| 275 | 283 | ||
| 284 | static inline int kprobes_built_in(void) | ||
| 285 | { | ||
| 286 | return 0; | ||
| 287 | } | ||
| 288 | static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) | ||
| 289 | { | ||
| 290 | return 0; | ||
| 291 | } | ||
| 276 | static inline struct kprobe *get_kprobe(void *addr) | 292 | static inline struct kprobe *get_kprobe(void *addr) |
| 277 | { | 293 | { |
| 278 | return NULL; | 294 | return NULL; |
| @@ -329,5 +345,5 @@ static inline void unregister_kretprobes(struct kretprobe **rps, int num) | |||
| 329 | static inline void kprobe_flush_task(struct task_struct *tk) | 345 | static inline void kprobe_flush_task(struct task_struct *tk) |
| 330 | { | 346 | { |
| 331 | } | 347 | } |
| 332 | #endif /* CONFIG_KPROBES */ | 348 | #endif /* CONFIG_KPROBES */ |
| 333 | #endif /* _LINUX_KPROBES_H */ | 349 | #endif /* _LINUX_KPROBES_H */ |
