[REFACTOR] redesign ret_handler_cp()
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 18 Jun 2013 07:08:58 +0000 (11:08 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 18 Jun 2013 07:08:58 +0000 (11:08 +0400)
us_manager/helper.c
us_manager/pf/pf_group.c

index d2b8590..62ebc7f 100644 (file)
@@ -118,20 +118,17 @@ static int ret_handler_cp(struct kretprobe_instance *ri, struct pt_regs *regs)
 {
        struct task_struct *task = (struct task_struct *)regs_return_value(regs);
 
-       return 0;
-
        if(!task || IS_ERR(task))
                goto out;
 
        if(task->mm != current->mm) {   /* check flags CLONE_VM */
                rm_uprobes_child(task);
 
-               if (check_task(current)) {
-                       struct sspt_proc *proc;
-
-                       proc = sspt_proc_create(task);
-                       sspt_proc_install(proc);
-               }
+               /*
+                * Ignoring page_addr, because it is
+                * first calling call_page_fault()
+                */
+               call_page_fault(task, 0xbadc0de);
        }
 out:
        return 0;
index e1c1508..3501e5a 100644 (file)
@@ -235,6 +235,7 @@ void call_page_fault(struct task_struct *task, unsigned long page_addr)
        struct pf_group *pfg;
 
        list_for_each_entry(pfg, &pfg_list, list) {
+               /* FIXME: install page more then once */
                install_page_by_pfg(pfg, task, page_addr);
        }
 }