loader: Replace outdated interface 96/111096/1
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 11 Nov 2016 17:53:46 +0000 (20:53 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Thu, 19 Jan 2017 10:17:05 +0000 (13:17 +0300)
Change functions:
swap_get_arg() --> swap_get_uarg()
swap_set_arg() --> swap_put_uarg()

Change-Id: Ia667b2d56fdfd730a4c864482aced52f7d5579f4
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
loader/loader_module.c

index 54d8948..8ee703e 100644 (file)
@@ -125,8 +125,8 @@ static inline void __save_uregs(struct uretprobe_instance *ri,
        struct us_priv *priv = (struct us_priv *)ri->data;
 
        memcpy(ri->data, regs, sizeof(*regs));
-       priv->arg0 = swap_get_arg(regs, 0);
-       priv->arg1 = swap_get_arg(regs, 1);
+       priv->arg0 = swap_get_uarg(regs, 0);
+       priv->arg1 = swap_get_uarg(regs, 1);
        priv->raddr = swap_get_ret_addr(regs);
 }
 
@@ -136,8 +136,8 @@ static inline void __restore_uregs(struct uretprobe_instance *ri,
        struct us_priv *priv = (struct us_priv *)ri->data;
 
        memcpy(regs, ri->data, sizeof(*regs));
-       swap_set_arg(regs, 0, priv->arg0);
-       swap_set_arg(regs, 1, priv->arg1);
+       swap_put_uarg(regs, 0, priv->arg0);
+       swap_put_uarg(regs, 1, priv->arg1);
        swap_set_ret_addr(regs, priv->raddr);
 #ifndef CONFIG_ARM
        /* need to do it only on x86 */
@@ -174,7 +174,7 @@ static inline void print_regs(const char *prefix, struct pt_regs *regs,
                                (char *)("NULL"),
               (int)lpd_get_state(hd),
               prefix, (unsigned long)ri->rp->up.addr,
-              regs->EREG(ip), swap_get_arg(regs, 0), swap_get_arg(regs, 1),
+              regs->EREG(ip), swap_get_uarg(regs, 0), swap_get_uarg(regs, 1),
               swap_get_ret_addr(regs));
 #endif /* CONFIG_ARM */
 }
@@ -428,8 +428,8 @@ static unsigned long __not_loaded_entry(struct uretprobe_instance *ri,
                path = lpd_get_path(pd, hd);
 
                /* set dlopen args: filename, flags */
-               swap_set_arg(regs, 0, (unsigned long)path/*swap_get_stack_ptr(regs)*/);
-               swap_set_arg(regs, 1, 2 /* RTLD_NOW */);
+               swap_put_uarg(regs, 0, (unsigned long)path);
+               swap_put_uarg(regs, 1, 2 /* RTLD_NOW */);
 
                /* do the jump to dlopen */
                __prepare_ujump(ri, regs, vaddr);