From: Dmitry V. Levin Date: Sun, 25 Dec 2016 01:11:24 +0000 (+0000) Subject: ipc_msg: change size types from unsigned long to kernel_ureg_t X-Git-Tag: v4.16~183 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ee3e80cb192f9bba8638925299742dc05335f98;p=strace ipc_msg: change size types from unsigned long to kernel_ureg_t * ipc_msg.c (tprint_msgsnd): Change count argument type from unsigned long to kernel_ureg_t. Change flags argument type from unsigned long to unsigned int. (tprint_msgrcv): Change the type of count and msgtyp arguments from unsigned long to kernel_ureg_t. (fetch_msgrcv_args): Change *pair type from unsigned long to kernel_ureg_t. (SYS_FUNC(msgrcv)): Change pair type from unsigned long to kernel_ureg_t. * print_msgbuf.c (tprint_msgbuf): Change count argument type from unsigned long to kernel_ureg_t. --- diff --git a/ipc_msg.c b/ipc_msg.c index 29a21d7a..d12be345 100644 --- a/ipc_msg.c +++ b/ipc_msg.c @@ -58,7 +58,7 @@ SYS_FUNC(msgget) static void tprint_msgsnd(struct tcb *const tcp, const kernel_ureg_t addr, - const unsigned long count, const unsigned long flags) + const kernel_ureg_t count, const unsigned int flags) { tprint_msgbuf(tcp, addr, count); printflags(ipc_msg_flags, flags, "MSG_???"); @@ -79,7 +79,7 @@ SYS_FUNC(msgsnd) static void tprint_msgrcv(struct tcb *const tcp, const kernel_ureg_t addr, - const unsigned long count, const unsigned long msgtyp) + const kernel_ureg_t count, const kernel_ureg_t msgtyp) { tprint_msgbuf(tcp, addr, count); tprintf("%ld, ", msgtyp); @@ -87,7 +87,7 @@ tprint_msgrcv(struct tcb *const tcp, const kernel_ureg_t addr, static int fetch_msgrcv_args(struct tcb *const tcp, const kernel_ureg_t addr, - unsigned long *const pair) + kernel_ureg_t *const pair) { if (current_wordsize == sizeof(*pair)) { if (umoven_or_printaddr(tcp, addr, 2 * sizeof(*pair), pair)) @@ -118,7 +118,7 @@ SYS_FUNC(msgrcv) tprint_msgrcv(tcp, tcp->u_arg[3], tcp->u_arg[1], tcp->u_arg[4]); } else { - unsigned long pair[2]; + kernel_ureg_t pair[2]; if (fetch_msgrcv_args(tcp, tcp->u_arg[3], pair)) tprintf(", %lu, ", tcp->u_arg[1]); diff --git a/print_msgbuf.c b/print_msgbuf.c index e6fe4306..733f0198 100644 --- a/print_msgbuf.c +++ b/print_msgbuf.c @@ -39,12 +39,12 @@ typedef struct msgbuf msgbuf_t; #include MPERS_DEFS MPERS_PRINTER_DECL(void, tprint_msgbuf, struct tcb *const tcp, - const kernel_ureg_t addr, const unsigned long count) + const kernel_ureg_t addr, const kernel_ureg_t count) { msgbuf_t msg; if (!umove_or_printaddr(tcp, addr, &msg)) { - tprintf("{%lu, ", (long) msg.mtype); + tprintf("{%" PRI_kld ", ", (kernel_long_t) msg.mtype); printstrn(tcp, addr + sizeof(msg.mtype), count); tprints("}"); }