History log of /external/strace/mmsghdr.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b755614143ce6aab5265ed32c1bb6c8f748e7898 21-Feb-2018 Elliott Hughes <enh@google.com> Update strace to 4.21.

Noteworthy changes in release 4.21 (2018-02-13)
===============================================

* Changes in behaviour
* Warning is now issued when -F option is used.
* Warning is now issued when a tracee with unsupported personality
is attached.
* Unknown syscall numbers are now printed in hexadecimal form.

* Improvements
* Implemented decoding of netlink descriptor attributes as file descriptors.
* Implemented decoding of hugetlb page size selection flags.
* Implemented decoding of BPF_PROG_TEST_RUN, BPF_PROG_GET_NEXT_ID,
BPF_MAP_GET_NEXT_ID, BPF_PROG_GET_FD_BY_ID, BPF_MAP_GET_FD_BY_ID,
and BPF_OBJ_GET_INFO_BY_FD commands of bpf syscall.
* Enhanced decoding of get_thread_area, memfd_create, modify_ldt,
perf_event_open, reboot, s390_guarded_storage, s390_pcio_mmio_read,
s390_pci_mmio_write, s390_runtime_instr, s390_sthyi, set_thread_area,
and shmget syscalls.
* Implemented decoding of KVM_* and DM_LIST_DEVICES ioctl commands.
* Implemented decoding of riscv_flush_icache syscall.
* Enhanced decoding of getsockopt and setsockopt syscalls for SOL_NETLINK
level.
* Enhanced decoding of BPF_MAP_CREATE command of bpf syscall.
* Print values returned by mq_open syscall and first arguments
of mq_getsetattr, mq_notify, mq_timedreceive, and mq_timedsend syscalls
as file descriptors.
* Added decoding of get_tls syscall on arm.
* Added -e trace=%pure option for tracing system calls with no arguments that
never fail.
* Updated lists of IPV6_*, MAP_*, MEMBARRIER_CMD_*, MSG_*, NT_*, PKEY_*,
SHM_*, and TCP_* constants.
* Added manual page for the strace-log-merge command.
* Updated lists of ioctl commands from Linux 4.15.
* Implemented biarch support for s390x.
* Implemented an optional support for symbol demangling in strace -k output
(activated by --with-libiberty configure option).
* Information about availability of demangling and reliable personality
decoding (on architectures with multiple personalities) is now available
in strace -V output.
* Added decoding of pkey_alloc, pkey_free, and pkey_mprotect syscalls on
powerpc and powerpc64.
* Enhanced manual page.

* Bug fixes
* Fixed multi-personality support in cross builds.
* Added mq_getsetattr, mq_notify, mq_open, mq_timedreceive, and mq_timedsend
syscalls to %desc tracing set.
* Fixed path tracing support for mmap syscalls with indirect arguments and
for old select syscall.
* Fixed decoding of arm-specific (__ARM_NR_*) syscalls.
* Fixed open mode flags decoding.
* Fixed corner cases in handling of strace -ff -ttt logs by strace-log-merge.
* Error counts that exceed one billion are now printed correctly in call
summary output.
* Fixed call summary header for x32 personality.
* Changes of tracee personalities are reported more reliably.
* Fixed the case when strace attaches to a tracee being inside exec and its
first syscall stop is syscall-exit-stop instead of syscall-enter-stop,
which messed up all the syscall state tracking.
* Fixed printing of higher 32 bits of the return value for x32 personality.

* Portability
* A C compiler that supports "for" loop initial declarations is now required.
* Inability to configure multiple personality support on architectures where
multiple personalities are supported leads to configuration failure during
build now. Use --enable-mpers=check to revert to the old behaviour.
* Build-time requirement for the mpers support has been lowered from gawk 4
to gawk 3.
* Removed incomplete and non-functional support for the CRIS architecture.
* Removed incomplete and unused support for IA-32 mode on the IA-64
architecture.

Bug: N/A
Test: strace -f date
Change-Id: I126eec18d7309a89f5a75dcab6498c99bb099836
/external/strace/mmsghdr.c
d35df493b4e7684c50d2d2fa032ee3a7ac228009 16-Feb-2017 Elliott Hughes <enh@google.com> Upgrade strace to 4.16 from 4.14.

