[REFACTOR] new interface arch_prepare_uprobe()
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 1 Apr 2013 09:09:58 +0000 (13:09 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 1 Apr 2013 09:09:58 +0000 (13:09 +0400)
-int arch_prepare_uprobe(struct kprobe *p, struct task_struct *task, int atomic);
+int arch_prepare_uprobe(struct uprobe *up, int atomic);

uprobe/arch/asm-arm/swap_uprobes.c
uprobe/arch/asm-arm/swap_uprobes.h
uprobe/swap_uprobes.c

index 9054260..2f6d160 100644 (file)
@@ -532,9 +532,11 @@ static int arch_copy_trampoline_thumb_uprobe(struct kprobe *p, struct task_struc
        return 0;
 }
 
-int arch_prepare_uprobe(struct kprobe *p, struct task_struct *task, int atomic)
+int arch_prepare_uprobe(struct uprobe *up, int atomic)
 {
        int ret = 0;
+       struct kprobe *p = &up->kp;
+       struct task_struct *task = up->task;
        kprobe_opcode_t insn[MAX_INSN_SIZE];
 
        if ((unsigned long)p->addr & 0x01) {
index 5ce45cc..a34f8a2 100644 (file)
@@ -10,7 +10,7 @@ static inline void dbi_arch_uprobe_return(void)
 {
 }
 
-int arch_prepare_uprobe(struct kprobe *p, struct task_struct *task, int atomic);
+int arch_prepare_uprobe(struct uprobe *up, int atomic);
 
 int setjmp_upre_handler(struct kprobe *p, struct pt_regs *regs);
 static inline int longjmp_break_uhandler(struct kprobe *p, struct pt_regs *regs)
index fd245d1..4309a02 100644 (file)
@@ -562,7 +562,7 @@ int dbi_register_uprobe(struct uprobe *up, int atomic)
                goto out;
        }
 
-       ret = arch_prepare_uprobe(p, up->task, atomic);
+       ret = arch_prepare_uprobe(up, atomic);
        if (ret) {
                DBPRINTF("goto out\n", ret);
                goto out;