]> granicus.if.org Git - strace/commitdiff
bjm: use getarg_ull for retrieving first two parameters of init_module syscall
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 16 Oct 2016 23:15:37 +0000 (02:15 +0300)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Fri, 28 Oct 2016 23:54:01 +0000 (02:54 +0300)
As init_module has no compat wrapper, its first parameter is a pointer
and the second is length, they both have the same size as kernel_ulong_t
type.

* bjm.c (SYS_FUNC(init_module)): Obtain first two parameters using
getarg_ull, print address argument using printaddr_ull, print length
argument using "%llu" conversion specifier.

bjm.c

diff --git a/bjm.c b/bjm.c
index e77b73d686c6d6ad1d60c902f2c3b2dbc136c8ca..054f110b25cb5ce63e4df8c84fbe27a2fddc42e5 100644 (file)
--- a/bjm.c
+++ b/bjm.c
@@ -44,8 +44,8 @@ SYS_FUNC(delete_module)
 
 SYS_FUNC(init_module)
 {
-       printaddr(tcp->u_arg[0]);
-       tprintf(", %lu, ", tcp->u_arg[1]);
+       printaddr_ull(getarg_ull(tcp, 0));
+       tprintf(", %llu, ", getarg_ull(tcp, 1));
        printstr(tcp, tcp->u_arg[2], -1);
 
        return RVAL_DECODED;