From 91b63a91aeece1a2e09016b413dc67a8e4b378d1 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 23 Dec 2016 01:05:06 +0000 Subject: [PATCH] ipc_*: change address argument type from long to kernel_ureg_t * 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 | 11 ++++++----- ipc_msgctl.c | 4 ++-- ipc_sem.c | 3 ++- ipc_shmctl.c | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ipc_msg.c b/ipc_msg.c index 7ef5cda9..29a21d7a 100644 --- 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)) diff --git a/ipc_msgctl.c b/ipc_msgctl.c index a7352cb9..9ad101f1 100644 --- a/ipc_msgctl.c +++ b/ipc_msgctl.c @@ -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; diff --git a/ipc_sem.c b/ipc_sem.c index db797469..f4b83f62 100644 --- 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; diff --git a/ipc_shmctl.c b/ipc_shmctl.c index 12bb806b..ee7f7d9f 100644 --- a/ipc_shmctl.c +++ b/ipc_shmctl.c @@ -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; -- 2.40.0