Noteworthy changes in release 4.16 (2017-02-14)

* Improvements
* Implemented syscall return value injection (-e inject=SET:retval= option).
* Implemented signal injection (-e inject=SET:signal= option).
* Implemented decoding of SUID_DUMP_* constants in PR_[GS]ET_DUMPABLE.
* Implemented decoding of all SG_* ioctl commands.
* Implemented decoding of ustat syscall.
* Implemented decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH,
and BPF_PROG_DETACH commands of bpf syscall.
* Enhanced decoding of sg_io_hdr and sg_io_v4 structures.
* Enhanced decoding of get_robust_list, getrandom, io_submit, set_robust_list
syscalls.
* Enhanced decoding of entities of kernel long type on x32 and mips n32 ABIs.
* Updated lists of IP_*, IPV6_*, and LOOP_* constants.
* Updated lists of ioctl commands from Linux 4.10.
* Added decoding of recently added syscalls on avr32, microblaze, ppc,
and ppc64.

* Bug fixes
* Fixed pathmatch of oldselect syscall on 64-bit architectures.
* Fixed decoding of mmap2 syscall on s390 when arguments are not available.
* Fixed decoding of kexec_file_load, mprotect, pkey_mprotect, prctl, preadv*,
and pwritev* syscalls on x32.
* Fixed printing of string arguments of getxattr and setxattr syscalls
when -s option is used to limit the printed string size.
* Fixed decoding of ifconf, ifreq, and loop_info structures on non-native
personalities.
* Fixed decoding of SG_* and LOOP_* ioctl commands.
* Fixed build on mips with musl libc.
* Fixed cross-building of ioctlsort.
* Applied minor formatting fixes to the manual page.

Noteworthy changes in release 4.15 (2016-12-14)

* Changes in behavior
* Time stamps are now printed according to ISO 8601.
* Changed output format of val3 parameter of futex FUTEX_WAKE_OP operation.
* The last argument of mincore, sched_getaffinity, and sched_setaffinity
syscalls is now formatted as an array.

* Improvements
* Implemented syscall fault injection (-e fault=... option).
* Implemented decoding of DM_* ioctl commands.
* Implemented decoding of attr parameter of perf_event_open syscall.
* Implemented decoding of pkey_alloc, pkey_free, and pkey_mprotect syscalls.
* Implemented dumping of mq_timedsend and mq_timedreceive syscalls.
* Implemented decoding of PR_SET_FP_MODE and PR_GET_FP_MODE operations
of prctl syscall.
* Implemented PTRACE_GETREGS API support on m68k.
* Updated lists of ARCH_*, BPF_*, BTRFS_*, FALLOC_*, MS_*, *_MAGIC,
and V4L2_* constants.
* Updated lists of ioctl commands from Linux 4.9.
* Added decoding of recently added syscalls on arc, x32, and xtensa.
* Enhanced manual page.

* Bug fixes
* Fixed corner cases in decoding of exit, exit_group, futimesat, getgroups,
getresuid, init_module, inotify_init1, kcmp, kexec_load, lookup_dcookie,
mq_getsetattr, mq_notify, mq_open, mq_timedreceive, mq_timedsend,
name_to_handle_at, prctl, process_vm_readv, process_vm_writev, setfsuid,
setgroups, setns, unshare, and utimes syscalls.
* Fixed handling of verbose flag in printing of controls array
of struct v4l2_ext_controls.
* Fixed omission of field names in the output of capability, sigaction,
sigevent, statfs, timespec, timeval, and utimbuf structures.
* Fixed printing of unknown syscalls in siginfo structure.
* Fixed decoding of ioctl constants on m68k.
* Fixed cris architecture support.
* Fixed cross build when host compiler does not support the same
set of warning flags as the cross compiler.
* Fixed build on SLE10 and SLE11.

Bug: N/A
Test: manual
Change-Id: I590bf5db1652aa1dfdc0eb16e30fd97c82af2261
/external/strace/mmsghdr.c
0d88d99da2cd452703d8b4f78645ca0c73bd23a0 18-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> Print unsent messages of failed sendmmsg syscall

