diff options
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r-- | include/linux/kprobes.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 5e1a7b0d7b3f..e050fc2d4c26 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -104,33 +104,12 @@ struct jprobe { | |||
104 | }; | 104 | }; |
105 | 105 | ||
106 | #ifdef ARCH_SUPPORTS_KRETPROBES | 106 | #ifdef ARCH_SUPPORTS_KRETPROBES |
107 | extern int trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs); | ||
108 | extern void trampoline_post_handler(struct kprobe *p, struct pt_regs *regs, | ||
109 | unsigned long flags); | ||
110 | extern struct task_struct *arch_get_kprobe_task(void *ptr); | ||
111 | extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); | 107 | extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); |
112 | extern void arch_kprobe_flush_task(struct task_struct *tk); | ||
113 | #else /* ARCH_SUPPORTS_KRETPROBES */ | 108 | #else /* ARCH_SUPPORTS_KRETPROBES */ |
114 | static inline void kretprobe_trampoline(void) | ||
115 | { | ||
116 | } | ||
117 | static inline int trampoline_probe_handler(struct kprobe *p, | ||
118 | struct pt_regs *regs) | ||
119 | { | ||
120 | return 0; | ||
121 | } | ||
122 | static inline void trampoline_post_handler(struct kprobe *p, | ||
123 | struct pt_regs *regs, unsigned long flags) | ||
124 | { | ||
125 | } | ||
126 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, | 109 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, |
127 | struct pt_regs *regs) | 110 | struct pt_regs *regs) |
128 | { | 111 | { |
129 | } | 112 | } |
130 | static inline void arch_kprobe_flush_task(struct task_struct *tk) | ||
131 | { | ||
132 | } | ||
133 | #define arch_get_kprobe_task(ptr) ((struct task_struct *)NULL) | ||
134 | #endif /* ARCH_SUPPORTS_KRETPROBES */ | 113 | #endif /* ARCH_SUPPORTS_KRETPROBES */ |
135 | /* | 114 | /* |
136 | * Function-return probe - | 115 | * Function-return probe - |
@@ -155,8 +134,8 @@ struct kretprobe_instance { | |||
155 | struct hlist_node uflist; /* either on free list or used list */ | 134 | struct hlist_node uflist; /* either on free list or used list */ |
156 | struct hlist_node hlist; | 135 | struct hlist_node hlist; |
157 | struct kretprobe *rp; | 136 | struct kretprobe *rp; |
158 | void *ret_addr; | 137 | kprobe_opcode_t *ret_addr; |
159 | void *stack_addr; | 138 | struct task_struct *task; |
160 | }; | 139 | }; |
161 | 140 | ||
162 | #ifdef CONFIG_KPROBES | 141 | #ifdef CONFIG_KPROBES |
@@ -176,7 +155,10 @@ extern void arch_copy_kprobe(struct kprobe *p); | |||
176 | extern void arch_arm_kprobe(struct kprobe *p); | 155 | extern void arch_arm_kprobe(struct kprobe *p); |
177 | extern void arch_disarm_kprobe(struct kprobe *p); | 156 | extern void arch_disarm_kprobe(struct kprobe *p); |
178 | extern void arch_remove_kprobe(struct kprobe *p); | 157 | extern void arch_remove_kprobe(struct kprobe *p); |
158 | extern int arch_init_kprobes(void); | ||
179 | extern void show_registers(struct pt_regs *regs); | 159 | extern void show_registers(struct pt_regs *regs); |
160 | extern kprobe_opcode_t *get_insn_slot(void); | ||
161 | extern void free_insn_slot(kprobe_opcode_t *slot); | ||
180 | 162 | ||
181 | /* Get the kprobe at this addr (if any). Must have called lock_kprobes */ | 163 | /* Get the kprobe at this addr (if any). Must have called lock_kprobes */ |
182 | struct kprobe *get_kprobe(void *addr); | 164 | struct kprobe *get_kprobe(void *addr); |
@@ -194,8 +176,6 @@ int register_kretprobe(struct kretprobe *rp); | |||
194 | void unregister_kretprobe(struct kretprobe *rp); | 176 | void unregister_kretprobe(struct kretprobe *rp); |
195 | 177 | ||
196 | struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); | 178 | struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); |
197 | struct kretprobe_instance *get_rp_inst(void *sara); | ||
198 | struct kretprobe_instance *get_rp_inst_tsk(struct task_struct *tk); | ||
199 | void add_rp_inst(struct kretprobe_instance *ri); | 179 | void add_rp_inst(struct kretprobe_instance *ri); |
200 | void kprobe_flush_task(struct task_struct *tk); | 180 | void kprobe_flush_task(struct task_struct *tk); |
201 | void recycle_rp_inst(struct kretprobe_instance *ri); | 181 | void recycle_rp_inst(struct kretprobe_instance *ri); |