From: Dmitry V. Levin Date: Sun, 25 Dec 2016 22:17:38 +0000 (+0000) Subject: clone: print clone flags without truncation X-Git-Tag: v4.16~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=276839aec610434ea355bd5920f8654b95f2f454;p=strace clone: print clone flags without truncation The flags argument is defined in kernel as unsigned long, so change its decoding to avoid truncation. * clone.c (SYS_FUNC(clone)): Change flags type from unsigned long to kernel_ureg_t, print it using printflags64 instead of printflags. --- diff --git a/clone.c b/clone.c index 3bc1e22e..81b1ba0d 100644 --- a/clone.c +++ b/clone.c @@ -98,7 +98,7 @@ SYS_FUNC(clone) { if (exiting(tcp)) { const char *sep = "|"; - unsigned long flags = tcp->u_arg[ARG_FLAGS]; + kernel_ureg_t flags = tcp->u_arg[ARG_FLAGS]; tprints("child_stack="); printaddr(tcp->u_arg[ARG_STACK]); tprints(", "); @@ -108,7 +108,7 @@ SYS_FUNC(clone) tcp->u_arg[ARG_STACKSIZE]); #endif tprints("flags="); - if (!printflags(clone_flags, flags &~ CSIGNAL, NULL)) + if (!printflags64(clone_flags, flags &~ CSIGNAL, NULL)) sep = ""; if ((flags & CSIGNAL) != 0) tprintf("%s%s", sep, signame(flags & CSIGNAL));