* mmsghdr.c (decode_mmsgvec): Clear syserror for the time of printing
struct mmsghdr array in !use_msg_len case.
(SYS_FUNC(sendmmsg)): As failed sendmmsg syscall does not
set msg_len fields, tell this to decode_mmsgvec.
* tests/mmsg_name.c (test_mmsg_name): Check it.
/external/strace/mmsghdr.c
3a161d19021710dd8c746655c45eb97aeba93051 18-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> Print unsent messages of sendmmsg syscall

* defs.h (decode_mmsgvec): Add int argument.
* mmsghdr.c (print_struct_mmsghdr_config): Add msg_len_vlen field.
(print_struct_mmsghdr): Print struct mmsghdr.msg_len only for
msg_len_vlen first elements of struct mmsghdr array.
(decode_mmsgvec): Add msg_len_vlen argument.
(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Pass to decode_mmsgvec
the number of elements of struct mmsghdr array that contain meaningful
struct mmsghdr.msg_len.
* tests/mmsg_name.c (test_mmsg_name): Check it.
/external/strace/mmsghdr.c
b42f6b39037eb9cfba87aa091ed86f0095f4adab 18-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> Fix decoding of msg_name* fields of recvmmsg syscall's msghdr array argument

As msg_namelen fields of recvmmsg syscall's struct msghdr array have
the same read-write semantics as struct msghdr argument of recvmsg
syscall, parser of recvmmsg syscall needs a similar fix.

* mmsghdr.c (print_struct_mmsghdr): Increment p_user_msg_namelen field.
(mmsgvec_data): New structure.
(free_mmsgvec_data, save_mmsgvec_namelen): New functions.
(decode_mmsgvec): Take into account the data saved
by save_mmsgvec_namelen function.
(SYS_FUNC(recvmmsg)): Use save_mmsgvec_namelen.
/external/strace/mmsghdr.c
0485ab5e23aa3cbc35d7dff4e55d28c58c25a1be 17-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> mmsghdr.c: rewrite decode_mmsgvec using print_array

* fetch_struct_mmsghdr.c (sizeof_struct_mmsghdr): New mpers printer.
* mmsghdr.c: Include <limits.h>.
(print_struct_mmsghdr_config): New structure.
(fetch_struct_mmsghdr_or_printaddr, print_struct_mmsghdr): New functions.
(decode_mmsgvec): Rewrite using them and print_array.
/external/strace/mmsghdr.c
3e3b7f64032257025081153074679eca3056f7bc 18-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> Fix printing of remaining timeout of recvmmsg syscall

* mmsghdr.c (SYS_FUNC(recvmmsg)): Do not print remaining timeout
when the 5th syscall argument is NULL.
* tests/mmsg.c (main): Update expected output.
/external/strace/mmsghdr.c
7f8ece11c8779a55b63399e21ec53a7a2ff743fc 15-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> Fix race condition in decoding timeout argument of recvmmsg syscall

As the value returned by sprint_timespec points to a static area and may
be overwritten by subsequent calls to sprint_timespec, it is not safe to
save this value on entering syscall and use it later on exiting.

* mmsghdr.c (SYS_FUNC(recvmmsg)): On entering syscall, copy the value
returned by sprint_timespec to a dynamically allocated memory, and save
the pointer using set_tcb_priv_data. On exiting, restore it using
get_tcb_priv_data.
/external/strace/mmsghdr.c
4de8de50d25f515100e7d13a9b7d551613d8d27e 15-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> net.c: move parsers of sendmmsg and recvmmsg syscalls to mmsghdr.c

* defs.h (decode_mmsgvec): Remove.
* net.c: Do not include "msghdr.h".
(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Move ...
* mmsghdr.c: ... here.
(decode_mmsgvec): Add static qualifier.
/external/strace/mmsghdr.c
7c37ce4055248e4d44f4c5b0a1c88ca0b9fdb9df 15-Jul-2016 Dmitry V. Levin <ldv@altlinux.org> msghdr.c: move all mmsghdr parsers to a separate file

* msghdr.h (print_struct_msghdr): New prototype.
* msghdr.c (print_msghdr): Rename to print_struct_msghdr, remove
static qualifier, all callers changed.
(decode_mmsghdr, decode_mmsgvec, dumpiov_in_mmsghdr): Move to ...
* mmsghdr.c: ... new file.
* Makefile.am (strace_SOURCES): Add it.
/external/strace/mmsghdr.c