commit | d8f77cdf42bf7215e7e7615b617a1de3d01188fd | [log] [tgz] |
---|---|---|
author | Dmitry V. Levin <ldv@altlinux.org> | Wed Jul 13 21:56:16 2016 +0000 |
committer | Dmitry V. Levin <ldv@altlinux.org> | Wed Jul 13 21:56:16 2016 +0000 |
tree | b695b95222c6beda89bc96fc6bb61507d8e66769 | |
parent | 766e1d992832aa9deca9aac6666916e98b3ae866 [diff] |
Fix decoding of struct msghdr.msg_name* arguments of recvmsg syscall As the msghdr.msg_namelen argument of recvmsg syscall has the same read-write semantics as the address length argument of recvfrom syscall, parser of recvmsg syscall needs a similar fix. * defs.h (fetch_msghdr_namelen): New prototype. (decode_msghdr): Add "int *" argument. * msghdr.c (print_msghdr): Likewise. Treat it as a pointer to struct msghdr.msg_namelen passed to the kernel. Pass to decode_sockaddr the size of socket address actually returned by the kernel. Print both user and kernel address lengths when the value changes. (decode_msghdr, decode_mmsghdr): Add "int *" argument, forward it to print_msghdr. (decode_mmsgvec): Update decode_mmsghdr invocation. (fetch_msghdr_namelen): New function. * net.c (SYS_FUNC(sendmsg)): Update decode_msghdr invocation. (SYS_FUNC(recvmsg)): Use fetch_msghdr_namelen on entering to save struct msghdr.msg_namelen. On exiting, pass the saved value to decode_msghdr.
This is strace -- a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace.
strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file COPYING for details.
See the file NEWS for information on what has changed in recent versions.
Please send bug reports and enhancements to the strace mailing list.