aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/uprobes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/uprobes.h')
-rw-r--r--include/linux/uprobes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index 02b83db8e2c5..06f28beed7c2 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -38,6 +38,8 @@ struct inode;
38#define UPROBE_HANDLER_REMOVE 1 38#define UPROBE_HANDLER_REMOVE 1
39#define UPROBE_HANDLER_MASK 1 39#define UPROBE_HANDLER_MASK 1
40 40
41#define MAX_URETPROBE_DEPTH 64
42
41enum uprobe_filter_ctx { 43enum uprobe_filter_ctx {
42 UPROBE_FILTER_REGISTER, 44 UPROBE_FILTER_REGISTER,
43 UPROBE_FILTER_UNREGISTER, 45 UPROBE_FILTER_UNREGISTER,
@@ -46,6 +48,9 @@ enum uprobe_filter_ctx {
46 48
47struct uprobe_consumer { 49struct uprobe_consumer {
48 int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); 50 int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs);
51 int (*ret_handler)(struct uprobe_consumer *self,
52 unsigned long func,
53 struct pt_regs *regs);
49 bool (*filter)(struct uprobe_consumer *self, 54 bool (*filter)(struct uprobe_consumer *self,
50 enum uprobe_filter_ctx ctx, 55 enum uprobe_filter_ctx ctx,
51 struct mm_struct *mm); 56 struct mm_struct *mm);
@@ -68,6 +73,8 @@ struct uprobe_task {
68 enum uprobe_task_state state; 73 enum uprobe_task_state state;
69 struct arch_uprobe_task autask; 74 struct arch_uprobe_task autask;
70 75
76 struct return_instance *return_instances;
77 unsigned int depth;
71 struct uprobe *active_uprobe; 78 struct uprobe *active_uprobe;
72 79
73 unsigned long xol_vaddr; 80 unsigned long xol_vaddr;
@@ -100,6 +107,7 @@ struct uprobes_state {
100extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 107extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
101extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); 108extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
102extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); 109extern bool __weak is_swbp_insn(uprobe_opcode_t *insn);
110extern bool __weak is_trap_insn(uprobe_opcode_t *insn);
103extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); 111extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
104extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); 112extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool);
105extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); 113extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);