aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index d304d4579856..b7a194c4362a 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
107extern int trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs);
108extern void trampoline_post_handler(struct kprobe *p, struct pt_regs *regs,
109 unsigned long flags);
110extern struct task_struct *arch_get_kprobe_task(void *ptr);
111extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); 107extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs);
112extern void arch_kprobe_flush_task(struct task_struct *tk);
113#else /* ARCH_SUPPORTS_KRETPROBES */ 108#else /* ARCH_SUPPORTS_KRETPROBES */
114static inline void kretprobe_trampoline(void)
115{
116}
117static inline int trampoline_probe_handler(struct kprobe *p,
118 struct pt_regs *regs)
119{
120 return 0;
121}
122static inline void trampoline_post_handler(struct kprobe *p,
123 struct pt_regs *regs, unsigned long flags)
124{
125}
126static inline void arch_prepare_kretprobe(struct kretprobe *rp, 109static inline void arch_prepare_kretprobe(struct kretprobe *rp,
127 struct pt_regs *regs) 110 struct pt_regs *regs)
128{ 111{
129} 112}
130static 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,6 +155,7 @@ extern void arch_copy_kprobe(struct kprobe *p);
176extern void arch_arm_kprobe(struct kprobe *p); 155extern void arch_arm_kprobe(struct kprobe *p);
177extern void arch_disarm_kprobe(struct kprobe *p); 156extern void arch_disarm_kprobe(struct kprobe *p);
178extern void arch_remove_kprobe(struct kprobe *p); 157extern void arch_remove_kprobe(struct kprobe *p);
158extern int arch_init(void);
179extern void show_registers(struct pt_regs *regs); 159extern void show_registers(struct pt_regs *regs);
180extern kprobe_opcode_t *get_insn_slot(void); 160extern kprobe_opcode_t *get_insn_slot(void);
181extern void free_insn_slot(kprobe_opcode_t *slot); 161extern void free_insn_slot(kprobe_opcode_t *slot);
@@ -196,8 +176,6 @@ int register_kretprobe(struct kretprobe *rp);
196void unregister_kretprobe(struct kretprobe *rp); 176void unregister_kretprobe(struct kretprobe *rp);
197 177
198struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); 178struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp);
199struct kretprobe_instance *get_rp_inst(void *sara);
200struct kretprobe_instance *get_rp_inst_tsk(struct task_struct *tk);
201void add_rp_inst(struct kretprobe_instance *ri); 179void add_rp_inst(struct kretprobe_instance *ri);
202void kprobe_flush_task(struct task_struct *tk); 180void kprobe_flush_task(struct task_struct *tk);
203void recycle_rp_inst(struct kretprobe_instance *ri); 181void recycle_rp_inst(struct kretprobe_instance *ri);