]> granicus.if.org Git - strace/commitdiff
ipc_*: change address argument type from long to kernel_ureg_t
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 01:05:06 +0000 (01:05 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:45 +0000 (11:32 +0000)
* ipc_msg.c (tprint_msgsnd, tprint_msgrcv, fetch_msgrcv_args): Change
address argument type from long to kernel_ureg_t.
* ipc_msgctl.c (print_msqid_ds): Likewise.
* ipc_sem.c (tprint_sembuf_array): Likewise.
* ipc_shmctl.c (print_shmid_ds): Likewise.

ipc_msg.c
ipc_msgctl.c
ipc_sem.c
ipc_shmctl.c

index 7ef5cda93f426a44abd41dc510b469840b11a93e..29a21d7aaf22276ff5d3149081b747c22e791b5f 100644 (file)
--- a/ipc_msg.c
+++ b/ipc_msg.c
@@ -57,8 +57,8 @@ SYS_FUNC(msgget)
 }
 
 static void
-tprint_msgsnd(struct tcb *tcp, const long addr, const unsigned long count,
-             const unsigned long flags)
+tprint_msgsnd(struct tcb *const tcp, const kernel_ureg_t addr,
+             const unsigned long count, const unsigned long flags)
 {
        tprint_msgbuf(tcp, addr, count);
        printflags(ipc_msg_flags, flags, "MSG_???");
@@ -78,15 +78,16 @@ SYS_FUNC(msgsnd)
 }
 
 static void
-tprint_msgrcv(struct tcb *tcp, const long addr, const unsigned long count,
-             const long msgtyp)
+tprint_msgrcv(struct tcb *const tcp, const kernel_ureg_t addr,
+             const unsigned long count, const unsigned long msgtyp)
 {
        tprint_msgbuf(tcp, addr, count);
        tprintf("%ld, ", msgtyp);
 }
 
 static int
-fetch_msgrcv_args(struct tcb *tcp, const long addr, unsigned long *pair)
+fetch_msgrcv_args(struct tcb *const tcp, const kernel_ureg_t addr,
+                 unsigned long *const pair)
 {
        if (current_wordsize == sizeof(*pair)) {
                if (umoven_or_printaddr(tcp, addr, 2 * sizeof(*pair), pair))
index a7352cb9a301f412d4dde0b53e3fa08fe3ee9910..9ad101f17249cd3a66f33f91db7890d02b148be6 100644 (file)
@@ -51,7 +51,7 @@ typedef struct msqid64_ds msqid_ds_t;
 #include "xlat/msgctl_flags.h"
 
 static void
-print_msqid_ds(struct tcb *tcp, const long addr, int cmd)
+print_msqid_ds(struct tcb *const tcp, const kernel_ureg_t addr, int cmd)
 {
        /* TODO: We don't properly decode old compat ipc calls. */
        if (cmd & IPC_64)
@@ -101,7 +101,7 @@ SYS_FUNC(msgctl)
                PRINTCTL(msgctl_flags, tcp->u_arg[1], "MSG_???");
                tprints(", ");
        } else {
-               const long addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
+               const kernel_ureg_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
                print_msqid_ds(tcp, addr, tcp->u_arg[1]);
        }
        return 0;
index db79746988b0a77f089114498e7aa158f690f6fc..f4b83f623058d76635c4846e99088ff73b1c0321 100644 (file)
--- a/ipc_sem.c
+++ b/ipc_sem.c
@@ -57,7 +57,8 @@ print_sembuf(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
 #endif
 
 static void
-tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned int count)
+tprint_sembuf_array(struct tcb *const tcp, const kernel_ureg_t addr,
+                   const unsigned int count)
 {
 #if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H
        struct sembuf sb;
index 12bb806b1d57be48beb405c32fddf3616e4e5687..ee7f7d9f3c3df50b7cd2c871bfc249aca13e76e0 100644 (file)
@@ -51,7 +51,7 @@ typedef struct shmid64_ds shmid_ds_t;
 #include "xlat/shmctl_flags.h"
 
 static void
-print_shmid_ds(struct tcb *tcp, const long addr, int cmd)
+print_shmid_ds(struct tcb *const tcp, const kernel_ureg_t addr, int cmd)
 {
        /* TODO: We don't properly decode old compat ipc calls. */
        if (cmd & IPC_64)
@@ -101,7 +101,7 @@ SYS_FUNC(shmctl)
                PRINTCTL(shmctl_flags, tcp->u_arg[1], "SHM_???");
                tprints(", ");
        } else {
-               const long addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
+               const kernel_ureg_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2];
                print_shmid_ds(tcp, addr, tcp->u_arg[1]);
        }
        return 0;