[REFACTOR] move and rename install_file_probes()
[kernel/swap-modules.git] / driver / us_proc_inst.h
1 ////////////////////////////////////////////////////////////////////////////////////
2 //
3 //      FILE:           us_proc_inst.h
4 //
5 //      DESCRIPTION:
6 //
7 //      SEE ALSO:       us_proc_inst.c
8 //      AUTHOR:         A.Gerenkov
9 //      COMPANY NAME:   Samsung Research Center in Moscow
10 //      DEPT NAME:      Advanced Software Group
11 //      CREATED:        2008.06.02
12 //      VERSION:        1.0
13 //      REVISION DATE:  2008.12.03
14 //
15 ////////////////////////////////////////////////////////////////////////////////////
16
17 /*
18     Functions in "us_proc_inst.h" file .
19 */
20
21 #if !defined(__US_PROC_INST_H__)
22 #define __US_PROC_INST_H__
23
24 #include <linux/signal.h>       // struct sigpending
25 #include "sspt/ip.h"
26
27 /* Instruments or schedules pending instrumentation of user space process. */
28 extern int inst_usr_space_proc (void);
29 extern int deinst_usr_space_proc (void);
30
31 extern pid_t gl_nNotifyTgid;
32
33 /* forward declarations */
34 struct task_struct;
35 struct pt_regs;
36 struct us_proc_ip_t;
37 struct us_ip;
38 struct sspt_file;
39 struct sspt_page;
40 struct vm_area_struct;
41 enum US_FLAGS;
42
43 int is_libonly(void);
44 int is_us_instrumentation(void);
45
46 int register_usprobe(struct us_ip *ip);
47 int unregister_usprobe(struct us_ip *ip);
48
49 struct dentry *dentry_by_path(const char *path);
50 int install_otg_ip(unsigned long addr,
51                         kprobe_pre_entry_handler_t pre_handler,
52                         unsigned long jp_handler,
53                         uretprobe_handler_t rp_handler);
54
55 void install_proc_probes(struct task_struct *task, struct sspt_procs *procs);
56 int check_dentry(struct task_struct *task, struct dentry *dentry);
57 void install_page_probes(unsigned long page_addr, struct task_struct *task, struct sspt_procs *procs);
58 int uninstall_us_proc_probes(struct task_struct *task, struct sspt_procs *procs, enum US_FLAGS flag);
59 int check_vma(struct vm_area_struct *vma);
60 int unregister_us_file_probes(struct task_struct *task, struct sspt_file *file, enum US_FLAGS flag);
61
62 #endif /* !defined(__US_PROC_INST_H__) */