aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
authorAbhishek Sagar <sagar.abhishek@gmail.com>2008-02-06 04:38:22 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:11 -0500
commitf47cd9b553aaada602449204513b5a5b29cba263 (patch)
tree079ddd399b1aa00a8c413ef51f3b8681a19a6e7e /include/linux/kprobes.h
parent5beec4aa2ac261b0b4992fb41df40a7ab91e4fad (diff)
kprobes: kretprobe user entry-handler
Provide support to add an optional user defined callback to be run at function entry of a kretprobe'd function. Also modify the kprobe smoke tests to include an entry-handler during the kretprobe sanity test. Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Acked-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 6168c0a44172..4a6ce82ba039 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -152,8 +152,10 @@ static inline int arch_trampoline_kprobe(struct kprobe *p)
152struct kretprobe { 152struct kretprobe {
153 struct kprobe kp; 153 struct kprobe kp;
154 kretprobe_handler_t handler; 154 kretprobe_handler_t handler;
155 kretprobe_handler_t entry_handler;
155 int maxactive; 156 int maxactive;
156 int nmissed; 157 int nmissed;
158 size_t data_size;
157 struct hlist_head free_instances; 159 struct hlist_head free_instances;
158 struct hlist_head used_instances; 160 struct hlist_head used_instances;
159}; 161};
@@ -164,6 +166,7 @@ struct kretprobe_instance {
164 struct kretprobe *rp; 166 struct kretprobe *rp;
165 kprobe_opcode_t *ret_addr; 167 kprobe_opcode_t *ret_addr;
166 struct task_struct *task; 168 struct task_struct *task;
169 char data[0];
167}; 170};
168 171
169struct kretprobe_blackpoint { 172struct kretprobe_blackpoint {