us_proc_info.pp->sm = create_sm_us(task);
/* install probes in already mapped memory */
- install_proc_probes(task, us_proc_info.pp, 1);
+ install_proc_probes(task, us_proc_info.pp);
}
}
if (procs) {
unsigned long page = addr & PAGE_MASK;
- install_page_probes(page, task, procs, 1);
+ install_page_probes(page, task, procs);
}
out:
procs = sspt_procs_get_by_task_or_new(task);
DPRINTF("trying process");
- install_proc_probes(task, procs, 1);
+ install_proc_probes(task, procs);
//put_task_struct (task);
}
}
DPRINTF("task found. installing probes");
us_proc_info.tgid = task->pid;
us_proc_info.pp->sm = create_sm_us(task);
- install_proc_probes(task, us_proc_info.pp, 0);
+ install_proc_probes(task, us_proc_info.pp);
put_task_struct (task);
}
}
return err;
}
-void install_page_probes(unsigned long page_addr, struct task_struct *task, struct sspt_procs *procs, int atomic)
+void install_page_probes(unsigned long page_addr, struct task_struct *task, struct sspt_procs *procs)
{
- int lock;
+ int lock, atomic;
struct mm_struct *mm;
struct vm_area_struct *vma;
+ atomic = in_atomic();
mm_read_lock(task, mm, atomic, lock);
vma = find_vma(mm, page_addr);
}
}
-void install_proc_probes(struct task_struct *task, struct sspt_procs *procs, int atomic)
+void install_proc_probes(struct task_struct *task, struct sspt_procs *procs)
{
- int lock;
+ int lock, atomic;
struct vm_area_struct *vma;
struct mm_struct *mm;
+ atomic = in_atomic();
mm_read_lock(task, mm, atomic, lock);
for (vma = mm->mmap; vma; vma = vma->vm_next) {
int check_install_pages_in_file(struct task_struct *task, struct sspt_file *file);
int unregister_us_page_probe(struct task_struct *task,
struct sspt_page *page, enum US_FLAGS flag);
-void install_proc_probes(struct task_struct *task, struct sspt_procs *procs, int atomic);
+void install_proc_probes(struct task_struct *task, struct sspt_procs *procs);
pid_t find_proc_by_task(const struct task_struct *task, struct dentry *dentry);
-void install_page_probes(unsigned long page_addr, struct task_struct *task, struct sspt_procs *procs, int atomic);
+void install_page_probes(unsigned long page_addr, struct task_struct *task, struct sspt_procs *procs);
int uninstall_us_proc_probes(struct task_struct *task, struct sspt_procs *procs, enum US_FLAGS flag);
int check_vma(struct vm_area_struct *vma);
int unregister_us_file_probes(struct task_struct *task, struct sspt_file *file, enum US_FLAGS flag);