diff options
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r-- | include/linux/kprobes.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index e373c4a9de53..669756bc20a2 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
38 | #include <linux/rcupdate.h> | 38 | #include <linux/rcupdate.h> |
39 | 39 | ||
40 | #ifdef CONFIG_KPROBES | ||
40 | #include <asm/kprobes.h> | 41 | #include <asm/kprobes.h> |
41 | 42 | ||
42 | /* kprobe_status settings */ | 43 | /* kprobe_status settings */ |
@@ -67,6 +68,9 @@ struct kprobe { | |||
67 | /* list of kprobes for multi-handler support */ | 68 | /* list of kprobes for multi-handler support */ |
68 | struct list_head list; | 69 | struct list_head list; |
69 | 70 | ||
71 | /* Indicates that the corresponding module has been ref counted */ | ||
72 | unsigned int mod_refcounted; | ||
73 | |||
70 | /*count the number of times this probe was temporarily disarmed */ | 74 | /*count the number of times this probe was temporarily disarmed */ |
71 | unsigned long nmissed; | 75 | unsigned long nmissed; |
72 | 76 | ||
@@ -147,17 +151,16 @@ struct kretprobe_instance { | |||
147 | struct task_struct *task; | 151 | struct task_struct *task; |
148 | }; | 152 | }; |
149 | 153 | ||
150 | #ifdef CONFIG_KPROBES | ||
151 | extern spinlock_t kretprobe_lock; | 154 | extern spinlock_t kretprobe_lock; |
155 | extern struct semaphore kprobe_mutex; | ||
152 | extern int arch_prepare_kprobe(struct kprobe *p); | 156 | extern int arch_prepare_kprobe(struct kprobe *p); |
153 | extern void arch_copy_kprobe(struct kprobe *p); | ||
154 | extern void arch_arm_kprobe(struct kprobe *p); | 157 | extern void arch_arm_kprobe(struct kprobe *p); |
155 | extern void arch_disarm_kprobe(struct kprobe *p); | 158 | extern void arch_disarm_kprobe(struct kprobe *p); |
156 | extern void arch_remove_kprobe(struct kprobe *p); | ||
157 | extern int arch_init_kprobes(void); | 159 | extern int arch_init_kprobes(void); |
158 | extern void show_registers(struct pt_regs *regs); | 160 | extern void show_registers(struct pt_regs *regs); |
159 | extern kprobe_opcode_t *get_insn_slot(void); | 161 | extern kprobe_opcode_t *get_insn_slot(void); |
160 | extern void free_insn_slot(kprobe_opcode_t *slot); | 162 | extern void free_insn_slot(kprobe_opcode_t *slot); |
163 | extern void kprobes_inc_nmissed_count(struct kprobe *p); | ||
161 | 164 | ||
162 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ | 165 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ |
163 | struct kprobe *get_kprobe(void *addr); | 166 | struct kprobe *get_kprobe(void *addr); |
@@ -195,6 +198,11 @@ void add_rp_inst(struct kretprobe_instance *ri); | |||
195 | void kprobe_flush_task(struct task_struct *tk); | 198 | void kprobe_flush_task(struct task_struct *tk); |
196 | void recycle_rp_inst(struct kretprobe_instance *ri); | 199 | void recycle_rp_inst(struct kretprobe_instance *ri); |
197 | #else /* CONFIG_KPROBES */ | 200 | #else /* CONFIG_KPROBES */ |
201 | |||
202 | #define __kprobes /**/ | ||
203 | struct jprobe; | ||
204 | struct kretprobe; | ||
205 | |||
198 | static inline struct kprobe *kprobe_running(void) | 206 | static inline struct kprobe *kprobe_running(void) |
199 | { | 207 | { |
200 | return NULL; | 208 | return NULL; |