goto sad_cleanup;
}
- proc_p_free_all();
+ sspt_procs_free_all();
vfree(bundle);
result = 0;
struct sspt_procs *get_file_probes(const inst_us_proc_t *task_inst_info)
{
- struct sspt_procs *procs = proc_p_create(task_inst_info->m_f_dentry, 0);
+ struct sspt_procs *procs = sspt_procs_create(task_inst_info->m_f_dentry, 0);
printk("####### get START #######\n");
extern struct list_head proc_probes_list;
-struct sspt_procs *proc_p_create(struct dentry* dentry, pid_t tgid)
+struct sspt_procs *sspt_procs_create(struct dentry* dentry, pid_t tgid)
{
struct sspt_procs *procs = kmalloc(sizeof(*procs), GFP_ATOMIC);
return procs;
}
-void proc_p_free(struct sspt_procs *procs)
+void sspt_procs_free(struct sspt_procs *procs)
{
struct sspt_file *file, *n;
list_for_each_entry_safe(file, n, &procs->file_list, list) {
#include "../storage.h"
extern inst_us_proc_t us_proc_info;
-void proc_p_free_all(void)
+void sspt_procs_free_all(void)
{
if (strcmp(us_proc_info.path,"*") == 0) {
// app
- proc_p_free(us_proc_info.pp);
+ sspt_procs_free(us_proc_info.pp);
us_proc_info.pp = NULL;
} else {
// libonly
struct sspt_procs *procs, *n;
list_for_each_entry_safe(procs, n, &proc_probes_list, list) {
list_del(&procs->list);
- proc_p_free(procs);
+ sspt_procs_free(procs);
}
}
}
-static void proc_p_add_file_p(struct sspt_procs *procs, struct sspt_file *file)
+static void sspt_procs_add_file(struct sspt_procs *procs, struct sspt_file *file)
{
list_add(&file->list, &procs->file_list);
}
}
file = file_p_new(pach, dentry, 10);
- proc_p_add_file_p(procs, file);
+ sspt_procs_add_file(procs, file);
return file;
}
}
}
-struct sspt_procs *proc_p_copy(struct sspt_procs *procs, struct task_struct *task)
+struct sspt_procs *sspt_procs_copy(struct sspt_procs *procs, struct task_struct *task)
{
struct sspt_file *file;
- struct sspt_procs *procs_out = proc_p_create(procs->dentry, task->tgid);
+ struct sspt_procs *procs_out = sspt_procs_create(procs->dentry, task->tgid);
list_for_each_entry(file, &procs->file_list, list) {
- proc_p_add_file_p(procs_out, file_p_copy(file));
+ sspt_procs_add_file(procs_out, file_p_copy(file));
}
return procs_out;
}
-struct sspt_file *proc_p_find_file_p(struct sspt_procs *procs, struct vm_area_struct *vma)
+struct sspt_file *sspt_procs_find_file(struct sspt_procs *procs, struct vm_area_struct *vma)
{
struct sspt_file *file;
};
-struct sspt_procs *proc_p_create(struct dentry* dentry, pid_t tgid);
-struct sspt_procs *proc_p_copy(struct sspt_procs *procs, struct task_struct *task);
-void proc_p_free(struct sspt_procs *procs);
-void proc_p_free_all(void);
+struct sspt_procs *sspt_procs_create(struct dentry* dentry, pid_t tgid);
+struct sspt_procs *sspt_procs_copy(struct sspt_procs *procs, struct task_struct *task);
+void sspt_procs_free(struct sspt_procs *procs);
+void sspt_procs_free_all(void);
void proc_p_add_dentry_probes(struct sspt_procs *procs, const char *pach,
struct dentry* dentry, struct ip_data *ip_d, int cnt);
struct sspt_file *proc_p_find_file_p_by_dentry(struct sspt_procs *procs,
const char *pach, struct dentry *dentry);
-struct sspt_file *proc_p_find_file_p(struct sspt_procs *procs, struct vm_area_struct *vma);
+struct sspt_file *sspt_procs_find_file(struct sspt_procs *procs, struct vm_area_struct *vma);
#endif /* __PROC_PROBES__ */
{
struct sspt_procs *procs = get_proc_probes_by_task(task);
if (procs == NULL) {
- procs = proc_p_copy(us_proc_info.pp, task);
+ procs = sspt_procs_copy(us_proc_info.pp, task);
add_proc_probes(task, procs);
}
vma = find_vma(mm, page_addr);
if (vma && check_vma(vma)) {
- struct sspt_file *file = proc_p_find_file_p(procs, vma);
+ struct sspt_file *file = sspt_procs_find_file(procs, vma);
if (file) {
struct page_probes *page;
if (!file->loaded) {
for (vma = mm->mmap; vma; vma = vma->vm_next) {
if (check_vma(vma)) {
- struct sspt_file *file = proc_p_find_file_p(procs, vma);
+ struct sspt_file *file = sspt_procs_find_file(procs, vma);
if (file) {
if (!file->loaded) {
set_mapping_file(file, procs, task, vma);
struct sspt_file *file;
unsigned long end = start + len;
- file = proc_p_find_file_p(procs, vma);
+ file = sspt_procs_find_file(procs, vma);
if (file) {
if (vma->vm_start == start || vma->vm_end == end) {
unregister_us_file_probes(task, file, US_NOT_RP2);