Home | History | Annotate | Download | only in strace
      1 2018-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
      2 
      3 	Prepare for 4.21 release.
      4 	* NEWS: Update for 4.21 release.
      5 
      6 	Update copyright headers.
      7 	Headers updated automatically using maint/update_copyright_years.sh
      8 	script.
      9 
     10 2018-02-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
     11 
     12 	Remove old and unused maintenance scripts.
     13 	Firewell, last witnesses of bygone era.
     14 
     15 	* linux/sparc/gen.pl: Remove.
     16 	* linux/x86_64/gentab.pl: Likewise.
     17 	* xlate.el: Likewise.
     18 	* Makefile.am (EXTRA_DIST): Remove them.
     19 
     20 	Suggested-by: Elvira Khabirova <lineprinter (a] altlinux.org>
     21 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
     22 
     23 2018-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
     24 
     25 	Consistently use MAX_ERRNO_VALUE.
     26 	* filter_qualify.c (parse_inject_token): Replace 4095
     27 	with MAX_ERRNO_VALUE.
     28 	* negated_errno.h (is_negated_errno): Likewise.  Remove redundant
     29 	comment.
     30 
     31 	Export SIZEOF_LONG and SIZEOF_KERNEL_LONG_T to tests.
     32 	* configure.ac (AC_SUBST): Add SIZEOF_LONG and SIZEOF_KERNEL_LONG_T.
     33 	* tests/Makefile.am (SIZEOF_LONG, SIZEOF_KERNEL_LONG_T): New variables.
     34 	(AM_TEST_LOG_FLAGS): Pass them.
     35 	* bootstrap: Substitute them.
     36 
     37 2018-02-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
     38 
     39 	tests: avoid ioctl_kvm_run test failure when built with gcc -O0.
     40 	When built with -O0, gcc (rightfully) generates function prologue, which
     41 	results in writing %rbp to the stack, causing premature KVM_EXIT_MMIO.
     42 	It could be possible to avoid such problems by "naked" attribute but,
     43 	unfortunately, the latter is not available on x86 with older GCC.
     44 	A trick suggested in [1] is used instead: assembly is moved
     45 	to the global scope.
     46 
     47 	[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50242#c3
     48 
     49 	* tests/ioctl_kvm_run.c (code): Remove function.
     50 	Add globally scoped __asm__ with the function code and its size.
     51 	(code, code_size): New extern symbols declarations.
     52 	(run_kvm): Remove code_size definition and initialization.
     53 
     54 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
     55 
     56 2018-02-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
     57 
     58 	tests/ioctl_kvm_run.c: add KVM_EXIT_MMIO diagnostics.
     59 	As it has proven itself useful.
     60 
     61 	* tests/ioctl_kvm_run.c (run_kvm) <case KVM_EXIT_MMIO:>: Fail
     62 	on unexpected KVM_EXIT_MMIO, providing relevant diagnostics.
     63 
     64 2018-02-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
     65 
     66 	tests: add compatibility layer for accept call.
     67 	Recent glibc (since version 2.26) uses accept4 syscall for implementing
     68 	accept call on sparc.  Unfortunately, it's impossible to simply fall
     69 	back on raw syscall as it had not been wired up until linux commit
     70 	v4.4-rc8~4^2~1.
     71 
     72 	* tests/accept_compat.h: New file.
     73 	* tests/Makefile.am (EXTRA_DIST): Add it.
     74 	* tests/net-y-unix.c: Include accept_compat.h, use do_accept()
     75 	instead of accept() calls.
     76 	* tests/net-yy-inet.c: Likewise.
     77 	* tests/net-yy-unix.c: Likewise.
     78 	* tests/net.expected: Allow accept4.
     79 
     80 2018-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
     81 
     82 	debian: build strace-udeb separately.
     83 	* debian/rules (extra_build_targets): Add build-udeb-stamp.
     84 	(build-udeb/Makefile): New rule.
     85 	(clean): Remove build-udeb.
     86 	* debian/strace-udeb.install: Update.
     87 
     88 	Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826223
     89 
     90 2018-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
     91 
     92 	Enable symbol demangling in deb- and rpm-driven builds.
     93 	* debian/control (Build-Depends) [amd64]: Add libiberty-dev.
     94 	* strace.spec.in (buildrequires_libunwind_devel): Add binutils-devel.
     95 
     96 2018-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
     97 
     98 	debian: re-enable -k option on x86_64.
     99 	This partially reverts commit v4.13~177.
    100 
    101 	* debian/control (Build-Depends) [amd64]: Add libunwind-dev.
    102 
    103 2018-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
    104 
    105 	Add "strace -V" output to build log.
    106 	* strace.spec.in (%check): Print "strace -V" output before
    107 	running the test suite.
    108 	* debian/rules (%-stamp): Likewise.
    109 
    110 2018-02-12  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    111 
    112 	xlat: update NT_* constants.
    113 	* xlat/nt_descriptor_types.in (NT_PPC_PKEY): New constant introduced
    114 	by linux kernel commit v4.16-rc1~93^2~72.
    115 
    116 	Update the list of PKEY_* constants.
    117 	* xlat/pkey_access.in (PKEY_DISABLE_EXECUTE): New constant introduced
    118 	by linux kernel commit v4.16-rc1~93^2~85.
    119 	* tests/pkey_alloc.c: Update expected output.
    120 	* NEWS: Mention it.
    121 
    122 	powerpc, powerpc64: wire up pkey_* syscalls.
    123 	* linux/powerpc/syscallent.h [384..386]: Add pkey_alloc,
    124 	pkey_free, and pkey_mprotect syscalls introduced by linux kernel
    125 	commits v4.16-rc1~93^2~70 and v4.16-rc1~93^2~69, respectively.
    126 	* linux/powerpc64/syscallent.h: Likewise.
    127 	* NEWS: Mention it.
    128 
    129 	Update NEWS.
    130 
    131 2018-02-12  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    132 
    133 	linux/ia64: remove IA-32 mode support.
    134 	There is no compat support in strace and there are no systems
    135 	within reach that would allow to test it.
    136 
    137 	* linux/ia64/arch_regs.c (IA64_PSR_IS, ia64_ia32mode): Remove.
    138 	* linux/ia64/get_error.c (get_error): Remove ia64_ia32mode branch.
    139 	* linux/ia64/get_scno.c (arch_get_scno): Likewise.
    140 	* linux/ia64/get_syscall_args.c (get_syscall_args): Likewise.
    141 	* linux/ia64/set_error.c (arch_set_error, arch_set_success): Likewise.
    142 	* linux/ia64/set_scno.c (arch_set_scno): Likewise.
    143 
    144 2018-02-12  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    145 
    146 	syscall.c: parse return code second time after injecting.
    147 	In order to have the same view as tracee has, with regards to
    148 	"never fail" syscalls.
    149 
    150 	* syscall.c (tamper_with_syscall_exiting): Call get_error after the
    151 	return value tampering to re-initialise u_rval and u_error fields
    152 	of struct tcb.
    153 
    154 2018-02-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    155 
    156 	sparc: mark as an architecture that has a dedicated error register.
    157 	* linux/sparc/arch_defs_.h (HAVE_ARCH_DEDICATED_ERR_REG): New macro,
    158 	define to 1.
    159 
    160 	strace.1.in: ffix.
    161 
    162 2018-02-11  Dmitry V. Levin  <ldv (a] altlinux.org>
    163 
    164 	Include <sys/ptrace.h> early.
    165 	Include "ptrace.h" before any header that can include <signal.h>
    166 	because on some architectures the latter may include <asm/sigcontext.h>
    167 	which in turn may include <asm/ptrace.h> with potentially devastating
    168 	effect on <sys/ptrace.h>.
    169 
    170 	* process.c: Include "ptrace.h" before "regs.h".
    171 	* rt_sigframe.c: Likewise.
    172 	* sigreturn.c: Include "ptrace.h" before "nsig.h".
    173 	* syscall.c: Likewise.
    174 	* wait.c: Include "ptrace.h" before <sys/wait.h>.
    175 	* strace.c: Include "ptrace.h" before <signal.h>.
    176 	* tests/ptrace.c: Likewise.
    177 	* tests/test_ucopy.c: Include <sys/ptrace.h> before <signal.h>.
    178 
    179 2018-02-11  Dmitry V. Levin  <ldv (a] altlinux.org>
    180 
    181 	Include <limits.h> instead of <sys/param.h>
    182 	Do not include <sys/param.h> unnecessarily as it includes <signal.h>.
    183 
    184 	* pathtrace.c: Include <limits.h> instead of <sys/param.h>.
    185 	* strace.c: Likewise.
    186 	* syscall.c: Likewise.
    187 	* util.c: Likewise.
    188 	* tests/getcwd.c: Likewise.
    189 	* tests/group_req.c: Likewise.
    190 	* tests/inode_of_sockfd.c: Likewise.
    191 	* tests/ip_mreq.c: Likewise.
    192 	* tests/printpath-umovestr.c: Likewise.
    193 	* tests/qual_fault.c: Likewise.
    194 	* tests/test_printpath.c: Likewise.
    195 	* tests/umovestr3.c: Likewise.
    196 	* tests/net-y-unix.c: Do not include <sys/param.h>.
    197 	* tests/net-yy-unix.c: Likewise.
    198 
    199 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    200 
    201 	basic_filters.c: introduce scno_by_name.
    202 	As it will be used elsewhere.
    203 
    204 	* basic_filters.c (scno_by_name): New function.
    205 	(qualify_syscall_name): Use it.
    206 	* defs.h (scno_by_name): New declaration.
    207 
    208 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    209 
    210 	xstring.h: rephrase xappendstr description a bit.
    211 
    212 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    213 
    214 	xlat.c: return NULL in sprintflags if there are no flags.
    215 	Otherwise the auxstr is rather ugly at times.
    216 
    217 	* xlat.c (sprintflags): Return NULL if no flags were printed.
    218 
    219 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    220 
    221 	Change type of injected rval to kernel_long_t.
    222 	* defs.h (struct inject_data): Change type of rval field to
    223 	kernel_ulong_t.
    224 	* filter_qualify.c (parse_inject_token): Use string_to_kulong instead of
    225 	string_to_uint for rval parsing.  Warn if retval is clipped in compat
    226 	personality.
    227 
    228 	Mark architectures that indicate syscall error in a dedicated register.
    229 	* linux/alpha/arch_defs_.h (HAVE_ARCH_DEDICATED_ERR_REG): New macro,
    230 	define to 1.
    231 	* linux/ia64/arch_defs_.h: Likewise.
    232 	* linux/mips/arch_defs_.h: Likewise.
    233 	* linux/powerpc/arch_defs_.h: Likewise.
    234 	* linux/powerpc64/arch_defs_.h: Likewise.
    235 	* linux/sparc64/arch_defs_.h: Likewise.
    236 	* linux/arch_defs_.h [!HAVE_ARCH_DEDICATED_ERR_REG]
    237 	(HAVE_ARCH_DEDICATED_ERR_REG): New macro, define to 0.
    238 	* linux/nios2/arch_defs_.h: New file.
    239 	* Makefile.am (EXTRA_DIST): Add it.
    240 
    241 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    242 
    243 	Make string_to_uint_ex more universal.
    244 	And add support for reading of various types.
    245 
    246 	* string_to_uint.c (string_to_uint_ex): Change to work with long long.
    247 	(string_to_uint): Move it...
    248 	* string_to_uint.h (string_to_uint): ...here.
    249 	(string_to_uint_upto): Accept long long as max_val, return long long.
    250 	(string_to_ulong, string_to_kulong, string_to_ulonglong): New functions,
    251 	for completeness.
    252 
    253 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
    254 
    255 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    256 
    257 	Add pure syscall flag.
    258 	* basic_filters.c (lookup_class) <syscall_class>: Add "%pure" for
    259 	TRACE_PURE.
    260 	* sysent.h (TRACE_PURE): New syscall flag.
    261 	* sysent_shorthand_defs.h (PU): New shorthand macro.
    262 	* linux/32/syscallent.h ([172], [173], [174], [175], [176], [177],
    263 	[178]): Add PU flag to getpid, getppid, getuid, geteuid, getgid,
    264 	getegid, gettid syscalls.
    265 	* linux/64/syscallent.h ([172], [173], [174], [175], [176], [177],
    266 	[178]): Add PU flag to getpid, getppid, getuid, geteuid, getgid,
    267 	getegid, gettid syscalls.
    268 	* linux/aarch64/syscallent.h ([1060]): Add PU flag to getpgrp syscalls.
    269 	* linux/alpha/syscallent.h ([20], [24], [47], [63], [64], [89],
    270 	[378]): Add PU flag to getxpid, getxuid, getxgid, getpgrp, getpagesize,
    271 	getdtablesize, gettid syscalls.
    272 	* linux/arc/syscallent.h ([246]): Add PU flag to arc_gettls syscalls.
    273 	* linux/arm/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    274 	[199], [200], [201], [202], [224], [ARM_FIRST_SHUFFLED_SYSCALL+1+6]):
    275 	Add PU flag to getpid, getuid, getgid, geteuid, getegid, getppid,
    276 	getpgrp, getuid32, getgid32, geteuid32, getegid32, gettid, get_tls
    277 	syscalls.
    278 	* linux/avr32/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    279 	[176]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
    280 	getppid, getpgrp, gettid syscalls.
    281 	* linux/bfin/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    282 	[199], [200], [201], [202], [224]): Add PU flag to getpid, getuid,
    283 	getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
    284 	geteuid32, getegid32, gettid syscalls.
    285 	* linux/hppa/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    286 	[206]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
    287 	getppid, getpgrp, gettid syscalls.
    288 	* linux/i386/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    289 	[199], [200], [201], [202], [224]): Add PU flag to getpid, getuid,
    290 	getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
    291 	geteuid32, getegid32, gettid syscalls.
    292 	* linux/ia64/syscallent.h ([1041], [1042], [1046], [1047], [1062],
    293 	[1063], [1105], [1171]): Add PU flag to getpid, getppid, getuid,
    294 	geteuid, getgid, getegid, gettid, getpagesize syscalls.
    295 	* linux/m68k/syscallent.h ([20], [24], [47], [49], [50], [64],
    296 	[65], [166], [199], [200], [201], [202], [221], [333]): Add PU flag
    297 	to getpid, getuid, getgid, geteuid, getegid, getppid, getpgrp,
    298 	getpagesize, getuid32, getgid32, geteuid32, getegid32, gettid,
    299 	get_thread_area syscalls.
    300 	* linux/metag/syscallent.h ([248]): Add PU flag to metag_get_tls
    301 	syscalls.
    302 	* linux/microblaze/syscallent.h ([20], [24], [47], [49], [50], [64],
    303 	[65], [199], [200], [201], [202], [224]): Add PU flag to getpid,
    304 	getuid, getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
    305 	geteuid32, getegid32, gettid syscalls.
    306 	* linux/powerpc64/syscallent.h ([20], [24], [47], [49], [50], [64],
    307 	[65], [207]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
    308 	getppid, getpgrp, gettid syscalls.
    309 	* linux/powerpc/syscallent.h ([20], [24], [47], [49], [50], [64],
    310 	[65], [207]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
    311 	getppid, getpgrp, gettid syscalls.
    312 	* linux/s390/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    313 	[199], [200], [201], [202], [236]): Add PU flag to getpid, getuid,
    314 	getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
    315 	geteuid32, getegid32, gettid syscalls.
    316 	* linux/s390x/syscallent.h ([20], [64], [65], [199], [200], [201],
    317 	[202], [236]): Add PU flag to getpid, getppid, getpgrp, getuid,
    318 	getgid, geteuid, getegid, gettid syscalls.
    319 	* linux/sh64/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    320 	[199], [200], [201], [202], [252]): Add PU flag to getpid, getuid,
    321 	getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
    322 	geteuid32, getegid32, gettid syscalls.
    323 	* linux/sh/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
    324 	[199], [200], [201], [202], [224]): Add PU flag to getpid, getuid,
    325 	getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
    326 	geteuid32, getegid32, gettid syscalls.
    327 	* linux/sparc64/syscallent.h ([20], [24], [47], [49], [50], [64], [81],
    328 	[143], [197], [340]): Add PU flag to getpid, getuid, getgid, geteuid,
    329 	getegid, getpagesize, getpgrp, gettid, getppid, kern_features syscalls.
    330 	* linux/sparc/syscallent.h ([20], [24], [44], [47], [49], [50], [53],
    331 	[64], [69], [70], [81], [143], [197], [340]): Add PU flag to getpid,
    332 	getuid, getuid32, getgid, geteuid, getegid, getgid32, getpagesize,
    333 	geteuid32, getegid32, getpgrp, gettid, getppid, kern_features syscalls.
    334 	* linux/x32/syscallent.h ([39], [102], [104], [107], [108], [110],
    335 	[111], [186]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
    336 	getppid, getpgrp, gettid syscalls.
    337 	* linux/x86_64/syscallent.h ([39], [102], [104], [107], [108], [110],
    338 	[111], [186]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
    339 	getppid, getpgrp, gettid syscalls.
    340 	* linux/xtensa/syscallent.h ([120], [127], [137], [139], [140], [141],
    341 	[150], [151]): Add PU flag to getpid, gettid, getuid, getgid, geteuid,
    342 	getegid, getppid, getpgrp syscalls.
    343 	* strace.1.in (.SS Filtering): Document it.
    344 	* NEWS: Mention it.
    345 
    346 	syscall.c: warn if tampering failed.
    347 
    348 	syscall.c: set errno if syscall is tampered.
    349 
    350 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    351 
    352 	tests/nsyscall-d.test: swap exp and log in diff calls.
    353 	In line with the rest of the tests.
    354 
    355 	* tests/nsyscalls-d.test: swap arguments of match_diff calls.
    356 
    357 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    358 
    359 	linux/arm/get_scno.c: use debug_msg.
    360 	* linux/arm/get_scno.c (arch_get_scno): replace if (debug_flag) {
    361 	error_msg() } with debug_msg() call.
    362 
    363 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    364 
    365 	Do not shuffle scno inside syscall_name.
    366 	This makes interface a bit irregular otherwise.
    367 
    368 	* defs.h (syscall_name): Clarify description.
    369 	* syscall.c (syscall_name): Do not call shuffle_scno.
    370 	* printsiginfo.c (print_si_info) <case SIGSYS>: Use shuffle_scno.
    371 
    372 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    373 
    374 	Handle very special __ARM_NR_-prefixed syscalls.
    375 	* linux/aarch64/nr_prefix.c: New file.
    376 	* linux/arm/nr_prefix.c: Likewise.
    377 	* linux/nr_prefix.c: Likewise.
    378 	* Makefile.am (EXTRA_DIST): Add them.
    379 	* printsiginfo.c: Include nr_prefix.c
    380 	(print_si_info): Use nr_prefix.
    381 
    382 	Make shuffle_scno globally available.
    383 	* syscall.c (shuffle_scno): Move the declaration...
    384 	* defs.h (shuffle_scno): ...here. Remove static qualifier.
    385 	* linux/aarch64/shuffle_scno.c (shuffle_scno): Remove static qualifier.
    386 	* linux/arm/shuffle_scno.c: Likewise.
    387 	* linux/shuffle_scno.c: Likewise.
    388 	* linux/x32/shuffle_scno.c: Likewise.
    389 	* linux/x86_64/shuffle_scno.c: Likewise.
    390 
    391 2018-02-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    392 
    393 	syscall.c: use shuffle_scno in syscall_name.
    394 	syscall_name() is used only in printsiginfo.c:print_si_info currently,
    395 	and is supplied with raw syscall number (that's why it has this ugly
    396 	__X32_SYSCALL_BIT hack). But since it handled only __X32_SYSCALL_BIT and
    397 	not shuffle_scno(), it was broken on ARM.  Let's replace it with shuffle_scno
    398 	call, as it handles both the case of shuffled ARM syscalls and the
    399 	__X32_SYSCALL_BIT.
    400 
    401 	* syscall.c (syscall_name): Call shuffle_scno instead of custom
    402 	__X32_SYSCALL_BIT handling.
    403 
    404 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    405 
    406 	Use shuffle_scno for x32 syscall numbers.
    407 	This changes behaviour of printing of unknown syscall.
    408 
    409 	* linux/x32/shuffle_scno.c: New file.
    410 	* linux/x86_64/shuffle_scno.c: Likewise.
    411 	* Makefile.am (EXTRA_DIST): Add them.
    412 	* linux/x86_64/get_scno.c (arch_get_scno): Do not clear
    413 	__X32_SYSCALL_BIT.
    414 	* tests/nsyscalls.c: Update expected output.
    415 
    416 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    417 
    418 	Move shuffle_scno() invocation to get_scno.
    419 	* linux/aarch64/get_scno.c (arch_get_scno): Remove shuffle_scno call.
    420 	* linux/arm/get_scno.c (arch_get_scno): Remove shuffle_scno calls.
    421 	* syscall.c (get_scno): Call shuffle_scno after arch_get_scno.
    422 
    423 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    424 
    425 	Move shuffle_scno to arch-specific file.
    426 	While we are here, let's fix AArch64 by limiting scno shuffling
    427 	to compat personality only.
    428 
    429 	* syscall.c: Include shuffle_scno.c.
    430 	(shuffle_scno): Move it to a...
    431 	* linux/arm/shuffle_scno.c: New file.
    432 	* linux/aarch64/shuffle_scno.c: New file, define arm's shuffle_scno
    433 	as arm_shuffle_scno and call it only for personality 1.
    434 	* linux/shuffle_scno.c: New file, fallback trivial shuffle_scno
    435 	definition.
    436 	* Makefile.am (EXTRA_DIST): Add them.
    437 
    438 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    439 
    440 	Print unknown syscall number in hexadecimal.
    441 	* syscall.c (struct sysent_buf): Update buf field size.
    442 	(get_scno): Print unknown syscall number in hexadecimal form.
    443 	* tests/nsyscalls.c: Update expected output.
    444 	* strace.1.in: Document it.
    445 	* NEWS: Mention it.
    446 
    447 	tests/accept.c: call accept syscall directly, if available.
    448 	* tests/accept.c [__NR_accept && !TEST_SYSCALL_NAME]: Define a wrapper that
    449 	calls accept directly.
    450 	* tests/sockname.c [TEST_SYSCALL_STR]: Do not define TEST_SYSCALL_STR.
    451 
    452 	printsiginfo.c: add a comment about personality detection for SIGSYS.
    453 	Looks like it is not necessary, after all.
    454 
    455 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    456 
    457 	linux/x86_64/set_error.c: update eax for compat personality.
    458 	Since this is where get_error gets the return value from in the compat case.
    459 
    460 	linux/x86_64/set_error.c (set_error, set_success): Update i386_regs.eax
    461 	if tracee is in compat personality.
    462 
    463 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    464 
    465 	Mark various arch-specific syscalls with SYSCALL_NEVER_FAILS.
    466 	* linux/alpha/syscallent.h (getpagesize, getdtablesize): Add NF flag.
    467 	* linux/arc/syscallent.h (arc_gettls): Likewise.
    468 	* linux/arm/syscallent.h (get_tls): Likewise.
    469 	* linux/ia64/syscallent.h (getpagesize): Likewise.
    470 	* linux/m68k/syscallent.h (getpagesize, get_thread_area): Likewise.
    471 	* linux/sparc/syscallent.h (getpagesize): Likewise.
    472 	* linux/sparc64/syscallent.h (getpagesize): Likewise.
    473 
    474 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    475 
    476 	Add SYSCALL_NEVER_FAILS flag to getpgrp.
    477 	As glibc, at least, treats it this way.
    478 
    479 	* linux/aarch64/syscallent.h (getpgrp): Add NF flag.
    480 	* linux/alpha/syscallent.h: Likewise.
    481 	* linux/arm/syscallent.h: Likewise.
    482 	* linux/avr32/syscallent.h: Likewise.
    483 	* linux/bfin/syscallent.h: Likewise.
    484 	* linux/hppa/syscallent.h: Likewise.
    485 	* linux/i386/syscallent.h: Likewise.
    486 	* linux/m68k/syscallent.h: Likewise.
    487 	* linux/microblaze/syscallent.h: Likewise.
    488 	* linux/powerpc/syscallent.h: Likewise.
    489 	* linux/powerpc64/syscallent.h: Likewise.
    490 	* linux/s390/syscallent.h: Likewise.
    491 	* linux/s390x/syscallent.h: Likewise.
    492 	* linux/sh/syscallent.h: Likewise.
    493 	* linux/sh64/syscallent.h: Likewise.
    494 	* linux/sparc/syscallent.h: Likewise.
    495 	* linux/sparc64/syscallent.h: Likewise.
    496 	* linux/x32/syscallent.h: Likewise.
    497 	* linux/x86_64/syscallent.h: Likewise.
    498 	* linux/xtensa/syscallent.h: Likewise.
    499 
    500 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    501 
    502 	linux/x86_64/get_error.c: do not sign-extend if no error happened.
    503 
    504 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    505 
    506 	tests/membarrier.c: fix expected output on nohz_full systems.
    507 	If nohz_full is enabled, MEMBARRIER_CMD_GLOBAL is not available.
    508 
    509 	* tests/membarrier.c: check availability of MEMBARRIER_CMD_GLOBAL
    510 	separately.
    511 
    512 2018-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    513 
    514 	Update MEMBARRIER_CMD_* constants.
    515 	* xlat/membarrier_cmds.in: Add new constants, rename
    516 	MEMBARRIER_CMD_SHARED to MEMBARRIER_CMD_GLOBAL.
    517 	* NEWS: Mention this.
    518 	* tests/membarrier.c (main): Update expected output.
    519 
    520 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
    521 
    522 2018-02-07  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    523 
    524 	perf.c: print group_fd argument of perf_event_open syscall as fd.
    525 	* perf.c (SYS_FUNC(perf_event_open)): Print 4th argument using printfd.
    526 
    527 	syscall.c: print higher bits of syscall return value on x32 personality.
    528 	* syscall.c (syscall_exiting_trace): Check for current_klongsize instead
    529 	of current_wordsize to determine the size of tcp->u_rval.
    530 
    531 	strace.1.in: history update.
    532 	strace.1.in (.SH HISTORY): Some amendments based on
    533 	https://github.com/strace/strace-talks/blob/master/2012-ossdevconf-obninsk-strace_from_upstream_PoV/ossdevconf_2012-slides-strace_from_upstream_PoV.tex
    534 
    535 	strace.1.in: minor changes.
    536 	* strace.1.in (.SH DESCRIPTION): s/a passion/passion/,
    537 	s/Here the/Here, the/, s/Where traditional/Where the traditional/,
    538 	s/output has proven/output is proven/, s/In all cases/In most cases,/
    539 	embolden st_mode, lstat, SIGCHLD, and SIGTTOU mentions,
    540 	s/In some cases /In some cases, /
    541 	(.SS Output format) <-o>: de-italicize dot in "filename.pid", convert
    542 	the sentence's voice to passive, some other rephrasing.  Mention
    543 	incompatibility of output piping with -ff mode.
    544 	(.SS Output options) <-t>: s/time of day/wall clock time/.
    545 	(.SS Statistics) <-c>: Remove "on Linux" mention, -F option mention.
    546 
    547 	README.md: add information about git repository location.
    548 	* README.md: Mention URLs for SourceForge, GitHub, and GitLab
    549 	repositories.
    550 
    551 2018-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
    552 
    553 	tests: rewrite net-accept-connect.c without strncpy.
    554 	gcc8 -Wall -Werror rejects our method of struct sockaddr_un.sun_path
    555 	initialization because the field lacks __nonstring__ attribute.
    556 
    557 	As we calculate the length of the string being copied anyway,
    558 	workaround this gcc+glibc bug by changing the code to use this
    559 	pre-calculated length and get rid of strncpy completely.
    560 
    561 	* tests/net-accept-connect.c (main): Use memcpy to initialize sun_path.
    562 
    563 2018-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
    564 
    565 	Use kernel's fcntl.h header instead of libc's for open_mode_flags.
    566 	As definitions of O_* macros provided by various libc implementations
    567 	are usually less reliable than those provided by kernel headers, switch
    568 	to use kernel's fcntl.h header.
    569 
    570 	* open.c: Include <asm/fcntl.h> instead of <fcntl.h>.  Remove
    571 	O_LARGEFILE fallback definitions assuming that the kernel headers
    572 	provide them.
    573 	* xlat/open_mode_flags.in: Add __O_SYNC after O_SYNC.  Add O_TMPFILE
    574 	and __O_TMPFILE before O_DIRECTORY.  Remove "O_TMPFILE & ~O_DIRECTORY".
    575 	* tests/open.c: Include <asm/fcntl.h> instead of <fcntl.h>.  Remove
    576 	workarounds for libc O_TMPFILE implementations.
    577 	* tests/openat.c: Include <asm/fcntl.h> instead of <fcntl.h>.
    578 	(test_mode_flag): New function.
    579 	(main): Use it to check decoding of all access modes and file flags.
    580 	* tests/gen_tests.in (openat): Add -a option.
    581 
    582 	Co-Authored-by: Eugene Syromyatnikov <evgsyr (a] gmail.com>
    583 
    584 2018-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
    585 
    586 	xlat: update TCP_* constants.
    587 	* xlat/socktcpoptions.in: Add TCP_FASTOPEN_KEY and
    588 	TCP_FASTOPEN_NO_COOKIE introduced by linux kernel commits
    589 	v4.15-rc1~84^2~387 and v4.15-rc1~84^2~339, respectively.
    590 	* NEWS: Mention this.
    591 
    592 	xlat: update IPV6_* constants.
    593 	* xlat/sockipv6options.in: Add IPV6_FREEBIND introduced by linux kernel
    594 	commit v4.15-rc1~84^2~601.
    595 	* NEWS: Mention this.
    596 
    597 	xlat: update MAP_* constants.
    598 	* xlat/mmap_flags.in: Add MAP_SHARED_VALIDATE and MAP_SYNC introduced
    599 	by linux kernel commits v4.15-rc1~71^2^2~23 and v4.15-rc1~71^2^2~12,
    600 	respectively.
    601 	* NEWS: Mention this.
    602 
    603 2018-02-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    604 
    605 	tests: avoid triggering -Wstringop-truncation in ioctl_dm.c.
    606 	* tests/ioctl_dm.c: Replace strncpy calls with memcpy as the character
    607 	arrays being copied are not C strings.
    608 
    609 	Makefile.am: minor EXTRA_DIST formatting changes.
    610 
    611 	Move large file-related wrappers to a separate header.
    612 	* strace.c [_LARGEFILE64_SOURCE]: Move the definitions under it to a...
    613 	* largefile_wrappers.h: ... new file.
    614 	* Makefile.am (strace_SOURCES): Add it.
    615 
    616 2018-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
    617 
    618 	strace.1: fix wording about setuid installation.
    619 	* strace.1.in (SETUID INSTALLATION): Fix wording.
    620 
    621 	Closes: https://github.com/strace/strace/issues/24
    622 
    623 2018-01-29  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
    624 
    625 	Add KVM_PPC_GET_CPU_CHAR ioctl definition from linux v4.15.
    626 	* linux/powerpc/ioctls_arch0.h: Update from linux v4.15
    627 	using ioctls_gen.sh.
    628 
    629 2018-01-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    630 
    631 	Update NEWS.
    632 
    633 	tests: check s390_pci_mmio_read and s390_pci_mmio_write decoders.
    634 	* tests/s390_pci_mmio_read_write.c: New file.
    635 	* tests/.gitignore: Add s390_pci_mmio_read_write.
    636 	* tests/pure_executables.list: Likewise.
    637 	* tests/gen_tests.in (s390_pci_mmio_read_write): New test.
    638 
    639 	Introduce s390_pci_mmio_read, s390_pci_mmio_write system call decoders.
    640 	* linux/s390/syscallent.h ([352]): Change decoder to s390_pci_mmio_write.
    641 	([353]): Change decoder to s390_pci_mmio_read.
    642 	* linux/s390x/syscallent.h: Likewise.
    643 	* s390.c (SYS_FUNC(s390_pci_mmio_write), SYS_FUNC(s390_pci_mmio_read)):
    644 	New function.
    645 
    646 	tests: check s390_runtime_instr system call decoder.
    647 	* tests/s390_runtime_instr.c: New file.
    648 	* tests/.gitignore: Add s390_runtime_instr.
    649 	* tests/pure_executables.list: Likewise.
    650 	* tests/gen_tests.in (s390_runtime_instr): New test.
    651 
    652 	Introduce s390_runtime_instr system call decoder.
    653 	* linux/s390/syscallent.h ([342]): Change decoder to s390_runtime_instr.
    654 	* linux/s390x/syscallent.h: Likewise.
    655 	* s390.c (SYS_FUNC(s390_runtime_instr)): New function.
    656 	* xlat/s390_runtime_instr_commands.in: New file.
    657 
    658 	tests: check s390_guarded_storage system call decoder.
    659 	* configure.ac (AC_CHECK_HEADERS): Add asm/guarded_storage.h.
    660 	* tests/s390_guarded_storage-v.c: New file.
    661 	* tests/s390_guarded_storage.c: Likewise.
    662 	* tests/.gitignore: Add s390_guarded_storage, s390_guarded_storage-v.
    663 	* tests/pure_executables.list: Likewise.
    664 	* tests/gen_tests.in (s390_guarded_storage, s390_guarded_storage-v):
    665 	New tests.
    666 
    667 	Introduce s390_guarded_storage system call decoder.
    668 	* linux/s390/syscallent.h ([378]): Change decoder to s390_guarded_storage.
    669 	* linux/s390x/syscallent.h: Likewise.
    670 	* s390.c (struct guard_storage_control_block,
    671 	struct guard_storage_event_parameter_list): New structure type
    672 	definition.
    673 	(guard_storage_print_gsepl, guard_storage_print_gscb,
    674 	SYS_FUNC(s390_guarded_storage)): New function.
    675 	(DIV_ROUND_UP): New macro.
    676 	* xlat/s390_guarded_storage_commands.in: New file.
    677 
    678 	tests: check s390_sthyi system call decoder.
    679 	* configure.ac (AC_CHECK_FUNCS): Add iconv_open.
    680 	(AC_CHECK_HEADERS): Add iconv.h.
    681 	* tests/s390_sthyi-v.c: New file.
    682 	* tests/s390_sthyi.c: Likewise.
    683 	* tests/.gitignore: Add s390_sthyi, s390_sthyi-v.
    684 	* tests/pure_executables.list: Likewise.
    685 	* tests/gen_tests.in (s390_sthyi, s390_sthyi): New tests.
    686 
    687 	Introduce s390_sthyi system call decoder.
    688 	* s390.c: New file.
    689 	* Makefile.am (strace_SOURCES): Add it.
    690 	* linux/s390/syscallent.h ([380]): Change decoder to s390_sthyi.
    691 	* linux/s390x/syscallent.h: Likewise.
    692 	* xlat/s390_sthyi_function_codes.in: New file.
    693 
    694 	print_fields.h: add macro to print hexadecimal array field.
    695 	* print_fields.h (PRINT_FIELD_HEX_ARRAY): New macro, prints target
    696 	array with QUOTE_FORCE_HEX.
    697 
    698 2018-01-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    699 
    700 	Add print_quoted_string flag to generate comment.
    701 	Because there are never enough print_quoted_string flags.
    702 
    703 	* defs.h (QUOTE_EMIT_COMMENT): New quoting flag macro constant.
    704 	* util.c (string_quote): Emit " /* " in the beginning and " */" in the
    705 	end if QUOTE_EMIT_COMMENT is passed.
    706 	(print_quoted_string): Increase alloc_size by 7 if QUOTE_EMIT_COMMENT is
    707 	passed.
    708 
    709 2018-01-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    710 
    711 	tests: make ioctl.test more flexible, use it for the rest of ioctl tests
    712 	As the remaining non-generated ioctl tests differ from ioctl.test only
    713 	in strace options, and since gen_tests.sh can pass arguments to sourced
    714 	tests, replace the remaining non-generated ioctl tests with invocations
    715 	of ioctl.test with appropriate parameters.
    716 
    717 	* tests/ioctl.test: Pass script arguments to the strace invocation.
    718 	* tests/gen_tests.in (ioctl_dm): New entry, invoke ioctl.test with -s9.
    719 	(ioctl_dm-v): New entry, invoke ioctl.test with -v -s9.
    720 	(ioctl_kvm_run): New entry, invoke ioctl.test with -a36 -y.
    721 	(ioctl_loop-nv): New entry, invoke ioctl.test with -a22 -e verbose=none.
    722 	(ioctl_nsfs): New entry, invoke ioctl.test with -esignal=none.
    723 	(ioctl_sock_gifconf): New entry, invoke ioctl.test with -a28 -s1.
    724 	(ioctl_evdev-v, ioctl_loop-v, ioctl_rtc-v): Invoke ioctl.test
    725 	with -v option instead of ioctl-v.sh.
    726 	* tests/ioctl_dm-v.test: Remove.
    727 	* tests/ioctl_dm.test: Likewise.
    728 	* tests/ioctl_kvm_run.test: Likewise.
    729 	* tests/ioctl_loop-nv.test: Likewise.
    730 	* tests/ioctl_nsfs.test: Likewise.
    731 	* tests/ioctl_sock_gifconf.test: Likewise.
    732 	* tests/ioctl-v.sh: Likewise.
    733 	* tests/Makefile.am (DECODER_TESTS, EXTRA_DIST): Remove them.
    734 
    735 2018-01-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    736 
    737 	tests/gen_tests.sh: enable passing arguments to sourced tests.
    738 	* tests/gen_tests.sh: Read first argument separately, put it in $arg0,
    739 	and the rest of the arguments in $args.
    740 	(case "$arg0" in) <+*)>: Set command line to $args and source $arg0.
    741 
    742 	xlat/gen.sh: add some rudimentary support for comments.
    743 	* xlat/gen.sh: Trim parts of the string abbreviated in "/*" and "*/"
    744 
    745 	configure.ac: sort architectures in lexicographical order.
    746 	* configure.ac (case "$host_cpu"): sort architectures in alphabetical
    747 	order.
    748 
    749 2018-01-25  Dmitry V. Levin  <ldv (a] altlinux.org>
    750 
    751 	Drop non-functional CRIS architecture support.
    752 	From the very first commit when CRIS architecture support was introduced
    753 	and up to this comment that ends the agony of this non-functional code,
    754 	this support was incomplete and could never be compiled.
    755 
    756 	* Makefile.am (EXTRA_DIST): Remove linux/crisv*.
    757 	* clone.c: Remove CRISV* checks.
    758 	* configure.ac ($host_cpu == cris*): Remove.
    759 	* linux/crisv10: Remove.
    760 	* linux/crisv32: Likewise.
    761 
    762 	Fixes: v4.5.18-77-gea0e6e8 ("CRIS support by Hinko Kocevar ...")
    763 
    764 2018-01-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    765 
    766 	Update futex test in accordance with kernel's v4.15-rc7-202-gfbe0e83.
    767 	* futex.c (VALP, VALP_PR, VAL2P, VAL2P_PR): New macro definitions.
    768 	(main): Allow EINVAL on *REQUEUE* checks with VAL/VAL2 with higher bit
    769 	being set, check that the existing behaviour preserved with VALP/VAL2P
    770 	where higher bit is unset.
    771 
    772 	tests/futex.c: improve error diagnostics.
    773 	* tests/futex.c (futex_error): Add func and line arguments, print them.
    774 	(CHECK_FUTEX_GENERIC): Pass __func__ and __LINE__ to futex_error.
    775 
    776 	Add syscall entry for ARM-specific get_tls syscall.
    777 	* linux/arm/syscallent.h ([ARM_FIRST_SHUFFLED_SYSCALL+1+6]): New entry.
    778 	(ARM_LAST_SPECIAL_SYSCALL): Update to 6.
    779 	* NEWS: Mention it.
    780 
    781 2018-01-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    782 
    783 	Fix syscall descriptions for ARM-specific system calls.
    784 	Based on an analysis of arm_syscall in arch/arm/kernel/traps.c.
    785 
    786 	* linux/arm/syscallent.h ([ARM_FIRST_SHUFFLED_SYSCALL+1+2]): Update
    787 	argument number, add TM flag.
    788 	([ARM_FIRST_SHUFFLED_SYSCALL+1+1], [ARM_FIRST_SHUFFLED_SYSCALL+1+3],
    789 	[ARM_FIRST_SHUFFLED_SYSCALL+1+4], [ARM_FIRST_SHUFFLED_SYSCALL+1+5]):
    790 	Update argument number.
    791 
    792 2018-01-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    793 
    794 	tests: check riscv_flush_icache syscall decoder.
    795 	* tests/riscv_flush_icache.c: New file.
    796 	* tests/.gitignore: Add riscv_flush_icache.
    797 	* tests/gen_tests.in: Likewise.
    798 	* tests/pure_executables.list: Likewise.
    799 
    800 	Implement decoding of riscv_flush_icache syscall.
    801 	* linux/riscv/syscallent.h ([259]): Add riscv_flush_icache entry.
    802 	* riscv.c: New file.
    803 	* Makefile.am (strace_SOURCES): Add it.
    804 	* xlat/riscv_flush_icache_flags.in: New file.
    805 	* NEWS: Mention it.
    806 
    807 2018-01-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    808 
    809 	Workaround stray PTRACE_EVENT_EXEC.
    810 	We (apparently) had a long-standing test failure inside strace-ff.test
    811 	with the symptom that it misses exit_group call.  As it turned out, it
    812 	was PTRACE_EVENT_EXEC followed by execve syscall exiting stop.  That
    813 	behaviour indeed screwed all the syscall state tracking for the tracee.
    814 	Let's try to patch it up by calling trace_syscall when we receive
    815 	PTRACE_EVENT_EXEC outside syscall.
    816 
    817 	* defs.h (TCB_RECOVERING): New tcb flag.
    818 	* strace.c (dispatch_event) <case TE_STOP_BEFORE_EXECVE>: Invoke
    819 	trace_syscall with TCB_RECOVERING flag being set for the current_tcp
    820 	if the tracee is not on exiting syscall.
    821 	* syscall.c (get_scno): Set QUAL_RAW if we are recovering.
    822 	(tamper_with_syscall_entering): Do not perform actual tampering during
    823 	recovery as it's already too late.
    824 	* NEWS: Mention it.
    825 
    826 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
    827 
    828 2018-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
    829 
    830 	tests: robustify set_ptracer_any.
    831 	* tests/set_ptracer_any.c (main) [HAVE_PRCTL]: Provide fallback
    832 	definitions for PR_SET_PTRACER and PR_SET_PTRACER_ANY constants,
    833 	set all unused prctl arguments to 0.
    834 
    835 2018-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
    836 
    837 	ia64: do not bail out in get_syscall_args if umove fails with EPERM.
    838 	If the kernel contains commit 84d77d3f06e7e8dea057d10e8ec77ad71f721be3,
    839 	both PTRACE_PEEKDATA and process_vm_readv become unavailable when the
    840 	process dumpable flag is cleared, on ia64 this results to all syscall
    841 	arguments being unavailable.
    842 
    843 	Recognize this situation and do not treat it as get_syscall_args error
    844 	because the latter leaves the tracee in a ptrace stop.
    845 
    846 	This condition used to be triggered by prctl-dumpable test that caused
    847 	strace to hang indefinitely.
    848 
    849 	* linux/ia64/get_syscall_args.c (get_syscall_args): Do not bail out
    850 	if umove fails.
    851 	* tests/prctl-dumpable.c [__ia64__]: Skip the test.
    852 
    853 2018-01-24  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    854 
    855 	strace.c: reset printing_tcp on print_event_exit.
    856 	print_event_exit should have printing_tcp setup analogous to printleader and
    857 	syscall_exit_trace before printing its part, otherwise it spuriously resets
    858 	curcol in line_ended for the stale printing_tcp if followfork == 2.
    859 
    860 	* strace.c (print_event_exit): Set printing_tcp to tcp before printing
    861 	exiting event line and calling line_ended.
    862 
    863 2018-01-23  Dmitry V. Levin  <ldv (a] altlinux.org>
    864 
    865 	tests: check path tracing of old select syscall.
    866 	* tests/xselect.c [xselect] (xselect): Turn into prototype.
    867 	* tests/oldselect-P.c: New file.
    868 	* tests/oldselect-efault-P.c: Likewise.
    869 	* tests/oldselect-efault.c: Likewise.
    870 	* tests/oldselect.c: Use xselect.c
    871 	* tests/pure_executables.list: Add oldselect-efault.
    872 	* tests/gen_tests.in (oldselect, oldselect-P, oldselect-efault,
    873 	oldselect-efault-P): New entries.
    874 	* tests/oldselect.expected: Remove.
    875 	* tests/oldselect.test: Remove.
    876 	* tests/Makefile.am (check_PROGRAMS): Add oldselect-P
    877 	and oldselect-efault-P.
    878 	(DECODER_TESTS): Remove oldselect.test.
    879 	(EXTRA_DIST): Remove oldselect.expected.
    880 	* tests/.gitignore: Add oldselect-P, oldselect-efault,
    881 	and oldselect-efault-P.
    882 
    883 	tests: check path tracing of select/_newselect syscalls.
    884 	* tests/xselect.c (main) [PATH_TRACING_FD]: Skip if /proc/self/fd/
    885 	is not available.  Add test calls that use PATH_TRACING_FD.
    886 	(main): Conditionalize expected output for those calls
    887 	that do not use PATH_TRACING_FD with [!PATH_TRACING_FD].
    888 	* tests/_newselect-P.c: New file.
    889 	* tests/select-P.c: Likewise.
    890 	* tests/Makefile.am (check_PROGRAMS): Add _newselect-P and select-P.
    891 	* tests/.gitignore: Likewise.
    892 	* tests/gen_tests.in (_newselect-P, select-P): New entries.
    893 
    894 	tests: extend the check of select/_newselect syscalls decoding.
    895 	* tests/xselect.c: Rewrite for better coverage.
    896 
    897 2018-01-23  Dmitry V. Levin  <ldv (a] altlinux.org>
    898 
    899 	tests: redirect stdin to /dev/null.
    900 	Ensure that stdin descriptor is not available for output
    901 	by reopening it to input from /dev/null.
    902 
    903 	* tests/run.sh: Redirect test's stdin to /dev/null.
    904 
    905 2018-01-23  Dmitry V. Levin  <ldv (a] altlinux.org>
    906 
    907 	tests: add file:line to perror_msg_and_fail/error_msg_and_fail output.
    908 	* tests/tests.h [!perror_msg_and_fail] (perror_msg_and_fail): New macro
    909 	wrapper around the homonymous function.
    910 	[!error_msg_and_fail] (error_msg_and_fail): Likewise.
    911 	* tests/error_msg.c (perror_msg_and_fail, error_msg_and_fail): New
    912 	macros defined to themselves.
    913 
    914 	Rework decoding and pathtrace of old select syscall.
    915 	* linux/arch_defs_.h [!HAVE_ARCH_OLD_SELECT] (HAVE_ARCH_OLD_SELECT): New
    916 	macro.
    917 	* linux/aarch64/arch_defs_.h (HAVE_ARCH_OLD_SELECT): Likewise.
    918 	* linux/arm/arch_defs_.h: Likewise.
    919 	* linux/bfin/arch_defs_.h: Likewise.
    920 	* linux/i386/arch_defs_.h: Likewise.
    921 	* linux/m68k/arch_defs_.h: Likewise.
    922 	* linux/microblaze/arch_defs_.h: Likewise.
    923 	* linux/powerpc64/arch_defs_.h: Likewise.
    924 	* linux/sh/arch_defs_.h: Likewise.
    925 	* linux/x32/arch_defs_.h: Likewise.
    926 	* linux/x86_64/arch_defs_.h: Likewise.
    927 	* linux/powerpc/arch_defs_.h: New file.
    928 	* Makefile.am (EXTRA_DIST): Add it.
    929 	* desc.c (SYS_FUNC(oldselect)): Rewrite using
    930 	fetch_indirect_syscall_args, move under [HAVE_ARCH_OLD_SELECT].
    931 	* pathtrace.c (match_xselect_args): New function.
    932 	(pathtrace_match_set): Use it.
    933 
    934 2018-01-23  Dmitry V. Levin  <ldv (a] altlinux.org>
    935 
    936 	Transform fetch_old_mmap_args into fetch_indirect_syscall_args.
    937 	As there are more than one old style syscall that take their arguments
    938 	via array, generalize fetch_old_mmap_args into a function that could
    939 	fetch variable number of arguments.
    940 
    941 	* mem.c (fetch_old_mmap_args): Transform into ...
    942 	* fetch_indirect_syscall_args.c: ... fetch_indirect_syscall_args
    943 	in this new file.
    944 	* Makefile.am (libstrace_a_SOURCES): Add it.
    945 	* defs.h [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): Remove.
    946 	(fetch_indirect_syscall_args): New prototype.
    947 	* pathtrace.c (pathtrace_match_set) [HAVE_ARCH_OLD_MMAP]: Use
    948 	fetch_indirect_syscall_args instead of fetch_old_mmap_args.
    949 
    950 2018-01-23  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    951 
    952 	signal.c: remove excess semicolon after the end of the function.
    953 	* signal.c (rt_sigtimedwait): Remove semicolon after the function body.
    954 
    955 	Use char * for pointer arithmetics.
    956 	* netlink_inet_diag.c (decode_inet_diag_req_compat,
    957 	decode_inet_diag_req_v2, decode_inet_diag_msg): Cast to char *
    958 	instead of void *.
    959 	* netlink_netlink_diag.c (decode_netlink_diag_req,
    960 	decode_netlink_diag_msg): Likewise.
    961 	* netlink_packet_diag.c (decode_packet_diag_req,
    962 	decode_packet_diag_msg): Likewise.
    963 	* netlink_unix_diag.c (decode_unix_diag_req, decode_unix_diag_msg):
    964 	Likewise.
    965 	* rtnl_addr.c (decode_ifaddrmsg): Likewise.
    966 	* rtnl_addrlabel.c (decode_ifaddrlblmsg): Likewise.
    967 	* rtnl_dcb.c (decode_dcbmsg): Likewise.
    968 	* rtnl_link.c (decode_ifinfomsg): Likewise.
    969 	* rtnl_mdb.c (decode_br_port_msg): Likewise.
    970 	* rtnl_neigh.c (decode_ndmsg): Likewise.
    971 	* rtnl_route.c (decode_rtmsg): Likewise.
    972 	* rtnl_rule.c (decode_fib_rule_hdr): Likewise.
    973 	* rtnl_tc.c (decode_tcmsg): Likewise.
    974 
    975 2018-01-23  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    976 
    977 	netlink_inet_diag.c: remove unnecessary return.
    978 	decode_inet_diag_req, as well as the functions it calls, returns void.
    979 
    980 	* netlink_inet_diag.c (decode_inet_diag_req): Do not return anything.
    981 
    982 2018-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
    983 
    984 	Move decoder of getpagesize syscall to libstrace.
    985 	As only five architectures have getpagesize syscall, moving the decoder
    986 	to libstrace allows to get rid of getpagesize related ifdefs and check
    987 	build of getpagesize decoder on other architectures.
    988 
    989 	* mem.c (SYS_FUNC(getpagesize)): Move ...
    990 	* getpagesize.c: ... to this new file.
    991 	* Makefile.am (libstrace_a_SOURCES): Add it.
    992 
    993 2018-01-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
    994 
    995 	mpers: implement gawk 3 support.
    996 	Some old systems that still make some sense to be supported have only
    997 	gawk 3, so let's support them for now.
    998 
    999 	In order to achieve that, multiple changes have been implemented:
   1000 	 - Multidimensional arrays are replaced with single-dimensional ones.
   1001 	   In most places it's a "][" -> ", " replacement, as awk allows some
   1002 	   kind of emulation of multidimensional arrays that way, but in several
   1003 	   occasions (specifically for storing name and special fields) we have
   1004 	   to iterate over them later, so we store that information in
   1005 	   additional arrays in order to get the keys.
   1006 	 - "switch" statements are replaced with sets of "if ... else if ...
   1007 	   else" statements.  This change is trivial, except we've added
   1008 	   a temporary variable in what_is order to store expression value, for
   1009 	   readability purposes.
   1010 	 - No support for array iteration ordering.  This one is most ugly of
   1011 	   them all.  Luckily, not that ugly, we've just had to process index a
   1012 	   bit in order to make it lexicographically sortable and add two
   1013 	   temporary arrays containing sorted indices in order to sort over them
   1014 	   instead of those two arrays that we've added in order to work around
   1015 	   lack of multidimensional array support.
   1016 
   1017 	* mpers.awk (compare_indices): Remove unused function.
   1018 	(array_get, update_upper_bound, /^DW_AT_data_member_location/,
   1019 	/^DW_AT_byte_size/, /^DW_AT_encoding/): Replace multidimensional array
   1020 	access with comma-concatenated index.
   1021 	(norm_idx): New function.
   1022 	(array_seq): Replace multidimensional array access with
   1023 	comma-concatenated index.  Use comma-concatenated pair of (array_idx,
   1024 	"seq") in order to check presence of the item in an array.
   1025 	(what_is): Add enc and i local variables.  Store the value of
   1026 	array[what_idx, "encoding"] in it.  Replace "switch" statements with
   1027 	sets of "if ... else if ... else" statements.  Replace multidimensional
   1028 	array access with comma-concatenated index. Use for (... ; ...; ...)
   1029 	iteration over aparents_keys instead of iteration over array.
   1030 	(/^<[[:xdigit:]]+>/): Store idx as norm_idx(matches[2]).  Replace
   1031 	multidimensional array access with comma-concatenated index.  Store an
   1032 	additional flag in array_names array.
   1033 	(/^DW_AT_name/): Replace multidimensional array access with
   1034 	comma-concatenated index.  Add a flag to array_names for that idx.
   1035 	(/^DW_AT_type/): Do not capture "0x" as a part of a group, normalise
   1036 	the captured group.  Replace multidimensional array access with
   1037 	comma-concatenated index.
   1038 	(/^Abbrev Number:[^(]+\(DW_TAG_/): Replace multidimensional array access
   1039 	with comma-concatenated index.  Store additional flags in
   1040 	array_special and array_parents arrays.
   1041 	(END): Remove PROCINFO["sorted_in"] setup.  Sort array_parents.  Replace
   1042 	multidimensional array access with comma-concatenated index.  Iterate
   1043 	over array_special to go over all the items that have "special" field.
   1044 	Iterate over array_names to go over all items that have "name" field.
   1045 	* NEWS: Mention it.
   1046 
   1047 2018-01-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1048 
   1049 	dm: add support for event_nr in DM_LIST_DEVICES result.
   1050 	Commit v4.13-rc1~137^2~13 (and a follow-up fix v4.14-rc4~20^2~3
   1051 	that changed alignment) introduced an additional hidden field
   1052 	in the structure returned by DM_LIST_DEVICES ioctl command
   1053 	that contains event_nr information.
   1054 
   1055 	Unfortunately, we can't test it for now, but looks like it kinda works:
   1056 
   1057 	  # ./strace -v -eioctl -y dmsetup ls
   1058 	  ioctl(3</dev/mapper/control>, DM_VERSION, {version=4.0.0,
   1059 	  data_size=16384, flags=DM_EXISTS_FLAG} => {version=4.37.0,
   1060 	  data_size=16384, flags=DM_EXISTS_FLAG}) = 0
   1061 	  ioctl(3</dev/mapper/control>, DM_LIST_DEVICES, {version=4.0.0,
   1062 	  data_size=16384, data_start=312, flags=DM_EXISTS_FLAG} =>
   1063 	  {version=4.37.0, data_size=408, data_start=312, flags=DM_EXISTS_FLAG,
   1064 	  {dev=makedev(253, 1), name="fedoratesting--30-swap", event_nr=0},
   1065 	  {dev=makedev(253, 0), name="fedoratesting--30-root"}}) = 0
   1066 	  fedoratesting--30-swap	(253:1)
   1067 	  fedoratesting--30-root	(253:0)
   1068 
   1069 	* dm.c (dm_decode_dm_name_list): Obtain the amount of bytes copied
   1070 	during printing device name, print event number if there's a suitable
   1071 	gap present and the DM version is high enough.
   1072 	* NEWS: Mention it.
   1073 
   1074 2018-01-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1075 
   1076 	Move definition of personality macros to arch_defs_.h.
   1077 	* supported_personalities.h: Remove.
   1078 	* defs.h: Do not include it.
   1079 	* linux/arch_defs_.h [!DEFAULT_PERSONALITY] (DEFAULT_PERSONALITY): New
   1080 	macro.
   1081 	[!SUPPORTED_PERSONALITIES] (SUPPORTED_PERSONALITIES): Likewise.
   1082 	* linux/aarch64/arch_defs_.h (SUPPORTED_PERSONALITIES): New macro.
   1083 	* linux/riscv/arch_defs_.h: Likewise.
   1084 	* linux/s390x/arch_defs_.h: Likewise.
   1085 	* linux/sparc64/arch_defs_.h: Likewise.
   1086 	* linux/x32/arch_defs_.h: Likewise.
   1087 	* linux/x86_64/arch_defs_.h: Likewise.
   1088 	* linux/powerpc64/arch_defs_.h: New file.
   1089 	* linux/tile/arch_defs_.h: Likewise.
   1090 	* Makefile.am (EXTRA_DIST): Add them.
   1091 	(strace_SOURCES): Remove supported_personalities.h.
   1092 
   1093 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
   1094 
   1095 2018-01-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1096 
   1097 	Introduce HAVE_ARCH_SA_RESTORER.
   1098 	In order to simplify HAVE_SA_RESTORER logic a bit.
   1099 
   1100 	* linux/ia64/arch_defs_.h (HAVE_ARCH_SA_RESTORER): New macro.
   1101 	* linux/m68k/arch_defs_.h: Likewise.
   1102 	* linux/sparc/arch_defs_.h: Likewise.
   1103 	* linux/sparc64/arch_defs_.h: Likewise.
   1104 	* linux/hppa/arch_defs_.h: New file.
   1105 	* Makefile.am (EXTRA_DIST): Add it.
   1106 	* signal.c [HAVE_ARCH_SA_RESTORER]: Define HAVE_SA_RESTORER to it.
   1107 	[!HAVE_ARCH_SA_RESTORER && SA_RESTORER]: Define HAVE_SA_RESTORER to 1.
   1108 	[!HAVE_ARCH_SA_RESTORER && !SA_RESTORER]: Define HAVE_SA_RESTORER to 0.
   1109 
   1110 2018-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   1111 
   1112 	Replace NEED_UID16_PARSERS with HAVE_ARCH_UID16_SYSCALLS.
   1113 	* linux/arch_defs_.h [!HAVE_ARCH_UID16_SYSCALLS]
   1114 	(HAVE_ARCH_UID16_SYSCALLS): New macro.
   1115 	* linux/aarch64/arch_defs_.h (HAVE_ARCH_UID16_SYSCALLS): New macro.
   1116 	* linux/arm/arch_defs_.h: Likewise.
   1117 	* linux/i386/arch_defs_.h: Likewise.
   1118 	* linux/ia64/arch_defs_.h: Likewise.
   1119 	* linux/m68k/arch_defs_.h: Likewise.
   1120 	* linux/s390/arch_defs_.h: Likewise.
   1121 	* linux/s390x/arch_defs_.h: Likewise.
   1122 	* linux/sh/arch_defs_.h: Likewise.
   1123 	* linux/sparc/arch_defs_.h: Likewise.
   1124 	* linux/sparc64/arch_defs_.h: Likewise.
   1125 	* linux/syscall.h: Likewise.
   1126 	* linux/x32/arch_defs_.h: Likewise.
   1127 	* linux/x86_64/arch_defs_.h: Likewise.
   1128 	* linux/bfin/arch_defs_.h: New file.
   1129 	* linux/microblaze/arch_defs_.h: Likewise.
   1130 	* linux/riscv/arch_defs_.h: Likewise.
   1131 	* linux/sh64/arch_defs_.h: Likewise.
   1132 	* Makefile.am (EXTRA_DIST): Add them.
   1133 	* defs.h (NEED_UID16_PARSERS): Remove.
   1134 	* linux/syscall.h: Check for HAVE_ARCH_UID16_SYSCALLS instead of
   1135 	NEED_UID16_PARSERS.
   1136 	* uid.c: Likewise.
   1137 
   1138 	Replace HAVE_GETRVAL2 with HAVE_ARCH_GETRVAL2.
   1139 	* linux/arch_defs_.h [!HAVE_ARCH_GETRVAL2] (HAVE_ARCH_GETRVAL2): New
   1140 	macro.
   1141 	* linux/alpha/arch_defs_.h: New file.
   1142 	* linux/ia64/arch_defs_.h: Likewise.
   1143 	* linux/mips/arch_defs_.h: Likewise.
   1144 	* linux/sh/arch_defs_.h: Likewise.
   1145 	* linux/sparc/arch_defs_.h: Likewise.
   1146 	* linux/sparc64/arch_defs_.h: Likewise.
   1147 	* Makefile.am (EXTRA_DIST): Add them.
   1148 	* defs.h (HAVE_GETRVAL2): Remove.
   1149 	(getrval2): Check for HAVE_ARCH_GETRVAL2 instead of arch checks.
   1150 	* net.c (SYS_FUNC(pipe)): Check for HAVE_ARCH_GETRVAL2 instead of
   1151 	HAVE_GETRVAL2.
   1152 	* syscall.c: Likewise.
   1153 
   1154 	Use #if idiom instead of #ifdef for HAVE_ARCH_* macros.
   1155 	* linux/arch_defs_.h [!HAVE_ARCH_OLD_MMAP] (HAVE_ARCH_OLD_MMAP): New
   1156 	macro.
   1157 	[!HAVE_ARCH_OLD_MMAP_PGOFF] (HAVE_ARCH_OLD_MMAP_PGOFF): Likewise.
   1158 	* defs.h: Use #if instead of #ifdef to check HAVE_ARCH_OLD_MMAP.
   1159 	* mem.c: Use #if instead of #ifdef to check HAVE_ARCH_OLD_MMAP
   1160 	and HAVE_ARCH_OLD_MMAP_PGOFF
   1161 	* pathtrace.c: Likewise.
   1162 
   1163 2018-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   1164 
   1165 	Rename arch-specific arch_defs.h files to arch_defs_.h.
   1166 	Introduce a new arch_defs.h header that includes the corresponding
   1167 	arch-specific arch_defs_.h file followed by generic arch_defs_.h file.
   1168 
   1169 	* linux/arch_defs.h: Rename to linux/arch_defs_.h.
   1170 	* linux/aarch64/arch_defs.h: Rename to linux/aarch64/arch_defs_.h.
   1171 	* linux/arm/arch_defs.h: Rename to linux/arm/arch_defs_.h.
   1172 	* linux/i386/arch_defs.h: Rename to linux/i386/arch_defs_.h.
   1173 	* linux/m68k/arch_defs.h: Rename to linux/m68k/arch_defs_.h.
   1174 	* linux/s390/arch_defs.h: Rename to linux/s390/arch_defs_.h.
   1175 	* linux/s390x/arch_defs.h: Rename to linux/s390x/arch_defs_.h.
   1176 	* linux/x32/arch_defs.h: Rename to linux/x32/arch_defs_.h.
   1177 	* linux/x86_64/arch_defs.h: Rename to linux/x86_64/arch_defs_.h.
   1178 	* arch_defs.h: New file.
   1179 	* Makefile.am (strace_SOURCES): Add it.
   1180 	(EXTRA_DIST): Rename linux/*/arch_defs.h to linux/*/arch_defs_.h.
   1181 
   1182 2018-01-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   1183 
   1184 	Fix ANY_WORDSIZE_LESS_THAN_KERNEL_LONG definition.
   1185 	* defs.h (ANY_WORDSIZE_LESS_THAN_KERNEL_LONG): Rewrite without undefined
   1186 	behaviour.
   1187 
   1188 	Fixes: f916793 ("Introduce ANY_WORDSIZE_LESS_THAN_KERNEL_LONG macro")
   1189 
   1190 2018-01-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1191 
   1192 	util: return string size in printstr.
   1193 	As umovestr now returns something useful, let's propagate it further.
   1194 
   1195 	* defs.h (printstr_ex, printpathn, printpath): Change return type from
   1196 	void to int.
   1197 	(printstrn, printstr): Change return type from void to int, return
   1198 	printstr_ex result.
   1199 	* util.c (printpathn): Return -1 on NULL addr, nul_seen (exit code of
   1200 	umovestr) on success.
   1201 	(printpath): Return printpathn result.
   1202 	(printstr_ex): Return -1 on NULL addr, umoven/umovestr result otherwise.
   1203 
   1204 2018-01-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1205 
   1206 	ucopy: return string size in umovestr.
   1207 	We return the size that includes \0 in order to preserve existing
   1208 	behaviour (return 0 when \0 haven't been seen, return positive number
   1209 	when it has been seen).
   1210 
   1211 	* ucopy.c (umovestr_peekdata, umovestr): Return string length
   1212 	including \0 instead of 1 when \0 is found.
   1213 
   1214 2018-01-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   1215 
   1216 	mpers.awk: avoid redefinition of mpers_ptr_t.
   1217 	Older versions of gcc like those found in RHEL6 fail with the following
   1218 	diagnostics:
   1219 
   1220 	  In file included from block.c:32:
   1221 	  ./mpers-m32/struct_blk_user_trace_setup.h:2: error: redefinition of typedef mpers_ptr_t
   1222 	  mpers_type.h:44: note: previous declaration of mpers_ptr_t was here
   1223 
   1224 	* mpers.awk (END): Add #ifndef guard to mpers_ptr_t typedef.
   1225 	* mpers_test.sh: Update expected output.
   1226 
   1227 2018-01-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1228 
   1229 	Add support for --enable-mpers=m32|mx32.
   1230 	* configure.ac (AC_ARG_ENABLE([mpers])): Allow m32 and mx32 values
   1231 	for --enable-mpers option.
   1232 	* m4/mpers.m4 (st_MPERS): Check for personality support if personality
   1233 	name is provided as an option.  Fail if the requested personality
   1234 	support is not available.
   1235 
   1236 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
   1237 
   1238 2018-01-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1239 
   1240 	tests: improve setugid error diagnostics a bit.
   1241 	* tests/setugid.c (main): Print unexpected code returned by syscall.
   1242 
   1243 2018-01-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   1244 
   1245 	v4l2: do not mpersify struct v4l2_create unless it is used by other code
   1246 	This fixes build with mpers support on older systems that lack
   1247 	definition of struct v4l2_create.
   1248 
   1249 	* v4l2.c: Wrap references to struct v4l2_create with
   1250 	[VIDIOC_CREATE_BUFS].
   1251 
   1252 2018-01-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   1253 
   1254 	btrfs: use uint32_t instead of __u32.
   1255 	* btrfs.c (btrfs_ioctl) [!HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE]:
   1256 	Replace __u32 with uint32_t.  Remove useless cast.
   1257 
   1258 2018-01-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1259 
   1260 	strace.1.in: clarify mpers flags in strace -V output.
   1261 	The previous description was a bit dated.
   1262 
   1263 	* strace.1.in (.SH "MULTIPLE PERSONALITY SUPPORT"): Remove "no-m32" and
   1264 	"no-mx32", describe the situation when some of mpers flags are not
   1265 	present in strace -V output.
   1266 
   1267 2018-01-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1268 
   1269 	Add compat support for s390x.
   1270 	By very popular demand.
   1271 
   1272 	While we are here, let's refactor the condition for old_mmap_pgoff into
   1273 	an arch-specific one, as it is used more than in one place.
   1274 
   1275 	* NEWS: Mention this.
   1276 	* strace.1.in (.SH "MULTIPLE PERSONALITY SUPPORT"): Likewise.
   1277 	* configure.ac (case "$host_cpu" in) <s390x>: Set arch_m32 to s390, set
   1278 	cc_flags_m32 to -m31.
   1279 	(st_MPERS([m32])): Add s390x.
   1280 	* defs.h [S390X]: Define NEED_UID16_PARSERS.
   1281 	* linux/s390/arch_sigreturn.c [!S390_FRAME_PTR] (S390_FRAME_PTR): New
   1282 	macro, define to s390_frame_ptr.
   1283 	[!SIGNAL_FRAMESIZE] (SIGNAL_FRAMESIZE): New macro, define to
   1284 	__SIGNAL_FRAMESIZE.
   1285 	[!PTR_TYPE] (PTR_TYPE): New macro, define to unsigned long.
   1286 	(arch_sigreturn): Use S390_FRAME_PTR, SIGNAL_FRAMESIZE, and PTR_TYPE
   1287 	instead of s390_frame_ptr, __SIGNAL_FRAMESIZE, and pointer-sized type,
   1288 	respectively.
   1289 	* linux/s390/get_error.c [!ARCH_REGSET] (ARCH_REGSET): New macro, define
   1290 	* to s390_regset.
   1291 	(get_error): Use it instead of s390_regset.
   1292 	* linux/s390/get_scno.c (arch_get_scno): Likewise.
   1293 	* linux/s390/get_syscall_args.c (get_syscall_args): Likewise.
   1294 	* linux/s390/set_error.c (arch_set_error, arch_set_success): Likewise.
   1295 	* linux/s390/set_scno.c (arch_set_scno): Likewise.
   1296 	* linux/s390x/arch_regs.c (psw_compat_t, s390_compat_regs,
   1297 	s390x_regs_union, s390_frame_ptr, s390x_frame_ptr, s390x_io): New
   1298 	variables.
   1299 	(s390_regset, s390x_regset, ARCH_REGS_FOR_GETREGSET,
   1300 	ARCH_IOVEC_FOR_GETREGSET, ARCH_PC_REG, ARCH_PERSONALITY_0_IOV_SIZE,
   1301 	ARCH_PERSONALITY_1_IOV_SIZE): New macros.
   1302 	* linux/s390x/arch_regs.h (s390_frame_ptr, s390x_frame_ptr): New
   1303 	prototypes.
   1304 	* linux/s390x/arch_rt_sigframe.c: Conditionalize on tcp->currpers.
   1305 	* linux/s390x/arch_sigreturn.c: Likewise.
   1306 	* linux/s390x/get_error.c: Likewise.
   1307 	* linux/s390x/get_scno.c: Likewise.
   1308 	* linux/s390x/get_syscall_args.c: Likewise.
   1309 	* linux/s390x/set_error.c: Likewise.
   1310 	* linux/s390x/set_scno.c: Likewise.
   1311 	* linux/s390x/errnoent1.h: New file.
   1312 	* linux/s390x/ioctls_arch1.h: Likewise.
   1313 	* linux/s390x/ioctls_inc1.h: Likewise.
   1314 	* linux/s390x/signalent1.h: Likewise.
   1315 	* linux/s390x/syscallent1.h: Likewise.
   1316 	* Makefile.am (EXTRA_DIST): Add new files added to linux/s390x.
   1317 	* supported_personalities.h [S390X] (SUPPORTED_PERSONALITIES): Define
   1318 	to 2.
   1319 	* tests/strace-V.test: Add s390 to the list of architectures that have
   1320 	m32 personality.
   1321 	* linux/s390/arch_defs.h (HAVE_ARCH_OLD_MMAP_PGOFF): New macro.
   1322 	* linux/s390x/arch_defs.h: Likewise.
   1323 	* mem.c: Replace #ifdef S390 with #ifdef HAVE_ARCH_OLD_MMAP_PGOFF.
   1324 	* pathtrace.c: Likewise.
   1325 
   1326 2018-01-18  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1327 
   1328 	Update NEWS.
   1329 
   1330 2018-01-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   1331 
   1332 	tests: check path tracing of ppoll syscall.
   1333 	* tests/ppoll.c (main) [PATH_TRACING_FD]: Skip if /proc/self/fd/
   1334 	is not available.  Add a test call that use PATH_TRACING_FD.
   1335 	(main): Conditionalize expected output for those calls
   1336 	that do not use PATH_TRACING_FD with [!PATH_TRACING_FD].
   1337 	* tests/ppoll-P.c: New file.
   1338 	* tests/pure_executables.list: Add ppoll-P.
   1339 	* tests/.gitignore: Likewise.
   1340 	* tests/gen_tests.in (ppoll-P): New entry.
   1341 
   1342 	tests: check path tracing of poll syscall.
   1343 	* tests/poll.c (main) [PATH_TRACING_FD]: Skip if /proc/self/fd/
   1344 	is not available.  Add tests calls that use PATH_TRACING_FD.
   1345 	(main): Conditionalize expected output for those calls
   1346 	that do not use PATH_TRACING_FD with [!PATH_TRACING_FD].
   1347 	* tests/poll-P.c: New file.
   1348 	* tests/pure_executables.list: Add poll-P.
   1349 	* tests/.gitignore: Likewise.
   1350 	* tests/poll-P.test: New test.
   1351 	* tests/Makefile.am (DECODER_TESTS): Add poll-P.test.
   1352 
   1353 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1354 
   1355 	tests: enable old_mmap-P.test on s390x.
   1356 	As s390x is the only 64-bit architecture that has old_mmap,
   1357 	the test needs some adjustments there.
   1358 
   1359 	* tests/old_mmap.c: Update condition.
   1360 	(main): Change int types to long, extend numerals to 64 bit, change
   1361 	printing format qualifiers to corresponding long types.
   1362 
   1363 	Co-Authored-by: Dmitry V. Levin <ldv (a] altlinux.org>
   1364 
   1365 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1366 
   1367 	tests: check path tracing of old mmap syscall.
   1368 	* tests/old_mmap.c [!TEST_FD]: Define TEST_FD.
   1369 	(main) <args1_c>: Replace 5th argument with TEST_FD.
   1370 	(main): Wrap the output for the calls that do not use TEST_FD
   1371 	with #ifndef PATH_TRACING.
   1372 	* tests/old_mmap-P.c: New file.
   1373 	* tests/pure_executables.list: Add old_mmap-P.
   1374 	* tests/.gitignore: Likewise.
   1375 	* tests/gen_tests.in: Add old_mmap-P test.
   1376 
   1377 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1378 
   1379 	Fix pathtrace for old_mmap/old_mmap_pgoff.
   1380 	As these system calls have only one argument that points to the
   1381 	location in memory containing actual arguments, current path tracing
   1382 	implementation is incorrect.  In order to fix this, let's use recently
   1383 	introduced fetch_old_mmap_args in order to get actual arguments suitable
   1384 	for path matching.
   1385 
   1386 	* pathtrace.c [HAVE_ARCH_OLD_MMAP] <case SEN_old_mmap,
   1387 	case SEN_old_mmap_pgoff>: Retrieve actual old_mmap arguments with
   1388 	fetch_old_mmap_args, pass the value from the retrieved args if it's
   1389 	available.
   1390 
   1391 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1392 
   1393 	Test non-verbose old_mmap output.
   1394 	* tests/old_mmap-v-none.c: New file.  Include old_mmap.c.
   1395 	* tests/pure_executables.list: Add old_mmap-v-none.
   1396 	* tests/.gitignore: Likewise.
   1397 	* tests/gen_tests.in (old_mmap-v-none): New entry.
   1398 
   1399 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1400 
   1401 	mem.c: use runtime check in fetch_old_mmap_args.
   1402 	This makes code a bit cleaner and makes it compatible with the upcoming
   1403 	s390x compat support.
   1404 
   1405 	* mem.c [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): Replace
   1406 	ANY_WORDSIZE_LESS_THAN_KERNEL_LONG check with current_wordsize == 4
   1407 	check.
   1408 
   1409 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1410 
   1411 	mem.c: introduce fetch_old_mmap_args.
   1412 	Move common old_mmap/old_mmap_pgoff argument fetching code into a
   1413 	separate function.
   1414 
   1415 	As it is, it also fixes the case of non-verbose printing of old_mmap
   1416 	arguments (see the new test in the next commit).  Also, it is a
   1417 	preparation for the fix of path tracing for these syscalls.
   1418 
   1419 	* defs.h [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): New prototype.
   1420 	* mem.c [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): New function.
   1421 	[HAVE_ARCH_OLD_MMAP] (old_mmap, old_mmap_pgoff): Use it.
   1422 
   1423 	Fixes: 3db07f11 "Fix old_mmap output when mmap arguments are unfetchable"
   1424 	Suggested-by: Dmitry V. Levin <ldv (a] altlinux.org>
   1425 
   1426 2018-01-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1427 
   1428 	Introduce arch-specific define HAVE_ARCH_OLD_MMAP.
   1429 	* linux/arch_defs.h: New file.
   1430 	* linux/aarch64/arch_defs.h: New file.  Define HAVE_ARCH_OLD_MMAP.
   1431 	* linux/arm/arch_defs.h: Likewise.
   1432 	* linux/i386/arch_defs.h: Likewise.
   1433 	* linux/m68k/arch_defs.h: Likewise.
   1434 	* linux/s390/arch_defs.h: Likewise.
   1435 	* linux/s390x/arch_defs.h: Likewise.
   1436 	* linux/x32/arch_defs.h: Likewise.
   1437 	* linux/x86_64/arch_defs.h: Likewise.
   1438 	* Makefile.am (EXTRA_DIST): Add them.
   1439 	* defs.h: Include "arch_defs.h"
   1440 	* mem.c: Replace condition for SYS_FUNC(old_mmap) with #ifdef
   1441 	HAVE_ARCH_OLD_MMAP.
   1442 
   1443 	Suggested-by: Dmitry V. Levin <ldv (a] altlinux.org>
   1444 
   1445 2018-01-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   1446 	    Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   1447 
   1448 	tests: improve descriptor set syntax testing.
   1449 	* tests/filtering_fd-syntax.test: New file.
   1450 	* tests/options-syntax.test: Move descriptor set syntax testing
   1451 	to filtering_fd-syntax.test.
   1452 	* tests/Makefile.am (MISC_TESTS): Add filtering_fd-syntax.test.
   1453 
   1454 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1455 
   1456 	strace.c: print correct out file name in error messages in case of -ff.
   1457 	* strace.c (outf_perror): New function.
   1458 	(tvprintf, tprints, flush_tcp_output): Use it.
   1459 
   1460 	aarch64: use ARCH_SET_PERSONALITY_FROM_IOV_SIZE.
   1461 	* linux/aarch64/arch_regs.c (ARCH_PERSONALITY_0_IOV_SIZE,
   1462 	ARCH_PERSONALITY_1_IOV_SIZE): New macros.
   1463 	* linux/aarch64/get_scno.c (arch_get_scno): Do not call
   1464 	update_personality as it is handled by the generic get_regs code now.
   1465 
   1466 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1467 
   1468 	syscall.c: add ability to set personality based on GETREGSET iov size.
   1469 	Some architectures (aarch64, s390x) use only PTRACE_GETREGSET interface
   1470 	and use its size to detect current personality. Let's generalise this
   1471 	approach and also avoid subtle errors when we get register but forget to
   1472 	update personality, at least for those architectures.
   1473 
   1474 	Note that in order to employ this behaviour, architecture has to use
   1475 	PTRACE_GETREGSET exclusively (no HAVE_GETREGS_OLD) and should declare
   1476 	appropriate ARCH_PERSONALITY_*_IOV_SIZE macros.
   1477 
   1478 	* syscall.c (get_regs) [ptrace_getregset_or_getregs &&
   1479 	!HAVE_GETREGS_OLD]: Call update_personality based on the value returned
   1480 	in the iov_len field by PTRACE_GETREGSET.  Warn once if the returned
   1481 	iov_len is unknown.
   1482 
   1483 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1484 
   1485 	syscall.c: add sanity check for the target personality number.
   1486 	We can never be cautious enough.
   1487 
   1488 	* defs.h (set_personality): Change argument type to unsigned int.
   1489 	* syscall.c (set_personality): Change argument type to unsigned int,
   1490 	check whether requested personality is sane, die otherwise.
   1491 
   1492 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1493 
   1494 	syscall.c: move current_personality check to set_personality.
   1495 	As all the personality-dependent entries are initially in sync, we can
   1496 	move the check whether we are setting the same personality as we
   1497 	currently are inside set_personality out of update_personality.
   1498 
   1499 	* syscall.c (current_wordsize, current_klongsize): Initialise to 0'th
   1500 	personality value in order to make the statement about "all the
   1501 	personality-dependent entries are initially in sync" true.
   1502 	(set_personality): Check whether requested personality differs from
   1503 	current_personality.
   1504 	(update_personality): Call set_personality unconditionally.
   1505 
   1506 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1507 
   1508 	syscall.c: always update tcp->currpers in update_personality.
   1509 	Sometimes (for example, switching from a process with one personality
   1510 	to a process that previously had different personality but returning
   1511 	from execve to that same personality into) it is possible that
   1512 	current_personality is not changed, but tcp->currpers is different.
   1513 	So, let's not return from update_personality and always update
   1514 	tcp->currpers if it differs from the target personality.
   1515 
   1516 	* syscall.c (update_personality): Do not exit early if personality ==
   1517 	current_personality.
   1518 
   1519 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1520 
   1521 	Update current_personality on tcb switch.
   1522 	* strace.c (set_current_tcp): New function.
   1523 	(printleader, droptcb, print_event_exit, next_event, dispatch_event):
   1524 	Call set_current_tcp instead of setting current_tcp manually.
   1525 
   1526 2018-01-16  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1527 
   1528 	Add support for specifying compiler options for mpers builds.
   1529 	Because some architectures are very, very special.
   1530 
   1531 	* configure.ac (cc_flags_m32, cc_flags_mx32): New variables. AC_SUBST
   1532 	them.
   1533 	* m4/mpers.m4 (MPERS_CFLAGS): Use instead of CFLAG, pushdef as
   1534 	$cc_flags_$1.
   1535 	Use mpers_name instead of CFLAG in AC_CACHE_CHECK messages.
   1536 	Pass MPERS_CFLAGS as the second argument to mpers_test.sh
   1537 	* mpers.sh: Add CC_ARCH_FLAGS as the second argument (PARSER_FILE
   1538 	is moved to the third one). Do not expect leading dash in ARCH_FLAG
   1539 	anymore.
   1540 	* mpers_test.sh (mpers_cc_flags): New variable, initialise to the second
   1541 	command line argument.
   1542 	Pass $mpers_name without leading dash to mpers.sh.
   1543 	Pass $mpers_cc_flags as the second argument to mpers.sh ($sample is
   1544 	the third argument now).
   1545 	* Makefile.am (mpers-m%.stamp:): Pass $(mpers_CC_FLAGS) as the second
   1546 	argument to mpers.sh ($$f is now the third argument).
   1547 	($(mpers_m32_targets)): Define target variable mpers_CC_FLAGS with the
   1548 	value of @cc_flags_m32@
   1549 	($(mpers_mx32_targets)): Define target variable mpers_CC_FLAGS with the
   1550 	value of @cc_flags_mx32@
   1551 	* tests/Makefile.am (MERS_CC_FLAGS): New variable.
   1552 	* bootstrap: Append @cc_flags_$1@ to MPERS_CC_FLAGS. Append
   1553 	$(MPERS_CC_FLAGS) to ARCH_MFLAGS.
   1554 
   1555 2018-01-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   1556 	    Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   1557 
   1558 	tests: improve syscall set syntax testing.
   1559 	* tests/filtering_syscall-syntax.test: New file.
   1560 	* tests/options-syntax.test: Move syscall set syntax testing
   1561 	to filtering_syscall-syntax.test.
   1562 	* tests/qual_fault-syntax.test: Likewise.
   1563 	* tests/qual_inject-syntax.test: Likewise.
   1564 	* tests/Makefile.am (MISC_TESTS): Add filtering_syscall-syntax.test.
   1565 
   1566 2018-01-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   1567 
   1568 	Enhance error diagnostics about invalid syscalls in fault injection syntax
   1569 	Validate syscall set before the whole fault injection syntax.
   1570 
   1571 	* filter_qualify.c (parse_inject_expression): Add const qualifier to
   1572 	return type.  Return an empty string when no syscall set is specified.
   1573 	(qualify_inject_common): Add const qualifier to "name".  Move
   1574 	qualify_syscall_tokens invocation right after parse_inject_expression.
   1575 	* tests/qual_fault-syntax.test: Update expected output.
   1576 	* tests/qual_inject-syntax.test: Likewise.
   1577 
   1578 2018-01-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   1579 
   1580 	basic_filters: use loop initial declarations.
   1581 	* basic_filters.c (qualify_syscall_number, qualify_syscall_regex,
   1582 	lookup_class, qualify_syscall_class, qualify_syscall_tokens,
   1583 	qualify_tokens): Use "for" loop initial declarations.
   1584 
   1585 	filter_qualify: use loop initial declarations.
   1586 	* filter_qualify.c (sigstr_to_uint, find_errno_by_name,
   1587 	parse_inject_expression, qualify_inject_common, qualify): Use "for" loop
   1588 	initial declarations.
   1589 
   1590 	configure: try to set the C compiler mode to accept ISO Standard C.
   1591 	* configure.ac: Use AC_PROG_CC_STDC.
   1592 	* NEWS: Mention this.
   1593 
   1594 2018-01-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   1595 
   1596 	pathtrace: update the list of unrelated syscalls.
   1597 	* pathtrace.c (pathtrace_match_set) <SEN_accept4, SEN_accept,
   1598 	SEN_signalfd4, SEN_signalfd>: Skip matching.
   1599 
   1600 	basic_filters: move legacy tracing class names to the end of table.
   1601 	* basic_filters.c (lookup_class) <syscall_class>: Move names that do not
   1602 	start with % to the end of table.
   1603 
   1604 	Enhance decoding of mq_* syscalls.
   1605 	* mq.c (SYS_FUNC(mq_open)): Add RVAL_FD to return value.
   1606 	(SYS_FUNC(mq_timedsend), SYS_FUNC(mq_timedreceive), SYS_FUNC(mq_notify),
   1607 	SYS_FUNC(mq_getsetattr)): Print the first argument using printfd.
   1608 	* NEWS: Mention this change.
   1609 	* pathtrace.c (pathtrace_match_set) <SEN_mq_getsetattr, SEN_mq_notify,
   1610 	SEN_mq_open, SEN_mq_timedreceive, SEN_mq_timedsend>: Skip matching.
   1611 	* linux/32/syscallent.h (mq_getsetattr, mq_notify, mq_open,
   1612 	mq_timedreceive, mq_timedsend): Add TD flag.
   1613 	* linux/64/syscallent.h: Likewise.
   1614 	* linux/alpha/syscallent.h: Likewise.
   1615 	* linux/arm/syscallent.h: Likewise.
   1616 	* linux/avr32/syscallent.h: Likewise.
   1617 	* linux/bfin/syscallent.h: Likewise.
   1618 	* linux/crisv10/syscallent.h: Likewise.
   1619 	* linux/hppa/syscallent.h: Likewise.
   1620 	* linux/i386/syscallent.h: Likewise.
   1621 	* linux/ia64/syscallent.h: Likewise.
   1622 	* linux/m68k/syscallent.h: Likewise.
   1623 	* linux/microblaze/syscallent.h: Likewise.
   1624 	* linux/mips/syscallent-n32.h: Likewise.
   1625 	* linux/mips/syscallent-n64.h: Likewise.
   1626 	* linux/mips/syscallent-o32.h: Likewise.
   1627 	* linux/powerpc/syscallent.h: Likewise.
   1628 	* linux/powerpc64/syscallent.h: Likewise.
   1629 	* linux/s390/syscallent.h: Likewise.
   1630 	* linux/s390x/syscallent.h: Likewise.
   1631 	* linux/sh/syscallent.h: Likewise.
   1632 	* linux/sh64/syscallent.h: Likewise.
   1633 	* linux/sparc/syscallent.h: Likewise.
   1634 	* linux/sparc64/syscallent.h: Likewise.
   1635 	* linux/x32/syscallent.h: Likewise.
   1636 	* linux/x86_64/syscallent.h: Likewise.
   1637 	* linux/xtensa/syscallent.h: Likewise.
   1638 
   1639 	Enhance error diagnostics about invalid syscalls in fault injection syntax
   1640 	* basic_filters.c (qualify_syscall_tokens): Remove "name" argument,
   1641 	assume its value is "system call".
   1642 	* filter.h (qualify_syscall_tokens): Remove "name" argument.
   1643 	All callers updated.
   1644 	* tests/qual_fault-syntax.test: Update expected output.
   1645 
   1646 	basic_filters: handle "all" in a more readable way.
   1647 	* basic_filters.c (qualify_syscall_tokens, qualify_tokens): Remove
   1648 	handle_inversion label, handle "all" by invoking invert_number_set_array
   1649 	directly.
   1650 
   1651 	filter: remove redundant braces around single line expressions.
   1652 	* basic_filters.c (qualify_syscall_class, qualify_syscall_name):
   1653 	Rearrange the inner loop body.
   1654 	(qualify_syscall_number, lookup_class, qualify_syscall_tokens,
   1655 	qualify_tokens): Remove redundant braces around single line expressions.
   1656 	* filter_qualify.c (qualify_inject_common): Likewise.
   1657 
   1658 	filter_qualify: move memory allocation from parse_inject_expression.
   1659 	* filter_qualify.c (parse_inject_expression): Replace "s" and "buf"
   1660 	arguments with "str" argument, use it instead of "s" and "*buf".
   1661 	(qualify_inject_common): Rename "buf" to "copy", initialize it to a copy
   1662 	of "str", pass "copy" to parse_inject_expression instead of "str" and
   1663 	"buf".
   1664 
   1665 2018-01-14  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1666 
   1667 	xlat: update NT_* constants.
   1668 	Update NT_* descriptor types with the values borrowed from
   1669 	kernel's include/uapi/linux/elf.h and glibc's elf.h.
   1670 
   1671 	* xlat/nt_descriptor_types.in (NT_PRSTATUS, NT_FPREGSET, NT_PRPSINFO,
   1672 	NT_PRXREG, NT_TASKSTRUCT, NT_PLATFORM, NT_AUXV, NT_GWINDOWS, NT_ASRS,
   1673 	NT_PSTATUS, NT_PSINFO, NT_PRCRED, NT_UTSNAME, NT_LWPSTATUS,
   1674 	NT_LWPSINFO, NT_PRFPXREG, NT_PRXFPREG, NT_PPC_VMX, NT_PPC_SPE,
   1675 	NT_PPC_VSX, NT_386_TLS, NT_386_IOPERM, NT_X86_XSTATE): Add fallback
   1676 	definitions.
   1677 	(NT_SIGINFO, NT_FILE, NT_PPC_*, NT_S390_*, NT_ARM_*, NT_METAG_*,
   1678 	NT_ARC_V2): New constants.
   1679 	* NEWS: Mention this.
   1680 
   1681 2018-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   1682 
   1683 	configure: use AC_MSG_ERROR and AC_MSG_FAILURE consistently.
   1684 	* configure.ac [$arch = mips]: Use AC_MSG_FAILURE instead of
   1685 	AC_MSG_ERROR when _MIPS_SIM cannot be determined.  Use AC_MSG_ERROR
   1686 	instead of AC_MSG_FAILURE when syscallent stubs cannot be generated.
   1687 
   1688 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1689 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   1690 
   1691 	configure: add --disable-mpers and --enable-mpers=check options.
   1692 	On architectures supporting multiple personalities, multiple
   1693 	personalities support in strace is required for proper decoding of
   1694 	structures used by tracees with personalities that differ from the
   1695 	personality of strace.
   1696 
   1697 	New configure options control whether multiple personalities support
   1698 	in strace is mandatory, optional, or disabled.
   1699 
   1700 	The default is changed from what is now equivalent of
   1701 	--enable-mpers=check (automatically detect whether required mpers
   1702 	support could be enabled) to --enable-mpers (terminate the build
   1703 	if required mpers support could not be enabled).
   1704 
   1705 	* configure.ac (AC_ARG_ENABLE([mpers])): New option.
   1706 	* m4/mpers.m4 (st_MPERS): Use enable_mpers.  Terminate the build
   1707 	if mpers could not be enabled and enable_mpers==yes.
   1708 	* strace.spec.in: Specify --enable-mpers=check to %configure.
   1709 	* debian/rules (build/Makefile, build64/Makefile): Specify
   1710 	--enable-mpers=check to configure.
   1711 
   1712 	Suggested-by: DJ Delorie <dj (a] redhat.com>
   1713 
   1714 2018-01-11  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   1715 
   1716 	Update ioctl entries from linux v4.15-rc7.
   1717 	* linux/32/ioctls_inc_align16.h: Update from linux v4.15-rc7 using ioctls_gen.sh.
   1718 	* linux/32/ioctls_inc_align32.h: Likewise.
   1719 	* linux/32/ioctls_inc_align64.h: Likewise.
   1720 	* linux/64/ioctls_inc.h: Likewise.
   1721 	* linux/x32/ioctls_inc0.h: Likewise.
   1722 	* NEWS: Mention this.
   1723 
   1724 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1725 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   1726 
   1727 	Issue a warning when strace lacks tracee personality support.
   1728 	* defs.h (HAVE_PERSONALITY_1_MPERS, HAVE_PERSONALITY_2_MPERS): New
   1729 	macros.
   1730 	* syscall.c (update_personality): Add need_mpers_warning array
   1731 	initialized with mpers support data.  Use it for printing the mpers
   1732 	unavailability warning once per personality.
   1733 
   1734 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1735 
   1736 	tests: add more checks of reboot syscall decoding.
   1737 	In particular, check for the recent fixes in reboot syscall decoder.
   1738 
   1739 	* tests/gen_tests.in (reboot): Provide -s 256 option.
   1740 	* tests/reboot.c (STR32, STR128): New macros.
   1741 	(main): Add more checks.
   1742 
   1743 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1744 
   1745 	tests: use sprintrc in reboot.test.
   1746 	* test/reboot.c (main): Use sprintrc instead of old-style manual
   1747 	printing of return code.
   1748 
   1749 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1750 
   1751 	reboot.c: limit printing of the fourth argument to 255 bytes.
   1752 	The size of kernel buffer is 256 bytes and the last byte is always zero.
   1753 
   1754 	* reboot.c (SYS_FUNC(reboot)): Replace printstr call with printstr_ex
   1755 	with size of 255 and style flag QUOTE_0_TERMINATED.
   1756 
   1757 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1758 
   1759 	reboot.c: use printxval instead of printflags.
   1760 	Numeric arguments of reboot syscall are not flags but magic values.
   1761 
   1762 	* reboot.c (SYS_FUNC(reboot)): Replace printflags with printxval.
   1763 
   1764 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1765 
   1766 	Search for <libiberty/demangle.h> in addition to <demangle.h>
   1767 	This is the location where this header is installed on Debian-based
   1768 	systems.
   1769 
   1770 	* configure.ac: Check for libiberty/demangle.h in addition to
   1771 	demangle.h.
   1772 	* unwind.c [USE_DEMANGLE]: Include either <demangle.h> or
   1773 	<libiberty_demangle.h> based on the presence of HAVE_DEMANGLE_H and
   1774 	HAVE_LIBIBERTY_DEMANGLE_H macros.
   1775 
   1776 2018-01-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   1777 
   1778 	strace.1: fix typo.
   1779 	* strace.1.in (.SH NOTES): Replace prlimit with prlimit64.
   1780 
   1781 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1782 
   1783 	Document multiple personalities support.
   1784 	* strace.1.in (.SH "MULTIPLE PERSONALITY SUPPORT"): New section.
   1785 
   1786 	Add indication of mpers support to strace -V output.
   1787 	* strace.c (print_version): Append information about m32 and mx32
   1788 	decoding support.
   1789 	* tests/strace-V.test: Update expected output.
   1790 
   1791 	Provide strace's native arch to the test framework.
   1792 	* configure.ac (arch_native): New variable, set to arch.
   1793 	* tests/Makefile.am (NATIVE_ARCH): New variable, set to @arch_native@.
   1794 	(AM_TEST_LOG_FLAGS): Pass NATIVE_ARCH as STRACE_NATIVE_ARCH environment
   1795 	variable.
   1796 
   1797 	Add indication of optional demangle feature strace -V output.
   1798 	* strace.c (print_version) [USE_DEMANGLE]: Append " stack-demangle"
   1799 	to the features string.
   1800 	* tests/strace-V.test: Update expected output.
   1801 
   1802 	configure.ac: check for mpers support on RISC-V.
   1803 	* confgure.ac (st_MPERS([m32])): Add riscv.
   1804 
   1805 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1806 
   1807 	Use xappendstr instead of xsnprintf where suitable.
   1808 	Replace occurrences of
   1809 
   1810 	    outptr += xsnprintf(outptr, sizeof(outstr) - (outptr - outstr), ...)
   1811 
   1812 	with much more sleek
   1813 
   1814 	    outptr = xappendstr(outstr, outptr, ...)
   1815 
   1816 	* desc.c (decode_select): Replace xsnprintf with xappendstr.
   1817 	* open.c (sprint_open_modes): Likewise.
   1818 	* poll.c (decode_poll_exiting): Likewise.
   1819 	* signal.c (sprintsigmask_n): Likewise.
   1820 	* xlat.c (sprintflags): Likewise.
   1821 
   1822 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1823 
   1824 	xstring.h: add xappendstr.
   1825 	Introduce a macro for handling common case of partial writes
   1826 	to a character array.
   1827 
   1828 	* xstring.h (get_pos_diff_): New function.
   1829 	(xappendstr): New macro.
   1830 
   1831 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1832 
   1833 	Update perf-related flags.
   1834 	 - PERF_SAMPLE_BRANCH_TYPE_SAVE, added in v4.14-rc1~173^2~33^2~6
   1835 	 - PERF_SAMPLE_PHYS_ADDR, added in v4.14-rc1~173^2~2
   1836 
   1837 	* xlat/perf_branch_sample_type.in (PERF_SAMPLE_BRANCH_TYPE_SAVE): New
   1838 	flag.
   1839 	* xlat/perf_event_sample_format.in (PERF_SAMPLE_PHYS_ADDR): Likewise.
   1840 	* tests/perf_event_open.c: Update expected output.
   1841 
   1842 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1843 
   1844 	perf.c: add support for struct perf_event_attr.namespaces.
   1845 	This field was introduced by linux kernel commit v4.12-rc1~152^2~42^2~10.
   1846 
   1847 	* configure.ac (AC_CHECK_MEMBERS): Add  perf_event_attr.namespaces.
   1848 	* perf_event_struct.h (struct perf_event_attr): Add namespaces field.
   1849 	* perf.c (print_perf_event_attr): Print namespaces field.
   1850 	Update comment for __reserved_1 field.
   1851 	* tests/perf_event_open.c (struct pea_flags): Add namespaces field.
   1852 	(print_event_attr): Update expected output.
   1853 
   1854 2018-01-11  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1855 
   1856 	tests: check decoding of [gs]et_thread_area syscalls on x86.
   1857 	* tests/xet_thread_area_x86.c: New file.
   1858 	* tests/xet_thread_area_x86.test: New test.
   1859 	* tests/Makefile.am (DECODER_TESTS): Add it.
   1860 	* tests/.gitignore: Add xet_thread_area_x86.
   1861 	* tests/pure_executables.list: Likewise.
   1862 
   1863 2018-01-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1864 
   1865 	tests: check decoding of modify_ldt with for 4-byte-available user_desc.
   1866 	Since there is possibility now that strace read only entry_number field
   1867 	of the user_desc struct, let's check that it doesn't do it with
   1868 	modify_ldt syscall.
   1869 
   1870 	* tests/modify_ldt.c (main): Add 4-byte-sized tail_alloc'ed variable.
   1871 	Try to provide it as an argument to modify_ldt.
   1872 
   1873 2018-01-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1874 
   1875 	Allow separate printing of struct user_desc.entry_number.
   1876 	Kernel reads only entry_number field in the beginning of the
   1877 	get_thread_area syscall handler.  Let's replicate this behaviour.
   1878 
   1879 	* defs.h (enum user_desc_print_filter): New enumeration.
   1880 	(print_user_desc): Add an argument for signalling which part of the
   1881 	structure should be printed.
   1882 	* clone.c (print_tls_arg): Update print_user_desc call.
   1883 	* ldt.c (print_user_desc): Add filter argument.  Print entry_number on
   1884 	entering and the rest on exiting. Store entering value of the
   1885 	entry_number field in order to print the updated value in the impossible
   1886 	case of changed entry_number value.
   1887 	(SYS_FUNC(modify_ldt), SYS_FUNC(set_thread_area)): Update
   1888 	print_user_desc call.
   1889 	(SYS_FUNC(get_thread_area)): Call print_user_desc with
   1890 	USER_DESC_ENTERING format argument on entering and with
   1891 	USER_DESC_EXITING on exiting.
   1892 
   1893 2018-01-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1894 
   1895 	tests: move struct user_desc printing function into a separate file.
   1896 	As part of preparation for the introduction of [gs]et_thread_area test.
   1897 
   1898 	* tests/modify_ldt.c (print_user_desc): Move it ...
   1899 	* tests/print_user_desc.c: ... to new file.
   1900 	* tests/Makefile.am (EXTRA_DIST): Add print_user_desc.c.
   1901 
   1902 2018-01-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1903 
   1904 	tests: check decoding of modify_ldt syscall.
   1905 	* tests/modify_ldt.c: New file.
   1906 	* tests/gen_tests.in: Add modify_ldt test.
   1907 	* tests/pure_executables.list: Add modify_ldt.
   1908 	* tests/.gitignore: Likewise.
   1909 
   1910 	ldt.c: manually set modify_ldt's error code.
   1911 	* ldt.c (modify_ldt): Move parsing under entering(tcp). Check whether
   1912 	return code is erroneous and set tcp->u_error appropriately along with
   1913 	RVAL_PRINT_ERR_VAL flag.
   1914 
   1915 2018-01-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1916 
   1917 	syscall.c: add support for printing return value and error code.
   1918 	Some weird syscalls (like modify_ldt) return value that doesn't indicate
   1919 	an error (less than -4096), but it is, in fact, erroneous (because they
   1920 	decide to clip the return value to 32-bit, for example).
   1921 
   1922 	Add a flag to print decoded error code along with syscall return value.
   1923 
   1924 	* defs.h (RVAL_PRINT_ERR_VAL): New rval flag.
   1925 	* syscall.c (syscall_exiting_trace): Handle it.
   1926 
   1927 2018-01-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1928 
   1929 	ldt.c: print the first argument of modify_ldt as int.
   1930 	* ldt.c (SYS_FUNC(modify_ldt)): Print the first argument as %d.
   1931 
   1932 	ldt.c: print lm field for 64-bit tracees.
   1933 	* configure.ac (AC_CHECK_MEMBERS): Add struct user_desc.lm.
   1934 	* ldt.c (print_user_desc) [HAVE_STRUCT_USER_DESC_LM]: Print lm field
   1935 	for non-compat tracees (it is ignored for compat ones).
   1936 
   1937 2018-01-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1938 
   1939 	ldt.c: make struct user_desc output more structured.
   1940 	Also, while we are here, let's fix print qualifiers (which should be %u
   1941 	and not %d).
   1942 
   1943 	* ldt.c (print_user_desc): Use PRINT_FIELD_* macros for printing
   1944 	structure.
   1945 	(SYS_FUNC(set_thread_area)): Change field key-value separator from ":"
   1946 	to "=", change print format qualifier from %d to %u.
   1947 
   1948 2018-01-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1949 
   1950 	print_fields.h: add PRINT_FIELD_U_CAST.
   1951 	Add a macro for printing fields explicitly casted to specific type.
   1952 	This is useful for bit fields, as otherwise the magic of *_extend_to_*
   1953 	macros breaks.
   1954 
   1955 	* print_field.h (PRINT_FIELD_U_CAST): New macro.
   1956 
   1957 2018-01-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1958 
   1959 	print_fields.h: rename PRINT_FIELD_UID to PRINT_FIELD_ID.
   1960 	As uid is not the only thing that has a special treatment of the -1
   1961 	value (and, as a result, needs special care), let's rename
   1962 	PRINT_FIELD_UID to PRINT_FIELD_ID and make PRINT_FIELD_UID its alias.
   1963 
   1964 	* print_fields.h (PRINT_FIELD_ID): Rename from PRINT_FIELD_UID.
   1965 	(PRINT_FIELD_UID): Define to PRINT_FIELD_ID.
   1966 
   1967 2018-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   1968 
   1969 	Fix build on systems without linux/genetlink.h.
   1970 	* socketutils.c [!HAVE_LINUX_GENETLINK_H] (genl_families_xlat): Add
   1971 	tcp argument.
   1972 
   1973 	Fixes: v4.20-134-gc46fefc ("Add tcp arguments to netlink calls")
   1974 
   1975 2018-01-07  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1976 
   1977 	count.c: whitespace.
   1978 
   1979 	count.c: cleanup types and sizeof usage.
   1980 	* count.c (call_summary_pers): Change the type of sorted_count
   1981 	to "unsigned int *".  Replace sizeof(int) with  sizeof(sorted_count[0]).
   1982 	Change the type of idx to unsigned int.
   1983 
   1984 2018-01-07  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   1985 
   1986 	count.c: collect definitions of format strings in one place.
   1987 	In an attempt to make it more readable.
   1988 
   1989 	* count.c (call_summary_pers): Put all format strings in static
   1990 	constants. Use them.
   1991 
   1992 2018-01-07  Eugene Syromiatnikov  <esyr (a] redhat.com>
   1993 
   1994 	Add tcp arguments to netlink calls.
   1995 	Since they call tracee-specific socket/sendmsg/recvmsg, we'd like to
   1996 	pass tcp there.
   1997 
   1998 	* defs.h (genl_families_xlat): Add tcp argument.
   1999 	* netlink.c (decode_nlmsg_type_default, decode_nlmsg_type_generic,
   2000 	decode_nlmsg_type_netfilter, typedef nlmsg_types_decoder_t): Likewise.
   2001 	(decode_nlmsg_type): Add tcp argument. Pass tcp to decoder call.
   2002 	(print_nlmsghdr): Pass tcp to the decode_nlmsg_type call.
   2003 	* socketutils.c (send_query, receive_responses): Add tcp argument.
   2004 	(inet_send_query, unix_send_query, netlink_send_query, ): Add tcp argument.
   2005 	Pass tcp to the send_query call.
   2006 	(unix_get): Add tcp argument. Pass tcp to the unix_send_query and
   2007 	receive_responses calls.
   2008 	(inet_get): Add tcp argument. Pass tcp to the inet_send_query and
   2009 	receive_responses calls.
   2010 	(tcp_v4_get, udp_v4_get, tcp_v6_get, udp_v6_get): Add tcp argument. Pass
   2011 	tcp to the inet_get call.
   2012 	(netlink_get): Add tcp argument. Pass tcp to the netlink_send_query and
   2013 	receive_responses calls.
   2014 	(protocols): Add tcp argument to the get field.
   2015 	(get_sockaddr_by_inode_uncached): Add tcp argument. Pass tcp to
   2016 	the protocols[].get calls.
   2017 	(print_sockaddr_by_inode_uncached): Add tcp argument. Pass tcp to
   2018 	the get_sockaddr_by_inode_uncached call.
   2019 	(get_sockaddr_by_inode): Pass tcp to the get_sockaddr_by_inode_uncached
   2020 	call.
   2021 	(print_sockaddr_by_inode): Pass tcp to the
   2022 	print_sockaddr_by_inode_uncached call.
   2023 	(genl_send_dump_families): Add tcp argument. Pass tcp to the send_query
   2024 	call.
   2025 	(genl_families_xlat): Add tcp argument. Pass tcp to the
   2026 	genl_send_dump_families and receive_responses calls.
   2027 
   2028 2018-01-07  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2029 
   2030 	Add tcp argument to clear_regs.
   2031 	* defs.h (clear_regs): Add argument struct tcb *tcp.
   2032 	* syscall.c (clear_regs): Likewise.
   2033 	* strace.c (next_event): Pass tcp to clear_regs() call.
   2034 
   2035 2018-01-07  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2036 
   2037 	Pass tcp argument to get_optmem_max/read_int_from_file.
   2038 	In preparation to passing tcp to all tracee-related syscalls.
   2039 
   2040 	* defs.h (read_int_from_file): Add "struct tcb *" as the first argument.
   2041 	* util.c (read_int_from_file): Likewise.
   2042 	* msghdr.c (get_optmem_max): Add "struct tcb *tcp" as the first
   2043 	argument, pass it to read_int_from_file call.
   2044 	(decode_msg_control): Pass tcp to get_optmem_max.
   2045 
   2046 2018-01-07  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2047 
   2048 	Include paths.h if it is available.
   2049 	Use the OS definition of _PATH_BSHELL macro if it is available.
   2050 
   2051 	* configure.ac (AC_CHECK_HEADERS): Add paths.h.
   2052 	* strace.c [HAVE_PATHS_H]: Include paths.h.
   2053 
   2054 2018-01-07  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2055 
   2056 	strace.c: avoid duplication of a format string in attach_tcb.
   2057 	* strace.c (attach_tcb): Add task_path variable with the output format.
   2058 	Use it for the procdir declaration and xsprintf format string argument.
   2059 
   2060 2018-01-07  Elvira Khabirova  <lineprinter (a] altlinux.org>
   2061 
   2062 	Move syscall_tampered to defs.h.
   2063 	* syscall.c (syscall_tampered): Move ...
   2064 	* defs.h: ... here.
   2065 
   2066 2018-01-07  Elvira Khabirova  <lineprinter (a] altlinux.org>
   2067 
   2068 	strace.c: rename set_sigaction to set_sighandler.
   2069 	Since set_sigaction() actually specifies sa_handler and not sa_sigaction,
   2070 	rename set_sigaction() to set_sighandler() for future definition of
   2071 	set_sigaction() function as specifying sa_sigaction.
   2072 
   2073 	* strace.c (set_sigaction): Rename to set_sighandler.
   2074 	All callers updated.
   2075 
   2076 2018-01-07  Elvira Khabirova  <lineprinter (a] altlinux.org>
   2077 
   2078 	.gitignore: ignore "gnu" directory created by st_MPERS m4 macro.
   2079 
   2080 	Update .mailmap.
   2081 	* .mailmap (Elvira Khabirova): Add @altlinux.org.
   2082 
   2083 2018-01-07  Chen Jingpiao  <chenjingpiao (a] gmail.com>
   2084 
   2085 	.mailmap: add canonical name for Chen Jingpiao.
   2086 	* .mailmap: Add canonical name for Chen Jingpiao.
   2087 
   2088 2018-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   2089 
   2090 	personality.c: use sprintxval.
   2091 	* personality.c (SYS_FUNC(personality)): Use sprintxval instead of local
   2092 	implementation.
   2093 
   2094 2018-01-07  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2095 
   2096 	xlat.c: add sprintxval for printing xval to string.
   2097 	* defs.h (sprintxval): New declaration.
   2098 	(sprintxval): New function.
   2099 
   2100 2018-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   2101 
   2102 	desc.c: use xsnprintf instead of sprintf.
   2103 	* desc.c: Include "xstring.h".
   2104 	(decode_select): Replace sprintf with xsnprintf.
   2105 
   2106 	xlat.c: use xsnprintf instead of sprintf.
   2107 	* xlat.c: Include "xstring.h".
   2108 	(sprintflags): Replace sprintf with xsnprintf.
   2109 
   2110 	open.c: use xsnprintf instead of sprintf.
   2111 	* open.c: Include "xstring.h".
   2112 	(sprint_open_modes): Replace sprintf with xsnprintf.
   2113 
   2114 	poll.c: use xs*printf instead of sprintf.
   2115 	* poll.c: Include "xstring.h".
   2116 	(decode_poll_exiting): Replace sprintf with xsnprintf and xsprintf.
   2117 
   2118 	signal.c: use xs*printf instead of sprintf.
   2119 	* signal.c: Include "xstring.h".
   2120 	(signame): Replace sprintf with xsprintf.
   2121 	(sprintsigmask_n): Replace sprintf with xsnprintf.
   2122 
   2123 	print_timeval.c: use xsprintf instead of snprintf.
   2124 	* print_timeval.c: Include "xstring.h".
   2125 	(sprint_timeval, sprint_timeval32): Replace snprintf with xsprintf.
   2126 
   2127 	print_timespec.c: use xsprintf instead of snprintf.
   2128 	* print_timespec.c: Include "xstring.h".
   2129 	(sprint_timespec): Replace snprintf with xsprintf.
   2130 
   2131 	mmsghdr.c: use xsprintf instead of snprintf.
   2132 	* mmsghdr.c: Include "xstring.h".
   2133 	(SYS_FUNC(recvmmsg)): Replace snprintf with xsprintf.
   2134 
   2135 	socketutils.c: use xsprintf instead of snprintf.
   2136 	* socketutils.c: Include "xstring.h".
   2137 	(unix_parse_response): Replace snprintf with xsprintf.
   2138 
   2139 	alpha.c: use xsprintf instead of snprintf.
   2140 	* alpha.c: Include "xstring.h".
   2141 	(decode_getxxid): Replace snprintf with xsprintf.
   2142 
   2143 	v4l2.c: use xsprintf instead of sprintf.
   2144 	* v4l2.c: Include "xstring.h".
   2145 	(print_v4l2_create_buffers): Replace sprintf with xsprintf.
   2146 
   2147 	util.c: use x*sprintf instead of s*printf.
   2148 	* util.c: Include "xstring.h".
   2149 	(sprinttime_ex): Replace snprintf with xsnprintf.
   2150 	(getfdproto): Replace sprintf with xsprintf.
   2151 
   2152 	unwind.c: use xsprintf instead of sprintf.
   2153 	* unwind.c: Include "xstring.h".
   2154 	(build_mmap_cache): Replace sprintf with xsprintf.
   2155 
   2156 	syscall.c: use xsprintf instead of sprintf.
   2157 	* syscall.c: Include "xstring.h".
   2158 	(get_scno): Replace sprintf with xsprintf.
   2159 
   2160 	resource.c: use xsprintf instead of sprintf.
   2161 	* resource.c: Include "xstring.h".
   2162 	(sprint_rlim64, sprint_rlim32): Replace sprintf with xsprintf.
   2163 
   2164 	pathtrace.c: use xsprintf instead of sprintf.
   2165 	* pathtrace.c: Include "xstring.h".
   2166 	(getfdpath): Replace sprintf with xsprintf.
   2167 
   2168 2018-01-07  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2169 
   2170 	ldt.c: replace sprintf with xsprintf.
   2171 	* ldt.c: Include "xstring.h".
   2172 	(SYS_FUNC(set_thread_area)): Replace sprintf with xsprintf.
   2173 
   2174 2018-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   2175 
   2176 	strace.c: use xsprintf instead of sprintf.
   2177 	* strace.c: Include "xstring.h".
   2178 	(strerror, newoutf, attach_tcb, print_debug_info): Replace sprintf
   2179 	with xsprintf.
   2180 
   2181 2018-01-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2182 
   2183 	ioprio.c: use xsprintf instead of sprintf.
   2184 	* ioprio.c: Include "xstring.h".
   2185 	(sprint_ioprio): Replace sprintf with xsprintf.
   2186 
   2187 2018-01-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2188 
   2189 	Introduce hardened xsprintf/xsnprintf macros.
   2190 	Let's try to future/fool-proof code a bit by introducing variants
   2191 	of sprintf/snprintf that die if an overflow (or an error) occurs.
   2192 	They are deemed to be the default choice for printing to some local
   2193 	string buffer where no sensible error handling is implemented.
   2194 
   2195 	* xstring.h: New file.
   2196 	* Makefile.am (strace_SOURCES): Add it.
   2197 
   2198 2018-01-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2199 
   2200 	count.c: use %9.u conversion specification.
   2201 	Instead of printing to a temporary string.  This also fixes a subtle bug
   2202 	when the output for a billion errors and more is cut and shown
   2203 	incorrectly.
   2204 
   2205 	* count.c (struct call_counts): Change type of calls and errors fields
   2206 	to unsigned int since they are used and printed as unsigned anyway.
   2207 	(call_summary_pers): Remove error_str.  Print cc->errors
   2208 	and error_cum using %9.u conversion specification.
   2209 
   2210 2018-01-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2211 
   2212 	count.c: use personality_names in call_summary report caption.
   2213 	Otherwise the title is quite misleading for x32 personality.
   2214 
   2215 	* count.c (call_summary): Use personality_names.
   2216 
   2217 2018-01-05  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   2218 
   2219 	Move personality names to a global variable.
   2220 	This is a part of "Prepare for adding support for Lua scripting"
   2221 	commit.
   2222 
   2223 	* defs.h (personality_names): New external constant declaration.
   2224 	* syscall.c: (personality_names): New global variable.
   2225 	(update_personality): Use personality_names for reporting personality
   2226 	name.
   2227 
   2228 	Co-Authored-by: Eugene Syromyatnikov <evgsyr (a] gmail.com>
   2229 
   2230 2018-01-04  Lubomir Rintel  <lkundrak (a] v3.sk>
   2231 
   2232 	strace.spec.in: include Bluetooth headers for AF_BLUETOOTH sockets decoding
   2233 	* strace.spec.in (BuildRequires): Add pkgconfig(bluez).
   2234 
   2235 2018-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   2236 
   2237 	Lift artificial limit on output file names in -ff mode.
   2238 	Starting with commit v4.5.19~88 strace imposed an artificial limit
   2239 	on output file names in -ff mode, leading to the following absurd
   2240 	behaviour:
   2241 
   2242 	$ strace -ff -o"$(perl -e 'print "/" x 510')/$PWD/log" /bin/true
   2243 	strace: Can't fopen '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.12345': Permission denied
   2244 
   2245 	* strace.c (newoutf): Raise buffer size to PATH_MAX.
   2246 	(init) <followfork >= 2>: Check output file name prefix length.
   2247 	* tests/options-syntax.test: Check it.
   2248 
   2249 2018-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   2250 
   2251 	configure.ac: fix typo.
   2252 	* configure.ac: Replace CPPFALGS with CPPFLAGS.
   2253 
   2254 	Fixes: v4.20-85-gf9c8e8a ("unwind: demangle symbol names")
   2255 
   2256 2018-01-03  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2257 
   2258 	Change the first argument of upeek from pid to tcp.
   2259 	All users were changed automatically by:
   2260 
   2261 		for i in `git grep -l 'upeek(tcp->pid'`; do \
   2262 			sed -i 's/upeek(tcp->pid/upeek(tcp/g' "$i"; \
   2263 		done
   2264 
   2265 	* upeek.c (upeek): Change the first argument from pid_t pid to struct
   2266 	tcb *tcp. Use tcp->pid instead of pid in the function's body.
   2267 	* defs.h (upeek): Update declaration.
   2268 	* linux/alpha/arch_getrval2.c: Pass tcp instead of tcp->pid to the
   2269 	upeek calls.
   2270 	* linux/alpha/arch_rt_sigframe.c: Likewise.
   2271 	* linux/alpha/arch_sigreturn.c: Likewise.
   2272 	* linux/alpha/get_scno.c: Likewise.
   2273 	* linux/alpha/get_syscall_args.c: Likewise.
   2274 	* linux/alpha/get_syscall_result.c: Likewise.
   2275 	* linux/bfin/arch_rt_sigframe.c: Likewise.
   2276 	* linux/bfin/get_scno.c: Likewise.
   2277 	* linux/bfin/get_syscall_args.c: Likewise.
   2278 	* linux/bfin/get_syscall_result.c: Likewise.
   2279 	* linux/crisv10/arch_rt_sigframe.c: Likewise.
   2280 	* linux/crisv10/get_scno.c: Likewise.
   2281 	* linux/crisv10/get_syscall_args.c: Likewise.
   2282 	* linux/crisv10/get_syscall_result.c: Likewise.
   2283 	* linux/hppa/arch_rt_sigframe.c: Likewise.
   2284 	* linux/hppa/get_scno.c: Likewise.
   2285 	* linux/hppa/get_syscall_args.c: Likewise.
   2286 	* linux/hppa/get_syscall_result.c: Likewise.
   2287 	* linux/microblaze/arch_rt_sigframe.c: Likewise.
   2288 	* linux/microblaze/arch_sigreturn.c: Likewise.
   2289 	* linux/microblaze/get_scno.c: Likewise.
   2290 	* linux/microblaze/get_syscall_args.c: Likewise.
   2291 	* linux/microblaze/get_syscall_result.c: Likewise.
   2292 	* linux/powerpc/getregs_old.c: Likewise.
   2293 	* linux/sh/arch_getrval2.c: Likewise.
   2294 	* linux/sh/arch_rt_sigframe.c: Likewise.
   2295 	* linux/sh/get_scno.c: Likewise.
   2296 	* linux/sh/get_syscall_args.c: Likewise.
   2297 	* linux/sh/get_syscall_result.c: Likewise.
   2298 	* linux/sh64/get_scno.c: Likewise.
   2299 	* linux/sh64/get_syscall_args.c: Likewise.
   2300 	* linux/sh64/get_syscall_result.c: Likewise.
   2301 	* linux/xtensa/arch_rt_sigframe.c: Likewise.
   2302 	* linux/xtensa/get_scno.c: Likewise.
   2303 	* linux/xtensa/get_syscall_args.c: Likewise.
   2304 	* linux/xtensa/get_syscall_result.c: Likewise.
   2305 	* syscall.c: Likewise.
   2306 
   2307 2018-01-03  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2308 
   2309 	Change argument of getregs_old from pid to tcp.
   2310 	* linux/powerpc/getregs_old.c (getregs_old): Change the first argument
   2311 	from pid_t pid to struct tcb *tcp. Replace all instances of pid with
   2312 	tcp->pid.
   2313 	* linux/x86_64/getregs_old.c (getregs_old): Likewise.
   2314 	* linux/x86_64/getregs_old.h (getregs_old): Update declaration.
   2315 	* syscall.c (get_regs) [HAVE_GETREGS_OLD]: Pass tcp to the getregs_old
   2316 	call instead of tcp->pid.
   2317 
   2318 2018-01-03  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2319 
   2320 	Change the first argument of upoke from pid to tcp.
   2321 	Users were updated automatically by:
   2322 
   2323 		for i in `git grep -l 'upoke(tcp->pid'`; do \
   2324 			sed -i 's/upoke(tcp->pid/upoke(tcp/g' "$i"; \
   2325 		done
   2326 
   2327 	* upoke.c (upoke): Change the first argument from pid_t pid to struct
   2328 	tcb *tcp. Use tcp->pid instead of pid in the function's body.
   2329 	* defs.h (upoke): Update declaration.
   2330 	* linux/alpha/set_error.c (arch_set_error, arch_set_success): Provide
   2331 	tcp in the first argument of the upoke call instead of tcp->pid.
   2332 	* linux/alpha/set_scno.c (arch_set_scno): Likewise.
   2333 	* linux/bfin/set_error.c (arch_set_error, arch_set_success): Likewise.
   2334 	* linux/bfin/set_scno.c (arch_set_scno): Likewise.
   2335 	* linux/crisv10/set_error.c (arch_set_error, arch_set_success):
   2336 	Likewise.
   2337 	* linux/crisv10/set_scno.c (arch_set_scno): Likewise.
   2338 	* linux/hppa/set_error.c (arch_set_error, arch_set_success): Likewise.
   2339 	* linux/hppa/set_scno.c (arch_set_scno): Likewise.
   2340 	* linux/i386/set_error.c (arch_set_error, arch_set_success): Likewise.
   2341 	* linux/i386/set_scno.c (arch_set_scno): Likewise.
   2342 	* linux/microblaze/set_error.c (arch_set_error, arch_set_success):
   2343 	Likewise.
   2344 	* linux/microblaze/set_scno.c (arch_set_scno): Likewise.
   2345 	* linux/powerpc/set_error.c (arch_set_error, arch_set_success):
   2346 	Likewise.
   2347 	* linux/powerpc/set_scno.c (arch_set_scno): Likewise.
   2348 	* linux/sh/set_error.c (arch_set_error, arch_set_success): Likewise.
   2349 	* linux/sh/set_scno.c (arch_set_scno): Likewise.
   2350 	* linux/sh64/set_error.c (arch_set_error, arch_set_success): Likewise.
   2351 	* linux/sh64/set_scno.c (arch_set_scno): Likewise.
   2352 	* linux/x86_64/set_error.c (arch_set_error, arch_set_success): Likewise.
   2353 	* linux/x86_64/set_scno.c (arch_set_scno): Likewise.
   2354 	* linux/xtensa/set_error.c (arch_set_error, arch_set_success): Likewise.
   2355 	* linux/xtensa/set_scno.c (arch_set_scno): Likewise.
   2356 
   2357 2018-01-03  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2358 
   2359 	Move enum trace_event into a separate header.
   2360 	As it will have users outside strace.c in the future.
   2361 
   2362 	* trace_event.h (enum trace_event): Move it from...
   2363 	* strace.c (enum trace_event): ...here.
   2364 	(#include "trace_event.h"): New header, for enum trace_event.
   2365 	* Makefile.am (strace_SOURCES): Add trace_event.h.
   2366 
   2367 2018-01-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2368 
   2369 	Call get_scno during startup_tcb only for forcibly attached processes.
   2370 	Otherwise it makes little sense on most arches to try to get syscall
   2371 	number.
   2372 
   2373 	* defs.h (TCB_GRABBED): New tcb flag.
   2374 	* strace.c (attach_tcb): Set TCB_GRABBED for the tcb.
   2375 	(startup_tcb): Call get_scno() only if process is grabbed and its
   2376 	registers may contain syscall number information.
   2377 
   2378 	Reported-by: Dmitry V. Levin <ldv (a] altlinux.org>
   2379 	Closes: https://github.com/strace/strace/issues/22
   2380 
   2381 2018-01-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2382 
   2383 	strace.c: sort getopt switch branches alphabetically.
   2384 	There's no reason to have them out of order. This also (almost) matches
   2385 	their order in the getopt call argument, introduced in
   2386 	v4.20-64-g61c03be.
   2387 
   2388 	* strace.c (init): Sort branches in the getopt switch routine.
   2389 
   2390 2018-01-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2391 
   2392 	strace.c: check for (non)zero argc instead of argv[0]
   2393 	Since we can never be sure that we have NULL behind the last entry of
   2394 	the argv array.
   2395 
   2396 	* strace.c (init): Check for non-zero argc before/instead of argv[0].
   2397 
   2398 2018-01-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2399 
   2400 	strace.1: advertise strace-log-merge.
   2401 	In order to raise awareness about strace-log-merge, mention it in
   2402 	SEE ALSO section and -ff option description.
   2403 
   2404 	* strace.1.in (.SS Filtering) <.TP .B \-ff>: Mention strace-log-merge.
   2405 	(.SH "SEE ALSO"): Likewise.
   2406 
   2407 2017-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   2408 
   2409 	unwind: demangle function arguments.
   2410 	* unwind.c (print_stack_frame): Specify demangling style.
   2411 	* tests/strace-k.test (result): Update regexp.
   2412 	* tests/strace-k-demangle.test (expected): Update expected output.
   2413 
   2414 	tests: check strace -k symbol names demangling.
   2415 	* tests/strace-k-demangle.test: New test.
   2416 	* tests/stack-fcall-mangled.c: New file.
   2417 	* tests/stack-fcall-mangled-0.c: Likewise.
   2418 	* tests/stack-fcall-mangled-1.c: Likewise.
   2419 	* tests/stack-fcall-mangled-2.c: Likewise.
   2420 	* tests/stack-fcall-mangled-3.c: Likewise.
   2421 	* tests/stack-fcall.h [MANGLE] (f0, f1, f2, f3): New macros.
   2422 	* tests/.gitignore: Add stack-fcall-mangled.
   2423 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   2424 	(stack_fcall_mangled_SOURCES): New variable.
   2425 	(EXTRA_DIST): Add strace-k-demangle.test.
   2426 	[USE_LIBUNWIND && USE_DEMANGLE] (LIBUNWIND_TESTS): Likewise.
   2427 
   2428 2017-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   2429 
   2430 	tests: parametrize strace-k.test.
   2431 	Prepare for the check of strace -k symbol names demangling.
   2432 
   2433 	* tests/strace-k.test: Parametrize $test_prog and $expected.
   2434 	* tests/stack-fcall.h: New file.
   2435 	* tests/stack-fcall.c: Include "stack-fcall.h"
   2436 	* tests/stack-fcall-0.c: Likewise.
   2437 	* tests/stack-fcall-1.c: Likewise.
   2438 	* tests/stack-fcall-2.c: Likewise.
   2439 	* tests/stack-fcall-3.c: Likewise.
   2440 	* tests/Makefile.am (EXTRA_DIST): Add stack-fcall.h.
   2441 
   2442 2017-12-26  Masatake YAMATO  <yamato (a] redhat.com>
   2443 
   2444 	unwind: demangle symbol names.
   2445 	Implement demangling of C++ symbol names in stack trace
   2446 	using cplus_demangle function from GNU libiberty library.
   2447 
   2448 	This is an example demangled stack trace output:
   2449 
   2450 	fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
   2451 	 > /usr/lib64/libc-2.25.so(__fxstat64+0x12) [0xffd62]
   2452 	 > /usr/lib64/libc-2.25.so(_IO_file_doallocate+0x5f) [0x717ff]
   2453 	 > /usr/lib64/libc-2.25.so(_IO_doallocbuf+0x79) [0x81699]
   2454 	 > /usr/lib64/libc-2.25.so(_IO_file_overflow+0x198) [0x807b8]
   2455 	 > /usr/lib64/libc-2.25.so(_IO_file_xsputn+0xbd) [0x7ed5d]
   2456 	 > /usr/lib64/libc-2.25.so(fwrite_unlocked+0x60) [0x7d800]
   2457 	 > /usr/lib64/libleveldb.so.1.18(leveldb::EnvWrapper::StartThread+0x3b6) [0x48656]
   2458 	 > /usr/lib64/libleveldb.so.1.18(leveldb::log::Writer::EmitPhysicalRecord+0x89) [0x28bc9]
   2459 	 > /usr/lib64/libleveldb.so.1.18(leveldb::log::Writer::AddRecord+0x9e) [0x28d9e]
   2460 	 > /usr/lib64/libleveldb.so.1.18(leveldb::DBImpl::Write+0x208) [0x1ce18]
   2461 	 > /usr/lib64/libleveldb.so.1.18(leveldb::DB::Put+0x59) [0x192b9]
   2462 	 > /usr/lib64/libleveldb.so.1.18(leveldb::DBImpl::Put+0x1d) [0x1931d]
   2463 	 > /home/yamato/var/leveldb/doc/a.out(main+0x120) [0x1107]
   2464 	 > /usr/lib64/libc-2.25.so(__libc_start_main+0xea) [0x2088a]
   2465 	 > /home/yamato/var/leveldb/doc/a.out(_start+0x2a) [0xf3a]
   2466 
   2467 	* Makefile.am [USE_DEMANGLE] (strace_CPPFLAGS, strace_LDFLAGS,
   2468 	libiberty_LDADD): Append libiberty_CPPFLAGS, strace_LDFLAGS, and
   2469 	libiberty_LIBS, respectively.
   2470 	* configure.ac: Add --with-libiberty option.  Check cplus_demangle
   2471 	support in libiberty.
   2472 	* unwind.c [USE_DEMANGLE]: Include <demangle.h>.
   2473 	(print_stack_frame) [USE_DEMANGLE]: Use cplus_demangle.
   2474 
   2475 2017-12-26  Masatake YAMATO  <yamato (a] redhat.com>
   2476 
   2477 	Define macros for renaming xmalloc and xcalloc.
   2478 	I'm planning to link strace with libiberty for mangling C++
   2479 	symbol names in stack trace enabled with -k option.
   2480 
   2481 	Both names, xmalloc and xcalloc, are already defined and used
   2482 	in libiberty, and they conflict with functions in strace.
   2483 	Rename xmalloc and xcalloc functions defined in strace
   2484 	to strace_xmalloc and strace_xcalloc, respectively,
   2485 	to avoid this conflict.
   2486 
   2487 	* xmalloc.h (xcalloc, xmalloc): New macros.
   2488 
   2489 2017-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   2490 
   2491 	syscall: move a sparc specific include to an arch specific file.
   2492 	* syscall.c [SPARC64]: Do not include <asm/psrcompat.h>.
   2493 	[SPARC]: Do not include <asm/psr.h>.
   2494 	* linux/sparc/get_error.c: Include <asm/psr.h>.
   2495 
   2496 	syscall: move all ia64 specific includes to an arch specific file.
   2497 	* syscall.c [IA64]: Remove.
   2498 	* linux/ia64/get_syscall_args.c: Include <asm/rse.h>.
   2499 
   2500 	syscall: simplify get_syscall_result.
   2501 	* syscall.c [ptrace_getregset_or_getregs] (get_syscall_result_regs):
   2502 	Define to get_regs.
   2503 	(get_syscall_result): Use get_syscall_result_regs unconditionally.
   2504 
   2505 2017-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   2506 
   2507 	syscall: change get_regs argument type.
   2508 	This opens the way for future changes related to get_regs.
   2509 
   2510 	* syscall.c (get_regs): Change argument type from "pid_t"
   2511 	to "struct tcb *", all callers changed.
   2512 
   2513 2017-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   2514 
   2515 	syscall: move get_regs call from syscall_exiting_decode to get_syscall_result
   2516 	This make the code less confusing and opens the way for future changes
   2517 	related to get_regs.
   2518 
   2519 	* syscall.c (syscall_exiting_decode): Move get_regs invocation ...
   2520 	(get_syscall_result) [ptrace_getregset_or_getregs]: ... here.
   2521 
   2522 2017-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   2523 
   2524 	syscall: rework subcall decoding on mips o32.
   2525 	Move syscall subcall handling to the same switch statement that
   2526 	handles ipc and socket subcalls.
   2527 
   2528 	* linux/mips/syscallent-o32.h [LINUX_MIPSO32] (SYS_syscall_subcall):
   2529 	Define.
   2530 	* syscall.c (decode_mips_subcall): Rename to decode_syscall_subcall,
   2531 	conditionalize on SYS_syscall_subcall instead of LINUX_MIPSO32.
   2532 	(syscall_entering_decode) [LINUX_MIPSO32]: Remove.
   2533 	(syscall_entering_decode) [SYS_syscall_subcall]: Handle SEN_syscall
   2534 	using decode_syscall_subcall.
   2535 
   2536 2017-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   2537 
   2538 	syscall: tweak shuffle_scno ifdefery.
   2539 	* syscall.c (shuffle_scno): Check for ARM_FIRST_SHUFFLED_SYSCALL
   2540 	instead of ARM || AARCH64.  This does not result to any code change
   2541 	but looks more comprehensible.
   2542 
   2543 	syscall: change get_regs to return an error code.
   2544 	* syscall.c (get_regs_error) [!ptrace_getregset_or_getregs]: Do not
   2545 	define.
   2546 	(clear_regs) [!ptrace_getregset_or_getregs]: Do not set get_regs_error.
   2547 	(get_regs) [ptrace_getregset_or_getregs]: Return get_regs_error, all
   2548 	callers changed to test get_regs return code instead of get_regs_error
   2549 	static variable, which is now internally used by get_regs() and
   2550 	clear_regs() only.
   2551 	(USE_GET_SYSCALL_RESULT_REGS): Do not define.
   2552 	Use "#ifndef ptrace_getregset_or_getregs"
   2553 	instead of "#ifdef USE_GET_SYSCALL_RESULT_REGS".
   2554 
   2555 2017-12-24  Harsha Sharma  <harshasharmaiitr (a] gmail.com>
   2556 
   2557 	tests: enhance run.sh usage error diagnostics.
   2558 	* tests/run.sh: Execute timeout command only when invoked with
   2559 	an argument, otherwise print an error message.
   2560 
   2561 2017-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   2562 
   2563 	tests: skip nsyscalls-d.test on mips o32.
   2564 	On mips o32, nsyscalls test is implemented using syscall #4000,
   2565 	so nsyscalls-d cannot work there.
   2566 
   2567 	* tests/nsyscalls-d.test: Skip on mips o32.
   2568 
   2569 2017-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   2570 
   2571 	Remove linux/ptp_clock.h.
   2572 	As linux kernel provides a compatible linux/ptp_clock.h header since
   2573 	commit v3.8-rc1~139^2~514, there is no need for a local copy.
   2574 
   2575 	* linux/ptp_clock.h: Remove.
   2576 	* Makefile.am (EXTRA_DIST): Remove it.
   2577 	* configure.ac (AC_CHECK_TYPES): Check for struct ptp_sys_offset
   2578 	in <linux/ptp_clock.h>.
   2579 	* ioctl.c (ioctl_decode) <case '='>: Conditionalize
   2580 	on [HAVE_STRUCT_PTP_SYS_OFFSET].
   2581 	* ptp.c: Likewise.
   2582 
   2583 2017-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   2584 
   2585 	Remove linux/ubi-user.h.
   2586 	As linux kernel provides a compatible mtd/ubi-user.h header since
   2587 	commit v3.7-rc1~85^2~17, there is no need for a local copy.
   2588 
   2589 	* linux/ubi-user.h: Remove.
   2590 	* Makefile.am (EXTRA_DIST): Remove it.
   2591 	* configure.ac (AC_CHECK_MEMBERS): Check
   2592 	for struct ubi_attach_req.max_beb_per1024 in <mtd/ubi-user.h>.
   2593 	* ioctl.c (ioctl_decode) <case 'o', case 'O'>: Conditionalize
   2594 	on HAVE_STRUCT_UBI_ATTACH_REQ_MAX_BEB_PER1024.
   2595 	* ubi.c: Likewise.
   2596 
   2597 2017-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   2598 
   2599 	Remove linux/mtd-abi.h.
   2600 	As linux kernel provides a compatible mtd/mtd-abi.h header since
   2601 	commit v3.2-rc1~14^2~33, there is no need for a local copy.
   2602 
   2603 	* linux/mtd-abi.h: Remove.
   2604 	* Makefile.am (EXTRA_DIST): Remove it.
   2605 	* configure.ac (AC_CHECK_TYPES): Check for struct mtd_write_req
   2606 	in <mtd/mtd-abi.h>.
   2607 	* ioctl.c (ioctl_decode) <case 'M'>: Conditionalize
   2608 	on [HAVE_STRUCT_MTD_WRITE_REQ].
   2609 	* mtd.c: Likewise.
   2610 	* tests/ioctl_mtd.c: Likewise.
   2611 	* tests/ioctl.c (main): Likewise.
   2612 
   2613 2017-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   2614 
   2615 	Remove linux/personality.h.
   2616 	* linux/personality.h: Remove.
   2617 	* Makefile.am (EXTRA_DIST): Remove it.
   2618 	* personality.c: Do not include <linux/personality.h>, include
   2619 	"xlat/personality_flags.h" before "xlat/personality_types.h".
   2620 	* xlat/personality_flags.in: Provide fallback definitions.
   2621 	* xlat/personality_types.in: Likewise.
   2622 
   2623 2017-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   2624 
   2625 	travis: switch from clang-3.8 to clang.
   2626 	As travis provides a relatively fresh clang by default nowadays,
   2627 	it makes sense to use default clang in clang-based test builds.
   2628 
   2629 	* .travis.yml (matrix): Change clang-3.8 to clang.
   2630 
   2631 2017-12-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2632 
   2633 	strace.1.in: mention perf and ftrace in SEE ALSO.
   2634 	* strace.1.in (.SH SEE ALSO): Add references to perf-trace(1) and
   2635 	trace-cmd(1).
   2636 
   2637 	strace.1.in: clarify -F option behaviour.
   2638 	* strace.1.in <.TP \-F>: Extend deprecation warning.  Describe behaviour
   2639 	of multiple instances of -F and interoperability of -F and -f.
   2640 
   2641 2017-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   2642 
   2643 	tests: consistently use $STRACE_EXE instead of local alternatives.
   2644 	* tests/get_regs.test: Replace "${STRACE##* }" with "$STRACE_EXE".
   2645 	* tests/options-syntax.test: Replace "$strace_exp" with "$STRACE_EXE".
   2646 	* tests/syntax.sh: Likewise.
   2647 
   2648 2017-12-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2649 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   2650 
   2651 	strace.c: inform the user about -F option obsolescence.
   2652 	* strace.c (init): Print an error message if the option is used.
   2653 
   2654 2017-12-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2655 
   2656 	strace.c: sort option arguments alphabetically.
   2657 	Except for the ones that enabled by configure options.
   2658 
   2659 	While we are here, let's also change the indentation of while expression
   2660 	continuation in order to separate it from the following switch clause.
   2661 
   2662 	* strace.c (init): Reorder options in getopt() call.
   2663 
   2664 2017-12-20  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2665 
   2666 	strace.c: use _exit() instead of exit() in child's die()
   2667 	Let's keep child's death routine as minimalistic as possible for the
   2668 	cases when vfork() is used instead of fork() on systems that lack MMU.
   2669 
   2670 	* strace.c (die) <!(strace_tracer_pid == getpid())>: Call _exit().
   2671 
   2672 2017-12-20  Harsha Sharma  <harshasharmaiitr (a] gmail.com>
   2673 
   2674 	syscall: replace if (debug_flag) ... with debug_msg macro.
   2675 	* syscall.c (get_scno): Use debug_msg instead of
   2676 	"if (debug_flag) error_msg".
   2677 
   2678 2017-12-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2679 
   2680 	tests: check (some) debugging output generated during nsyscalls test.
   2681 	* tests/nsyscalls-d.c: New file.
   2682 	* tests/.gitignore: Add it.
   2683 	* tests/nsyscalls-d.test: New test, variant of nsyscalls.test with debug
   2684 	output check.
   2685 	* tests/nsyscalls-nd.test: Likewise.
   2686 	* tests/nsyscalls.c: Add expected debug output.
   2687 	* tests/Makefile.am (check_PROGRAMS): Add nsyscalls-d.
   2688 	(DECODER_TESTS): Add nsyscalls-d.test and nsyscalls-nd.test.
   2689 
   2690 2017-12-20  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2691 
   2692 	pathtrace.c: use xgrowarray.
   2693 	* defs.h <struct path_set>: Change type of num_selected field to size_t.
   2694 	Add size field.
   2695 	* pathtrace.c (storepath): Rewrite to utilise xgrowarray.
   2696 
   2697 2017-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   2698 
   2699 	dyxlat: use xgrowarray.
   2700 	* dyxlat.c (dyxlat_alloc): Use xgrowarray instead of xcalloc.
   2701 	(dyxlat_add_pair): Use xgrowarray instead of xreallocarray.
   2702 
   2703 	unwind: use xgrowarray.
   2704 	* unwind.c (get_symbol_name): Use xgrowarray instead of manual
   2705 	dynamic array management using xreallocarray.
   2706 
   2707 2017-12-14  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2708 
   2709 	strace.c: use xgrowarray.
   2710 	* strace.c (tcbtabsize): Change type to size_t.
   2711 	(expand_tcbtab): Rewrite in order to utilise xgrowarray
   2712 	instead of manual dynamic array management.
   2713 
   2714 	unwind: use xgrowarray.
   2715 	* unwind.c (build_mmap_cache): Use xgrowarray instead of manual dynamic
   2716 	array management.
   2717 
   2718 2017-12-14  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2719 
   2720 	xmalloc.c: introduce xgrowarray helper function.
   2721 	In order to simplify dynamic array management code.
   2722 
   2723 	* xmalloc.h (xgrowarray): New declaration.
   2724 	* xmalloc.c (xgrowarray): New function.
   2725 
   2726 2017-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   2727 
   2728 	tests: check error diagnostics when exec file name is too long.
   2729 	* tests/options-syntax.test: Check error diagnostics when
   2730 	exec file name length equals to PATH_MAX.
   2731 
   2732 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2733 
   2734 	strace.c: minor style fixes.
   2735 	* strace.c (test_ptrace_seize): Remove excess braces.
   2736 	(init): Wrap overly long string literal.  Add braces
   2737 	to the else if branch.
   2738 
   2739 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2740 
   2741 	strace.c: use *_func_* message printing macros where appropriate.
   2742 	In order to provide some additional bits of information in weird error
   2743 	cases or just replace existing usages of __func__/literal function name.
   2744 
   2745 	* strace.c (detach): Use perror_func_msg() instead of perror_msg().
   2746 	(startup_attach, open_dummy_desc, startup_child, test_ptrace_seize): Use
   2747 	perror_func_msg_and_die() instead of perror_msg_and_die().
   2748 	(test_ptrace_seize): Use error_func_msg_and_die() instead of
   2749 	error_msg_and_die().
   2750 
   2751 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2752 
   2753 	unwind.c: more verbose mapping overlapping diagnostic message.
   2754 	* unwind.c (build_mmap_cache): Change error_msg() to debug_msg(), add
   2755 	information about region names and the respective start and end
   2756 	addresses.
   2757 
   2758 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2759 
   2760 	unwind.c: non-fatal handling of asprintf error.
   2761 	An error returned by asprintf is a poor excuse for dying.
   2762 
   2763 	* unwind.c (asprintf_error_str): New string constant.
   2764 	(sprint_call_or_error): Replace error_msg_and_die() with
   2765 	perror_func_msg() and usage of asprintf_error_str for a return value.
   2766 	(queue_print): Free tmp->output line only if it is not
   2767 	asprintf_error_str.
   2768 
   2769 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2770 
   2771 	unwind.c: eliminate DPRINTF.
   2772 	Since DPRINTF is simply a macro that provides debugging information
   2773 	along with some information about printing routine call site, now standard
   2774 	debug_func_* macros are deemed to be a suitable replacement.
   2775 
   2776 	* unwind.c (DPRINTF): Remove.
   2777 	(build_mmap_cache, delete_mmap_cache, unwind_cache_invalidate,
   2778 	unwind_print_stacktrace, unwind_captiure_stacktrace): Replace
   2779 	DPRINTF(fmt, str, ...) with debug_func_msg(fmt, ...)/
   2780 
   2781 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2782 
   2783 	strace.c: replace if (debug_flag) ... with suitable debug printing macros
   2784 	* strace.c (alloc_tcb, droptcb, detach, attach_tcb, test_ptrace_seize,
   2785 	init, startup_tcb): Replace if (debug_flag) error_msg(...) occurrences
   2786 	with debug_error_msg(...).
   2787 	(attach_tcb): Replace if (debug_flag) perror_msg(...) with
   2788 	debug_perror_msg(...).
   2789 	(cleanup, startup_tcb): Replace if (debug_flag) error_msg(...)
   2790 	occurrences with debug_func_msg() in attempt to provide additional
   2791 	information.
   2792 
   2793 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2794 
   2795 	error_prints.h: add *_func_* printing macros.
   2796 	In order to reduce boilerplate for the cases when __func__ is desired
   2797 	to be printed.
   2798 
   2799 	* error_prints.h (error_func_msg, perror_func_msg, debug_func_msg,
   2800 	debug_func_perror_msg, error_func_msg_and_die, perror_func_msg_and_die):
   2801 	New macro definitions.
   2802 
   2803 2017-12-13  Eugene Syromiatnikov  <esyr (a] redhat.com>
   2804 
   2805 	error_prints.h: add debug print macros.
   2806 	* defs.h (debug_flag): Move the declaration...
   2807 	* error_prints.h (debug_flag): ... here.
   2808 	(debug_msg, debug_perror_msg): New macro definitions.
   2809 	Include <stdbool.h> for the debug_flag declaration.
   2810 
   2811 2017-12-04  Masatake YAMATO  <yamato (a] redhat.com>
   2812 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   2813 
   2814 	tests: check decoding of KVM ioctl commands.
   2815 	* tests/ioctl_kvm_run.c: New file.
   2816 	* tests/ioctl_kvm_run.test: New test.
   2817 	* tests/Makefile.am (DECODER_TESTS): Add ioctl_kvm_run.test.
   2818 	* tests/pure_executables.list: Add ioctl_kvm_run.
   2819 	* tests/.gitignore: Likewise.
   2820 
   2821 2017-12-04  Masatake YAMATO  <yamato (a] redhat.com>
   2822 
   2823 	kvm: decode the argument of KVM_{SET, GET}_SREGS ioctl command.
   2824 	* configure.ac (AC_CHECK_TYPES): Add struct kvm_sregs.
   2825 	* kvm.c [HAVE_STRUCT_KVM_SREGS] (kvm_ioctl_decode_sregs): New function.
   2826 	(kvm_ioctl) [HAVE_STRUCT_KVM_SREGS] <KVM_SET_SREGS, KVM_GET_SREGS>:
   2827 	Use it.
   2828 	* linux/arch_kvm.c (arch_print_kvm_sregs): New function.
   2829 	* linux/x86_64/arch_kvm.c (PRINT_FIELD_KVM_SREGS_STRUCT): New macro.
   2830 	(kvm_ioctl_decode_regs_dtable, kvm_ioctl_decode_regs_segment,
   2831 	arch_print_kvm_sregs): New functions.
   2832 
   2833 	kvm: decode the argument of KVM_{SET, GET}_REGS ioctl command.
   2834 	* configure.ac (AC_CHECK_TYPES): Add struct kvm_regs.
   2835 	* linux/arck_kvm.c: New file.
   2836 	* linux/x86_64/arch_kvm.c: Likewise.
   2837 	* linux/i386/arch_kvm.c: Likewise.
   2838 	* linux/x32/arch_kvm.c: Likewise.
   2839 	* Makefile.am (EXTRA_DIST): Add them.
   2840 	* kvm.c: Include "arch_kvm.c".
   2841 	[HAVE_STRUCT_KVM_REGS] (kvm_ioctl_decode_regs): New function.
   2842 	(kvm_ioctl) [HAVE_STRUCT_KVM_REGS] <KVM_SET_REGS, KVM_GET_REGS>: Use it.
   2843 
   2844 	kvm: decode the argument of KVM_SET_USER_MEMORY_REGION ioctl command.
   2845 	* configure.ac (AC_CHECK_TYPES): Add struct kvm_userspace_memory_region.
   2846 	* xlat/kvm_mem_flags.in: New file.
   2847 	* kvm.c: Include print_fields.h.
   2848 	[HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION]: Include xlat/kvm_mem_flags.h,
   2849 	(kvm_ioctl_set_user_memory_region): New function.
   2850 	(kvm_ioctl) [HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION]
   2851 	<KVM_SET_USER_MEMORY_REGION>: Use it.
   2852 
   2853 2017-12-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2854 
   2855 	Add strace mascot.
   2856 	* strace.svg: New file.
   2857 
   2858 	Co-Authored-by: Vitaly Chaykovsky <mgspeker (a] gmail.com>
   2859 
   2860 2017-12-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   2861 
   2862 	tests: robustify attach-p-cmd.test against buggy kernels.
   2863 	From time to time various kernels, old and new, just go nuts
   2864 	and fail attach-p-cmd.test with the following diagnostics:
   2865 
   2866 	 12345 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---
   2867 	-12345 chdir("attach-p-cmd.test -p") = -1 ENOENT (No such file or directory)
   2868 	+12345 syscall_4294967295(0xffe60934, 0x1c0, 0xffe60934, 0x1, 0xffe609b4, 0xffe60a58) = -1 (errno 38)
   2869 	+12345 chdir("attach-p-cmd.test -p") = -1 ENOSYS (Function not implemented)
   2870 
   2871 	Let's workaround this kernel madness by rewriting the test
   2872 	without use of SIGALRM.
   2873 
   2874 	* tests/attach-p-cmd.h: New file.
   2875 	* tests/Makefile.am (EXTRA_DIST): Add attach-p-cmd.h.
   2876 	* tests/attach-p-cmd-cmd.c: Include "attach-p-cmd.h".
   2877 	(write_pidfile, wait_for_peer_invocation): New functions.
   2878 	(main): Use them.
   2879 	* tests/attach-p-cmd-p.c: Include <time.h> and "attach-p-cmd.h".
   2880 	(wait_for_peer_invocation, wait_for_peer_termination): New functions.
   2881 	(main): Use them.  Do not raise SIGALRM, use nanosleep after peer
   2882 	termination.
   2883 
   2884 2017-12-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   2885 
   2886 	tests: robustify ipc_msgbuf.test against broken libc.
   2887 	glibc between commits glibc-2.25~130 and glibc-2.26~740 had broken
   2888 	msgctl(IPC_RMID) on hppa: this operation always failed with EINVAL
   2889 	because of inappropriate use of IPC_64 flag.  Similar issues were
   2890 	fixed on other niche architectures.  Let's workaround these issues
   2891 	by skipping the test in case of msgctl(IPC_RMID) failure.
   2892 
   2893 	* tests/ipc_msgbuf.c (cleanup): Change return type to int,
   2894 	return 77 in case of msgctl(IPC_RMID) failure.
   2895 	(main): Explicitly invoke cleanup() at the end.
   2896 
   2897 2017-12-01  Masatake YAMATO  <yamato (a] redhat.com>
   2898 
   2899 	kvm: decode the argument of KVM_CREATE_VCPU ioctl command.
   2900 	* kvm.c (kvm_ioctl_create_vcpu): New function.
   2901 	(kvm_ioctl) <KVM_CREATE_VCPU>: Use it.
   2902 
   2903 	kvm: handle KVM_CREATE_VM ioctl command.
   2904 	* kvm.c (kvm_ioctl): Handle KVM_CREATE_VM command.
   2905 
   2906 	kvm: handle KVM_RUN, KVM_GET_VCPU_MMAP_SIZE, and KVM_GET_API_VERSION ioctl commands
   2907 	* kvm.c (kvm_ioctl): Handle KVM_RUN, KVM_GET_VCPU_MMAP_SIZE,
   2908 	and KVM_GET_API_VERSION commands.
   2909 
   2910 	ioctl: add a stub for decoding kvm related ioctls.
   2911 	* kvm.c: New file.
   2912 	* Makefile.am (strace_SOURCES): Add it.
   2913 	* configure.ac (AC_CHECK_HEADERS): Add linux/kvm.h.
   2914 	* defs.h (kvm_ioctl): New prototype.
   2915 	* ioctl.c (ioctl_decode) HAVE_LINUX_KVM_H]: Use kvm_ioctl.
   2916 
   2917 2017-11-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2918 
   2919 	strace-log-merge: work around corner cases of strace -ttt parsing.
   2920 	Employing strace -ttt for the logs destined to be fed to
   2921 	strace-log-merge is ultimately the best solution except for the logs
   2922 	that pass the following dates:
   2923 
   2924 	Thu Jan  1 00:00:09 UTC 1970
   2925 	Thu Jan  1 00:01:39 UTC 1970
   2926 	Thu Jan  1 00:16:39 UTC 1970
   2927 	Thu Jan  1 02:46:39 UTC 1970
   2928 	Fri Jan  2 03:46:39 UTC 1970
   2929 	Mon Jan 12 13:46:39 UTC 1970
   2930 	Sun Apr 26 17:46:39 UTC 1970
   2931 	Sat Mar  3 09:46:39 UTC 1973
   2932 	Sun Sep  9 01:46:39 UTC 2001
   2933 	Sat Nov 20 17:46:39 UTC 2286
   2934 	Wed Nov 16 09:46:39 UTC 5138
   2935 	Fri Sep 27 01:46:39 UTC 33658
   2936 	Sun May 20 17:46:39 UTC 318857
   2937 	Sat Nov  7 09:46:39 UTC 3170843
   2938 	Sun Jul  5 01:46:39 UTC 31690708
   2939 	Sat Jan 25 17:46:39 UTC 316889355
   2940 
   2941 	Let's lift this limitation.
   2942 
   2943 	* strace-log-merge: Generate numeric-only key for sorting, use sort -n
   2944 	option.
   2945 
   2946 2017-11-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   2947 
   2948 	debian: add strace-log-merge to the list of installed files.
   2949 	* debian/strace.install: Add strace-log-merge.
   2950 
   2951 	Add strace-log-merge man page.
   2952 	* strace-log-merge.1.in: New file.
   2953 	* NEWS: Mention this.
   2954 	* .gitignore: Add strace-log-merge.1.
   2955 	* Makefile.am (man_MANS): Likewise.
   2956 	* configure.ac (AC_CONFIG_FILES): Likewise.
   2957 	* debian/strace.manpages: Likewise.
   2958 
   2959 	strace-log-merge: add copyright header.
   2960 
   2961 2017-11-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   2962 
   2963 	Add initial GitLab CI support.
   2964 	* .gitlab-ci.yml: New file.
   2965 	* travis-build.sh: Print $CC -print-multi-lib.  Print config.log
   2966 	in case of configure failure.
   2967 	* travis-install.sh: Check sudo availability.  Install autoconf,
   2968 	automake, file, gawk, gcc-multilib, git, gzip, make, and xz-utils
   2969 	for all targets.
   2970 	(musl-gcc): Install ca-certificates.
   2971 
   2972 2017-11-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   2973 
   2974 	mpers: fix cross-compiling.
   2975 	In cross builds, a target version of readelf has to be used
   2976 	instead of a native one.
   2977 
   2978 	* configure.ac (AC_CHECK_TOOL): Add readelf.
   2979 	* Makefile.am (READELF): New variable.
   2980 	(mpers-m%.stamp): Pass it to $(srcdir)/mpers.sh.
   2981 	* m4/mpers.m4 (st_MPERS): Pass READELF environment variable
   2982 	to $srcdir/mpers_test.sh.
   2983 	* mpers.sh (READELF): New variable.
   2984 	Use it instead of readelf.
   2985 	* maint/ioctls_sym.sh: Likewise.
   2986 	* NEWS: Mention this fix.
   2987 
   2988 	Reported-by: Rolf Eike Beer <eb (a] emlix.com>
   2989 
   2990 2017-11-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   2991 
   2992 	tests: fix llseek test.
   2993 	* tests/llseek.test: Fix typo.
   2994 
   2995 	INSTALL-git.md: fix typo.
   2996 
   2997 	tests: simplify bpf test a bit.
   2998 	* tests/bpf.c (DEF_BPF_INIT_FIRST): New macro.
   2999 	(init_BPF_MAP_CREATE_first, init_BPF_MAP_LOOKUP_ELEM_first,
   3000 	init_BPF_PROG_LOAD_first, init_BPF_OBJ_PIN_first,
   3001 	init_BPF_PROG_ATTACH_first, init_BPF_PROG_TEST_RUN_first,
   3002 	init_BPF_PROG_GET_NEXT_ID_first, init_BPF_OBJ_GET_INFO_BY_FD_first):
   3003 	Use it.
   3004 
   3005 2017-11-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   3006 
   3007 	Implement decoding of BPF_OBJ_GET_INFO_BY_FD command of bpf syscall.
   3008 	* configure.ac (AC_CHECK_MEMBERS): Add union bpf_attr.info.info.
   3009 	* bpf.c (decode_BPF_OBJ_GET_INFO_BY_FD): New function.
   3010 	(SYS_FUNC(bpf)) <bpf_cmd_decoders>: Use it.
   3011 	* NEWS: Mention this.
   3012 	* tests/bpf.c: Add macro guard for BPF_OBJ_GET_INFO_BY_FD decoder test.
   3013 	[HAVE_UNION_BPF_ATTR_INFO_INFO] (sample_BPF_OBJ_GET_INFO_BY_FD_attr):
   3014 	New variable.
   3015 	[HAVE_UNION_BPF_ATTR_INFO_INFO] (init_BPF_OBJ_GET_INFO_BY_FD_first,
   3016 	print_BPF_OBJ_GET_INFO_BY_FD_first, init_BPF_OBJ_GET_INFO_BY_FD_attr,
   3017 	print_BPF_OBJ_GET_INFO_BY_FD_attr): New functions.
   3018 	(main) [HAVE_UNION_BPF_ATTR_INFO_INFO]: Use them.
   3019 
   3020 	Simplify union bpf_attr field checks.
   3021 	* configure.ac: Use AC_CHECK_MEMBERS instead of st_CHECK_UNION_BPF_ATTR
   3022 	for union bpf_attr field checks as the former seems to be enough
   3023 	for the case.
   3024 	* m4/st_bpf.m4: Remove.
   3025 
   3026 	Implement decoding of BPF_*_GET_*_ID commands of bpf syscall.
   3027 	* configure.ac: Check for union bpf_attr.next_id.
   3028 	* bpf.c (decode_BPF_PROG_GET_NEXT_ID, decode_BPF_PROG_GET_FD_BY_ID,
   3029 	* decode_BPF_MAP_GET_FD_BY_ID): New functions.
   3030 	(decode_BPF_MAP_GET_NEXT_ID): New macro.
   3031 	(SYS_FUNC(bpf)) <bpf_cmd_decoders>: Use them.
   3032 	* NEWS: Mention this.
   3033 	* tests/bpf.c: Add macro guard for BPF_*_GET_*_ID decoder tests.
   3034 	[HAVE_UNION_BPF_ATTR_NEXT_ID] (init_BPF_PROG_GET_NEXT_ID_first,
   3035 	print_BPF_PROG_GET_NEXT_ID_first, init_BPF_PROG_GET_NEXT_ID_attr,
   3036 	print_BPF_PROG_GET_NEXT_ID_attr, print_BPF_PROG_GET_FD_BY_ID_first,
   3037 	print_BPF_PROG_GET_FD_BY_ID_attr, print_BPF_MAP_GET_NEXT_ID_first,
   3038 	print_BPF_MAP_GET_NEXT_ID_attr): New functions.
   3039 	(init_BPF_MAP_GET_NEXT_ID_first, print_BPF_MAP_GET_NEXT_ID_first,
   3040 	init_BPF_MAP_GET_NEXT_ID_attr, print_BPF_MAP_GET_NEXT_ID_attr,
   3041 	init_BPF_PROG_GET_FD_BY_ID_first, init_BPF_PROG_GET_FD_BY_ID_attr,
   3042 	init_BPF_MAP_GET_FD_BY_ID_first, init_BPF_MAP_GET_FD_BY_ID_attr):
   3043 	New macros.
   3044 	(main) [HAVE_UNION_BPF_ATTR_NEXT_ID]: Use them.
   3045 
   3046 2017-11-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   3047 
   3048 	Implement decoding of BPF_PROG_TEST_RUN command of bpf syscall.
   3049 	* configure.ac: Check for union bpf_attr.test.duration.
   3050 	* bpf.c (decode_BPF_PROG_TEST_RUN): New function.
   3051 	(SYS_FUNC(bpf)) <bpf_cmd_decoders>: Use it.
   3052 	* NEWS: Mention this.
   3053 	* tests/bpf.c: Include "print_fields.h".
   3054 	Add macro guard for BPF_PROG_TEST_RUN decoder test.
   3055 	[HAVE_UNION_BPF_ATTR_TEST_DURATION] (sample_BPF_PROG_TEST_RUN_attr):
   3056 	New variable.
   3057 	[HAVE_UNION_BPF_ATTR_TEST_DURATION] (init_BPF_PROG_TEST_RUN_first,
   3058 	print_BPF_PROG_TEST_RUN_first, init_BPF_PROG_TEST_RUN_attr,
   3059 	print_BPF_PROG_TEST_RUN_attr): New functions.
   3060 	(main) [HAVE_UNION_BPF_ATTR_TEST_DURATION]: Use them.
   3061 
   3062 2017-11-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   3063 
   3064 	bpf: update BPF_MAP_CREATE decoding.
   3065 	Implement decoding of union bpf_attr.numa_node field for BPF_MAP_CREATE
   3066 	command introduced by linux kernel commit v4.14-rc1~130^2~196^2~1.
   3067 
   3068 	* configure.ac: Check for numa_node member of union bpf_attr
   3069 	instead of inner_map_fd.
   3070 	(decode_BPF_MAP_CREATE): Add numa_node field to the structure, print it.
   3071 	* NEWS: Mention this.
   3072 	* tests/bpf.c: Update macro guards of BPF_MAP_CREATE decoder test.
   3073 	(init_BPF_MAP_CREATE_first, print_BPF_MAP_CREATE_attr): Update expected
   3074 	output.
   3075 	(init_BPF_MAP_CREATE_attr): Initialize numa_node field, update offset.
   3076 
   3077 2017-11-20  Eugene Syromiatnikov  <esyr (a] redhat.com>
   3078 
   3079 	unwind.c: cleanup.
   3080 	* unwind.c (rebuild_cache_if_invalid): Simplify return statement.
   3081 
   3082 	unwind.c: fix typo in comment.
   3083 	* unwind.c (unwind_cache_invalidate, unwind_print_stacktrace,
   3084 	unwind_capture_stacktrace): Replace strack with stack.
   3085 
   3086 2017-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   3087 
   3088 	ipc_shm: decode hugetlb page size in shmget flags.
   3089 	Decode alternative hugetlb page sizes introduced by kernel commit
   3090 	v3.8-rc1~175^2~36.
   3091 
   3092 	* ipc_shm.c [!SHM_HUGE_SHIFT] (SHM_HUGE_SHIFT): New macro.
   3093 	[!SHM_HUGE_MASK] (SHM_HUGE_MASK): Likewise.
   3094 	(SYS_FUNC(shmget)): Print hugetlb page size.
   3095 	* tests/ipc_shm.c: Check it.
   3096 
   3097 2017-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   3098 
   3099 	memfd_create: decode hugetlb page size.
   3100 	Decode alternative hugetlb page sizes introduced by kernel commit
   3101 	v4.14-rc1~126^2~17.
   3102 
   3103 	* configure.ac (AC_CHECK_HEADERS): Add linux/memfd.h.
   3104 	* memfd_create.c [HAVE_LINUX_MEMFD_H]: Include it.
   3105 	[!MFD_HUGE_SHIFT] (MFD_HUGE_SHIFT): New macro.
   3106 	[!MFD_HUGE_MASK] (MFD_HUGE_MASK): Likewise.
   3107 	(SYS_FUNC(memfd_create)): Print hugetlb page size.
   3108 	* tests/memfd_create.c: Check it.
   3109 
   3110 2017-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   3111 
   3112 	Print the first argument of memfd_create syscall as a path.
   3113 	The limit imposed by the kernel on the length of memfd_create first
   3114 	argument is NAME_MAX - strlen("memfd:").
   3115 
   3116 	* memfd_create.c (SYS_FUNC(memfd_create)): Print the first argument
   3117 	using printpathn.
   3118 	* tests/memfd_create.c: Check it.
   3119 
   3120 2017-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3121 
   3122 	mem: decode hugetlb page size in mmap flags.
   3123 	Decode alternative hugetlb page sizes introduced by kernel commit
   3124 	v3.8-rc1~175^2~36.
   3125 
   3126 	* mem.c [!MAP_HUGE_SHIFT] (MAP_HUGE_SHIFT): New macro.
   3127 	[!MAP_HUGE_MASK] (MAP_HUGE_MASK): Likewise.
   3128 	(print_mmap_flags): Print hugetlb page size.
   3129 	* NEWS: Mention it.
   3130 	* tests/remap_file_pages.c: Check it.
   3131 
   3132 2017-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3133 
   3134 	mem: assume that MAP_TYPE is defined.
   3135 	Since linux kernel provided a definition of MAP_TYPE in <asm/mman.h>
   3136 	as long ago as in v2.4.0, it's safe to assume that MAP_TYPE is defined.
   3137 
   3138 	* mem.c (print_mmap_flags) [!MAP_TYPE]: Remove.
   3139 
   3140 2017-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3141 
   3142 	mem: move printing of mmap_flags to a separate function.
   3143 	* mem.c (print_mmap_flags): New function.
   3144 	(print_mmap, SYS_FUNC(remap_file_pages)): Use it.
   3145 
   3146 2017-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3147 
   3148 	Provide fallback definitions for SHM_EXEC constant.
   3149 	Although SHM_EXEC is available in <linux/shm.h> since kernel commit
   3150 	v2.6.9-rc2~23^2~93^2~78, the glibc version of <sys/shm.h> did not
   3151 	provide SHM_EXEC until commit glibc-2.10~238.
   3152 
   3153 	* xlat/shm_flags.in (SHM_EXEC): Add fallback definition.
   3154 	* tests/shmxt.c (SHM_EXEC): Likewise.
   3155 
   3156 2017-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3157 
   3158 	Update SHM_* constants.
   3159 	* xlat/shm_flags.in: Add SHM_EXEC introduced by kernel commit
   3160 	v2.6.9-rc2~23^2~93^2~78.
   3161 	* xlat/shm_resource_flags.in: Add SHM_NORESERVE introduced by kernel
   3162 	commit v2.6.15-rc1~622.
   3163 	* NEWS: Mention this.
   3164 	* tests/ipc_shm.c (main): Update expected output.
   3165 	* tests/shmxt.c (main): Update expected output, check SHM_EXEC decoding.
   3166 
   3167 2017-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3168 
   3169 	Remove fallback definitions for SHM_STAT and SHM_INFO constants.
   3170 	These constants are universally available for quite a long time
   3171 	and are used unconditionally in tests without any complaints.
   3172 
   3173 	* xlat/shmctl_flags.in: Remove fallback definitions.
   3174 
   3175 2017-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   3176 
   3177 	net: fix SOL_NETLINK NETLINK_LIST_MEMBERSHIPS decoding.
   3178 	NETLINK_LIST_MEMBERSHIPS, unlike all other SOL_NETLINK options, requests
   3179 	not just a single integer but an array of integers.  The kernel also
   3180 	supports a zero optlen NETLINK_LIST_MEMBERSHIPS request.
   3181 
   3182 	* net.c (print_uint32): New function.
   3183 	(print_getsockopt): Add ulen argument, rename len argument to rlen,
   3184 	<SOL_NETLINK> Handle NETLINK_LIST_MEMBERSHIPS using print_array
   3185 	and print_uint32.
   3186 	(SYS_FUNC(getsockopt)): Pass ulen to print_getsockopt.
   3187 	* tests/sockopt-sol_netlink.c (main): Check NETLINK_LIST_MEMBERSHIPS
   3188 	decoding.
   3189 
   3190 2017-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   3191 
   3192 	tests: check [gs]etsockopt SOL_NETLINK decoding.
   3193 	* tests/sockopt-sol_netlink.c: New file.
   3194 	* tests/gen_tests.in (sockopt-sol_netlink): New entry.
   3195 	* tests/pure_executables.list: Add sockopt-sol_netlink.
   3196 	* tests/.gitignore: Likewise.
   3197 
   3198 2017-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   3199 
   3200 	net: fix decoding of optval argument of [gs]etsockopt SOL_NETLINK.
   3201 	Tweak the parser to follow the kernel behaviour.
   3202 
   3203 	* net.c (print_getsockopt, print_setsockopt) <SOL_NETLINK>: Fetch and
   3204 	print returned value as integer iff the length is >= sizeof(int),
   3205 	otherwise print the address.
   3206 	* NEWS: Mention this.
   3207 
   3208 2017-11-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   3209 
   3210 	net: decode optname argument of [gs]etsockopt for SOL_NETLINK level.
   3211 	* xlat/socknetlinkoptions.in: New file.
   3212 	* net.c: Include "xlat/socknetlinkoptions.h".
   3213 	(print_sockopt_fd_level_name) <SOL_NETLINK>: Print name using
   3214 	socknetlinkoptions.
   3215 	* NEWS: Metnion this.
   3216 
   3217 	Update MSG_* constants.
   3218 	* xlat/msg_flags.in: Add MSG_ZEROCOPY introduced by kernel commit
   3219 	v4.14-rc1~130^2~376^2~6.
   3220 	* NEWS: Mention this.
   3221 
   3222 	netlink: print descriptor attributes using printfd.
   3223 	* nlattr.h (DECL_NLA(fd)): New prototype.
   3224 	* nlattr.c (decode_nla_fd): New function.
   3225 	* rtnl_link.c (ifla_xdp_nla_decoders) <IFLA_XDP_FD>: Use it.
   3226 	(ifinfomsg_nla_decoders) <IFLA_NET_NS_FD>: Likewise.
   3227 	* rtnl_nsid.c (rtgenmsg_nla_decoders) <NETNSA_FD>: Likewise.
   3228 	* NEWS: Mention this.
   3229 
   3230 2017-11-14  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3231 
   3232 	maint/update_copyright_years.sh: implement concurrent execution.
   3233 	Analogous to the way it is done in xlat/gen.sh.
   3234 
   3235 	* maint/update_copyright_years.sh (MAX_JOBS): New variable, initialize
   3236 	it to double the CPU count.
   3237 	<while [ -n "${1:-}" ]; do case "$1" in>: Add -j option parsing.
   3238 	(jobs, pids): New variables.
   3239 	<git ls-files -- "$@" | grep -vFx "$IGNORED_FILES" | while read f; do>:
   3240 	Execute process_file in background, count background jobs and wait
   3241 	if there are too many.
   3242 
   3243 2017-11-14  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3244 
   3245 	maint/update_copyright_years.sh: use -efu shell mode.
   3246 	* maint/update_copyright_years.sh: Add -efu to shebang.  Adjust
   3247 	the script for -efu shell mode.
   3248 
   3249 2017-11-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   3250 
   3251 	Post-release administrivia.
   3252 	* NEWS: Add a header line for the next release.
   3253 	* debian/changelog.in: Add a changelog entry for 4.20-1.
   3254 	* strace.spec.in: Likewise.
   3255 
   3256 2017-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   3257 
   3258 	Prepare for 4.20 release.
   3259 	* NEWS: Update for 4.20 release.
   3260 
   3261 	CREDITS.in: remove entries listed by maint/gen-contributors-list.sh.
   3262 
   3263 2017-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3264 
   3265 	Makefile.am: use gen-contributors-list.sh for CREDITS.
   3266 	* Makefile.am ($(srcdir)/CREDITS): Employ maint/gen-contributors-list.sh
   3267 	for the contributor list generation.
   3268 
   3269 2017-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3270 
   3271 	maint: make gen-contributors-list.sh suitable for generation of CREDITS.
   3272 	Implement various features in order to make it suitable for the
   3273 	generation of the CREDITS file:
   3274 	- add an option for including contributor e-mail;
   3275 	- add an option to read additional list of contributors from stdin;
   3276 	- add shorthand for referring to the initial commit of the branch;
   3277 	- document all of the above in a help message.
   3278 
   3279 	* maint/gen-contributors-list.sh (print_help): New function.
   3280 	(script): Rename to SCRIPT.
   3281 	(SCRIPT_NORM_EMAILS, MATCH_OUT, OUT_EMAILS, OUT_NO_EMAILS, read_stdin,
   3282 	include_email): New variables.
   3283 	Add parsing of options, rewrite input processing.
   3284 
   3285 2017-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   3286 
   3287 	.mailmap: add more entries to avoid duplication in CREDITS.
   3288 
   3289 	.mailmap: sort entries.
   3290 
   3291 2017-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3292 
   3293 	.mailmap: more deduplication.
   3294 	Of course there are no two persons in the whole world that share
   3295 	the same name.
   3296 
   3297 2017-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   3298 
   3299 	CREDITS.in: use UTF-8 consistently.
   3300 	In particular, do not use " symbols in names.
   3301 
   3302 2017-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3303 
   3304 	CREDITS.in: add Jiri Slaby as a contributor.
   3305 	Unfortunately, he wasn't mentioned in the message of the commit
   3306 	v4.19-68-g48cb633, so let's fix that omission.
   3307 
   3308 	References: https://github.com/strace/strace/pull/16
   3309 
   3310 2017-11-13  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   3311 
   3312 	s390, s390x: update ioctl entries from linux 4.14.
   3313 	* linux/s390/ioctls_arch0.h: Update from linux v4.14 using ioctls_gen.sh.
   3314 	* linux/s390x/ioctls_arch0.h: Likewise.
   3315 
   3316 	s390x: remove some of non-s390 KVM ioctls.
   3317 	* linux/s390x/ioctls_arch0.h: Regenerate.
   3318 
   3319 	maint: remove KVM_PPC_CONFIGURE_V3_MMU ioctl from non-powerpc arches.
   3320 	* maint/ioctls_sym.sh (ppc_list): Update.
   3321 
   3322 2017-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   3323 
   3324 	Update copyright headers.
   3325 	Headers updated semi-automatically using
   3326 	maint/update_copyright_years.sh script.
   3327 
   3328 	* m4/mpers.m4: Update copyright years.
   3329 	* tests/kcmp.c: Likewise.
   3330 	* tests/membarrier.c: Likewise.
   3331 
   3332 2017-11-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   3333 
   3334 	maint/update_copyright_years.sh: fix typo in help output.
   3335 	* maint/update_copyright_years.sh (print_help): Fix typo, disable
   3336 	here-document expansion.
   3337 
   3338 2017-11-10  Eugene Syromiatnikov  <esyr (a] redhat.com>
   3339 
   3340 	Move MIN, MAX, and CLAMP to macros.h.
   3341 	We shouldn't have to include the whole defs.h to get them.
   3342 
   3343 	* defs.h (MIN, MAX, CLAMP): Move ...
   3344 	* macros.h: ... here.
   3345 
   3346 2017-11-10  Eugene Syromiatnikov  <esyr (a] redhat.com>
   3347 
   3348 	Update .mailmap.
   3349 	* .mailmap (Eugene Syromyatnikov): Add work address.
   3350 
   3351 2017-11-07  Steve McIntyre  <steve (a] einval.com>
   3352 
   3353 	debian: update debhelper compat level to 10, replace -s with -a in some calls
   3354 
   3355 	debian: update Standards-Version to 3.9.8.
   3356 
   3357 2017-11-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   3358 
   3359 	mpers.m4: check for size of long and kernel_long_t.
   3360 	The primary purpose of this new check is diagnostics.
   3361 
   3362 	* m4/mpers.m4 (st_MPERS): Check for size of long and kernel_long_t.
   3363 
   3364 2017-11-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3365 
   3366 	xlat/gen.sh: speedup xlat generation.
   3367 	This commit implements the following changes:
   3368 	- increases the number of concurrent jobs to twice the CPU count;
   3369 	- creates a circular buffer, so instead of running multiple jobs
   3370 	  at once, the generator tries to keep about the same number of jobs
   3371 	  being run concurrently;
   3372 	- runs gen_git and gen_make concurrently in order to squeeze in
   3373 	  one more bit of concurrency.
   3374 
   3375 	With my deeply scientific measurements, this approach achieves
   3376 	up to 15% speedup with dash and about 30-40% with bash as /bin/sh
   3377 	on a 4-core machine.
   3378 
   3379 	* xlat/gen.sh (main): Declare pids local variable, append pid of every
   3380 	run job to it; increase the limit of jobs to ncpus * 2; when the limit
   3381 	is reached, wait for the first pid in pids instead of resetting jobs
   3382 	to zero and waiting for all the run jobs; put gen_git and gen_make
   3383 	into background.
   3384 
   3385 2017-11-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   3386 
   3387 	hppa: wire up statx syscall.
   3388 	* linux/hppa/syscallent.h [349]: Add statx entry.
   3389 
   3390 2017-11-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   3391 
   3392 	tests: check signal mask transparency.
   3393 	Starting with commit v4.17-5-gf83b49b strace is expected
   3394 	to forward the signal mask to tracees unchanged.
   3395 
   3396 	* tests/check_sigblock.c: New file.
   3397 	* tests/set_sigblock.c: Likewise.
   3398 	* tests/sigblock.test: New test.
   3399 	* tests/.gitignore: Add check_sigblock and set_sigblock.
   3400 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   3401 	(MISC_TESTS): Add sigblock.test.
   3402 
   3403 2017-11-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   3404 
   3405 	tests: check signal disposition transparency.
   3406 	Starting with commit v4.17-8-ge97a66f strace is expected
   3407 	to forward the signal disposition to tracees unchanged.
   3408 
   3409 	* tests/check_sigign.c: New file.
   3410 	* tests/list_sigaction_signum.c: Likewise.
   3411 	* tests/set_sigign.c: Likewise.
   3412 	* tests/sigign.test: New test.
   3413 	* tests/.gitignore: Add check_sigign, list_sigaction_signum,
   3414 	and set_sigign.
   3415 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   3416 	(MISC_TESTS): Add sigign.test.
   3417 
   3418 2017-11-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3419 
   3420 	tests: update futex test to accommodate the recent kernel change.
   3421 	Kernel commit v4.14-rc1~162^2~8 refactored futex implementation and
   3422 	introduced checks for invalid shift sizes.  Accommodate this change
   3423 	by allowing EINVAL in the corresponding futex checks.
   3424 
   3425 	* tests/futex.c (CHECK_FUTEX_GENERIC): Reset errno before the syscall.
   3426 	(main) <wake_ops>: Add err2 field, describe err/err2 fields.
   3427 	Add EINVAL as a possible errno to the checks that contain invalid
   3428 	shift values.
   3429 	Update return value check so it checks that values are strictly
   3430 	as expected.
   3431 
   3432 	Closes: https://github.com/strace/strace/pull/16
   3433 
   3434 2017-11-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3435 
   3436 	tests: cleanup futex test.
   3437 	* tests/futex.c (main) <wake_ops>: Remove unused errstr field
   3438 	from the structure type definition.
   3439 
   3440 2017-11-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   3441 
   3442 	seccomp: decode SECCOMP_GET_ACTION_AVAIL operation.
   3443 	* defs.h (seccomp_ret_action): New xlat prototype.
   3444 	* seccomp.c (decode_seccomp_set_mode_strict): Remove.
   3445 	(SYS_FUNC(seccomp)): Decode SECCOMP_GET_ACTION_AVAIL operation.
   3446 	* NEWS: Mention this.
   3447 	* tests/seccomp_get_action_avail.c: New file.
   3448 	* tests/gen_tests.in (seccomp_get_action_avail): New entry.
   3449 	* tests/pure_executables.list: Add seccomp_get_action_avail.
   3450 	* tests/.gitignore: Likewise.
   3451 
   3452 2017-11-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   3453 
   3454 	Add SECCOMP_RET_KILL_PROCESS decoding support.
   3455 	* bpf_seccomp_filter.c [!SECCOMP_RET_ACTION]: Remove.
   3456 	[!SECCOMP_RET_ACTION_FULL] (SECCOMP_RET_ACTION_FULL): Define.
   3457 	(print_seccomp_filter_k): Use SECCOMP_RET_ACTION_FULL
   3458 	instead of SECCOMP_RET_ACTION.
   3459 	* xlat/seccomp_ret_action.in: Add SECCOMP_RET_KILL_PROCESS introduced
   3460 	by linux kernel commit v4.14-rc2~15^2~3.
   3461 
   3462 2017-11-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   3463 
   3464 	Rename SECCOMP_RET_KILL to SECCOMP_RET_KILL_THREAD.
   3465 	Follow linux kernel commit v4.14-rc2~15^2~4 and rename SECCOMP_RET_KILL
   3466 	to SECCOMP_RET_KILL_THREAD.
   3467 
   3468 	* xlat/seccomp_ret_action.in (SECCOMP_RET_KILL): Rename
   3469 	to SECCOMP_RET_KILL_THREAD.
   3470 	* tests/prctl-seccomp-filter-v.c (main): Update expected output.
   3471 	* tests/seccomp-filter-v.c (main): Likewise.
   3472 
   3473 2017-11-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   3474 
   3475 	Update SECCOMP_* constants.
   3476 	* xlat/seccomp_filter_flags.in: Add SECCOMP_FILTER_FLAG_LOG introduced
   3477 	by kernel commit v4.14-rc2~15^2~6.
   3478 	* xlat/seccomp_ops.in: Add SECCOMP_GET_ACTION_AVAIL introduced
   3479 	by kernel commit v4.14-rc2~15^2~9.
   3480 	* xlat/seccomp_ret_action.in: Add SECCOMP_RET_LOG introduced
   3481 	by kernel commit v4.14-rc2~15^2~5.
   3482 	* NEWS: Mention this.
   3483 	* tests/seccomp-filter.c (main): Update expected output.
   3484 	* tests/seccomp-filter-v.c (main): Likewise.
   3485 
   3486 	Provide fallback definitions for SECCOMP_RET_* constants.
   3487 	* xlat/seccomp_ret_action.in: Add fallback definitions.
   3488 
   3489 2017-11-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   3490 
   3491 	tests: robustify options-syntax.test against inquisitive musl.
   3492 	Workaround musl >= 1.1.17 ability to use AT_EXECFN during
   3493 	program_invocation_name initialization.
   3494 
   3495 	* tests/options-syntax.test: Check for two valid variants
   3496 	of "zeroargc strace" expected output.
   3497 
   3498 2017-11-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   3499 
   3500 	Update MEMBARRIER_CMD_* constants.
   3501 	* xlat/membarrier_cmds.in: Add MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED
   3502 	introduced by kernel commit v4.14-rc6~26.
   3503 	* tests/membarrier.c (main): Update expected output.
   3504 
   3505 2017-10-31  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3506 
   3507 	tests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message flags.
   3508 	* tests/nfnetlink_nft_compat.c (test_nlmsg_flags): New function.
   3509 	(main): Use it.
   3510 
   3511 	tests: check decoding of NFNL_SUBSYS_NFTABLES netlink message flags.
   3512 	* tests/nfnetlink_nftables.c (test_nlmsg_flags): New function.
   3513 	(main): Use it.
   3514 
   3515 	tests: check decoding of NFNL_SUBSYS_CTHELPER netlink message flags.
   3516 	* tests/nfnetlink_cthelper.c (test_nlmsg_flags): New function.
   3517 	(main): Use it.
   3518 
   3519 	tests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message flags
   3520 	* tests/nfnetlink_cttimeout.c (test_nlmsg_flags): New function.
   3521 	(main): Use it.
   3522 
   3523 	tests: check decoding of NFNL_SUBSYS_ACCT netlink message flags.
   3524 	* tests/nfnetlink_acct.c (test_nlmsg_flags): New function.
   3525 	(main): Use it.
   3526 
   3527 	tests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message flags
   3528 	* tests/nfnetlink_ctnetlink_exp.c (test_nlmsg_flags): New function.
   3529 	(main): Use it.
   3530 
   3531 	tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message flags.
   3532 	* tests/nfnetlink_ctnetlink.c (test_nlmsg_flags): New function.
   3533 	(main): Use it.
   3534 
   3535 2017-10-26  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3536 
   3537 	netlink: decode NETLINK_NETFILTER netlink message flags.
   3538 	* netlink.c (decode_nlmsg_flags_netfilter): New function.
   3539 	(nlmsg_flags): Add NETLINK_NETFILTER.
   3540 	* NEWS: Mention this.
   3541 
   3542 	netlink: decode netlink message delete flags.
   3543 	* netlink.c: Include "xlat/netlink_delete_flags.h".
   3544 	(decode_nlmsg_flags_crypto, decode_nlmsg_flags_route,
   3545 	decode_nlmsg_flags_xfrm): Decode delete flags.
   3546 	* netlink.h (NLM_F_NONREC): New macro.
   3547 	* xlat/netlink_delete_flags.in: New file.
   3548 	* tests/netlink_crypto.c (test_nlmsg_flags): Check this.
   3549 	* tests/netlink_route.c (test_nlmsg_flags): Likewise.
   3550 	* tests/netlink_xfrm.c (test_nlmsg_flags): Likewise.
   3551 
   3552 2017-10-26  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3553 
   3554 	netlink: refactor decode_nlmsg_flags.
   3555 	Refactor decode_nlmsg_flags to make it family-specific, just like
   3556 	decode_nlmsg_type and decode_payload.
   3557 
   3558 	* netlink.c (decode_nlmsg_flags_crypto, decode_nlmsg_flags_route,
   3559 	decode_nlmsg_flags_sock_diag, decode_nlmsg_flags_xfrm): New functions.
   3560 	(nlmsg_flags_decoder_t): New typedef.
   3561 	(nlmsg_flags): New array.
   3562 	(decode_nlmsg_flags): Use it.
   3563 
   3564 2017-10-14  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3565 
   3566 	Workaround historic linux/netfilter/xt_osf.h deficiencies.
   3567 	When using linux kernel headers without commit v4.5-rc1~128^2~115^2~22
   3568 	("netfilter: fix include files for compilation"), both <linux/ip.h>
   3569 	and <linux/tcp.h> have to be included before <linux/netfilter/xt_osf.h>.
   3570 
   3571 	* configure.ac (AC_CHECK_HEADERS): Include <linux/ip.h>
   3572 	and <linux/tcp.h> when checking for linux/netfilter/xt_osf.h header.
   3573 	* tests/nfnetlink_osf.c: Include <linux/ip.h> and <linux/tcp.h>
   3574 	before <linux/netfilter/xt_osf.h>.
   3575 
   3576 2017-09-24  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3577 
   3578 	tests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message types.
   3579 	* configure.ac (AC_CHECK_HEADERS): Add
   3580 	linux/netfilter/nf_tables_compat.h.
   3581 	* tests/nfnetlink_nft_compat.c: New file.
   3582 	* tests/gen_tests.in (nfnetlink_nft_compat): New entry.
   3583 	* tests/pure_executables.list: Add nfnetlink_nft_compat.
   3584 	* tests/.gitignore: Likewise.
   3585 
   3586 	tests: check decoding of NFNL_SUBSYS_NFTABLES netlink message types.
   3587 	* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/nf_tables.h.
   3588 	* tests/nfnetlink_nftables.c: New file.
   3589 	* tests/gen_tests.in (nfnetlink_nftables): New entry.
   3590 	* tests/pure_executables.list: Add nfnetlink_nftables.
   3591 	* tests/.gitignore: Likewise.
   3592 
   3593 	tests: check decoding of NFNL_SUBSYS_CTHELPER netlink message types.
   3594 	* configure.ac (AC_CHECK_HEADERS): Add
   3595 	linux/netfilter/nfnetlink_cthelper.h.
   3596 	* tests/nfnetlink_cthelper.c: New file.
   3597 	* tests/gen_tests.in (nfnetlink_cthelper): New entry.
   3598 	* tests/pure_executables.list: Add nfnetlink_cthelper.
   3599 	* tests/.gitignore: Likewise.
   3600 
   3601 	tests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message types
   3602 	* configure.ac (AC_CHECK_HEADERS): Add
   3603 	linux/netfilter/nfnetlink_cttimeout.h.
   3604 	* tests/nfnetlink_cttimeout.c: New file.
   3605 	* tests/gen_tests.in (nfnetlink_cttimeout): New entry.
   3606 	* tests/pure_executables.list: Add nfnetlink_cttimeout.
   3607 	* tests/.gitignore: Likewise.
   3608 
   3609 	tests: check decoding of NFNL_SUBSYS_ACCT netlink message types.
   3610 	* configure.ac (AC_CHECK_HEADERS): Add
   3611 	linux/netfilter/nfnetlink_acct.h.
   3612 	* tests/nfnetlink_acct.c: New file.
   3613 	* tests/gen_tests.in (nfnetlink_acct): New entry.
   3614 	* tests/pure_executables.list: Add nfnetlink_acct.
   3615 	* tests/.gitignore: Likewise.
   3616 
   3617 	tests: check decoding of NFNL_SUBSYS_IPSET netlink message types.
   3618 	* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/ipset/ip_set.h.
   3619 	* tests/nfnetlink_ipset.c: New file.
   3620 	* tests/gen_tests.in (nfnetlink_ipset): New entry.
   3621 	* tests/pure_executables.list: Add nfnetlink_ipset.
   3622 	* tests/.gitignore: Likewise.
   3623 
   3624 	tests: check decoding of NFNL_SUBSYS_OSF netlink message types.
   3625 	* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/xt_osf.h.
   3626 	* tests/nfnetlink_osf.c: New file.
   3627 	* tests/gen_tests.in (nfnetlink_osf): New entry.
   3628 	* tests/pure_executables.list: Add nfnetlink_osf.
   3629 	* tests/.gitignore: Likewise.
   3630 
   3631 	tests: check decoding of NFNL_SUBSYS_ULOG netlink message types.
   3632 	* configure.ac (AC_CHECK_HEADERS): Add
   3633 	linux/netfilter/nfnetlink_log.h.
   3634 	* tests/nfnetlink_ulog.c: New file.
   3635 	* tests/gen_tests.in (nfnetlink_ulog): New entry.
   3636 	* tests/pure_executables.list: Add nfnetlink_ulog.
   3637 	* tests/.gitignore: Likewise.
   3638 
   3639 	tests: check decoding of NFNL_SUBSYS_QUEUE netlink message types.
   3640 	* configure.ac (AC_CHECK_HEADERS): Add
   3641 	linux/netfilter/nfnetlink_queue.h.
   3642 	* tests/nfnetlink_queue.c: New file.
   3643 	* tests/gen_tests.in (nfnetlink_queue): New entry.
   3644 	* tests/pure_executables.list: Add nfnetlink_queue.
   3645 	* tests/.gitignore: Likewise.
   3646 
   3647 	tests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message types
   3648 	* tests/nfnetlink_ctnetlink_exp.c: New file.
   3649 	* tests/gen_tests.in (nfnetlink_ctnetlink_exp): New entry.
   3650 	* tests/pure_executables.list: Add nfnetlink_ctnetlink_exp.
   3651 	* tests/.gitignore: Likewise.
   3652 
   3653 	tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message types.
   3654 	* configure.ac (AC_CHECK_HEADERS): Add
   3655 	linux/netfilter/nfnetlink_conntrack.h.
   3656 	* tests/nfnetlink_ctnetlink.c: New file.
   3657 	* tests/gen_tests.in (nfnetlink_ctnetlink): New entry.
   3658 	* tests/pure_executables.list: Add nfnetlink_ctnetlink.
   3659 	* tests/.gitignore: Likewise.
   3660 
   3661 	netlink: decode NETLINK_NETFILTER netlink message types.
   3662 	* netlink.c: Include "xlat/nf_acct_msg_types.h",
   3663 	"xlat/nf_cthelper_msg_types.h", "xlat/nf_ctnetlink_exp_msg_types.h",
   3664 	"xlat/nf_ctnetlink_msg_types.h", "xlat/nf_cttimeout_msg_types.h",
   3665 	"xlat/nf_ipset_msg_types.h", "xlat/nf_nft_compat_msg_types.h",
   3666 	"xlat/nf_nftables_msg_types.h", "xlat/nf_osf_msg_types.h",
   3667 	"xlat/nf_queue_msg_types.h", and "xlat/nf_ulog_msg_types.h".
   3668 	(nf_nlmsg_types): New array.
   3669 	(decode_nlmsg_type_netfilter): Use it.
   3670 	* NEWS: Mention this.
   3671 	* xlat/nf_acct_msg_types.in: New file.
   3672 	* xlat/nf_cthelper_msg_types.in: Likewise.
   3673 	* xlat/nf_ctnetlink_exp_msg_types.in: Likewise.
   3674 	* xlat/nf_ctnetlink_msg_types.in: Likewise.
   3675 	* xlat/nf_cttimeout_msg_types.in: Likewise.
   3676 	* xlat/nf_ipset_msg_types.in: Likewise.
   3677 	* xlat/nf_nft_compat_msg_types.in: Likewise.
   3678 	* xlat/nf_nftables_msg_types.in: Likewise.
   3679 	* xlat/nf_osf_msg_types.in: Likewise.
   3680 	* xlat/nf_queue_msg_types.in: Likewise.
   3681 	* xlat/nf_ulog_msg_types.in: Likewise.
   3682 	* tests/netlink_netfilter.c (test_nlmsg_type): Update expected output.
   3683 
   3684 2017-09-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   3685 
   3686 	ppc64: fix sigreturn parser for ppc personality.
   3687 	* linux/powerpc/arch_sigreturn.c (arch_sigreturn) [POWERPC64]: Rewrite.
   3688 
   3689 	ppc64: truncate syscall args for 32-bit personality tracees.
   3690 	* linux/powerpc/get_syscall_args.c (get_syscall_args): Clear upper
   3691 	32 bits of syscall args for 32-bit personality tracees.
   3692 	* NEWS: Mention this fix.
   3693 
   3694 	ppc64: fix PRI__64 macro definition when compiled with -m32.
   3695 	* kernel_types.h [SIZEOF_LONG != 4]: Check for __powerpc64__ instead
   3696 	of POWERPC to handle -m32 case properly.
   3697 
   3698 2017-09-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   3699 
   3700 	loop: decode LOOP_SET_BLOCK_SIZE.
   3701 	* loop.c (loop_ioctl) <LOOP_SET_BLOCK_SIZE>: Handle LOOP_SET_BLOCK_SIZE.
   3702 	* tests/ioctl_loop.c (main): Check it.
   3703 
   3704 	Update ioctl entries from linux v4.14-rc1.
   3705 	* linux/32/ioctls_inc_align16.h: Update from linux v4.14-rc1
   3706 	using ioctls_gen.sh.
   3707 	* linux/32/ioctls_inc_align32.h: Likewise.
   3708 	* linux/32/ioctls_inc_align64.h: Likewise.
   3709 	* linux/64/ioctls_inc.h: Likewise.
   3710 	* linux/x32/ioctls_inc0.h: Likewise.
   3711 	* xlat/loop_cmds.in: Add LOOP_SET_BLOCK_SIZE introduced
   3712 	by kernel commit v4.13-rc7-176-g89e4fde.
   3713 	* NEWS: Mention this.
   3714 	* tests/ioctl_loop.c (main): Update.
   3715 
   3716 2017-09-19  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   3717 
   3718 	maint: generate ioctl entries without target architecture code execution
   3719 	ioctls_sym.sh used to generate and invoke target architecture
   3720 	executables that limited its applicability.
   3721 	After this change, the generated code is just compiled to the target
   3722 	architecture object files and all required information is obtained
   3723 	from the dwarf sections.
   3724 	This approach allows to generate ioctl entries for any target
   3725 	architecture supported by compiler.
   3726 
   3727 	* maint/ioctls_sym.awk: New file.
   3728 	* maint/ioctls_sym.sh (LC_ALL): Define to C and export.
   3729 	(uname_m): Make configurable.
   3730 	(CFLAGS): Add -gdwarf-2.
   3731 	(LDFLAGS): Remove.
   3732 	Do not use print_ioctlent.c.
   3733 	Change asm-generic/ioctl.h and asm/ioctl.h hook.
   3734 	Dump and process dwarf sections of generated object files.
   3735 	* maint/print_ioctlent.c: Remove.
   3736 
   3737 2017-09-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   3738 
   3739 	Remove KVM_S390_* ioctls from non-s390 architectures.
   3740 	* maint/ioctls_sym.sh <linux/kvm.h> (s390_list): New variable.
   3741 	Use it to exclude KVM_S390_* ioctls on non-s390 architectures.
   3742 	* linux/arm/ioctls_arch0.h: Regenerate.
   3743 	* linux/i386/ioctls_arch0.h: Likewise.
   3744 	* linux/powerpc/ioctls_arch0.h: Likewise.
   3745 	* linux/s390/ioctls_arch0.h: Likewise.
   3746 	* linux/x86_64/ioctls_arch0.h: Likewise.
   3747 
   3748 2017-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3749 
   3750 	Remove some of arch-specific KVM ioctls from non-matching architectures.
   3751 	* maint/ioctls_sym.sh (arm_list, ppc_list, x86_list): Use bracket
   3752 	expressions to generalize arch-specific regular expressions.
   3753 	* linux/arm/ioctls_arch0.h: Regenerate.
   3754 	* linux/i386/ioctls_arch0.h: Likewise.
   3755 	* linux/powerpc/ioctls_arch0.h: Likewise.
   3756 	* linux/s390/ioctls_arch0.h: Likewise.
   3757 	* linux/x86_64/ioctls_arch0.h: Likewise.
   3758 
   3759 2017-09-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3760 
   3761 	dm: add support for DM_DEV_ARM_POLL.
   3762 	Added in Linux commit v4.13-rc1~137^2~14.
   3763 
   3764 	* dm.c [!DM_LIST_VERSIONS] (DM_LIST_VERSIONS): Add leading zero.
   3765 	[!DM_TARGET_MSG] (DM_TARGET_MSG): Likewise.
   3766 	[!DM_DEV_SET_GEOMETRY_CMD] (DM_DEV_SET_GEOMETRY_CMD): Likewise.
   3767 	[!DM_DEV_ARM_POLL] (DM_DEV_ARM_POLL): New macro.
   3768 	(dm_ioctl_has_params, dm_ioctl): Handle DM_DEV_ARM_POLL.
   3769 	* tests/ioctl_dm.c [!DM_DEV_ARM_POLL] (DM_DEV_ARM_POLL): New macro.
   3770 	(main) <dummy_check_cmds>: Add DM_DEV_ARM_POLL.
   3771 
   3772 2017-09-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3773 
   3774 	kcmp: add KCMP_EPOLL_TFD support.
   3775 	* configure.ac (AC_CHECK_TYPES): Add check for struct kcmp_epoll_slot.
   3776 	* kcmp.c (SYS_FUNC(kcmp)) <case KCMP_EPOLL_TFD>: Implement idx1/idx2
   3777 	argument parsing.
   3778 	* tests/kcmp.c: Update test.
   3779 	* xlat/kcmp_types.in (KCMP_EPOLL_TFD): New entry.
   3780 
   3781 2017-09-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3782 
   3783 	tests: add kcmp-y test.
   3784 	It is not very useful as of now, but it will allow tracking changes
   3785 	in fd output once they are implemented.
   3786 
   3787 	* tests/gen_tests.in (kcmp-y): New test.
   3788 	* tests/kcmp-y.c: New file, wrapper for kcmp.c
   3789 	* tests/kcmp.c: Add opening of some files for which info may be printed
   3790 	in the future.
   3791 	* tests/pure_executables.list: Add kcmp-y.
   3792 	* tests/.gitignore: Likewise.
   3793 
   3794 2017-09-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3795 
   3796 	kcmp: output fds using a separate function.
   3797 	This is a preparation for the future introduction of cross-NS PID
   3798 	derivation, which would enable us to print fd information for fds
   3799 	related to all processes, not just traced ones.
   3800 
   3801 	Note the change in output type for idx1/idx2 in KCMP_FILE command from
   3802 	unsigned to int, it follows printfd output format.
   3803 
   3804 	* kcmp.c (printpidfd): New function.
   3805 	(PRINT_FIELD_PIDFD): New macro.
   3806 	(SYS_FUNC(kcmp)) <case KCMP_FILE>: Use printpidfd for printing
   3807 	idx1/idx2, as they are fds, after all.
   3808 
   3809 2017-09-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3810 
   3811 	tests/kcmp: add more checks.
   3812 	Let's check all kcmp commands that they indeed do not print idx1/idx2.
   3813 	Also, check that upper bits of pid arguments are ignored.
   3814 
   3815 	* tests/gen_tests.in (kcmp): Decrease -a argument's value from 27 to 22.
   3816 	* tests/kcmp.c: Add checks for upper bits of pid1/pid2 and for all
   3817 	kcmp types not tested before.
   3818 
   3819 2017-09-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   3820 
   3821 	tests/kcmp: use <linux/kcmp.h> if it is available.
   3822 	I see it as a good idea to stick to system headers whenever possible
   3823 	in order to also check for possible discrepancies between strace's
   3824 	internal definitions and definitions present in the system headers.
   3825 
   3826 	* configure.ac (AC_CHECK_HEADERS): Add linux/kcmp.h.
   3827 	* tests/kcmp.h [HAVE_LINUX_KCMP_H]: Include <linux/kcmp.h>,
   3828 	do not define KCMP_FILE and KCMP_SYSVSEM.
   3829 
   3830 2017-09-17  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3831 
   3832 	tests: check decoding of MDBA_ROUTER_PORT netlink attribute.
   3833 	* tests/nlattr_mdba_router_port.c: New file.
   3834 	* tests/gen_tests.in (nlattr_mdba_router_port): New entry.
   3835 	* tests/pure_executables.list: Add nlattr_mdba_router_port.
   3836 	* tests/.gitignore: Likewise.
   3837 
   3838 	tests: check decoding of MDBA_MDB_ENTRY_INFO netlink attributes.
   3839 	* tests/nlattr_mdba_mdb_entry.c: New file.
   3840 	* tests/gen_tests.in (nlattr_mdba_mdb_entry): New entry.
   3841 	* tests/pure_executables.list: Add nlattr_mdba_mdb_entry.
   3842 	* tests/.gitignore: Likewise.
   3843 
   3844 2017-09-17  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3845 
   3846 	tests: extend TEST_NESTED_NLATTR_OBJECT macro.
   3847 	Extend TEST_NESTED_NLATTR_OBJECT macro for multi-nested netlink
   3848 	attributes, such as
   3849 
   3850 		[MDBA_MDB] = {
   3851 			[MDBA_MDB_ENTRY] = {
   3852 				[MDBA_MDB_ENTRY_INFO] {
   3853 					struct br_mdb_entry
   3854 					[MDBA_MDB_EATTR attributes]
   3855 				}
   3856 			}
   3857 		}
   3858 
   3859 	* tests/test_nlattr.h (TEST_NESTED_NLATTR_OBJECT_EX_,
   3860 	TEST_NESTED_NLATTR_OBJECT_EX): New macros.
   3861 	(TEST_NESTED_NLATTR_OBJECT): Use TEST_NESTED_NLATTR_OBJECT_EX_.
   3862 
   3863 2017-09-17  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3864 
   3865 	rtnl_mdb: decode br_port_msg netlink attributes.
   3866 	* configure.ac (AC_CHECK_TYPES): Check for struct br_mdb_entry
   3867 	in <linux/if_bridge.h>.
   3868 	(AC_CHECK_MEMBERS): Check for flags and vid fields in struct br_mdb_entry.
   3869 	* rtnl_mdb.c: Include "xlat/mdb_flags.h", "xlat/mdb_states.h",
   3870 	"xlat/rtnl_mdba_mdb_attrs.h", "xlat/rtnl_mdba_mdb_eattr_attrs.h",
   3871 	"xlat/rtnl_mdba_mdb_entry_attrs.h" ,"xlat/rtnl_mdba_router_attrs.h"
   3872 	and "xlat/rtnl_mdba_router_pattr_attrs.h".
   3873 	(decode_mdba_mdb_entry_info, decode_mdba_mdb_entry,
   3874 	decode_mdba_mdb, decode_multicast_router_type,
   3875 	decode_mdba_router_port, decode_mdba_router): New functions.
   3876 	(mdba_mdb_eattr_nla_decoders, mdba_mdb_entry_nla_decoders,
   3877 	mdba_mdb_nla_decoders, mdba_router_pattr_nla_decoders,
   3878 	mdba_router_nla_decoders, br_port_msg_nla_decoders): New arrays.
   3879 	(decode_br_port_msg): Use br_port_msg_nla_decoders.
   3880 	* xlat/mdb_flags.in: New file.
   3881 	* xlat/mdb_states.in: Likewise.
   3882 	* xlat/multicast_router_types.in: Likewise.
   3883 	* xlat/rtnl_mdba_mdb_attrs.in: Likewise.
   3884 	* xlat/rtnl_mdba_mdb_eattr_attrs.in: Likewise.
   3885 	* xlat/rtnl_mdba_mdb_entry_attrs.in: Likewise.
   3886 	* xlat/rtnl_mdba_router_attrs.in: Likewise.
   3887 	* xlat/rtnl_mdba_router_pattr_attrs.in: Likewise.
   3888 
   3889 2017-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3890 
   3891 	netlink: implement decoding of INET_DIAG_CLASS_ID attribute.
   3892 	This is a new netlink attribute introduced by linux kernel commit
   3893 	v4.14-rc1~130^2~207.
   3894 
   3895 	* linux/inet_diag.h (INET_DIAG_CLASS_ID): New enum.
   3896 	* netlink_inet_diag.c (inet_diag_msg_nla_decoders): Add
   3897 	INET_DIAG_CLASS_ID.
   3898 	* xlat/inet_diag_attrs.in: Add INET_DIAG_CLASS_ID.
   3899 	* xlat/inet_diag_extended_flags.in: Add 1<<(INET_DIAG_CLASS_ID-1).
   3900 	* tests/nlattr_inet_diag_msg.c (main): Check INET_DIAG_CLASS_ID
   3901 	decoding.
   3902 
   3903 2017-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   3904 
   3905 	Update MEMBARRIER_CMD_* constants.
   3906 	* xlat/membarrier_cmds.in: Add MEMBARRIER_CMD_PRIVATE_EXPEDITED
   3907 	introduced by kernel commit v4.14-rc1~174^2^2^4.
   3908 	* NEWS: Mention this.
   3909 	* tests/membarrier.c (main): Update expected output.
   3910 
   3911 	Update UFFD_FEATURE_* constants.
   3912 	* xlat/memfd_create_flags.in: Remove UFFD_FEATURE_EVENT_EXIT removed
   3913 	by kernel commit v4.11-rc2~15^2~18.
   3914 	Add UFFD_FEATURE_SIGBUS and UFFD_FEATURE_THREAD_ID introduced by kernel
   3915 	commits v4.14-rc1~126^2~28 and v4.14-rc1~126^2~23, repsectively.
   3916 	* NEWS: Mention this.
   3917 
   3918 	Update MFD_* constants.
   3919 	* xlat/memfd_create_flags.in: Add MFD_HUGETLB introduced
   3920 	by kernel commit v4.14-rc1~126^2~17.
   3921 	* NEWS: Mention this.
   3922 	* tests/memfd_create.c (main): Update expected output.
   3923 
   3924 	Update ETH_P_* constants.
   3925 	* xlat/ethernet_protocols.in: Add ETH_P_ERSPAN, ETH_P_NSH, ETH_P_IFE,
   3926 	and ETH_P_MAP introduced by kernel commits v4.14-rc1~130^2~164,
   3927 	v4.14-rc1~130^2~89^2~3, v4.14-rc1~130^2~90^2~2, and
   3928 	v4.14-rc1~130^2~78^2~2, respectively.
   3929 	* NEWS: Mention this.
   3930 
   3931 	Update ARPHRD_* constants.
   3932 	* xlat/arp_hardware_types.in: Add ARPHRD_RAWIP introduced
   3933 	by kernel commit v4.14-rc1~130^2~78^2~1.
   3934 	* NEWS: Mention this.
   3935 
   3936 	Update BPF_* constants.
   3937 	* xlat/bpf_attach_type.in: Add BPF_SK_SKB_STREAM_PARSER
   3938 	and BPF_SK_SKB_STREAM_VERDICT introduced by kernel commit
   3939 	v4.14-rc1~130^2~123^2~8.
   3940 	* xlat/bpf_map_flags.in: Add BPF_F_NO_COMMON_LRU and BPF_F_NUMA_NODE
   3941 	introduced by kernel commits v4.10-rc1~202^2~271^2~2
   3942 	and v4.14-rc1~130^2~196^2~1, respectively.
   3943 	* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_DEVMAP
   3944 	and BPF_MAP_TYPE_SOCKMAP introduced by kernel commits
   3945 	v4.14-rc1~130^2~497^2~4 and v4.14-rc1~130^2~234^2~4,
   3946 	respectively.
   3947 	* xlat/bpf_op_jmp.in: Add BPF_JLT, BPF_JLE, BPF_JSLT, and BPF_JSLE
   3948 	introduced by kernel commit v4.14-rc1~130^2~309^2~8.
   3949 	* xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_SK_SKB introduced
   3950 	by kernel commit v4.14-rc1~130^2~234^2~6.
   3951 	* NEWS: Mention this.
   3952 
   3953 	Update SO_* constants.
   3954 	* xlat/sockoptions.in: Add SO_ZEROCOPY introduced by kernel commit
   3955 	v4.14-rc1~130^2~376^2~5.
   3956 	* NEWS: Mention this.
   3957 
   3958 	Update MADV_* constants.
   3959 	* xlat/madvise_cmds.in: Add MADV_WIPEONFORK and MADV_KEEPONFORK
   3960 	introduced by kernel commit v4.14-rc1~126^2.
   3961 	* NEWS: Mention this.
   3962 
   3963 2017-09-08  Baruch Siach  <baruch (a] tkos.co.il>
   3964 
   3965 	error_prints: fix potential program_invocation_name type conflict.
   3966 	uClibc-ng declares program_invocation_name as const.
   3967 	This causes the build failure below:
   3968 
   3969 	error_prints.c:40:14: error: conflicting types for program_invocation_name
   3970 	 extern char *program_invocation_name;
   3971 	              ^~~~~~~~~~~~~~~~~~~~~~~
   3972 	In file included from error_prints.c:32:0:
   3973 	.../output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/errno.h:54:20: note: previous declaration of program_invocation_name was here
   3974 	 extern const char *program_invocation_name, *program_invocation_short_name;
   3975 	                    ^~~~~~~~~~~~~~~~~~~~~~~
   3976 
   3977 	* error_prints.c (program_invocation_name): Declare only in case
   3978 	of [!HAVE_PROGRAM_INVOCATION_NAME].
   3979 
   3980 2017-09-07  JingPiao Chen  <chenjingpiao (a] gmail.com>
   3981 
   3982 	rtnl_tc_action: decode tcamsg netlink attributes.
   3983 	* rtnl_tc_action.c (tcamsg_nla_decoders): New array.
   3984 	(decode_tcamsg): Use it.
   3985 
   3986 	tests: check decoding of TCA_STAB netlink attribute of tcmsg.
   3987 	* tests/test_nlattr.h (TEST_NESTED_NLATTR_ARRAY): New macro.
   3988 	* tests/nlattr_tca_stab.c: New file.
   3989 	* tests/gen_tests.in (nlattr_tca_stab): New entry.
   3990 	* tests/pure_executables.list: Add nlattr_tca_stab.
   3991 	* tests/.gitignore: Likewise.
   3992 
   3993 	tests: check decoding of TCA_STATS2 netlink attribute of tcmsg.
   3994 	* tests/nlattr_tc_stats.c: New file.
   3995 	* tests/gen_tests.in (nlattr_tc_stats): New entry.
   3996 	* tests/pure_executables.list: Add nlattr_tc_stats.
   3997 	* tests/.gitignore: Likewise.
   3998 
   3999 	tests: check decoding of tcmsg netlink attributes.
   4000 	* tests/nlattr_tcmsg.c: Include <stddef.h> and <linux/pkt_sched.h>.
   4001 	(main): Check decoding of TCA_STATS and TCA_RATE.
   4002 
   4003 	rtnl_tc: decode tcmsg netlink attributes.
   4004 	* configure.ac (AC_CHECK_TYPES): Check for gnet_stats_basic,
   4005 	gnet_stats_queue, gnet_stats_rate_est,
   4006 	and gnet_stats_rate_est64 structures in <linux/gen_stats.h>.
   4007 	And check for struct tc_sizespec in <linux/pkt_sched.h>.
   4008 	* nlattr.h (tc_stats): New prototype.
   4009 	* rtnl_tc.c: Include <linux/gen_stats.h>, <linux/pkt_sched.h>,
   4010 	"xlat/rtnl_tca_stab_attrs.h" and "xlat/rtnl_tca_stats_attrs.h".
   4011 	(decode_tc_stats, decode_tc_estimator, decode_gnet_stats_basic,
   4012 	decode_gnet_stats_rate_est, decode_gnet_stats_queue,
   4013 	decode_gnet_stats_rate_est64, decode_nla_tc_stats,
   4014 	decode_tc_sizespec, print_stab_data, decode_tca_stab_data,
   4015 	decode_tca_stab): New functions.
   4016 	(tca_stats_nla_decoders, tca_stab_nla_decoders,
   4017 	tcmsg_nla_decoders): New arrays.
   4018 	(decode_tcmsg): Use tcmsg_nla_decoders.
   4019 	* xlat/rtnl_tca_stab_attrs.in: New file.
   4020 	* xlat/rtnl_tca_stats_attrs.in: Likewise.
   4021 
   4022 2017-09-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   4023 
   4024 	Update TCP_* constants.
   4025 	* xlat/socktcpoptions.in: Add TCP_ULP and TCP_MD5SIG_EXT.
   4026 	* NEWS: Mention this.
   4027 
   4028 	Update SOL_* constants.
   4029 	* xlat/socketlayers.in: Add SOL_TLS.
   4030 	* NEWS: Mention this.
   4031 
   4032 2017-09-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   4033 
   4034 	Post-release administrivia.
   4035 	* NEWS: Add a header line for the next release.
   4036 	* debian/changelog.in: Add a changelog entry for 4.19-1.
   4037 	* strace.spec.in: Likewise.
   4038 
   4039 2017-09-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   4040 
   4041 	Prepare for 4.19 release.
   4042 	* NEWS: Update for 4.19 release.
   4043 
   4044 	.mailmap: add canonical name and address of Edgar Kaziakhmedov.
   4045 	* .mailmap: Add canonical name and address of Edgar Kaziakhmedov here
   4046 	to avoid duplications in CREDITS file.
   4047 
   4048 	maint: add gen-tag-message.sh script.
   4049 	* maint/gen-tag-message.sh: New file.
   4050 
   4051 	maint: add gen-contributors-list.sh script.
   4052 	* maint/gen-contributors-list.sh: New file.
   4053 
   4054 2017-09-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4055 
   4056 	Update copyright headers.
   4057 	Headers updated automatically with
   4058 
   4059 	    maint/update_copyright_headers.sh -c
   4060 
   4061 2017-09-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4062 
   4063 	update_copyright_years.sh: add ability to automatically commit results.
   4064 	* maint/update_copyright_years.sh (DEFAULT_GIT_COMMIT_MESSAGE,
   4065 	GIT_COMMIT_MESSAGE): New variables.
   4066 	<-c>: New option, implies -a, calls git commit with GIT_COMMIT_TEMPLATE string
   4067 	as a template.
   4068 
   4069 2017-09-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4070 
   4071 	configure.ac: specify minimal GNU Automake version.
   4072 	In order to provide better diagnostics.
   4073 
   4074 	* configure.ac (AM_INIT_AUTOMAKE): Specify minimal GNU Automake version as
   4075 	1.13 due to usage of AM_EXTRA_RECURSIVE_TARGETS macro.
   4076 
   4077 	Closes: https://github.com/strace/strace/issues/11
   4078 
   4079 2017-09-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4080 
   4081 	Update NEWS.
   4082 
   4083 2017-09-03  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4084 
   4085 	tests: check decoding of IFLA_XDP netlink attribute of ifinfomsg.
   4086 	* tests/nlattr_ifla_xdp.c: New file.
   4087 	* tests/gen_tests.in (nlattr_ifla_xdp): New entry.
   4088 	* tests/pure_executables.list: Add nlattr_ifla_xdp.
   4089 	* tests/.gitignore: Likewise.
   4090 
   4091 	tests: check decoding of IFLA_PORT_SELF netlink attribute of ifinfomsg.
   4092 	* tests/nlattr_ifla_port.c: New file.
   4093 	* tests/gen_tests.in (nlattr_ifla_port): New entry.
   4094 	* tests/pure_executables.list: Add nlattr_ifla_port.
   4095 	* tests/.gitignore: Likewise.
   4096 
   4097 	tests: check decoding of more ifinfomsg netlink attributes.
   4098 	* tests/nlattr_ifinfomsg.c (IFLA_LINKINFO, IFLA_VF_PORTS,
   4099 	IFLA_INFO_KIND, IFLA_VF_PORT): New macros.
   4100 	(main): Check decoding of IFLA_LINKINFO and IFLA_VF_PORTS.
   4101 
   4102 	rtnl_link: decode more ifinfomsg netlink attributes.
   4103 	* configure.ac (AC_CHECK_TYPES): Check for struct ifla_port_vsi
   4104 	in <linux/if_link.h>.
   4105 	* rtnl_link.c: Include "xlat/rtnl_ifla_info_attrs.h",
   4106 	"xlat/rtnl_ifla_port_attrs.h", "xlat/rtnl_ifla_port_attrs.h",
   4107 	"xlat/rtnl_ifla_xdp_attrs.h", and "xlat/xdp_flags.h".
   4108 	(decode_ifla_linkinfo, decode_ifla_port_vsi,
   4109 	decode_ifla_port, decode_ifla_vf_ports,
   4110 	decode_ifla_xdp_flags, decode_ifla_xdp): New functions.
   4111 	(ifla_linkinfo_nla_decoders, ifla_port_nla_decoders,
   4112 	ifla_vf_port_nla_decoders, ifla_xdp_nla_decoders): New arrays.
   4113 	(ifinfomsg_nla_decoders) <IFLA_LINKINFO>: Use decode_ifla_linkinfo.
   4114 	<IFLA_VF_PORTS>: Use decode_ifla_vf_ports.
   4115 	<IFLA_PORT_SELF>: Use decode_ifla_port.
   4116 	<IFLA_XDP>: Use decode_ifla_xdp.
   4117 	* xlat/rtnl_ifla_info_attrs.in: New file.
   4118 	* xlat/rtnl_ifla_port_attrs.in: Likewise.
   4119 	* xlat/rtnl_ifla_vf_port_attrs.in: Likewise.
   4120 	* xlat/rtnl_ifla_xdp_attrs.in: Likewise.
   4121 	* xlat/xdp_flags.in: Likewise.
   4122 
   4123 2017-09-02  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4124 
   4125 	keyctl: add support for KDF parameters decoding in KEYCTL_DH_COMPUTE.
   4126 	* fetch_struct_keyctl_kdf_params.c: New file.
   4127 	* keyctl_kdf_params.h: Likewise.
   4128 	* Makefile.am (strace_SOURCES): Add them.
   4129 	* configure.ac: Add check for struct keyctl_kdf_params presence in
   4130 	<linux/keyctl.h>.
   4131 	* defs.h (struct strace_keyctl_kdf_params): Add forward declaration.
   4132 	* keyctl.c (keyctl_dh_compute): Add new parameter kdf_addr, print it
   4133 	on exiting.
   4134 	(SYS_FUNC(keyctl)) <case KEYCTL_DH_COMPUTE>: Pass arg5 to
   4135 	keyctl_dh_compute.
   4136 	* tests/keyctl.c: Include assert.h.
   4137 	(struct keyctl_kdf_params) [!HAVE_STRUCT_KEYCTL_KDF_PARAMS]: New
   4138 	definition.
   4139 	(STR32): New definition, copied from ioctl_dm.c.
   4140 	(append_str, kckdfp_to_str): New functions.
   4141 	(main): Update expected output, add checks for struct keyctl_kdf_params
   4142 	decoding.
   4143 
   4144 	tests/keyctl: improve readability.
   4145 	* tests/keyctl.c: Since do_keyctl() has so convoluted calling convention
   4146 	and keyctl test is so complex, let's try to improve readability a bit
   4147 	with some conventions regarding do_keyctl() call formatting: arguments
   4148 	representing single keyctl argument should be put on the separate line,
   4149 	continuations of arguments related to the same keyctl argument should
   4150 	have additional indentation and termination 0UL should always be
   4151 	on a separate line.  Also, while we are here, let's add spaces
   4152 	to two type casts that are missing them.
   4153 
   4154 2017-09-01  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   4155 
   4156 	s390: update ioctl entries from linux 4.13.
   4157 	* linux/s390/ioctls_arch0.h: Update from linux v4.13-rc7 using ioctls_gen.sh.
   4158 
   4159 2017-09-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   4160 
   4161 	mpers.awk: fix regression introduced by the previous cleanup.
   4162 	* mpers.awk (what_is): Remove returned_size from local variables.
   4163 
   4164 	Fixes: v4.18-308-gfd3447b5 ("mpers.awk: declare local variables consistently")
   4165 
   4166 2017-09-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   4167 
   4168 	rtnl_link: enhance decoding of struct rtnl_link_stats{,64}
   4169 	Enhance runtime detection of struct rtnl_link_stats.rx_nohandler
   4170 	and struct rtnl_link_stats64.rx_nohandler.
   4171 
   4172 	* rtnl_link.c (decode_rtnl_link_stats): Do not accept structure length
   4173 	greater than min_size but less than sizeof(struct rtnl_link_stats).
   4174 	(decode_rtnl_link_stats64): Likewise, so not accept structure length
   4175 	greater than min_size but less than sizeof(struct rtnl_link_stats64).
   4176 
   4177 2017-09-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   4178 
   4179 	rtnl_neightbl: enhance decoding of struct ndt_stats.
   4180 	Add support of kernels that operate with older definition of
   4181 	struct ndt_stats than the definition used to build strace.
   4182 
   4183 	* rtnl_neightbl.c (decode_ndt_stats): Add runtime detection
   4184 	of struct ndt_stats.ndts_table_fulls field, print the field
   4185 	when it is available.
   4186 
   4187 2017-09-01  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4188 
   4189 	tests: check decoding of IFLA_PROTINFO netlink attribute of ifinfomsg.
   4190 	* tests/nlattr_ifla_brport.c: New file.
   4191 	* tests/gen_tests.in (nlattr_ifla_brport): New entry.
   4192 	* tests/pure_executables.list: Add nlattr_ifla_brport.
   4193 	* tests/.gitignore: Likewise.
   4194 	* tests/test_nlattr.h (TEST_NESTED_NLATTR_OBJECT): New macro.
   4195 
   4196 	rtnl_link: decode IFLA_PROTINFO netlink attribute of ifinfomsg.
   4197 	* configure.ac (AC_CHECK_TYPES): Check for ifla_bridge_id
   4198 	and rtnl_link_stats64 structures in <linux/if_link.h>.
   4199 	* rtnl_link.c: Include "xlat/rtnl_ifla_brport_attrs.h".
   4200 	(decode_ifla_bridge_id, decode_ifla_protinfo): New functions.
   4201 	(ifla_brport_nla_decoders): New array.
   4202 	(ifinfomsg_nla_decoders) <IFLA_PROTINFO>: Use decode_ifla_protinfo.
   4203 	* xlat/rtnl_ifla_brport_attrs.in: New file.
   4204 
   4205 	tests: check decoding of ndtmsg netlink attributes.
   4206 	* tests/nlattr_ndtmsg.c (NDTA_PARMS, NDTPA_IFINDEX): New macros.
   4207 	(main): Check decoding of NDTA_CONFIG, NDTA_PARMS and NDTA_STATS.
   4208 
   4209 	rtnl_neightbl: decode ndtmsg netlink attributes.
   4210 	* configure.ac (AC_CHECK_TYPES): Check for ndt_config
   4211 	and ndt_stats structures in <linux/neighbour.h>.
   4212 	(AC_CHECK_MEMBERS): Check for ndts_table_fulls field in struct ndt_stats.
   4213 	* rtnl_neightbl.c: Include "xlat/rtnl_neightbl_parms_attrs.h".
   4214 	(decode_ndt_config, decode_ndta_parms, decode_ndta_parms): New functions.
   4215 	(ndt_parms_nla_decoders, ndtmsg_nla_decoders): New arrays.
   4216 	(decode_ndtmsg): Use ndtmsg_nla_decoders.
   4217 	* xlat/rtnl_neightbl_parms_attrs.in: New file.
   4218 
   4219 	tests: check decoding of ifaddrlblmsg netlink attributes.
   4220 	* tests/nlattr_ifaddrlblmsg.c (main): Check decoding of IFAL_ADDRESS.
   4221 
   4222 	rtnl_addrlabel: decode ifaddrlblmsg netlink attributes.
   4223 	* rtnl_addrlabel.c (decode_ifal_address): New function.
   4224 	(ifaddrlblmsg_nla_decoders): New array.
   4225 	(decode_ifaddrlblmsg): Use it.
   4226 
   4227 2017-09-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   4228 
   4229 	alpha: wire up new syscalls.
   4230 	* linux/alpha/syscallent.h [514..522]: New entries.
   4231 
   4232 2017-08-31  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4233 
   4234 	tests/.gitignore: add missing files that should be ignored.
   4235 	* tests/.gitignore: Add is_linux_mips_n64.
   4236 
   4237 2017-08-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   4238 
   4239 	mpers.awk: declare local variables consistently.
   4240 	* mpers.awk (compare_indices): Make c1 and c2 variables local.
   4241 	(enter): Make item variable local.
   4242 	(what_is): Make loc_diff, returned_size, and to_return local.
   4243 
   4244 2017-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   4245 
   4246 	mpers.awk: separate local variables from real parameters by newline.
   4247 	* mpers.awk (array_get, update_upper_bound): Separate local variables
   4248 	from real parameters by newline.
   4249 
   4250 2017-08-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   4251 
   4252 	rtnl_rule: enhance FRA_TABLE decoding.
   4253 	The attribute of FRA_TABLE is not just a 32-bit integer, some constants
   4254 	have well-known symbolic names like RT_TABLE_DEFAULT.
   4255 
   4256 	* rtnl_rule.c (fib_rule_hdr_nla_decoders) <FRA_TABLE>:
   4257 	Use decode_nla_rt_class.
   4258 	* tests/nlattr_fib_rule_hdr.c (FRA_TABLE): New macro.
   4259 	(main): Check FRA_TABLE decoding.
   4260 
   4261 2017-08-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   4262 
   4263 	rtnl_route: enhance RTA_TABLE decoding.
   4264 	The attribute of RTA_TABLE is not just a 32-bit integer, some constants
   4265 	have well-known symbolic names like RT_TABLE_DEFAULT.
   4266 
   4267 	* nlattr.h (decode_nla_rt_class): New prototype.
   4268 	* rtnl_route.c (decode_nla_rt_class): New function.
   4269 	(rtmsg_nla_decoders) <RTA_TABLE>: Use it.
   4270 	* tests/nlattr_rtmsg.c (main): Check RTA_TABLE decoding.
   4271 
   4272 2017-08-29  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4273 
   4274 	rtnl_nsid: decode rtgenmsg netlink attributes.
   4275 	* rtnl_nsid.c (rtgenmsg_nla_decoders): New array.
   4276 	(decode_rtgenmsg): Use it.
   4277 
   4278 	rtnl_netconf: decode netconfmsg netlink attributes.
   4279 	* rtnl_netconf.c (netconfmsg_nla_decoders): New array.
   4280 	(decode_netconfmsg): Use it.
   4281 
   4282 	tests: check decoding of ndmsg netlink attributes.
   4283 	* tests/nlattr_ndmsg.c: Include <netinet/in.h> and <arpa/inet.h>.
   4284 	(NDA_PORT): New macro.
   4285 	(main): Check decoding of NDA_DST, NDA_CACHEINFO and NDA_PORT.
   4286 
   4287 	rtnl_neigh: decode ndmsg netlink attributes.
   4288 	* nlattr.c: Include <netinet/in.h> and <arpa/inet.h>.
   4289 	(decode_nla_be16): New function.
   4290 	* nlattr.h (decode_nla_be16): New prototype.
   4291 	* rtnl_neigh.c (decode_neigh_addr,
   4292 	decode_nda_cacheinfo): New functions.
   4293 	(ndmsg_nla_decoders): New array.
   4294 	(decode_ndmsg): Use it.
   4295 
   4296 	tests: check decoding of fib_rule_hdr netlink attributes.
   4297 	* tests/nlattr_fib_rule_hdr.c: Include <inttypes.h>.
   4298 	(FRA_TUN_ID, FRA_UID_RANGE): New macros.
   4299 	(main): Check decoding of FRA_DST, FRA_UID_RANGE and FRA_TUN_ID.
   4300 
   4301 	rtnl_rule: decode fib_rule_hdr netlink attributes.
   4302 	* configure.ac (AC_CHECK_FUNCS): Add be64toh.
   4303 	(AC_CHECK_TYPES): Check for struct fib_rule_uid_range
   4304 	in <linux/fib_rules.h>.
   4305 	* nlattr.c: Include <endian.h>.
   4306 	(decode_nla_be64): New function.
   4307 	* nlattr.h (decode_nla_be64): New prototype.
   4308 	* rtnl_rule.c (decode_rule_addr,
   4309 	decode_fib_rule_uid_range): New functions.
   4310 	(fib_rule_hdr_nla_decoders): New array.
   4311 	(decode_fib_rule_hdr): Use it.
   4312 
   4313 	rtnl_neigh: fix ndm_type field decode in struct ndmsg.
   4314 	* defs.h (routing_types): New xlat prototype.
   4315 	* rtnl_neigh.c (decode_ndmsg): Fix ndm_type decode.
   4316 	* xlat/nda_types.in: Remove it.
   4317 	* tests/netlink_route.c (test_rtnl_neigh): Update the test.
   4318 	* tests/nlattr_ndmsg.c (init_ndmsg, print_ndmsg): Likewise.
   4319 
   4320 2017-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   4321 
   4322 	Disallow more than one signal= specification in an injection expression.
   4323 	Specifying several signal= specifications in an injection expressions
   4324 	makes no sense.
   4325 
   4326 	* filter_qualify.c (parse_inject_token): Disallow second
   4327 	signal= specification.
   4328 	* strace.1.in: Document it.
   4329 	* tests/qual_inject-syntax.test: Check it.
   4330 
   4331 2017-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   4332 
   4333 	Add "flags" field to struct inject_data.
   4334 	Introduce "flags" field to struct inject_data and use it instead
   4335 	of magic rval and signo constants.
   4336 	Due to layout of struct inject_data, this new field does not change
   4337 	sizeof(struct inject_data).
   4338 
   4339 	* defs.h (INJECT_F_RETVAL, INJECT_F_SIGNAL): New macros.
   4340 	(INJECT_OPTS_RVAL_DEFAULT): Remove macro.
   4341 	(struct inject_data): Add "flags" field.
   4342 	* filter_qualify.c (parse_inject_token, qualify_inject_common): Check
   4343 	struct inject_data.flags instead of inject_data.rval
   4344 	and inject_data.signo, do not initialize inject_opts.data.
   4345 	* syscall.c (tamper_with_syscall_entering): Check struct
   4346 	inject_data.flags instead of inject_data.rval and inject_data.signo.
   4347 
   4348 2017-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   4349 	    Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   4350 
   4351 	Move inject data of struct inject_opts to inject_data substructure.
   4352 	* defs.h (inject_data): New structure.
   4353 	(struct inject_opts): Replace "signo" and "rval" fields with "data"
   4354 	field of type "struct inject_data".
   4355 	* filter_qualify.c (parse_inject_token, qualify_inject_common): Update
   4356 	for the new layout of struct inject_opts.
   4357 	* syscall.c (tamper_with_syscall_entering, tamper_with_syscall_exiting):
   4358 	Likewise.
   4359 
   4360 2017-08-28  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   4361 
   4362 	Update ioctl entries from linux v4.13-rc7.
   4363 	* linux/32/ioctls_inc_align16.h: Update from linux v4.13-rc7 using ioctls_gen.sh.
   4364 	* linux/32/ioctls_inc_align32.h: Likewise.
   4365 	* linux/32/ioctls_inc_align64.h: Likewise.
   4366 	* linux/64/ioctls_inc.h: Likewise.
   4367 	* linux/x32/ioctls_inc0.h: Likewise.
   4368 	* linux/arm/ioctls_arch0.h: Likewise.
   4369 	* linux/i386/ioctls_arch0.h: Likewise.
   4370 	* linux/powerpc/ioctls_arch0.h: Likewise.
   4371 	* linux/s390x/ioctls_arch0.h: Likewise.
   4372 	* linux/x86_64/ioctls_arch0.h: Likewise.
   4373 	* NEWS: Mention this.
   4374 
   4375 2017-08-28  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4376 
   4377 	tests: check decoding of ifinfomsg netlink attributes.
   4378 	* tests/nlattr_ifinfomsg.c: Include <stddef.h> and <linux/if_link.h>.
   4379 	(IFLA_LINK_NETNSID): New macro.
   4380 	(main): Check decoding of IFLA_LINK_NETNSID,
   4381 	IFLA_STATS, IFLA_MAP and IFLA_STATS64.
   4382 
   4383 	rtnl_link: decode ifinfomsg netlink attributes.
   4384 	* configure.ac (AC_CHECK_HEADERS): Add linux/if_link.h.
   4385 	(AC_CHECK_TYPES): Check for struct rtnl_link_stats64
   4386 	in <linux/if_link.h>.
   4387 	(AC_CHECK_MEMBERS): Check for rx_nohandler field
   4388 	in struct rtnl_link_stats/rtnl_link_stats64.
   4389 	* rtnl_link.c: Include <linux/if_link.h>.
   4390 	(decode_rtnl_link_stats, decode_rtnl_link_ifmap,
   4391 	decode_rtnl_link_stats64): New functions.
   4392 	(ifinfomsg_nla_decoders): New array.
   4393 	(decode_ifinfomsg): Use it.
   4394 
   4395 2017-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   4396 	    Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4397 
   4398 	Imply RVAL_DECODED when RVAL_IOCTL_PARSED is returned on entering.
   4399 	Also, rename RVAL_IOCTL_PARSED to RVAL_IOCTL_DECODED as the latter
   4400 	is a more suitable name.
   4401 
   4402 	* defs.h (RVAL_IOCTL_PARSED): Rename to RVAL_IOCTL_DECODED.
   4403 	* ioctl.c (ioctl_decode): Update comment.
   4404 	(SYS_FUNC(ioctl)): Replace RVAL_IOCTL_PARSED with RVAL_IOCTL_DECODED,
   4405 	add convertation of RVAL_IOCTL_DECODED to RVAL_DECODED.
   4406 	* block.c (block_ioctl): Replace RVAL_DECODED | RVAL_IOCTL_PARSED
   4407 	with RVAL_IOCTL_DECODED on entering.  Replace RVAL_IOCTL_PARSED
   4408 	with RVAL_IOCTL_DECODED on exiting.
   4409 	* btrfs.c (btrfs_ioctl): Likewise.
   4410 	* evdev.c: Likewise.
   4411 	* file_ioctl.c: Likewise.
   4412 	* fs_x_ioctl.c: Likewise.
   4413 	* hdio.c: Likewise.
   4414 	* loop.c: Likewise.
   4415 	* mtd.c: Likewise.
   4416 	* nsfs.c: Likewise.
   4417 	* print_sg_req_info.c: Likewise.
   4418 	* ptp.c: Likewise.
   4419 	* rtc.c: Likewise.
   4420 	* scsi.c: Likewise.
   4421 	* sg_io_v3.c: Likewise.
   4422 	* sg_io_v4.c: Likewise.
   4423 	* sock.c: Likewise.
   4424 	* term.c: Likewise.
   4425 	* ubi.c: Likewise.
   4426 	* userfaultfd.c: Likewise.
   4427 	* dm.c (dm_known_ioctl): Return RVAL_IOCTL_DECODED on exiting and 0
   4428 	on entering.  Replace RVAL_IOCTL_PARSED with RVAL_IOCTL_DECODED
   4429 	on exiting.
   4430 	* v4l2.c: Likewise.
   4431 
   4432 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4433 
   4434 	Replace return 1 ioctl sub-decoder hack with proper flag.
   4435 	* defs.h (RVAL_IOCTL_PARSED): Introduce new flag for ioctl sub-decoders
   4436 	* to signalise that they have successfully printed argument.
   4437 	* ioctl.c (SYS_FUNC(ioctl)): Check for RVAL_IOCTL_PARSED flag, remove
   4438 	un-set it before returning the value.
   4439 	* block.c: Use RVAL_IOCTL_PARSED instead of 1.
   4440 	* btrfs.c: Likewise.
   4441 	* dm.c: Likewise.
   4442 	* evdev.c: Likewise.
   4443 	* file_ioctl.c: Likewise.
   4444 	* fs_x_ioctl.c: Likewise.
   4445 	* hdio.c: Likewise.
   4446 	* loop.c: Likewise.
   4447 	* mtd.c: Likewise.
   4448 	* nsfs.c: Likewise.
   4449 	* print_sg_req_info.c: Likewise.
   4450 	* ptp.c: Likewise.
   4451 	* rtc.c: Likewise.
   4452 	* scsi.c: Likewise.
   4453 	* sg_io_v3.c: Likewise.
   4454 	* sg_io_v4.c: Likewise.
   4455 	* sock.c: Likewise.
   4456 	* term.c: Likewise.
   4457 	* ubi.c: Likewise.
   4458 	* userfaultfd.c: Likewise.
   4459 	* v4l2.c: Likewise.
   4460 
   4461 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4462 
   4463 	v4l2: streamline logic.
   4464 	Move exiting path out of if (entering(tcp)) { ... return 0; } else,
   4465 	provide common exit point in v4l2_ioctl handler, use break instead of
   4466 	return in specific command handlers.
   4467 
   4468 	* v4l2.c (print_v4l2_format, print_v4l2_buffer, print_v4l2_standard,
   4469 	print_v4l2_input, print_v4l2_frmivalenum): Move exiting path out of else
   4470 	par of the entering(tcp) condition.
   4471 	(v4l2_ioctl): Add return RVAL_DECODED | 1 at the end of function.
   4472 	(v4l2_ioctl) <case VIDIOC_S_STD, case VIDIOC_S_INPUT>: Replace return
   4473 	with break.
   4474 
   4475 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4476 
   4477 	v4l2: reorder field printing in order to avoid auxstr usage.
   4478 	Also rework flow a little in order to reduce amount of indentation.
   4479 
   4480 	* v4l2.c (print_v4l2_requestbuffers): Print count as the last field on
   4481 	entering, append it with updated value on exiting.
   4482 	* tests/ioctl_v4l2.c: Update expected output.
   4483 
   4484 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4485 
   4486 	userfaultfd: streamline logic.
   4487 	Make userfaultfd ioctl handling more in line with other ioctl decoders.
   4488 
   4489 	* userfaultfd.c (uffdio_ioctl): Return RVAL_DECODED | 1, break instead
   4490 	of returning in specific command handlers, return 0 on entering paths,
   4491 	move exiting paths out of else branch of entering(tcp) condition.
   4492 
   4493 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4494 
   4495 	Do not return RVAL_DECODED on exiting path of ioctl decoders.
   4496 	* print_sg_req_info.c (decode_sg_req_info): Return 1 instead of
   4497 	RVAL_DECODED | 1 on exiting path.
   4498 	* scsi.c (decode_sg_scsi_id): Likewise.
   4499 	* sg_io_v3.c (decode_response): Likewise.
   4500 	* sg_io_v4.c (decode_response): Likewise.
   4501 
   4502 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4503 
   4504 	dm: return RVAL_DECODED instead of 0 if we can't decode command.
   4505 	Return RVAL_DECODED if we can't decode command in order to avoid being
   4506 	called on exiting.
   4507 
   4508 	* dm.c (dm_ioctl): Return RVAL_DECODED instead of 0 if command can't be
   4509 	decoded.
   4510 
   4511 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4512 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   4513 
   4514 	Return 0 instead of 1 on entering path of ioctl decoders.
   4515 	As returning 1 (without RVAL_DECODED) on entering makes no sense.
   4516 
   4517 	* block.c (block_ioctl) <case BLKTRACESETUP>: Replace return 1 with
   4518 	return 0 on entering path.
   4519 	* ptp.c (ptp_ioctl) <case PTP_SYS_OFFSET>: Likewise.
   4520 	* sg_io_v3.c (decode_request): Likewise.
   4521 	* sg_io_v4.c (decode_request): Likewise.
   4522 	* sock.c (decode)ifconf, sock_ioctl) <case SIOCGIFMAP>: Likewise.
   4523 	* ubi.c (ubi_ioctl) <case UBI_IOCMKVOL, case UBI_IOCATT>: Likewise.
   4524 	* v4l2.c (print_v4l2_ext_controls): Likewise.
   4525 
   4526 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4527 
   4528 	ioctl: simplify ioctl_decode handling, document its return value semantics
   4529 	* ioctl.s (SYS_FUNC(ioctl.c)): Unconditionally unset 1, simply print arg
   4530 	when (ret & RVAL_DECODED) && !(ret & 1).
   4531 
   4532 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4533 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   4534 
   4535 	syscall.c: define personality names for all multi-personality architectures
   4536 	I see no reason for not having these definitions for SPARC64 and RISC-V.
   4537 	Also, borrow the check template from supported_personalities.h.
   4538 
   4539 	* syscall.c (update_personality) [defined RISCV, defined SPARC64]
   4540 	<PERSONALITY_NAMES>: Define it for these architectures.
   4541 
   4542 2017-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4543 
   4544 	copyright-year-gen: workaround for old git versions.
   4545 	Apply the same treatment to this script as the one in
   4546 	v4.18-278-g295cf32.
   4547 
   4548 	* copyright-year-gen <year>: Change format to format:%cD, remove --date,
   4549 	supply output as a -d option argument to date +%Y.
   4550 
   4551 2017-08-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4552 
   4553 	ubi: trim overly long lines.
   4554 
   4555 	term: use print_quoted_string.
   4556 	* term.c (decode_termios): Use print_quoted_string for printing c_cc field
   4557 	instead of writing the printing code by hand.
   4558 
   4559 2017-08-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4560 
   4561 	update_copyright_years.sh: workaround for old git versions.
   4562 	Old git versions (like the one shipped in Debian 8) do not support setting
   4563 	date format with --date, working this around by processing git log output
   4564 	with date +%Y.
   4565 
   4566 	* main/update_copyright_years.sh (process_file) <first_commit_year,
   4567 	last_commit_year>: Change format to format:%aD, remove --date, supply
   4568 	output as a -d option argument to date +%Y.
   4569 
   4570 2017-08-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   4571 
   4572 	syscall: use spaces in tile personality names, de-duplicate definition.
   4573 	As Chris Metcalf, the author of v4.7-40-g0b99a8a, told in private, there
   4574 	is no strong reason for having tile's personality name different from
   4575 	personality names on other architectures, so let's use spaces instead of
   4576 	dashes here. And, while we are here, remove duplication of personality
   4577 	name definitions for various architectures.
   4578 
   4579 	* syscall.c (update_personality) [defined TILE]: Change dashes to spaces
   4580 	in personality names.
   4581 
   4582 2017-08-26  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4583 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   4584 
   4585 	tests: check decoding of rtmsg netlink attributes.
   4586 	* tests/nlattr_rtmsg.c: Include <netinet/in.h> and <arpa/inet.h>.
   4587 	(LWTUNNEL_ENCAP_NONE, RTA_ENCAP_TYPE): New macros.
   4588 	(main): Check decoding of RTA_DST, RTA_OIF, RTA_METRICS, RTA_MULTIPATH,
   4589 	RTA_CACHEINFO, RTA_MFC_STATS, RTA_VIA, and RTA_ENCAP_TYPE.
   4590 
   4591 	rtnl_route: decode rtmsg netlink attributes.
   4592 	* configure.ac (AC_CHECK_TYPES): Check for
   4593 	rta_mfc_stats and rtvia structures in <linux/rtnetlink.h>.
   4594 	* nlattr.c (decode_nla_ifindex): New function.
   4595 	* nlattr.h (decode_nla_ifindex): New prototype.
   4596 	* rtnl_route.c (decode_route_addr, decode_rta_metrics,
   4597 	decode_rta_multipath, decode_rta_cacheinfo,
   4598 	decode_rta_mfc_stats, decode_rtvia,
   4599 	decode_rta_encap_type): New functions.
   4600 	(rta_metrics_nla_decoders, rtmsg_nla_decoders): New arrays.
   4601 	(decode_rtmsg): Use rtmsg_nla_decoders.
   4602 	* xlat/lwtunnel_encap_types.in: New file.
   4603 	* xlat/route_nexthop_flags.in: Likewise.
   4604 	* xlat/rtnl_rta_metrics_attrs.in: Likewise.
   4605 
   4606 2017-08-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   4607 
   4608 	s390: wire up s390_guarded_storage syscall.
   4609 	* linux/s390/syscallent.h [378]: Add s390_guarded_storage entry.
   4610 	* linux/s390x/syscallent.h: Likewise.
   4611 
   4612 	microblaze: wire up statx syscall.
   4613 	* linux/microblaze/syscallent.h [398]: Add statx entry.
   4614 
   4615 2017-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   4616 
   4617 	alloc_number_set_array: add ATTRIBUTE_MALLOC.
   4618 	* number_set.h: Include "gcc_compat.h".
   4619 	(alloc_number_set_array): Add ATTRIBUTE_MALLOC.
   4620 
   4621 2017-08-24  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   4622 
   4623 	Add macros for testing QUAL_* flags.
   4624 	* defs.h (traced, raw, inject): Add macros for testing QUAL_TRACE,
   4625 	QUAL_RAW, and QUAL_INJECT flags.
   4626 	* syscall.c (syscall_entering_trace, syscall_exiting_trace): Use them.
   4627 
   4628 2017-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   4629 
   4630 	Remove QUAL_SIGNAL, QUAL_READ and QUAL_WRITE.
   4631 	Remove these flags that are unused since commit v4.15~26.
   4632 	They might be introduced later with a different meaning.
   4633 
   4634 	* defs.h (QUAL_SIGNAL, QUAL_READ, QUAL_WRITE): Remove.
   4635 
   4636 2017-08-24  Eugene Syromiatnikov  <evgsyr (a] gmail.com>
   4637 
   4638 	xstrdup, xtrndup: allow NULL argument.
   4639 	Accept NULL argument in xstrdup and xtrndup functions to allow use
   4640 	of "xstrdup(str)" instead of "str ? xstrdup(str) : NULL".
   4641 
   4642 	* xmalloc.c (xstrdup, xstrndup): Handle NULL argument.
   4643 	* xmalloc.h: Add comment regarding this deviation from the behaviour
   4644 	of the POSIX counterparts of these functions.
   4645 
   4646 2017-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   4647 
   4648 	tests: really skip mips o32 scno tampering tests on mips n64.
   4649 	* tests/is_linux_mips_n64.c: New file.
   4650 	* tests/Makefile.am (check_PROGRAMS): Add it.
   4651 	* tests/scno_tampering.sh <$STRACE_ARCH == mips>:
   4652 	In case of mips o32 abi, skip the test if is_linux_mips_n64 says
   4653 	that the kernel is mips n64, even if "uname -m" claims it's mips.
   4654 
   4655 2017-08-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   4656 
   4657 	Hide struct number_set implementation details from users.
   4658 	* number_set.h (number_slot_t, struct number_set): Move to number_set.c.
   4659 	(struct number_set): Add forward declaration.
   4660 	(read_set, write_set, signal_set): Change prototypes from objects
   4661 	to pointers.
   4662 	* filter_qualify.c (read_set, write_set, signal_set): Change definitions
   4663 	from objects to pointers.
   4664 	(abbrev_set, inject_set, raw_set, trace_set, verbose_set): Change
   4665 	definitions from arrays to pointers.
   4666 	(qualify_read): Initialize read_set before first use.
   4667 	(qualify_write): Initialize write_set before first use.
   4668 	(qualify_signals): Initialize signal_set before first use.
   4669 	(qualify_trace): Initialize trace_set before first use.
   4670 	(qualify_abbrev): Initialize abbrev_set before first use.
   4671 	(qualify_verbose): Initialize verbose_set before first use.
   4672 	(qualify_raw): Initialize raw_set before first use.
   4673 	(qualify_inject_common): Initialize inject_set before first use.
   4674 	* strace.c (print_signalled, print_stopped): Update signal_set usage.
   4675 	* syscall.c (dumpio): Update usage of read_set and write_set.
   4676 
   4677 	Extend number_set interface.
   4678 	* number_set.h (number_set_array_is_empty, is_number_in_set_array,
   4679 	add_number_to_set_array, clear_number_set_array,
   4680 	invert_number_set_array, alloc_number_set_array, free_number_set_array):
   4681 	New function prototypes.
   4682 	* number_set.c (number_set_array_is_empty, is_number_in_set_array,
   4683 	add_number_to_set_array, clear_number_set_array,
   4684 	invert_number_set_array, alloc_number_set_array, free_number_set_array):
   4685 	New functions.
   4686 	* basic_filters.c (qualify_syscall_number, qualify_syscall_regex,
   4687 	qualify_syscall_class, qualify_syscall_name): Use
   4688 	add_number_to_set_array.
   4689 	(qualify_syscall_tokens, qualify_tokens): Use
   4690 	clear_number_set_array and invert_number_set_array.
   4691 	* filter_qualify.c (qualify_inject_common): Use alloc_number_set_array,
   4692 	number_set_array_is_empty, is_number_in_set_array,
   4693 	add_number_to_set_array, and free_number_set_array.
   4694 	(qual_flags): Use is_number_in_set_array.
   4695 
   4696 	Move number_set interface to separate files.
   4697 	* number_set.c: New file.
   4698 	* number_set.h: Likewise.
   4699 	* Makefile.am (strace_SOURCES): Add them.
   4700 	* basic_filters.c: Include "number_set.h".
   4701 	(number_slot_t, struct number_set): Move to number_set.h.
   4702 	(BITS_PER_SLOT, number_setbit, number_isset, reallocate_number_set,
   4703 	add_number_to_set, is_number_in_set): Move to number_set.c.
   4704 	* defs.h (struct number_set): Remove forward declaration.
   4705 	(read_set, write_set, signal_set, is_number_in_set): Move to number_set.h.
   4706 	* filter.h (add_number_to_set): Move to number_set.h.
   4707 	* filter_qualify.c: Include "number_set.h".
   4708 	(number_slot_t, struct number_set): Remove.
   4709 	* strace.c: Include "number_set.h".
   4710 	* syscall.c: Likewise.
   4711 
   4712 2017-08-22  Edgar Kaziakhmedov  <edgar.kaziakhmedov (a] virtuozzo.com>
   4713 
   4714 	Move SUPPORTED_PERSONALITIES to a separate file.
   4715 	Since the defs.h contains unrelated declarations which are
   4716 	redundant (and sometimes conflicting) for other binaries included
   4717 	in the strace package, move SUPPORTED_PERSONALITIES defintions
   4718 	to a separate file.
   4719 
   4720 	* defs.h: Include "supported_personalities.h".
   4721 	(SUPPORTED_PERSONALITIES): Move ...
   4722 	* supported_personalities.h: ... to the new file.
   4723 	* Makefile.am (strace_SOURCES): Add it.
   4724 
   4725 2017-08-22  Edgar Kaziakhmedov  <edgar.kaziakhmedov (a] virtuozzo.com>
   4726 
   4727 	Move string_to_uint* functions to a separate file.
   4728 	Make string_to_uint* functions available to other binaries
   4729 	included in the strace package.
   4730 
   4731 	* string_to_uint.h: New file.
   4732 	* defs.h: Include it.
   4733 	(string_to_uint_ex, string_to_uint_upto, string_to_uint): Move
   4734 	to string_to_uint.h.
   4735 	* util.c (string_to_uint_ex, string_to_uint): Move ...
   4736 	* string_to_uint.c: ... to the new file.
   4737 	* Makefile.am (strace_SOURCES): Add string_to_uint.h and string_to_uint.c.
   4738 
   4739 2017-08-22  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4740 
   4741 	tests: check decoding of ifaddrmsg netlink attributes.
   4742 	* tests/nlattr_ifaddrmsg.c: Include <arpa/inet.h>.
   4743 	(IFA_FLAGS, SET_IFA_FAMILY): New macros.
   4744 	(init_ifaddrmsg): Set ifaddrmsg.ifa_family field from ifa_family.
   4745 	(print_ifaddrmsg): Print ifaddrmsg.ifa_family field using ifa_family_str.
   4746 	(main): Check decoding of IFA_ADDRESS, IFA_CACHEINFO, and IFA_FLAGS.
   4747 
   4748 	rtnl_addr: decode ifaddrmsg netlink attributes.
   4749 	* rtnl_addr.c (decode_ifa_address,
   4750 	decode_ifa_cacheinfo, decode_ifa_flags): New functions.
   4751 	(ifaddrmsg_nla_decoders): New array.
   4752 	(decode_ifaddrmsg): Use it.
   4753 
   4754 2017-08-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   4755 
   4756 	Export decode_inet_addr.
   4757 	* defs.h (decode_inet_addr): New prototype.
   4758 	* netlink_inet_diag.c (decode_inet_addr): Remove static keyword, move ...
   4759 	* sockaddr.c: ... here.
   4760 
   4761 	netlink_inet_diag: prepare decode_inet_addr for export.
   4762 	* netlink_inet_diag.c (decode_inet_addr): Change return type to bool,
   4763 	parametrize field name using new var_name argument.
   4764 	(decode_inet_diag_hostcond): Specify "addr" field name
   4765 	to decode_inet_addr.
   4766 
   4767 2017-08-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   4768 
   4769 	print_inet_addr: add support of invocations without field name.
   4770 	Prepare print_inet_addr for use in structureless contexts where
   4771 	no structure field name is available.
   4772 
   4773 	* sockaddr.c (print_inet_addr): Handle var_name == NULL.
   4774 
   4775 2017-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   4776 
   4777 	print_inet_addr: print address of unsupported family in hex.
   4778 	* sockaddr.c (print_inet_addr): Specify QUOTE_FORCE_HEX
   4779 	to print_quoted_string.
   4780 
   4781 2017-08-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   4782 
   4783 	mips o32: do not bail out in get_syscall_args if umoven fails.
   4784 	If the kernel contains commit 84d77d3f06e7e8dea057d10e8ec77ad71f721be3,
   4785 	both PTRACE_PEEKDATA and process_vm_readv become unavailable when the
   4786 	process dumpable flag is cleared.  As the first 4 syscall arguments are
   4787 	still available via registers, do not treat this as get_syscall_args
   4788 	error.
   4789 
   4790 	This condition is triggered and therefore tested by prctl-dumpable test.
   4791 
   4792 	* linux/mips/get_syscall_args.c (get_syscall_args) [LINUX_MIPSO32]:
   4793 	Do not bail out if umoven fails.
   4794 
   4795 2017-08-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   4796 
   4797 	configure: cleanup struct statfs/statfs64 member checks.
   4798 	* configure.ac <AC_CHECK_TYPES([struct statfs])>: Merge several
   4799 	AC_CHECK_MEMBERS checks of struct statfs members into a single check.
   4800 	<AC_CHECK_TYPES([struct statfs64])>: Likewise, for checks
   4801 	of struct statfs64 members.
   4802 
   4803 2017-08-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   4804 
   4805 	tests: fix a few harmless -Woverflow compilation warnings.
   4806 	Fix the following compilation warnings on platforms where
   4807 	sizeof(struct timeval.tv_usec) < sizeof(long):
   4808 
   4809 	xettimeofday.c: In function main:
   4810 	xettimeofday.c:76:16: warning: overflow in implicit constant conversion [-Woverflow]
   4811 	  tv->tv_usec = (long) 0xbadc0dedfacefeedLL;
   4812 	xetitimer.c: In function main:
   4813 	xetitimer.c:170:28: warning: overflow in implicit constant conversion [-Woverflow]
   4814 	  p_new->it_value.tv_usec = (long) 0xbadc0dedfacefeedLL;
   4815 	In file included from utimes.c:38:0:
   4816 	xutimes.c: In function main:
   4817 	xutimes.c:110:18: warning: overflow in implicit constant conversion [-Woverflow]
   4818 	  tv[1].tv_usec = (long) 0xbadc0dedfacefeedLL;
   4819 	futimesat.c: In function main:
   4820 	futimesat.c:121:18: warning: overflow in implicit constant conversion [-Woverflow]
   4821 	  tv[1].tv_usec = (long) 0xbadc0dedfacefeedLL;
   4822 	In file included from _newselect.c:35:0:
   4823 	xselect.c: In function main:
   4824 	xselect.c:94:16: warning: overflow in implicit constant conversion [-Woverflow]
   4825 	  tv->tv_usec = (long) 0xbadc0dedfacefeedLL;
   4826 	                ^
   4827 	* tests/futimesat.c (main): In initialization of struct timeval.tv_usec,
   4828 	change explicit cast from (long) to (suseconds_t).
   4829 	* tests/xetitimer.c: Likewise.
   4830 	* tests/xettimeofday.c: Likewise.
   4831 	* tests/xselect.c: Likewise.
   4832 	* tests/xutimes.c: Likewise.
   4833 
   4834 	Reported-by: Anatoly Pugachev <matorola (a] gmail.com>
   4835 
   4836 2017-08-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   4837 
   4838 	tests: fix sigaction.test on sparc.
   4839 	On sparc, the first argument of old sigaction syscall has negated
   4840 	semantics, compared to other architectures.  While sigaction.test
   4841 	was aware about this arch-specific detail from the beginning, in one
   4842 	of many sigaction syscall invocations a non-negative signal number
   4843 	was erroneously passed on sparc.
   4844 
   4845 	* tests/sigaction.c (ADDR_INT, SIGNO_INT): New arch-specific macros.
   4846 	(signo, addr): Use them.
   4847 
   4848 2017-08-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   4849 
   4850 	nlattr: fix printing of unrecognized attribute data.
   4851 	Do not print more than "nlattr.nla_len - NLA_HDRLEN" bytes
   4852 	of unrecognized attribute data.
   4853 
   4854 	* nlattr.c (decode_nlattr_with_data): Specify "nla_len - NLA_HDRLEN"
   4855 	instead of "len - NLA_HDRLEN" as the size of unrecognized attribute
   4856 	data.
   4857 	* tests/nlattr.c (test_nlattr): Check it.
   4858 
   4859 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4860 
   4861 	tests: check decoding of NETLINK_ROUTE rtgenmsg attributes.
   4862 	* tests/nlattr_rtgenmsg.c: New file.
   4863 	* tests/gen_tests.in (nlattr_rtgenmsg): New entry.
   4864 	* tests/pure_executables.list: Add nlattr_rtgenmsg.
   4865 	* tests/.gitignore: Likewise.
   4866 
   4867 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4868 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4869 
   4870 	netlink: add basic decoding of NETLINK_ROUTE rtgenmsg attributes.
   4871 	* rtnl_nsid.c: Include "nlattr.h" and "xlat/rtnl_nsid_attrs.h".
   4872 	(decode_rtgenmsg): Call decode_nlattr.
   4873 	* xlat/rtnl_nsid_attrs.in: New file.
   4874 
   4875 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4876 
   4877 	tests: check decoding of NETLINK_ROUTE br_port_msg attributes.
   4878 	* tests/nlattr_br_port_msg.c: New file.
   4879 	* tests/gen_tests.in (nlattr_br_port_msg): New entry.
   4880 	* tests/pure_executables.list: Add nlattr_br_port_msg.
   4881 	* tests/.gitignore: Likewise.
   4882 
   4883 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4884 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4885 
   4886 	netlink: add basic decoding of NETLINK_ROUTE br_port_msg attributes.
   4887 	* rtnl_mdb.c: Include "netlink.h", "nlattr.h".
   4888 	and "xlat/rtnl_mdb_attrs.h".
   4889 	(decode_br_port_msg): Call decode_nlattr.
   4890 	* xlat/rtnl_mdb_attrs.in: New file.
   4891 
   4892 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4893 
   4894 	tests: check decoding of NETLINK_ROUTE netconfmsg attributes.
   4895 	* tests/nlattr_netconfmsg.c: New file.
   4896 	* tests/gen_tests.in (nlattr_netconfmsg): New entry.
   4897 	* tests/pure_executables.list: Add nlattr_netconfmsg.
   4898 	* tests/.gitignore: Likewise.
   4899 
   4900 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4901 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4902 
   4903 	netlink: add basic decoding of NETLINK_ROUTE netconfmsg attributes.
   4904 	* rtnl_netconf.c: Include "netlink.h", "nlattr.h",
   4905 	and "xlat/rtnl_netconf_attrs.h".
   4906 	(decode_netconfmsg): Call decode_nlattr.
   4907 	* xlat/rtnl_netconf_attrs.in: New file.
   4908 
   4909 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4910 
   4911 	tests: check decoding of NETLINK_ROUTE dcbmsg attributes.
   4912 	* tests/nlattr_dcbmsg.c: New file.
   4913 	* tests/gen_tests.in (nlattr_dcbmsg): New entry.
   4914 	* tests/pure_executables.list: Add nlattr_dcbmsg.
   4915 	* tests/.gitignore: Likewise.
   4916 
   4917 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4918 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4919 
   4920 	netlink: add basic decoding of NETLINK_ROUTE dcbmsg attributes.
   4921 	* rtnl_dcb.c: Include "netlink.h", "nlattr.h",
   4922 	and "xlat/rtnl_dcb_attrs.h".
   4923 	(decode_dcbmsg): Call decode_nlattr.
   4924 	* xlat/rtnl_dcb_attrs.in: New file.
   4925 
   4926 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4927 
   4928 	tests: check decoding of NETLINK_ROUTE ifaddrlblmsg attributes.
   4929 	* tests/nlattr_ifaddrlblmsg.c: New file.
   4930 	* tests/gen_tests.in (nlattr_ifaddrlblmsg): New entry.
   4931 	* tests/pure_executables.list: Add nlattr_ifaddrlblmsg.
   4932 	* tests/.gitignore: Likewise.
   4933 
   4934 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4935 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4936 
   4937 	netlink: add basic decoding of NETLINK_ROUTE ifaddrlblmsg attributes.
   4938 	* rtnl_addrlabel.c: Include "netlink.h", "nlattr.h",
   4939 	and "xlat/rtnl_addrlabel_attrs.h".
   4940 	(decode_ifaddrlblmsg): Call decode_nlattr.
   4941 	* xlat/rtnl_addrlabel_attrs.in: New file.
   4942 
   4943 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4944 
   4945 	tests: check decoding of NETLINK_ROUTE tcamsg attributes.
   4946 	* tests/nlattr_tcamsg.c: New file.
   4947 	* tests/gen_tests.in (nlattr_tcamsg): New entry.
   4948 	* tests/pure_executables.list: Add nlattr_tcamsg.
   4949 	* tests/.gitignore: Likewise.
   4950 
   4951 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4952 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4953 
   4954 	netlink: add basic decoding of NETLINK_ROUTE tcamsg attributes.
   4955 	* rtnl_tc_action.c: Include "nlattr.h" and "xlat/rtnl_tc_action_attrs.h".
   4956 	(decode_tcamsg): Call decode_nlattr.
   4957 	* xlat/rtnl_tc_action_attrs.in: New file.
   4958 
   4959 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4960 
   4961 	tests: check decoding of NETLINK_ROUTE tcmsg attributes.
   4962 	* tests/nlattr_tcmsg.c: New file.
   4963 	* tests/gen_tests.in (nlattr_tcmsg): New entry.
   4964 	* tests/pure_executables.list: Add nlattr_tcmsg.
   4965 	* tests/.gitignore: Likewise.
   4966 
   4967 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4968 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4969 
   4970 	netlink: add basic decoding of NETLINK_ROUTE tcmsg attributes.
   4971 	* rtnl_tc.c: Include "nlattr.h" and "xlat/rtnl_tc_attrs.h".
   4972 	(decode_tcmsg): Call decode_nlattr.
   4973 	* xlat/rtnl_tc_attrs.in: New file.
   4974 
   4975 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4976 
   4977 	tests: check decoding of NETLINK_ROUTE ndtmsg attributes.
   4978 	* tests/nlattr_ndtmsg.c: New file.
   4979 	* tests/gen_tests.in (nlattr_ndtmsg): New entry.
   4980 	* tests/pure_executables.list: Add nlattr_ndtmsg.
   4981 	* tests/.gitignore: Likewise.
   4982 
   4983 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4984 	    Fabien Siron  <fabien.siron (a] epita.fr>
   4985 
   4986 	netlink: add basic decoding of NETLINK_ROUTE ndtmsg attributes.
   4987 	* rtnl_neightbl.c: Include "nlattr.h" and "xlat/rtnl_neightbl_attrs.h".
   4988 	(decode_ndtmsg): Call decode_nlattr.
   4989 	* xlat/rtnl_neightbl_attrs.in: New file.
   4990 
   4991 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   4992 
   4993 	tests: check decoding of NETLINK_ROUTE ndmsg attributes.
   4994 	* tests/nlattr_ndmsg.c: New file.
   4995 	* tests/gen_tests.in (nlattr_ndmsg): New entry.
   4996 	* tests/pure_executables.list: Add nlattr_ndmsg.
   4997 	* tests/.gitignore: Likewise.
   4998 
   4999 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5000 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5001 
   5002 	netlink: add basic decoding of NETLINK_ROUTE ndmsg attributes.
   5003 	* rtnl_neigh.c: Include "nlattr.h" and "xlat/rtnl_neigh_attrs.h".
   5004 	(decode_ndmsg): Call decode_nlattr.
   5005 	* xlat/rtnl_neigh_attrs.in: New file.
   5006 
   5007 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5008 
   5009 	tests: check decoding of NETLINK_ROUTE fib_rule_hdr attributes.
   5010 	* tests/nlattr_fib_rule_hdr.c: New file.
   5011 	* tests/gen_tests.in (nlattr_fib_rule_hdr): New entry.
   5012 	* tests/pure_executables.list: Add nlattr_fib_rule_hdr.
   5013 	* tests/.gitignore: Likewise.
   5014 
   5015 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5016 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5017 
   5018 	netlink: add basic decoding of NETLINK_ROUTE fib_rule_hdr attributes.
   5019 	* rtnl_rule.c: Include "nlattr.h" and "xlat/rtnl_rule_attrs.h".
   5020 	(decode_fib_rule_hdr): Call decode_nlattr.
   5021 	* xlat/rtnl_rule_attrs.in: New file.
   5022 
   5023 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5024 
   5025 	tests: check decoding of NETLINK_ROUTE rtmsg attributes.
   5026 	* tests/nlattr_rtmsg.c: New file.
   5027 	* tests/gen_tests.in (nlattr_rtmsg): New entry.
   5028 	* tests/pure_executables.list: Add nlattr_rtmsg.
   5029 	* tests/.gitignore: Likewise.
   5030 
   5031 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5032 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5033 
   5034 	netlink: add basic decoding of NETLINK_ROUTE rtmsg attributes.
   5035 	* rtnl_route.c: Include "nlattr.h" and "xlat/rtnl_route_attrs.h".
   5036 	(decode_rtmsg): Call decode_nlattr.
   5037 	* xlat/rtnl_route_attrs.in: New file.
   5038 
   5039 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5040 
   5041 	tests: check decoding of NETLINK_ROUTE ifaddrmsg attributes.
   5042 	* tests/nlattr_ifaddrmsg.c: New file.
   5043 	* tests/gen_tests.in (nlattr_ifaddrmsg): New entry.
   5044 	* tests/pure_executables.list: Add nlattr_ifaddrmsg.
   5045 	* tests/.gitignore: Likewise.
   5046 
   5047 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5048 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5049 
   5050 	netlink: add basic decoding of NETLINK_ROUTE ifaddrmsg attributes.
   5051 	* rtnl_addr.c: Include "nlattr.h" and "xlat/rtnl_addr_attrs.h".
   5052 	(decode_ifaddrmsg): Call decode_nlattr.
   5053 	* xlat/rtnl_addr_attrs.in: New file.
   5054 
   5055 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5056 
   5057 	tests: check decoding of NETLINK_ROUTE ifinfomsg attributes.
   5058 	* tests/nlattr_ifinfomsg.c: New file.
   5059 	* tests/gen_tests.in (nlattr_ifinfomsg): New entry.
   5060 	* tests/pure_executables.list: Add nlattr_ifinfomsg.
   5061 	* tests/.gitignore: Likewise.
   5062 
   5063 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5064 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5065 
   5066 	netlink: add basic decoding of NETLINK_ROUTE ifinfomsg attributes.
   5067 	* rtnl_link.c: Include "nlattr.h" and "xlat/rtnl_link_attrs.h".
   5068 	(decode_ifinfomsg): Call decode_nlattr.
   5069 	* xlat/rtnl_link_attrs.in: New file.
   5070 
   5071 2017-08-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   5072 
   5073 	tests/test_nlattr.h: include <stdint.h>
   5074 	* tests/test_nlattr.h: Include <stdint.h> for definition of uint16_t
   5075 	used by init_nlattr.
   5076 
   5077 	tests: use ifindex_lo and IFINDEX_LO_STR.
   5078 	* tests/netlink_route.c: Do not check for HAVE_IF_INDEXTONAME.
   5079 	(if_nametoindex, IFINDEX_LO): Remove.
   5080 	(test_rtnl_link, test_rtnl_addr, test_rtnl_neigh, test_rtnl_tc,
   5081 	test_rtnl_addrlabel, test_rtnl_mdb): Use ifindex_lo instead
   5082 	of if_nametoindex, use IFINDEX_LO_STR instead of hardcoded string.
   5083 	* tests/netlink_sock_diag.c: Do not check for HAVE_IF_INDEXTONAME.
   5084 	(if_nametoindex, IFINDEX_LO): Remove.
   5085 	(test_inet_diag_sockid, test_inet_diag_req, test_inet_diag_req_v2,
   5086 	test_inet_diag_msg, test_smc_diag_req): Use ifindex_lo instead
   5087 	of if_nametoindex, use IFINDEX_LO_STR instead of hardcoded string.
   5088 	* tests/nlattr_inet_diag_msg.c: Do not check for HAVE_IF_INDEXTONAME.
   5089 	(if_nametoindex, IFINDEX_LO): Remove.
   5090 	(init_inet_diag_msg): Use ifindex_lo instead of if_nametoindex.
   5091 	(print_inet_diag_msg): Use IFINDEX_LO_STR instead of hardcoded string.
   5092 	* tests/nlattr_inet_diag_req_compat.c: Do not check
   5093 	for HAVE_IF_INDEXTONAME.
   5094 	(if_nametoindex, IFINDEX_LO): Remove.
   5095 	(init_inet_diag_req): Use ifindex_lo instead of if_nametoindex.
   5096 	(print_inet_diag_req): Use IFINDEX_LO_STR instead of hardcoded string.
   5097 	* tests/nlattr_inet_diag_req_v2.c: Do not check for HAVE_IF_INDEXTONAME.
   5098 	(if_nametoindex, IFINDEX_LO): Remove.
   5099 	(init_inet_diag_req_v2, print_inet_diag_req_v2,
   5100 	test_inet_diag_bc_dev_cond): Use ifindex_lo instead of if_nametoindex,
   5101 	use IFINDEX_LO_STR instead of hardcoded string.
   5102 	* tests/nlattr_packet_diag_msg.c: Do not check for HAVE_IF_INDEXTONAME.
   5103 	(if_nametoindex, IFINDEX_LO): Remove.
   5104 	(main): Use ifindex_lo instead of if_nametoindex.
   5105 	(print_packet_diag_mclist): Use IFINDEX_LO_STR instead of hardcoded
   5106 	string.
   5107 
   5108 	tests/net-sockaddr: use ifindex_lo and IFINDEX_LO_STR.
   5109 	* tests/net-sockaddr.c (if_nametoindex): Remove declaration.
   5110 	(check_in6_linklocal, check_ll): Remove HAVE_IF_INDEXTONAME checks,
   5111 	Use ifindex_lo instead of if_nametoindex, use IFINDEX_LO_STR instead
   5112 	of hardcoded string.
   5113 
   5114 	tests/msg_control: use ifindex_lo and IFINDEX_LO_STR.
   5115 	* tests/msg_control.c (test_ip_pktinfo): Use ifindex_lo instead
   5116 	of if_nametoindex, use IFINDEX_LO_STR instead of hardcoded string.
   5117 
   5118 	tests/inet-cmsg: use IFINDEX_LO_STR.
   5119 	* tests/inet-cmsg.c (print_pktinfo): Use IFINDEX_LO_STR instead
   5120 	of hardcoded string.
   5121 
   5122 	tests/ip_mreq: use ifindex_lo and IFINDEX_LO_STR.
   5123 	* tests/ip_mreq.c: Do not check for HAVE_IF_INDEXTONAME.
   5124 	(main): Use ifindex_lo instead of if_nametoindex, use IFINDEX_LO_STR
   5125 	instead of hardcoded string.
   5126 
   5127 	tests/group_req: use ifindex_lo and IFINDEX_LO_STR.
   5128 	* tests/group_req.c: Do not check for HAVE_IF_INDEXTONAME.
   5129 	(main): Use ifindex_lo instead of if_nametoindex, use IFINDEX_LO_STR
   5130 	instead of hardcoded string.
   5131 
   5132 	tests: add ifindex_lo function and IFINDEX_LO_STR macro to libtests.
   5133 	* tests/ifindex.c: New file.
   5134 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   5135 	* tests/tests.h (ifindex_lo): New prototype.
   5136 	(IFINDEX_LO_STR): New macro.
   5137 
   5138 2017-08-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5139 
   5140 	configure.ac: remove redundant linux/dcbnl.h header check.
   5141 	* configure.ac (AC_CHECK_HEADERS): Remove linux/dcbnl.h.
   5142 	* rtnl_dcb.c: Replace HAVE_LINUX_DCBNL_H with HAVE_STRUCT_DCBMSG.
   5143 	* tests/netlink_route.c: Likewise.
   5144 
   5145 2017-08-14  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5146 
   5147 	pathtrace: fix typo in comment.
   5148 
   5149 	pathtrace: limit amount of checked poll fds similarly to select limit.
   5150 	* pathtrace.c (pathtrace_match_set): Limit the maximum descriptor number
   5151 	checked for fd match in poll family syscalls to 1024 * 1024.
   5152 
   5153 	pathtrace: fail poll path match on first failed umove.
   5154 	* pathtrace.c (pathtrace_match_set): When checking descriptors of poll
   5155 	family syscalls for fd match, break the loop on first failed umove call.
   5156 
   5157 2017-08-14  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5158 
   5159 	Update NEWS.
   5160 
   5161 2017-08-14  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5162 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5163 
   5164 	tests: check decoding of rtnetlink nsid messages.
   5165 	* tests/netlink_route.c (test_rtnl_nsid): New function.
   5166 	(main): Use it.
   5167 
   5168 	netlink: add a basic rtnetlink parser of nsid messages.
   5169 	* rtnl_nsid.c: New file.
   5170 	* Makefile.am (strace_SOURCES): Add it.
   5171 	* netlink_route.h (decode_rtgenmsg): New prototype.
   5172 	* netlink_route.c (route_decoders): Add RTM_DELNSID, RTM_GETNSID,
   5173 	and RTM_NEWNSID.
   5174 
   5175 	tests: check decoding of rtnetlink mdb messages.
   5176 	* tests/netlink_route.c: Include <netinet/in.h>
   5177 	and <linux/if_bridge.h>.
   5178 	(test_rtnl_mdb): New function.
   5179 	(main): Use it.
   5180 
   5181 	netlink: add a basic rtnetlink parser of mdb messages.
   5182 	* rtnl_mdb.c: New file.
   5183 	* Makefile.am (strace_SOURCES): Add it.
   5184 	* netlink_route.h (decode_br_port_msg): New prototype.
   5185 	* configure.ac (AC_CHECK_TYPES): Check for struct br_port_msg
   5186 	in <linux/if_bridge.h>.
   5187 	* netlink_route.c (route_decoders): Add RTM_DELMDB, RTM_GETMDB,
   5188 	and RTM_NEWMDB.
   5189 
   5190 	tests: check decoding of rtnetlink netconf messages.
   5191 	* tests/netlink_route.c: Include <linux/netconf.h>.
   5192 	(test_rtnl_netconf): New function.
   5193 	(main): Use it.
   5194 
   5195 	netlink: add a basic rtnetlink parser of netconf messages.
   5196 	* rtnl_netconf.c: New file.
   5197 	* Makefile.am (strace_SOURCES): Add it.
   5198 	* netlink_route.h (decode_netconfmsg): New prototype.
   5199 	* configure.ac (AC_CHECK_TYPES): Check for struct netconfmsg
   5200 	in <linux/netconf.h>.
   5201 	* netlink_route.c (route_decoders): Add RTM_GETNETCONF
   5202 	and RTM_NEWNETCONF.
   5203 
   5204 	tests: check decoding of rtnetlink dcb messages.
   5205 	* tests/netlink_route.c: Include <linux/dcbnl.h>.
   5206 	(test_rtnl_dcb): New function.
   5207 	(main): Use it.
   5208 
   5209 	netlink: add a basic rtnetlink parser of dcb messages.
   5210 	* rtnl_dcb.c: New file.
   5211 	* Makefile.am (strace_SOURCES): Add it.
   5212 	* netlink_route.h (decode_dcbmsg): New prototype.
   5213 	* configure.ac (AC_CHECK_HEADERS): Add linux/dcbnl.h.
   5214 	(AC_CHECK_TYPES): Check for struct dcbmsg in <linux/dcbnl.h>.
   5215 	* netlink_route.c (route_decoders): Add RTM_GETDCB and RTM_SETDCB.
   5216 	* xlat/dcb_commands.in: New file.
   5217 
   5218 	tests: check decoding of rtnetlink addrlabel messages.
   5219 	* tests/netlink_route.c: Include <linux/if_addrlabel.h>.
   5220 	(test_rtnl_addrlabel): New function.
   5221 	(main): Use it.
   5222 
   5223 	netlink: add a basic rtnetlink parser of addrlabel messages.
   5224 	* rtnl_addrlabel.c: New file.
   5225 	* Makefile.am (strace_SOURCES): Add it.
   5226 	* netlink_route.h (decode_ifaddrlblmsg): New prototype.
   5227 	* configure.ac (AC_CHECK_TYPES): Check for struct ifaddrlblmsg
   5228 	in <linux/if_addrlabel.h>.
   5229 	* netlink_route.c (route_decoders): Add RTM_DELADDRLABEL,
   5230 	RTM_GETADDRLABEL, and RTM_NEWADDRLABEL.
   5231 
   5232 	tests: check decoding of rtnetlink tc action messages.
   5233 	* tests/netlink_route.c (test_rtnl_tca): New function.
   5234 	(main): Use it.
   5235 
   5236 	netlink: add a basic rtnetlink parser of tc action messages.
   5237 	* rtnl_tc_action.c: New file.
   5238 	* Makefile.am (strace_SOURCES): Add it.
   5239 	* netlink_route.h (decode_tcamsg): New prototype.
   5240 	* netlink_route.c (route_decoders): Add RTM_DELACTION, RTM_GETACTION,
   5241 	and RTM_NEWACTION.
   5242 
   5243 	tests: check decoding of rtnetlink tc messages.
   5244 	* tests/netlink_route.c (test_rtnl_tc): New function.
   5245 	(main): Use it.
   5246 
   5247 	netlink: add a basic rtnetlink parser of tc messages.
   5248 	* rtnl_tc.c: New file.
   5249 	* Makefile.am (strace_SOURCES): Add it.
   5250 	* netlink_route.h (decode_tcmsg): New prototype.
   5251 	* netlink_route.c (route_decoders): Add RTM_DELQDISC,
   5252 	RTM_GETQDISC, RTM_NEWQDISC, RTM_DELTCLASS, RTM_GETTCLASS,
   5253 	RTM_NEWTCLASS, RTM_DELTFILTER, RTM_GETTFILTER, and RTM_NEWTFILTER.
   5254 
   5255 	tests: check decoding of rtnetlink neightbl messages.
   5256 	* tests/netlink_route.c (test_rtnl_neightbl): New function.
   5257 	(main): Use it.
   5258 
   5259 	netlink: add a basic rtnetlink parser of neightbl messages.
   5260 	* rtnl_neightbl.c: New file.
   5261 	* Makefile.am (strace_SOURCES): Add it.
   5262 	* netlink_route.h (decode_ndtmsg): New prototype.
   5263 	* netlink_route.c (route_decoders): Add RTM_GETNEIGHTBL,
   5264 	RTM_NEWNEIGHTBL, and RTM_SETNEIGHTBL.
   5265 
   5266 	tests: check decoding of rtnetlink neigh messages.
   5267 	* tests/netlink_route.c: Include <linux/neighbour.h>.
   5268 	(test_rtnl_neigh): New function.
   5269 	(main): Use it.
   5270 
   5271 	netlink: add a basic rtnetlink parser of neigh messages.
   5272 	* rtnl_neigh.c: New file.
   5273 	* Makefile.am (strace_SOURCES): Add it.
   5274 	* netlink_route.h (decode_ndmsg, decode_rtm_getneigh): New prototypes.
   5275 	* configure.ac (AC_CHECK_HEADERS): Add linux/neighbour.h.
   5276 	* netlink_route.c (route_decoders): Add RTM_DELNEIGH, RTM_DELNEIGH,
   5277 	and RTM_NEWNEIGH.
   5278 	* xlat/nda_types.in: New file.
   5279 	* xlat/neighbor_cache_entry_flags.in: Likewise.
   5280 	* xlat/neighbor_cache_entry_states.in: Likewise.
   5281 
   5282 	tests: check decoding of rtnetlink rule messages.
   5283 	* tests/netlink_route.c: Include <linux/fib_rules.h>.
   5284 	(test_rtnl_rule): New function.
   5285 	(main): Use it.
   5286 
   5287 	netlink: add a basic rtnetlink parser of rule messages.
   5288 	* defs.h (routing_table_ids): New xlat prototype.
   5289 	* rtnl_rule.c: New file.
   5290 	* Makefile.am (strace_SOURCES): Add it.
   5291 	* defs.h (ip_type_of_services, routing_table_ids): New xlat prototypes.
   5292 	* netlink_route.h (decode_fib_rule_hdr): New prototype.
   5293 	* configure.ac (AC_CHECK_HEADERS): Add linux/fib_rules.h.
   5294 	* netlink_route.c (route_decoders): Add RTM_DELRULE, RTM_GETRULE,
   5295 	and RTM_NEWRULE.
   5296 	* xlat/fib_rule_actions.in: New file.
   5297 	* xlat/fib_rule_flags.in: Likewise.
   5298 
   5299 	tests: check decoding of rtnetlink route messages.
   5300 	* tests/netlink_route.c: Include <linux/ip.h>.
   5301 	(test_rtnl_route): New function.
   5302 	(main): Use it.
   5303 
   5304 	netlink: add a basic rtnetlink parser of route messages.
   5305 	* defs.h (routing_scopes): New xlat prototype.
   5306 	* rtnl_route.c: New file.
   5307 	* Makefile.am (strace_SOURCES): Add it.
   5308 	* netlink_route.h (decode_rtmsg): New prototype.
   5309 	* netlink_route.c (route_decoders): Add RTM_DELROUTE, RTM_GETROUTE,
   5310 	and RTM_NEWROUTE.
   5311 	* xlat/ip_type_of_services.in: New file.
   5312 	* xlat/routing_flags.in: Likewise.
   5313 	* xlat/routing_protocols.in: Likewise.
   5314 	* xlat/routing_table_ids.in: Likewise.
   5315 	* xlat/routing_types.in: Likewise.
   5316 
   5317 	tests: check decoding of rtnetlink addr messages.
   5318 	* tests/netlink_route.c: Include <linux/if_addr.h>.
   5319 	(test_rtnl_addr): New function.
   5320 	(main): Use it.
   5321 
   5322 2017-08-13  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5323 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5324 
   5325 	netlink: add a basic rtnetlink parser of addr messages.
   5326 	* rtnl_addr.c: New file.
   5327 	* Makefile.am (strace_SOURCES): Add it.
   5328 	* configure.ac (AC_CHECK_HEADERS): Add linux/if_addr.h.
   5329 	* netlink_route.h (decode_ifaddrmsg): New prototype.
   5330 	* netlink_route.c (route_decoders): Add RTM_DELADDR,
   5331 	RTM_GETADDR, RTM_GETANYCAST, RTM_GETMULTICAST, and RTM_NEWADDR.
   5332 	* xlat/ifaddrflags.in: New file.
   5333 	* xlat/routing_scopes.in: Likewise.
   5334 
   5335 2017-08-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5336 
   5337 	Make description of discrepancies between libc and kernel APIs more relevant
   5338 	Looks like this part was untouched since the days strace supported OSes
   5339 	other than Linux. Well, it's time to make it more contemporary.
   5340 
   5341 	* strace.1.in (.SH NOTES): Use faccessat(2) and setrlimit(2)/prlimit(2)
   5342 	instead of time(2) and stat(2)/xstat(2) as examples of libc/kernel API
   5343 	discrepancies.
   5344 
   5345 2017-08-11  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5346 
   5347 	tests: check decoding of NLMSG_DONE messages of NETLINK_ROUTE.
   5348 	* tests/netlink_route.c (test_nlmsg_done): New function.
   5349 	(main): Use it.
   5350 
   5351 2017-08-11  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   5352 
   5353 	Add TF flag to inotify_add_watch syscall entries.
   5354 	The second argument of the inotify_add_watch syscall is a file name,
   5355 	but inotify_add_watch has no TF flag set.
   5356 
   5357 	* linux/32/syscallent.h (inotify_add_watch): Add TF flag.
   5358 	* linux/64/syscallent.h: Likewise.
   5359 	* linux/alpha/syscallent.h: Likewise.
   5360 	* linux/arm/syscallent.h: Likewise.
   5361 	* linux/avr32/syscallent.h: Likewise.
   5362 	* linux/bfin/syscallent.h: Likewise.
   5363 	* linux/crisv10/syscallent.h: Likewise.
   5364 	* linux/hppa/syscallent.h: Likewise.
   5365 	* linux/i386/syscallent.h: Likewise.
   5366 	* linux/ia64/syscallent.h: Likewise.
   5367 	* linux/m68k/syscallent.h: Likewise.
   5368 	* linux/microblaze/syscallent.h: Likewise.
   5369 	* linux/mips/syscallent-n32.h: Likewise.
   5370 	* linux/mips/syscallent-n64.h: Likewise.
   5371 	* linux/mips/syscallent-o32.h: Likewise.
   5372 	* linux/powerpc/syscallent.h: Likewise.
   5373 	* linux/powerpc64/syscallent.h: Likewise.
   5374 	* linux/s390/syscallent.h: Likewise.
   5375 	* linux/s390x/syscallent.h: Likewise.
   5376 	* linux/sh/syscallent.h: Likewise.
   5377 	* linux/sh64/syscallent.h: Likewise.
   5378 	* linux/sparc/syscallent.h: Likewise.
   5379 	* linux/sparc64/syscallent.h: Likewise.
   5380 	* linux/x32/syscallent.h: Likewise.
   5381 	* linux/x86_64/syscallent.h: Likewise.
   5382 	* linux/xtensa/syscallent.h: Likewise.
   5383 
   5384 2017-08-11  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   5385 
   5386 	pathtrace: fix matching of execveat syscall.
   5387 	* pathtrace.c (pathtrace_match_set): Add testing of SEN_execveat.
   5388 
   5389 2017-08-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5390 
   5391 	strace.1: add indentation to examples.
   5392 	* strace.1 (.de CW): Add .in +4n.
   5393 	(.de CE): Add .in.
   5394 
   5395 	Generate date for the man page.
   5396 	* Makefile.am (dist-hook): Add .strace.1.in.date generation.
   5397 	* strace.spec.in (%setup): Likewise.
   5398 	* configure.ac (manpage_date): New m4 define.
   5399 	(MANPAGE_DATE): New define/subst.
   5400 	* strace.1 (.TH): Add manpage date and strace's version.
   5401 
   5402 	Add script for generating date of the last commit for specific file.
   5403 	* file-date-gen: New auxiliary script.
   5404 
   5405 	Make strace.1 generated.
   5406 	* .gitignore (/strace.1): New entry.
   5407 	* configure.ac (AC_CONFIG_FILES): Add strace.1.
   5408 	* strace.1.in: Rename from strace.1.
   5409 
   5410 2017-08-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5411 
   5412 	strace.1: format synopsis using .SY/.OP macros.
   5413 	Also, add .OM and .OR macros and use { ... | ... } syntax for indicating
   5414 	possible options regarding mandatory arguments.
   5415 
   5416 	* strace.1 (.OM, .OR): New macro definitions, based on .OP
   5417 	(.SH SYNOPSYS): Format using .SY/.OP/.OM/.OR. Put -p/command inside
   5418 	{ ... | ... } block.
   5419 
   5420 2017-08-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5421 
   5422 	strace.1: remove date from .TH, as it is no longer relevant.
   5423 	* strace.1 (.TH): Remove date.
   5424 
   5425 2017-08-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5426 
   5427 	strace.1: remove .IX definition.
   5428 	It is present in groff macros nowadays.
   5429 
   5430 	* strace.1 (.de IX): Remove.
   5431 
   5432 2017-08-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5433 
   5434 	strace.1: replace .TP with .TQ between command-line option variants.
   5435 	In order to eliminate unneeded space between them.
   5436 
   5437 	* strace.1 (Filtering): Replace .TP with .TQ between different variants
   5438 	of the same option.
   5439 
   5440 2017-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   5441 
   5442 	rtnl_link: include "netlink.h" before <linux/rtnetlink.h>
   5443 	<sys/socket.h> has to be included before <linux/netlink.h> because
   5444 	the latter used to be incomplete in older kernel headers.
   5445 
   5446 	As a local wrapper file called netlink.h was introduced earlier
   5447 	to workaround this and related portability issues, include it before
   5448 	<linux/rtnetlink.h> that in turn includes <linux/netlink.h>.
   5449 
   5450 	This fixes build on systems with older kernel headers.
   5451 
   5452 	* rtnl_link.c: Include "netlink.h" before <linux/rtnetlink.h>.
   5453 
   5454 2017-08-09  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5455 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5456 
   5457 	tests: check decoding of rtnetlink link messages.
   5458 	* tests/netlink_route.c: Include <linux/if_arp.h>.
   5459 	(TEST_NL_ROUTE): New macro.
   5460 	(test_rtnl_link): New function.
   5461 	(main): Use it.
   5462 
   5463 	netlink: add a basic rtnetlink parser of link messages.
   5464 	* netlink_route.h: New file.
   5465 	* rtnl_link.c: Likewise.
   5466 	* Makefile.am (strace_SOURCES): Add them.
   5467 	* defs.h (arp_hardware_types, iffflags): New xlat prototypes.
   5468 	* netlink_route.c: Include "netlink_route.h"
   5469 	and <linux/rtnetlink.h>.
   5470 	(netlink_route_decoder_t): New typedef.
   5471 	(route_decoders): New array.
   5472 	(decode_netlink_route): Use it.
   5473 
   5474 2017-08-09  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5475 
   5476 	Move nl_route_types definition from netlink.c to netlink_route.c.
   5477 	The side effect of #include "xlat/nl_route_types.h" is
   5478 	RTM_* constants properly defined in that header file.
   5479 	While netlink.c does not use these constants itself,
   5480 	netlink_route.c is going to need them soon.
   5481 
   5482 	* defs.h (nl_route_types): New xlat prototype.
   5483 	* netlink.c: Move inclusion of "xlat/nl_route_types.h" ...
   5484 	* netlink_route.c: ... here.
   5485 
   5486 2017-08-09  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5487 	    Fabien Siron  <fabien.siron (a] epita.fr>
   5488 
   5489 	tests: check netlink family specific decoder of NETLINK_ROUTE.
   5490 	* tests/netlink_route.c: Include <stdint.h>,
   5491 	include "test_netlink.h" instead of "netlink.h".
   5492 	(test_rtnl_unspec): New function.
   5493 	(main): Use it.
   5494 
   5495 	netlink: introduce family specific decoder of NETLINK_ROUTE.
   5496 	* netlink_route.c: New file.
   5497 	* Makefile.am (strace_SOURCES): Add it.
   5498 	* defs.h (decode_netlink_route): New prototype.
   5499 	* netlink.c (netlink_decoders): Add NETLINK_ROUTE.
   5500 
   5501 2017-08-08  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5502 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   5503 
   5504 	tests: check decoding of NETLINK_KOBJECT_UEVENT messages.
   5505 	* tests/netlink_kobject_uevent.c: New file.
   5506 	* tests/gen_tests.in (netlink_kobject_uevent): New entry.
   5507 	* tests/pure_executables.list: Add netlink_kobject_uevent.
   5508 	* tests/.gitignore: Likewise.
   5509 
   5510 2017-08-08  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5511 
   5512 	netlink: add decoding of NETLINK_KOBJECT_UEVENT messages.
   5513 	* netlink.c (decode_netlink): Print NETLINK_KOBJECT_UEVENT messages
   5514 	as a string using printstrn.
   5515 
   5516 2017-08-08  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5517 
   5518 	netlink: call get_fd_nl_family before nlmsghdr decoding.
   5519 	Prepare for decoding of NETLINK_KOBJECT_UEVENT.  Messages of the latter,
   5520 	unlike traditional netlink families, don't contain a header at all.
   5521 
   5522 	* netlink.c (NL_FAMILY_*): Remove enum.
   5523 	(get_fd_nl_family): Replace NL_FAMILY_ERROR with -1.
   5524 	(decode_nlmsg_type): Update the comment.
   5525 	Skip family specific type decoders for type < NLMSG_MIN_TYPE.
   5526 	(decode_nlmsghdr_with_payload): Skip family specific decoders
   5527 	for type < NLMSG_MIN_TYPE && type != NLMSG_DONE.
   5528 	(print_nlmsghdr): Move get_fd_nl_family invocation ...
   5529 	(decode_nlmsghdr_with_payload): ... here.
   5530 
   5531 2017-08-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   5532 
   5533 	Make sysent_shorthand_defs.h suitable for tests.
   5534 	* sysent_shorthand_defs.h [STRACE_TESTS_H]: Add shorthand notations from
   5535 	tests/ksysent.c and tests/nsyscalls.c.
   5536 	* tests/ksysent.c: Remove shorthand notations.
   5537 	* tests/nsyscalls.c: Likewise.
   5538 
   5539 2017-08-07  Edgar Kaziakhmedov  <edgar.kaziakhmedov (a] virtuozzo.com>
   5540 
   5541 	Move sysent shorthand notations to separate files.
   5542 	Avoid proliferation of exactly the same definitions of shorthand
   5543 	notations for macros defined in sysent.h by moving definitions
   5544 	and undefs of these shorthand notations to separate files.
   5545 
   5546 	* sysent_shorthand_defs.h: New file.
   5547 	* sysent_shorthand_undefs.h: Likewise.
   5548 	* Makefile.am (strace_SOURCES): Add them.
   5549 	* syscall.c: Use them.
   5550 
   5551 2017-08-07  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5552 
   5553 	netlink.c: fix indentation.
   5554 	* netlink.c (print_cookie): Fix indentation.
   5555 
   5556 2017-08-07  Edgar Kaziakhmedov  <edgar.kaziakhmedov (a] virtuozzo.com>
   5557 
   5558 	Move err/mem subroutines to separate files.
   5559 	In order to allow usage of utility functions by other binaries
   5560 	included in the strace package (like the upcoming asinfo utility),
   5561 	these functions should be moved to separate files.
   5562 
   5563 	* error_prints.h: New file.
   5564 	* xmalloc.h: Likewise.
   5565 	* defs.h: Include "xmalloc.h" and "error_prints.h".
   5566 	(error_msg, error_msg_and_die, error_msg_and_help, perror_msg,
   5567 	perror_msg_and_die): Move to error_prints.h.
   5568 	(xcalloc, xmalloc, xreallocarray, xstrdup, xstrndup): Move to xmalloc.h.
   5569 	* strace.c (die): Remove static quialifier to make visible
   5570 	by error_prints.c.
   5571 	(error_msg, error_msg_and_die, error_msg_and_help, perror_msg,
   5572 	perror_msg_and_die, verror_msg): Move ...
   5573 	* error_prints.c: ... to the new file.
   5574 	* xmalloc.c: Include "config.h", <stdlib.h>, <string.h>,
   5575 	"error_prints.h", and "xmalloc.h" instead of "defs.h".
   5576 	Use int instead of bool.  Fix codestyle.
   5577 	* Makefile.am (strace_SOURCES): Add error_prints.c, error_prints.h,
   5578 	and xmalloc.h.
   5579 
   5580 2017-08-07  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   5581 
   5582 	tests: move check_* functions from options-syntax.test to separate file.
   5583 	* tests/options-syntax.test: Move check_* functions to ...
   5584 	* tests/syntax.sh: ... new file.
   5585 	* tests/Makefile.am (EXTRA_DIST): Add syntax.sh.
   5586 
   5587 2017-08-07  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   5588 
   5589 	Split qualify.c into basic_filters.c and filter_qualify.c.
   5590 	This change also exports add_number_to_set, qualify_tokens,
   5591 	and qualify_syscall_tokens.
   5592 
   5593 	* basic_filters.c: New file, part of qualify.c.
   5594 	* filter_qualify.c: Likewise.
   5595 	* filter.h: New file.
   5596 	* qualify.c: Remove.
   5597 	* Makefile.am (strace_SOURCES): Add new files, remove qualify.c.
   5598 
   5599 2017-08-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   5600 
   5601 	Simplify handling of unexpected tracees.
   5602 	* strace.c (maybe_allocate_tcb) <WIFSTOPPED(status) && !followfork>:
   5603 	Remove the dance around possible re-injection of WSTOPSIG(status)
   5604 	as the only observable stop here is the initial ptrace-stop.
   5605 
   5606 	Fix handling of unexpected tracees when PTRACE_SEIZE is not in use.
   5607 	* strace.c (maybe_allocate_tcb) <WIFSTOPPED(status) && !followfork>:
   5608 	The expected ptrace stop signal in case of !use seize is not
   5609 	syscall_trap_sig but SIGSTOP.  An idea of using PTRACE_GETSIGINFO to
   5610 	distinguish signal stops that should be re-injected from other kinds
   5611 	of stops didn't work out due to kernel implementation peculiarities
   5612 	of initial ptrace-stop.
   5613 
   5614 	pathtrace: fix matching of symlinkat syscall.
   5615 	* pathtrace.c (pathtrace_match_set) <SEN_symlinkat>: The first argument
   5616 	of symlinkat syscall is not a path but an arbitrary string, ignore it.
   5617 
   5618 2017-08-06  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   5619 
   5620 	pathtrace: fix missing syscalls.
   5621 	* pathtrace.c (pathtrace_match_set): Fix symlink decoding,
   5622 	disable pathtracing for inotify_init.
   5623 
   5624 2017-08-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   5625 
   5626 	Enhance fflush error diagnostics.
   5627 	* strace.c (flush_tcp_output): New function.
   5628 	(line_ended, droptcb, print_event_exit): Use it to flush tcp->outf.
   5629 	* tests/fflush.c: New file.
   5630 	* tests/fflush.test: New test.
   5631 	* tests/Makefile.am (MISC_TESTS): Add it.
   5632 	* tests/.gitignore: Add fflush.
   5633 	* tests/pure_executables.list: Likewise.
   5634 
   5635 	tests: check handling of CLONE_PARENT'ed and CLONE_PTRACE'ed processes.
   5636 	* tests/clone_parent.c: New file.
   5637 	* tests/clone_ptrace.c: Likewise.
   5638 	* tests/clone_parent.test: New test.
   5639 	* tests/clone_ptrace.test: Likewise.
   5640 	* tests/.gitignore: Add clone_parent and clone_ptrace.
   5641 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   5642 	(MISC_TESTS): Add clone_parent.test and clone_ptrace.test.
   5643 
   5644 	tests: export a path to the trace executable to check_PROGRAMS.
   5645 	* tests/init.sh (STRACE_EXE): Initialize from $STRACE and export.
   5646 
   5647 2017-08-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5648 
   5649 	Makefile.am: build top directory first.
   5650 	This solves potential issues when tests run first and strace is rebuilt
   5651 	only after they have finished.  As noted in [1], providing the current
   5652 	directory explicitly should help.
   5653 
   5654 	[1] https://www.gnu.org/software/automake/manual/html_node/Subdirectories.html
   5655 
   5656 	* Makefile.am (SUBDIRS): Prepend the current directory.
   5657 
   5658 2017-08-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5659 
   5660 	Improve handling of unexpected tracees.
   5661 	When receiving a ptrace stop of an unexpected child, handle it
   5662 	in the most transparent way possible:
   5663 	- detach it instead of PTRACE_CONT'ing;
   5664 	- send it the signal with which it has been stopped.
   5665 	This should hopefully help to deal with processes that have been created
   5666 	with misused CLONE_PTRACE flag set.
   5667 
   5668 	* strace.c (maybe_allocate_tcb) <WIFSTOPPED(status) && !followfork>:
   5669 	Calculate the signal similarly to the way next_event does,
   5670 	forward it to the unexpected tracee, and detach the tracee.
   5671 
   5672 2017-08-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   5673 
   5674 	tests: fix unaligned access in nlattr.test.
   5675 	* tests/nlattr.c (test_nlattr): Use SET_STRUCT
   5676 	to initialize potentially unaligned struct nlattr.
   5677 
   5678 	tests: fix unaligned access in nlattr_packet_diag_msg.test.
   5679 	* tests/nlattr_packet_diag_msg.c (init_packet_diag_msg): Use SET_STRUCT
   5680 	to initialize potentially unaligned struct packet_diag_msg.
   5681 
   5682 2017-08-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   5683 
   5684 	sparc64: do not bail out in get_scno if PTRACE_PEEKTEXT fails.
   5685 	If the kernel contains commit 84d77d3f06e7e8dea057d10e8ec77ad71f721be3,
   5686 	PTRACE_PEEKTEXT becames unavailable when the process dumpable flag is
   5687 	cleared.  As this is not a fatal condition for get_scno, do not bail out
   5688 	if PTRACE_PEEKTEXT fails.
   5689 
   5690 	This condition is triggered and therefore tested by prctl-dumpable test.
   5691 
   5692 	* linux/sparc64/get_scno.c (arch_get_scno): Do not bail out
   5693 	if PTRACE_PEEKTEXT fails.
   5694 
   5695 2017-08-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   5696 
   5697 	tests: enhance test coverage of printstrn and umoven.
   5698 	* tests/printstrn-umoven.c: New file.
   5699 	* tests/printstrn-umoven-peekdata.c: Likewise.
   5700 	* tests/printstrn-umoven-undumpable.c: Likewise.
   5701 	* tests/printstrn-umoven-legacy.test: New test.
   5702 	* tests/Makefile.am (MISC_TESTS): Add printstrn-umoven-legacy.test.
   5703 	* tests/gen_tests.in (printstrn-umoven, printstrn-umoven-peekdata,
   5704 	printstrn-umoven-undumpable): New entries.
   5705 	* tests/pure_executables.list: Add printstrn-umoven,
   5706 	printstrn-umoven-peekdata, and printstrn-umoven-undumpable.
   5707 	* tests/.gitignore: Likewise.
   5708 
   5709 	tests: add test_printstrn function to libtests.
   5710 	* tests/test_ucopy.h (test_printstrn): New prototype.
   5711 	* tests/test_printstrn.c: New file.
   5712 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   5713 
   5714 2017-08-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   5715 
   5716 	tests: enhance test coverage of printpath and umovestr.
   5717 	* tests/init.sh (TIMEOUT_DURATION): Raise from 300 to 600.
   5718 	* tests/printpath-umovestr.c: New file.
   5719 	* tests/printpath-umovestr-peekdata.c: Likewise.
   5720 	* tests/printpath-umovestr-undumpable.c: Likewise.
   5721 	* tests/printpath-umovestr-legacy.test: New test.
   5722 	* tests/Makefile.am (MISC_TESTS): Add printpath-umovestr-legacy.test.
   5723 	* tests/gen_tests.in (printpath-umovestr, printpath-umovestr-peekdata,
   5724 	printpath-umovestr-undumpable): New entries.
   5725 	* tests/pure_executables.list: Add printpath-umovestr,
   5726 	printpath-umovestr-peekdata, and printpath-umovestr-undumpable.
   5727 	* tests/.gitignore: Likewise.
   5728 
   5729 	tests: add test_printpath function to libtests.
   5730 	* tests/test_ucopy.h (test_printpath): New prototype.
   5731 	* tests/test_printpath.c: New file.
   5732 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   5733 
   5734 	tests: add test_process_vm_readv and test_ptrace_peekdata to libtests.
   5735 	* tests/test_ucopy.c: New file.
   5736 	* tests/test_ucopy.h: Likewise.
   5737 	* tests/Makefile.am (libtests_a_SOURCES): Add them.
   5738 
   5739 2017-08-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   5740 
   5741 	printpath: do not fetch more than PATH_MAX bytes from tracee's memory.
   5742 	The kernel does not copy more than PATH_MAX bytes from userspace
   5743 	pathnames, treating non-NUL-terminated pathnames as ENAMETOOLONG.
   5744 
   5745 	* util.c (printpathn): Decrease buffer size to PATH_MAX.
   5746 	(printpath): Specify PATH_MAX - 1 as the maximum pathname length
   5747 	to match the kernel behaviour.  The underlying umovestr call will fetch
   5748 	up to PATH_MAX bytes from tracee's memory, but no more than first
   5749 	PATH_MAX - 1 bytes will be printed.
   5750 
   5751 2017-07-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   5752 
   5753 	ucopy: cleanup umoven_peekdata and umovestr_peekdata.
   5754 	* ucopy.c (umoven_peekdata, umovestr_peekdata): Merge aligned
   5755 	and unaligned tracee address cases.
   5756 
   5757 2017-07-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   5758 
   5759 	ucopy: move legacy fallbacks of umoven and umovestr to separate functions
   5760 	Move legacy PTRACE_PEEKDATA-based support to separate functions.
   5761 
   5762 	* ucopy.c (umoven_peekdata, umovestr_peekdata): New functions.
   5763 	(umoven, umovestr): Use them.
   5764 
   5765 2017-07-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   5766 
   5767 	ucopy: move process_vm_readv ENOSYS check to vm_read_mem.
   5768 	* ucopy.c (vm_read_mem): Set process_vm_readv_not_supported in case
   5769 	of ENOSYS.
   5770 	* ucopy.c (umoven, umovestr): Do not set process_vm_readv_not_supported.
   5771 
   5772 2017-07-31  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5773 
   5774 	Print enabled optional features in strace version output.
   5775 	In order to provide information to user what optionally built features
   5776 	are available.
   5777 
   5778 	* strace.c (print_version): New variable "features".  Print features string
   5779 	after non-liability disclaimer (or "(none)" in case it is empty).
   5780 	(print_version) [USE_LIBUNWIND]: Concatenate "stack-unwind" into features
   5781 	string.
   5782 	* tests/strace-V.tests (getoption): New function.
   5783 	Update check in accordance with updated output.
   5784 
   5785 2017-07-31  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5786 
   5787 	tests/strace-V.test: rename getval to getstr.
   5788 	As this name is more suitable.
   5789 
   5790 	* tests/strace-V (getval): Rename to getstr, update all call sites.
   5791 
   5792 2017-07-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   5793 
   5794 	ucopy: refactor the check for invalid tracee addresses.
   5795 	* ucopy.c (tracee_addr_is_invalid): New function.
   5796 	* ucopy.c (umoven, umovestr): Use it.
   5797 
   5798 	ucopy: enhance vm_read_mem error diagnostics.
   5799 	* ucopy.c (umoven, umovestr): Enhance vm_read_mem error diagnostics
   5800 	to match PTRACE_PEEKDATA case.
   5801 
   5802 2017-07-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   5803 
   5804 	ucopy: skip redundant tracee address truncation check.
   5805 	* ucopy.c (vm_read_mem): Skip raddr != truncated_raddr check
   5806 	if these variables have the same data size.
   5807 
   5808 2017-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   5809 
   5810 	util: move umoven and umovestr to a separate file.
   5811 	These functions are more kernel-specific compared to all other functions
   5812 	defined in util.c.
   5813 
   5814 	* ucopy.c: New file.
   5815 	* Makefile.am (strace_SOURCES): Add it.
   5816 	* util.c (umoven, umovestr): Move to ucopy.c.
   5817 
   5818 2017-07-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   5819 
   5820 	bpf: enhance decoding of BPF_MAP_LOOKUP_ELEM and BPF_MAP_GET_NEXT_KEY.
   5821 	Print union bpf_attr.value field of BPF_MAP_LOOKUP_ELEM command
   5822 	and union bpf_attr.next_key field of BPF_MAP_GET_NEXT_KEY command
   5823 	on entering syscall.  These fields are addresses specified to the
   5824 	kernel from userspace.  The amount of data written by the kernel
   5825 	to these addresses is specified at the map creation time
   5826 	by BPF_MAP_CREATE command and is not available at this point.
   5827 
   5828 	* bpf.c (decode_BPF_MAP_LOOKUP_ELEM): Print union bpf_attr.value
   5829 	on entering syscall.
   5830 	(decode_BPF_MAP_GET_NEXT_KEY): Print union bpf_attr.next_key
   5831 	on entering syscall.
   5832 	(bpf_map_io): Remove.
   5833 	* tests/bpf.c (print_BPF_MAP_DELETE_ELEM_first,
   5834 	print_BPF_MAP_DELETE_ELEM_attr, print_BPF_MAP_GET_NEXT_KEY_first,
   5835 	print_BPF_MAP_GET_NEXT_KEY_attr): Replace macro redirects with
   5836 	new functions.
   5837 	(print_BPF_MAP_LOOKUP_ELEM_first, print_BPF_MAP_LOOKUP_ELEM_attr,
   5838 
   5839 2017-07-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   5840 
   5841 	bpf: update BPF_MAP_CREATE decoding.
   5842 	Implement decoding of map_flags and inner_map_fd fields of union bpf_attr
   5843 	for BPF_MAP_CREATE command introduced by linux kernel commits
   5844 	v4.6-rc1~91^2~108^2~6 and v4.12-rc1~64^3~373^2~2, respectively.
   5845 
   5846 	* configure.ac: Check for inner_map_fd member of union bpf_attr
   5847 	instead of max_entries.
   5848 	* xlat/bpf_map_flags.in: New file.
   5849 	* bpf.c: Include "xlat/bpf_map_flags.h".
   5850 	(decode_BPF_MAP_CREATE): Add map_flags and inner_map_fd fields
   5851 	to the structure, print them.
   5852 	* tests/bpf.c: Update macro guards of BPF_MAP_CREATE decoder test.
   5853 	(init_BPF_MAP_CREATE_first, print_BPF_MAP_CREATE_attr): Update expected
   5854 	output.
   5855 	(init_BPF_MAP_CREATE_attr): Initialize map_flags and inner_map_fd
   5856 	fields, update offset.
   5857 
   5858 2017-07-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   5859 
   5860 	bpf: update BPF_PROG_LOAD decoding.
   5861 	Implement decoding of union bpf_attr.prog_flags field for BPF_PROG_LOAD
   5862 	command introduced by linux kernel commit v4.12-rc2~34^2~29^2~2.
   5863 
   5864 	* configure.ac: Check for prog_flags member of union bpf_attr
   5865 	instead of kern_version.
   5866 	* xlat/bpf_prog_flags.in: New file.
   5867 	* bpf.c: Include "xlat/bpf_prog_flags.h".
   5868 	(decode_BPF_PROG_LOAD): Add prog_flags field to the structure, print it.
   5869 	* tests/bpf.c: Update macro guards of BPF_PROG_LOAD decoder test.
   5870 	(init_BPF_PROG_LOAD_first, print_BPF_PROG_LOAD_attr): Update expected
   5871 	output.
   5872 	(init_BPF_PROG_LOAD_attr): Initialize prog_flags field, update offset.
   5873 
   5874 2017-07-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   5875 
   5876 	tests: enhance test coverage of bpf syscall parser.
   5877 	* configure.ac: Update union bpf_attr member checks.
   5878 	* tests/bpf.c: Rewrite.
   5879 	* tests/bpf-v.c: New file.
   5880 	* tests/gen_tests.in (bpf-v): New entry.
   5881 	* tests/pure_executables.list: Add bpf-v.
   5882 	* tests/.gitignore: Likewise.
   5883 
   5884 	m4: macroize union bpf_attr field checks.
   5885 	* m4/st_bpf.m4: New file.
   5886 	* configure.ac: Use st_CHECK_UNION_BPF_ATTR.
   5887 
   5888 	Move offsetofend from defs.h to macros.h.
   5889 	* defs.h (offsetofend): Move ...
   5890 	* macros.h: ... here.
   5891 
   5892 2017-07-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   5893 
   5894 	bpf: print unused fields of union bpf_attr if one of them is non-zero.
   5895 	When the size argument specifies more data than necessary for the given
   5896 	command, kernel checks that all unused fields of union bpf_attr are
   5897 	zero.  Print this extra data when it contains non-zero bytes to enhance
   5898 	debugging experience.
   5899 
   5900 	* bpf.c (decode_attr_extra_data): New function.
   5901 	(decode_BPF_MAP_CREATE, decode_BPF_MAP_UPDATE_ELEM,
   5902 	decode_BPF_MAP_DELETE_ELEM, bpf_map_io, decode_BPF_PROG_LOAD,
   5903 	decode_BPF_OBJ_PIN, decode_BPF_OBJ_GET, decode_BPF_PROG_ATTACH,
   5904 	decode_BPF_PROG_DETACH): Use it to print extra data passed
   5905 	via bpf_attr pointer.
   5906 	(bpf_obj_manage, bpf_prog_attach_detach): Remove.
   5907 	* tests/bpf.c (map_delete_elem): New function.
   5908 	(main): Use it.
   5909 
   5910 2017-07-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   5911 
   5912 	bpf: change handling of big and unaccessible data to match the kernel.
   5913 	When the size argument exceeds PAGE_SIZE, the kernel fails with E2BIG
   5914 	without parsing union bpf_attr.
   5915 	When the whole chunk of memory specified by addr and size arguments is
   5916 	not readable, the kernel fails with EFAULT.
   5917 
   5918 	* bpf.c (DECL_BPF_CMD_DECODER) <bpf_cmd_decoder>: Add const qualifier
   5919 	to size argument, add data argument.
   5920 	(decode_BPF_MAP_CREATE, decode_BPF_MAP_UPDATE_ELEM,
   5921 	decode_BPF_MAP_DELETE_ELEM, bpf_map_io, decode_BPF_PROG_LOAD,
   5922 	bpf_obj_manage, bpf_prog_attach_detach): Move size argument check and
   5923 	memory fetching ...
   5924 	(SYS_FUNC(bpf)) ... here, add PAGE_SIZE check, pass fetched memory
   5925 	to command-specific parsers.
   5926 
   5927 2017-07-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   5928 
   5929 	bpf: replace big switch statement with a dispatch table.
   5930 	* bpf.c (DECL_BPF_CMD_DECODER, DEF_BPF_CMD_DECODER, BPF_CMD_ENTRY):
   5931 	New macros.
   5932 	(bpf_cmd_decoder_t): New typedef.
   5933 	Rename static parser functions using DEF_BPF_CMD_DECODER.
   5934 	(decode_BPF_MAP_LOOKUP_ELEM, decode_BPF_MAP_GET_NEXT_KEY): New proxy
   5935 	functions.
   5936 	(SYS_FUNC(bpf)): Replace big switch statement with a dispatch table.
   5937 
   5938 	bpf: use PRINT_FIELD_* macros.
   5939 	* print_fields.h (PRINT_FIELD_STR, PRINT_FIELD_PATH): New macros.
   5940 	* bpf.c: Include "print_fields.h".
   5941 	(bpf_map_create): Use PRINT_FIELD_U and PRINT_FIELD_XVAL.
   5942 	(bpf_map_update_elem): Use PRINT_FIELD_FD, PRINT_FIELD_X, and
   5943 	PRINT_FIELD_XVAL.
   5944 	(bpf_map_delete_elem, bpf_map_io): Use PRINT_FIELD_FD and PRINT_FIELD_X.
   5945 	(bpf_prog_load): Use PRINT_FIELD_STR, PRINT_FIELD_U, PRINT_FIELD_X,
   5946 	and PRINT_FIELD_XVAL.
   5947 	(bpf_obj_manage): Use PRINT_FIELD_FD and PRINT_FIELD_PATH.
   5948 	(bpf_prog_attach_detach): Use PRINT_FIELD_FD, PRINT_FIELD_FLAGS,
   5949 	and PRINT_FIELD_XVAL.
   5950 
   5951 2017-07-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   5952 
   5953 	Add terminating comment after each DECL_* macro definition.
   5954 	In an attempt to improve readability.
   5955 
   5956 	* defs.h (DECL_IOCTL, DECL_NETLINK, DECL_PRINTNUM, DECL_PRINTNUM_ADDR,
   5957 	ATTRIBUTE_FORMAT): Add comment that marks end of macro definition.
   5958 	* netlink_sock_diag (DECL_NETLINK_DIAG_DECODER): Likewise.
   5959 	* nlattr.h (DECL_NLA): Likewise.
   5960 
   5961 2017-07-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   5962 
   5963 	Introduce print_quoted_cstring.
   5964 	In many places where kernel expects a NUL-terminated string of length
   5965 	up to a known fixed limit, e.g. when a NUL-terminated string is
   5966 	a fixed-size field of a structure, strace does not print the last byte
   5967 	assuming it is NUL, which is not always the case.
   5968 
   5969 	Change output format for such strings to distinguish NUL-terminated
   5970 	strings from non-NUL-terminated ones: append ellipsis to the output
   5971 	when the string is not NUL-terminated.
   5972 
   5973 	* defs.h (print_quoted_cstring): New prototype.
   5974 	* util.c (print_quoted_cstring): New function.
   5975 	(printpathn): Use it instead of print_quoted_string with
   5976 	QUOTE_0_TERMINATED argument.
   5977 	* print_fields.h (PRINT_FIELD_CSTRING): Likewise.
   5978 	* btrfs.c (btrfs_ioctl): Likewise.
   5979 	* dirent.c (SYS_FUNC(getdents)): Likewise.
   5980 	* dirent64.c (SYS_FUNC(getdents64)): Likewise.
   5981 	* print_ifindex.c (print_ifindex): Likewise.
   5982 	* sysmips.c (SYS_FUNC(sysmips)): Likewise.
   5983 	* ubi.c (ubi_ioctl): Likewise.
   5984 	* tests/tests.h (print_quoted_cstring): New prototype.
   5985 	* tests/print_quoted_string.c (print_quoted_cstring): New function.
   5986 	* tests/ioctl_block.c (main): Update expected output.
   5987 	* tests/ioctl_dm.c (main): Likewise.
   5988 	* tests/ioctl_loop.c (print_loop_info, print_loop_info64): Likewise.
   5989 	* tests/netlink_crypto.c (test_crypto_msg_newalg): Likewise.
   5990 
   5991 2017-07-24  JingPiao Chen  <chenjingpiao (a] gmail.com>
   5992 
   5993 	tests: check decoding of NETLINK_CRYPTO crypto_user_alg attributes.
   5994 	* tests/nlattr_crypto_user_alg.c: New file.
   5995 	* tests/gen_tests.in (nlattr_crypto_user_alg): New entry.
   5996 	* tests/pure_executables.list: Add nlattr_crypto_user_alg.
   5997 	* tests/.gitignore: Likewise.
   5998 
   5999 	tests: extend TEST_NLATTR_OBJECT macro.
   6000 	* tests/test_nlattr.h (TEST_NLATTR_OBJECT_EX_,
   6001 	TEST_NLATTR_OBJECT_EX): New macros.
   6002 	(TEST_NLATTR_OBJECT): Use TEST_NLATTR_OBJECT_EX_.
   6003 
   6004 	netlink: decode NETLINK_CRYPTO crypto_user_alg netlink attributes.
   6005 	* configure.ac (AC_CHECK_TYPES): Check for crypto_report_aead,
   6006 	crypto_report_blkcipher, crypto_report_cipher, crypto_report_hash,
   6007 	and crypto_report_rng structures in <linux/cryptouser.h>.
   6008 	* netlink_crypto.c (decode_crypto_report_generic,
   6009 	decode_crypto_report_hash, decode_crypto_report_blkcipher,
   6010 	decode_crypto_report_aead, decode_crypto_report_rng,
   6011 	decode_crypto_report_cipher): New functions.
   6012 	(crypto_user_alg_nla_decoders): New array.
   6013 	(decode_crypto_user_alg): Use it.
   6014 	* xlat/crypto_nl_attrs.in: New file.
   6015 	* NEWS: Mention this.
   6016 
   6017 	tests: check decoding of NETLINK_CRYPTO messages.
   6018 	* tests/netlink_crypto.c: Include "test_netlink.h"
   6019 	instead of "netlink.h".
   6020 	(test_crypto_msg_newalg, test_crypto_msg_unspec): New functions.
   6021 	(main): Use them.
   6022 
   6023 2017-07-24  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6024 
   6025 	tests: extend TEST_NETLINK_OBJECT macro.
   6026 	As the first field of NETLINK_CRYPTO messages is a string, print
   6027 	unrecognized data as a string.  Extend TEST_NETLINK_OBJECT macro
   6028 	to test this case.
   6029 
   6030 	* tests/test_netlink.h (TEST_NETLINK_OBJECT_EX_,
   6031 	TEST_NETLINK_OBJECT_EX): New macros.
   6032 	(TEST_NETLINK_OBJECT): Use TEST_NETLINK_OBJECT_EX_.
   6033 
   6034 2017-07-24  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6035 
   6036 	netlink: add a basic parser of NETLINK_CRYPTO messages.
   6037 	* netlink_crypto.c: New file.
   6038 	* Makefile.am (strace_SOURCES): Add it.
   6039 	* defs.h (decode_netlink_crypto): New prototype.
   6040 	* netlink.c (netlink_decoders): Add NETLINK_CRYPTO.
   6041 	* NEWS: Mention this.
   6042 
   6043 2017-07-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   6044 
   6045 	Unify PRINT_FIELD_XVAL and PRINT_FIELD_XVAL64.
   6046 	* print_fields.h (PRINT_FIELD_XVAL64): Unify with PRINT_FIELD_XVAL.
   6047 
   6048 	Unify PRINT_FIELD_FLAGS and PRINT_FIELD_FLAGS64.
   6049 	* print_fields.h (PRINT_FIELD_FLAGS64): Unify with PRINT_FIELD_FLAGS.
   6050 	* userfaultfd.c (uffdio_ioctl): Replace PRINT_FIELD_FLAGS64 with
   6051 	PRINT_FIELD_FLAGS.
   6052 
   6053 2017-07-23  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   6054 
   6055 	pathtrace: fix fanotify_mark path tracing on 32-bit architectures.
   6056 	The fanotify_mark syscall takes a 64-bit mask, and on 32-bit
   6057 	architectures it is split up into two syscall arguments.
   6058 
   6059 	* pathtrace.c (pathtrace_match_set): Use getllval to properly decode
   6060 	arguments after mask.
   6061 
   6062 2017-07-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   6063 
   6064 	travis: add valgrind check support.
   6065 	* travis-build.sh [CHECK == valgrind]: Pass --enable-valgrind
   6066 	to configure and appropriate check-valgrind-* to make.
   6067 	* travis-install.sh [CHECK == valgrind]: Install valgrind.
   6068 
   6069 2017-07-22  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6070 
   6071 	netlink_sock_diag: replace NLA_ALIGN with NLMSG_ALIGN.
   6072 	In several netlink_sock_diag parsers NLA_ALIGN was used instead of
   6073 	NLMSG_ALIGN to align the length of netlink messages.  Fortunately,
   6074 	both macros round the given length to the closest multiple of 4,
   6075 	so technically there is no difference, but the use of wrong macro
   6076 	is misleading.
   6077 
   6078 	* netlink_inet_diag.c (decode_inet_diag_req_compat,
   6079 	decode_inet_diag_req_v2, decode_inet_diag_msg): Replace
   6080 	NLA_ALIGN with NLMSG_ALIGN.
   6081 	* netlink_netlink_diag.c (decode_netlink_diag_msg): Likewise.
   6082 	* netlink_packet_diag.c (decode_packet_diag_msg): Likewise.
   6083 	* netlink_smc_diag.c (decode_smc_diag_msg): Likewise.
   6084 
   6085 2017-07-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   6086 
   6087 	travis: configure build with dependency tracking disabled.
   6088 	Dependency tracking is completely useless for one-time builds,
   6089 	so configure build with dependency tracking disabled.
   6090 
   6091 	* travis-build.sh (DISTCHECK_CONFIGURE_FLAGS): Add
   6092 	--disable-dependency-tracking.
   6093 
   6094 2017-07-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   6095 
   6096 	m4: remove equal sign from define directive in ax_valgrind_check.m4.
   6097 	Support for providing equal sign in define directives has been added
   6098 	only in GNU Make 3.82 [1] and it provides the same semantics (variables
   6099 	should be recursively expanded) as when it is omitted at all, so let's
   6100 	remove it in order to preserve compatibility with older GNU Make
   6101 	versions (like the one used on Travis).
   6102 
   6103 	[1] https://git.savannah.gnu.org/cgit/make.git/tree/ChangeLog?h=3.82#n766
   6104 
   6105 	* m4/ax_valgrind_check.m4 <define valgrind_tool_rule>: Remove equal
   6106 	sign.
   6107 
   6108 2017-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   6109 
   6110 	keyctl: add support for KEYCTL_RESTRICT_KEYRING operation.
   6111 	* keyctl.c (keyctl_restrict_keyring): New function.
   6112 	(SYS_FUNC(keyctl)): Use it to implement KEYCTL_RESTRICT_KEYRING support.
   6113 	* NEWS: Mention this.
   6114 	* tests/keyctl.c (main): Check KEYCTL_RESTRICT_KEYRING decoding.
   6115 
   6116 2017-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   6117 
   6118 	tests: robustify strace-t.test.
   6119 	If strace -t is running too long, it might happen that time stamps
   6120 	before and after its invocation differ for more than a second.
   6121 	Adjust expected output to handle this rare but possible case.
   6122 
   6123 	* tests/strace-t.test: Allow any time stamp between start and finish
   6124 	of strace invocation.
   6125 
   6126 2017-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   6127 
   6128 	x86: wire up arch_prctl syscall.
   6129 	* linux/i386/syscallent.h [384]: Add arch_prctl entry.
   6130 	* xlat/archvals.in: Add fallback definitions for constants.
   6131 	* prctl.c: Stop including <asm/prctl.h>.
   6132 	(SYS_FUNC(arch_prctl)): Enable for [I386].
   6133 	* NEWS: Mention this.
   6134 
   6135 2017-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   6136 
   6137 	tests: tweak strace-ff.test for slow startup case.
   6138 	strace starts up much slower when invoked under valgrind control.
   6139 	Increase the tracee's sleep delay to let strace more time to attach.
   6140 
   6141 	* tests/strace-ff.test: Increase sleep delay.
   6142 
   6143 2017-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   6144 
   6145 	tests: update valgrind suppressions.
   6146 	* tests/strace.supp: Add a suppression for the memleak before
   6147 	error_msg_and_die in qualify_tokens.
   6148 
   6149 2017-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   6150 
   6151 	Do not copy optarg unnecessarily.
   6152 	There is no need to copy the optarg string since it is a pointer
   6153 	into the original argv array, not into a static area
   6154 	that might be overwritten.
   6155 
   6156 	* strace.c (username, outfname): Add const qualifier.
   6157 	(init): Do not xstrdup optarg to initialize outfname and username.
   6158 
   6159 2017-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   6160 
   6161 	travis: add build environment information to the travis log.
   6162 	* travis-build.sh: Print build environment information.
   6163 
   6164 2017-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   6165 
   6166 	build: add check-valgrind-* to recursive targets.
   6167 	As make -j$N check-valgrind cannot parallelize properly, add
   6168 	recursive targets for each of valgrind checks.  This way one can run
   6169 		for t in $valgrind_enabled_tools; do
   6170 			make -k check-valgrind-$n || rc=$?
   6171 		done
   6172 	in $top_builddir.
   6173 
   6174 	* configure.ac (AM_EXTRA_RECURSIVE_TARGETS): Remove.
   6175 	* m4/ax_valgrind_check.m4 (AX_VALGRIND_CHECK): Add check-valgrind
   6176 	and check-valgrind-* to AM_EXTRA_RECURSIVE_TARGETS.
   6177 
   6178 2017-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   6179 
   6180 	tests: add check-valgrind-local make rule.
   6181 	This guarantees that $(check_LIBRARIES) and $(check_PROGRAMS)
   6182 	are made on 'make check-valgrind' before its recipe is processed.
   6183 
   6184 	* tests/Makefile.am (check-valgrind-local): New rule.
   6185 	(.PHONY): Add it.
   6186 
   6187 2017-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   6188 
   6189 	Add ksysent.h and scno.h to BUILT_SOURCES.
   6190 	This guarantees that ksysent.h and scno.h, along with other targets
   6191 	listed in BUILT_SOURCES, are made on 'make all', 'make check',
   6192 	and 'make check-valgrind' before other targets are processed.
   6193 
   6194 	* scno.am (BUILT_SOURCES): Add scno.h.
   6195 	* tests/Makefile.am (BUILT_SOURCES): Add ksysent.h.
   6196 
   6197 2017-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   6198 
   6199 	tests: fix valgrind suppression file path.
   6200 	* tests/Makefile.am (VALGRIND_SUPPRESSIONS_FILES): Replace srcdir
   6201 	with abs_srcdir.
   6202 
   6203 	Fixes: v4.16-74-g16036030 ("tests: run every test except ksysent.test in its own subdirectory")
   6204 
   6205 2017-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   6206 
   6207 	Update AX_VALGRIND_CHECK.
   6208 	* m4/ax_valgrind_check.m4: Update to serial 15.  In particular,
   6209 	this version does not eat check-valgrind errors.
   6210 
   6211 	Update AX_CODE_COVERAGE.
   6212 	* m4/ax_code_coverage.m4: Update to serial 24.  In particular,
   6213 	this version has no lcov version check.
   6214 	* Makefile.am (strace_LDADD): Rename CODE_COVERAGE_LDFLAGS
   6215 	to CODE_COVERAGE_LIBS.
   6216 
   6217 	Update input event KEY_* constants.
   6218 	* xlat/evdev_keycode.in: Add KEY_ASSISTANT introduced by linux kernel
   6219 	commit v4.13-rc1~13^2~1^2~1.
   6220 	* NEWS: Mention this.
   6221 
   6222 	Update fs *_MAGIC constants.
   6223 	* xlat/fsmagic.in: Add AAFS_MAGIC introduced by linux kernel commit
   6224 	v4.13-rc1~161^2~87.
   6225 	* NEWS: Mention this.
   6226 
   6227 2017-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   6228 
   6229 	Move family-specific NETLINK_SOCK_DIAG parsers to separate files.
   6230 	Split netlink_sock_diag.c that grew too big.
   6231 
   6232 	* defs.h (tcp_states, tcp_state_flags): New xlat prototypes.
   6233 	* netlink_sock_diag.h: New file.
   6234 	* netlink_inet_diag.c: Likewise.
   6235 	* netlink_netlink_diag.c: Likewise.
   6236 	* netlink_packet_diag.c: Likewise.
   6237 	* netlink_smc_diag.c: Likewise.
   6238 	* netlink_unix_diag.c: Likewise.
   6239 	* Makefile.am (strace_SOURCES): Add them.
   6240 	* netlink_sock_diag.c: Move family-specific parsers and associated
   6241 	header includes to separate files.
   6242 	* nlattr.h (DECL_NLA(meminfo)): New prototype.
   6243 	* nlattr.c: Include <linux/sock_diag.h>.
   6244 	(print_meminfo, decode_nla_meminfo): New functions from
   6245 	netlink_sock_diag.c.
   6246 
   6247 2017-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   6248 
   6249 	Adjust prototypes of netlink parsing functions.
   6250 	Change the type of "len" argument that is based
   6251 	on struct nlmsghdr.nlmsg_len from kernel_ulong_t to unsigned int.
   6252 
   6253 	* defs.h (netlink_decoder_t, DECL_NETLINK): Change "len" argument type
   6254 	from kernel_ulong_t to unsigned int.
   6255 	* netlink.c (decode_nlmsgerr_attr_cookie, decode_nlmsgerr,
   6256 	decode_payload): Likewise.
   6257 	* netlink_selinux.c (decode_netlink_selinux): Likewise.
   6258 	* netlink_sock_diag.c (decode_family, decode_unix_diag_req,
   6259 	decode_meminfo, decode_unix_diag_vfs, decode_unix_diag_inode,
   6260 	decode_unix_diag_rqlen, decode_unix_diag_msg, decode_netlink_diag_req,
   6261 	print_group, decode_netlink_diag_ring, decode_netlink_diag_flags,
   6262 	decode_netlink_diag_msg, decode_packet_diag_req,
   6263 	decode_packet_diag_info, decode_packet_diag_mclist,
   6264 	decode_packet_diag_ring, decode_packet_diag_filter,
   6265 	decode_packet_diag_msg, decode_inet_addr, decode_inet_diag_hostcond,
   6266 	decode_inet_diag_markcond, decode_bytecode_data, decode_inet_diag_bc_op,
   6267 	decode_inet_diag_req_compat, decode_inet_diag_req_v2,
   6268 	decode_inet_diag_req, decode_inet_diag_meminfo, decode_tcpvegas_info,
   6269 	decode_tcp_dctcp_info, decode_tcp_bbr_info, decode_inet_diag_msg,
   6270 	decode_smc_diag_req, decode_smc_diag_conninfo, decode_smc_diag_lgrinfo,
   6271 	decode_smc_diag_msg, netlink_diag_decoder_t, decode_netlink_sock_diag):
   6272 	Likewise.
   6273 	* nlattr.c (fetch_nlattr, decode_nlattr_with_data, decode_nlattr,
   6274 	decode_nla_str, decode_nla_strn, DECODE_NLA_INTEGER): Likewise.
   6275 	* nlattr.h (nla_decoder_t, DECL_NLA, decode_nlattr): Likewise.
   6276 
   6277 2017-07-19  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6278 
   6279 	tests: check decoding of nlmsgerr attributes.
   6280 	* tests/nlattr_nlmsgerr.c: New file.
   6281 	* tests/gen_tests.in (nlattr_nlmsgerr): New entry.
   6282 	* tests/pure_executables.list: Add nlattr_nlmsgerr.
   6283 	* tests/.gitignore: Likewise.
   6284 
   6285 	netlink: decode nlmsgerr attributes.
   6286 	* netlink.c: Include "nlattr.h" and "xlat/nlmsgerr_attrs.h".
   6287 	(print_cookie, decode_nlmsgerr_attr_cookie): New functions.
   6288 	(nlmsgerr_nla_decoders): New array.
   6289 	(decode_nlmsgerr): Use it.
   6290 	* xlat/nlmsgerr_attrs.in: New file.
   6291 	* NEWS: Mention this.
   6292 
   6293 2017-07-19  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6294 
   6295 	netlink: adjust decode_nlmsgerr for extended ACK reporting.
   6296 	Extended ACK reporting introduced by linux kernel commit
   6297 	v4.11-rc5-1382-g2d4bc93.
   6298 
   6299 	* netlink.h (NLM_F_CAPPED): New macro.
   6300 	* netlink.c (decode_payload): Pass
   6301 	nlmsghdr->nlmsg_flags & NLM_F_CAPPED to decode_nlmsgerr.
   6302 	(decode_nlmsgerr): Adjust the length pass to
   6303 	decode_nlmsghdr_with_payload.
   6304 
   6305 2017-07-19  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6306 
   6307 	netlink: decode netlink message ack flags.
   6308 	* netlink.c: Include "xlat/netlink_ack_flags.h".
   6309 	(decode_nlmsg_flags): Decode ack flags when type == NLMSG_ERROR.
   6310 	* xlat/netlink_ack_flags.in: New file.
   6311 	* NEWS: Mention this.
   6312 	* tests/netlink_protocol.c (test_ack_flags): New function, check this.
   6313 	(main): Use it.
   6314 
   6315 2017-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   6316 
   6317 	tests: enhance error diagnostics.
   6318 	* tests/init.sh (dump_log_and_fail_with): Dump $LOG to stderr instead
   6319 	of stdout as the latter is more likely to be redirected to a temporary
   6320 	file in the context where this function is called.
   6321 
   6322 	tests: enhance timeout diagnostics.
   6323 	* tests/init.sh: Trap SIGXCPU.
   6324 	* tests/run.sh: Send SIGXCPU instead of SIGKILL in case of timeout, send
   6325 	SIGKILL if the command is still running 5 seconds after SIGXCPU.
   6326 
   6327 	userfaultfd: decode struct uffdio_api.features as flags.
   6328 	* xlat/uffd_api_features.in: New file.
   6329 	* userfaultfd.c: Include "xlat/uffd_api_features.h".
   6330 	(uffdio_ioctl): Print struct uffdio_api.features using
   6331 	PRINT_FIELD_FLAGS64 and uffd_api_features.
   6332 	* NEWS: Mention this.
   6333 	* tests/ioctl_uffdio.c: Include "xlat.h" and "xlat/uffd_api_features.h".
   6334 	(main): Update expected output.
   6335 
   6336 2017-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   6337 
   6338 	userfaultfd: enhance decoding of struct uffdio_api.features.
   6339 	As struct uffdio_api.features has read-write semantics,
   6340 	print the value returned by the kernel only when it differs
   6341 	from the value passed to the kernel.
   6342 
   6343 	* userfaultfd.c (uffdio_ioctl) <UFFDIO_API>: On entering syscall,
   6344 	save the value of struct uffdio_api.features.  On exiting syscall, do
   6345 	not print struct uffdio_api.features when it's the same as on entering.
   6346 	* tests/ioctl_uffdio.c (main): Update expected output.
   6347 
   6348 2017-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   6349 
   6350 	userfaultfd: use PRINT_FIELD_* macros.
   6351 	This also fixes output correctness for struct uffdio_api.features.
   6352 
   6353 	* userfaultfd.c: Include "print_fields.h".
   6354 	(tprintf_uffdio_range): Use PRINT_FIELD_X.
   6355 	(PRINT_FIELD_UFFDIO_RANGE): New macro.
   6356 	(uffdio_ioctl): Use it, PRINT_FIELD_FLAGS64, and PRINT_FIELD_X.
   6357 	* tests/ioctl_uffdio.c (main): Update expected output.
   6358 
   6359 2017-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   6360 
   6361 	Introduce PRINT_FIELD_FLAGS64 and PRINT_FIELD_XVAL64.
   6362 	* print_fields.h (PRINT_FIELD_FLAGS64, PRINT_FIELD_XVAL64): New macros.
   6363 
   6364 2017-07-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   6365 
   6366 	Update NEWS.
   6367 
   6368 	aio: change struct iocb.aio_lio_opcode output format.
   6369 	* aio.c (tprint_lio_opcode): Change opcode output format to match
   6370 	the kernel.
   6371 	* tests/aio.c (main): Update expected output.
   6372 
   6373 2017-07-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   6374 
   6375 	aio: use PRINT_FIELD_* macros.
   6376 	This also fixes output correctness for struct iocb.
   6377 
   6378 	* aio.c: Include "print_fields.h".
   6379 	(print_common_flags, print_iocb_header, print_iocb, print_io_event):
   6380 	Use PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X, PRINT_FIELD_FD,
   6381 	and PRINT_FIELD_STRN.
   6382 	* tests/aio.c (main): Update expected output.
   6383 
   6384 2017-07-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   6385 
   6386 	Introduce PRINT_FIELD_FD and PRINT_FIELD_STRN.
   6387 	* print_fields.h (PRINT_FIELD_FD, PRINT_FIELD_STRN): New macros.
   6388 
   6389 2017-07-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   6390 
   6391 	Update BPF_* constants.
   6392 	* xlat/bpf_commands.in: Add BPF_PROG_TEST_RUN, BPF_PROG_GET_NEXT_ID,
   6393 	BPF_MAP_GET_NEXT_ID, BPF_PROG_GET_FD_BY_ID, BPF_MAP_GET_FD_BY_ID,
   6394 	and BPF_OBJ_GET_INFO_BY_FD introduced by linux kernel commits
   6395 	v4.12-rc1~64^3~287^2~5, v4.13-rc1~157^2~271^2~5,
   6396 	v4.13-rc1~157^2~271^2~4, v4.13-rc1~157^2~271^2~3, and
   6397 	v4.13-rc1~157^2~271^2~1, respectively.
   6398 	* xlat/bpf_attach_type.in: Add BPF_CGROUP_SOCK_OPS introduced
   6399 	by linux kernel commit v4.13-rc1~157^2~37^2~15.
   6400 	* xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_SOCK_OPS introduced
   6401 	by the same commit.
   6402 
   6403 	Update SO_* constants.
   6404 	* xlat/sockoptions.in: Add SO_PEERGROUPS introduced by linux kernel
   6405 	commit v4.13-rc1~157^2~124.
   6406 
   6407 	Update SCM_* constants.
   6408 	* xlat/scmvals.in: Add SCM_TIMESTAMPING_PKTINFO introduced
   6409 	by linux kernel commit v4.13-rc1~157^2~405^2~3.
   6410 
   6411 2017-07-16  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6412 
   6413 	tests: check decoding of NETLINK_SELINUX protocol.
   6414 	* test_netlink.h (TEST_NETLINK_OBJECT): New macro.
   6415 	* tests/netlink_selinux.c: Include "test_netlink.h"
   6416 	instead of "netlink.h".
   6417 	(test_selnl_msg_unspec, test_selnl_msg_setenforce,
   6418 	test_selnl_msg_policyload): New functions.
   6419 	(main): Use them.
   6420 
   6421 	netlink: decode NETLINK_SELINUX protocol.
   6422 	* netlink_selinux.c: New file.
   6423 	* Makefile.am (strace_SOURCES): Add it.
   6424 	* defs.h (decode_netlink_selinux): New prototype.
   6425 	* netlink.c (netlink_decoders): Add NETLINK_SELINUX.
   6426 
   6427 2017-07-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   6428 
   6429 	sg_io_v3: use PRINT_FIELD_* macros.
   6430 	* sg_io_v3.c: Include "print_fields.h".
   6431 	(PRINT_FIELD_SG_IO_BUFFER): New macro.
   6432 	(decode_request, decode_response): Use it, PRINT_FIELD_D, PRINT_FIELD_U,
   6433 	PRINT_FIELD_X, PRINT_FIELD_PTR, PRINT_FIELD_FLAGS, and PRINT_FIELD_XVAL.
   6434 
   6435 	Introduce PRINT_FIELD_PTR.
   6436 	* print_fields.h (PRINT_FIELD_PTR): New macro.
   6437 
   6438 2017-07-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   6439 
   6440 	Provide mpers_ptr_t definition for non-mpers case.
   6441 	In mpers case, mpers_ptr_t is already defined by DEF_MPERS_TYPE(...).
   6442 	This allows use of mpers_ptr_t regardless of IN_MPERS state.
   6443 
   6444 	* mpers_type.h [!IN_MPERS] (mpers_ptr_t): New typedef.
   6445 
   6446 2017-07-14  Lazar Trsic  <Lazar.Trsic (a] imgtec.com>
   6447 
   6448 	Move is_negated_errno() to new header negated_errno.h.
   6449 	Move is_negated_errno() to a separate new header file negated_errno.h
   6450 	and include it just for architectures which require it.
   6451 
   6452 	is_negated_errno() is not used on those architectures
   6453 	that have a dedicated register to signal a syscall error.
   6454 
   6455 	The issue was raised when compiling with clang, which is more
   6456 	strict regarding semantics of unused static inline functions
   6457 	defined in C files and will issue a -Wunused-function warrning
   6458 	if they are not used anywhere.
   6459 
   6460 	* syscall.c (is_negated_errno): Move to ...
   6461 	* negated_errno.h: ... new file.
   6462 	* Makefile.am (strace_SOURCES): Add it.
   6463 	* linux/aarch64/get_error.c: Include it.
   6464 	* linux/arc/get_error.c: Likewise.
   6465 	* linux/arm/get_error.c: Likewise.
   6466 	* linux/avr32/get_error.c: Likewise.
   6467 	* linux/bfin/get_error.c: Likewise.
   6468 	* linux/crisv10/get_error.c: Likewise.
   6469 	* linux/hppa/get_error.c: Likewise.
   6470 	* linux/i386/get_error.c: Likewise.
   6471 	* linux/ia64/get_error.c: Likewise.
   6472 	* linux/m68k/get_error.c: Likewise.
   6473 	* linux/metag/get_error.c: Likewise.
   6474 	* linux/microblaze/get_error.c: Likewise.
   6475 	* linux/or1k/get_error.c: Likewise.
   6476 	* linux/riscv/get_error.c: Likewise.
   6477 	* linux/s390/get_error.c: Likewise.
   6478 	* linux/sh/get_error.c: Likewise.
   6479 	* linux/sh64/get_error.c: Likewise.
   6480 	* linux/tile/get_error.c: Likewise.
   6481 	* linux/x86_64/get_error.c: Likewise.
   6482 	* linux/xtensa/get_error.c: Likewise.
   6483 
   6484 2017-07-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   6485 
   6486 	sg_io_v4: use PRINT_FIELD_* macros.
   6487 	* sg_io_v4.c: Include "print_fields.h".
   6488 	(PRINT_FIELD_SG_IO_BUFFER): New macro.
   6489 	(decode_request, decode_response): Use it, PRINT_FIELD_D, PRINT_FIELD_U,
   6490 	PRINT_FIELD_X, PRINT_FIELD_FLAGS, and PRINT_FIELD_XVAL.
   6491 
   6492 	dm: use PRINT_FIELD_* macros.
   6493 	* dm.c (dm_decode_values, dm_decode_dm_target_spec,
   6494 	dm_decode_dm_target_deps, dm_decode_dm_target_msg, dm_known_ioctl): Use
   6495 	PRINT_FIELD_D, PRINT_FIELD_U, and PRINT_FIELD_FLAGS.
   6496 
   6497 2017-07-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   6498 
   6499 	Move macros related to kernel types to kernel_types.h.
   6500 	Some macros related to kernel types are defined both in defs.h and
   6501 	tests/tests.h.  Avoid this redundancy by moving these definitions
   6502 	to kernel_types.h.
   6503 
   6504 	* defs.h (PRI_kl, PRI_kld, PRI_klu, PRI_klx, PRI__64, PRI__d64,
   6505 	PRI__u64, PRI__x64): Move ...
   6506 	* kernel_types.h: ... here.
   6507 	* tests/tests.h (PRI__64, PRI__d64, PRI__u64, PRI__x64): Remove.
   6508 
   6509 2017-07-13  Lazar Trsic  <Lazar.Trsic (a] imgtec.com>
   6510 
   6511 	mips64: fix PRI__64 macro definition when compiled for Android.
   6512 	By default for MIPS64 in Android __u64 type is exported
   6513 	as unsigned long long.  This caused compilation -Wformat warnings
   6514 	and would break the build if -Werror is used.
   6515 
   6516 	* defs.h [SIZEOF_LONG != 4 && MIPS && __ANDROID__] (PRI__64): Change
   6517 	from "l" to "ll".
   6518 
   6519 2017-07-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   6520 
   6521 	block: use PRINT_FIELD_* macros.
   6522 	This also fixes output correctness for struct blkpg_ioctl_arg.
   6523 
   6524 	* block.c (print_blkpg_req): Use PRINT_FIELD_D and PRINT_FIELD_XVAL.
   6525 	(block_ioctl): Use PRINT_FIELD_U.
   6526 	* tests/ioctl_block.c (main): Update expected output.
   6527 
   6528 2017-07-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   6529 
   6530 	netlink_sock_diag: enhance decoding of long meminfo arrays.
   6531 	Print trailing dots instead of silent truncation if the array
   6532 	is too long.
   6533 
   6534 	* netlink_sock_diag.c (decode_meminfo): Do not apply SK_MEMINFO_VARS
   6535 	limit to nmemb, specify element count to print_array instead.
   6536 	(print_meminfo): Check element count and terminate printing
   6537 	if the element count exceeds SK_MEMINFO_VARS.
   6538 	* tests/nlattr_inet_diag_msg.c (main): Check it.
   6539 
   6540 2017-07-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   6541 
   6542 	tests: extend coverage of netlink_diag_req decoder.
   6543 	Add one more NETLINK_SOCK_DIAG check to ressurrect full coverage
   6544 	of netlink_diag_req decoder that was lost after commit
   6545 	v4.18-58-g37ef2d0d.
   6546 
   6547 	* tests/netlink_sock_diag.c (test_netlink_diag_req): Add a check for
   6548 	sdiag_protocol != NDIAG_PROTO_ALL.
   6549 
   6550 2017-07-12  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6551 
   6552 	tests: check decoding of NETLINK_CRYPTO nlmsg_flags.
   6553 	* tests/netlink_crypto.c (test_nlmsg_flags): New function.
   6554 	(main): Use it.
   6555 
   6556 	netlink: add decoding of NETLINK_CRYPTO nlmsg_flags.
   6557 	* netlink.c (decode_nlmsg_flags): Add NETLINK_CRYPTO.
   6558 
   6559 	tests: check decoding of NETLINK_CRYPTO message types.
   6560 	* configure.ac (AC_CHECK_HEADERS): Add linux/cryptouser.h.
   6561 	* tests/netlink_crypto.c: New file.
   6562 	* tests/gen_tests.in (netlink_crypto): New entry.
   6563 	* tests/pure_executables.list: Add netlink_crypto.
   6564 	* tests/.gitignore: Likewise.
   6565 
   6566 	netlink: add decoding of NETLINK_CRYPTO message types.
   6567 	* xlat/nl_crypto_types.in: New file.
   6568 	* netlink.c: Include "xlat/nl_crypto_types.h".
   6569 	(nlmsg_types): Add NETLINK_CRYPTO.
   6570 
   6571 	tests: introduce TEST_NETLINK and TEST_NETLINK_ macros.
   6572 	* tests/test_netlink.h: New file.
   6573 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   6574 	* tests/netlink_sock_diag.c: Include "test_netlink.h"
   6575 	instead of "netlink.h".
   6576 	(TEST_SOCK_DIAG): New macro.
   6577 	(test_unix_diag_req, test_unix_diag_msg,
   6578 	test_netlink_diag_req, test_netlink_diag_msg,
   6579 	test_packet_diag_req, test_packet_diag_msg,
   6580 	test_inet_diag_req, test_inet_diag_req_v2,
   6581 	test_inet_diag_msg, test_smc_diag_req,
   6582 	test_smc_diag_msg): Use it.
   6583 	(test_odd_family_req, test_odd_family_msg,
   6584 	test_inet_diag_sockid): Use TEST_NETLINK macro.
   6585 
   6586 2017-07-11  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6587 
   6588 	tests: check decoding of nlattr_inet_diag_req_v2 attributes.
   6589 	* tests/nlattr_inet_diag_req_v2.c: New file.
   6590 	* tests/gen_tests.in (nlattr_inet_diag_req_v2): New entry.
   6591 	* tests/pure_executables.list: Add nlattr_inet_diag_req_v2.
   6592 	* tests/.gitignore: Likewise.
   6593 
   6594 	tests: check decoding of nlattr_inet_diag_req_compat attributes.
   6595 	* tests/nlattr_inet_diag_req_compat.c: New file.
   6596 	* tests/gen_tests.in (nlattr_inet_diag_req_compat): New entry.
   6597 	* tests/pure_executables.list: Add nlattr_inet_diag_req_compat.
   6598 	* tests/.gitignore: Likewise.
   6599 
   6600 	netlink: decode AF_INET inet_diag_req_* attributes.
   6601 	* linux/inet_diag.h (inet_diag_bc_op, inet_diag_hostcond,
   6602 	inet_diag_markcond): New structures.
   6603 	(INET_DIAG_BC_*): New enum.
   6604 	* netlink_sock_diag.c: Include "xlat/inet_diag_bytecodes.h".
   6605 	(decode_inet_addr, decode_inet_diag_hostcond,
   6606 	print_inet_diag_bc_op, decode_inet_diag_markcond,
   6607 	decode_bytecode_data, decode_inet_diag_bc_op): New functions.
   6608 	(inet_diag_req_nla_decoders): New array.
   6609 	(decode_inet_diag_req_compat, decode_inet_diag_req_v2): Use it.
   6610 	* xlat/inet_diag_bytecodes.in: New file.
   6611 
   6612 2017-07-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   6613 
   6614 	Introduce PRINT_FIELD_CSTRING.
   6615 	* print_fields.h (PRINT_FIELD_CSTRING): New macro.
   6616 	* block.c (print_blkpg_req, block_ioctl): Use PRINT_FIELD_CSTRING
   6617 	instead of print_quoted_string.
   6618 	* btrfs.c (btrfs_ioctl): Likewise.
   6619 	* dm.c (dm_decode_device, dm_decode_dm_target_spec): Likewise.
   6620 	* loop.c (decode_loop_info, decode_loop_info64): Likewise.
   6621 	* v4l2.c (print_v4l2_capability, print_v4l2_fmtdesc,
   6622 	print_v4l2_standard, print_v4l2_input, print_v4l2_tuner,
   6623 	print_v4l2_queryctrl): Likewise.
   6624 	* netlink_sock_diag.c (decode_smc_diag_lgrinfo): Use PRINT_FIELD_CSTRING
   6625 	instead of PRINT_FIELD_STRING.
   6626 	* uname.c (PRINT_UTS_MEMBER): Remove.
   6627 	(SYS_FUNC(uname)): Use PRINT_FIELD_CSTRING instead of PRINT_UTS_MEMBER.
   6628 
   6629 2017-07-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   6630 
   6631 	Rename PRINT_FIELD_QUOTED_STRING to PRINT_FIELD_STRING.
   6632 	As string fields are always qouted when printed, choose a shorter name
   6633 	for the helper macro.
   6634 
   6635 	* print_fields.h (PRINT_FIELD_QUOTED_STRING): Rename
   6636 	to PRINT_FIELD_STRING.  All callers updated.
   6637 
   6638 2017-07-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   6639 
   6640 	Update RWF_* constants.
   6641 	* xlat/rwf_flags.in: Add RWF_NOWAIT introduced by linux kernel
   6642 	commit v4.12-rc5-150-gb745fafa.
   6643 
   6644 	Intorduce PRINT_FIELD_0X.
   6645 	* print_fields.h (PRINT_FIELD_0X): New macro.
   6646 	* sockaddr.c (print_sockaddr_data_ipx, print_sockaddr_data_nl): Use it
   6647 	instead of manual tprintf statements.
   6648 	* netlink_sock_diag.c (PRINT_FIELD_SMC_DIAG_CONNINFO_FLAGS): Remove.
   6649 	(decode_smc_diag_conninfo): Replace it with PRINT_FIELD_0X.
   6650 
   6651 	print_inet_addr: use inet_addr-based output format for IPv4.
   6652 	* sockaddr.c (print_inet_addr): Remove af_name variable.
   6653 	<AF_INET>: Use inet_addr-based output format.
   6654 	* tests/netlink_sock_diag.c (test_inet_diag_sockid, test_inet_diag_req,
   6655 	test_inet_diag_req_v2, test_inet_diag_msg, test_smc_diag_req,
   6656 	test_smc_diag_msg): Update expected output.
   6657 	* tests/nlattr_inet_diag_msg.c (print_inet_diag_msg): Likewise.
   6658 	* tests/nlattr_smc_diag_msg.c (print_smc_diag_msg): Likewise.
   6659 
   6660 2017-07-10  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6661 
   6662 	tests: check decoding of netlink smc_diag_msg attributes.
   6663 	* tests/nlattr_smc_diag_msg.c: New file.
   6664 	* tests/gen_tests.in (nlattr_smc_diag_msg): New entry.
   6665 	* tests/pure_executables.list: Add nlattr_smc_diag_msg.
   6666 	* tests/.gitignore: Likewise.
   6667 
   6668 	netlink: decode AF_SMC smc_diag_msg attributes.
   6669 	* linux/smc_diag.h (smc_diag_cursor, smc_diag_conninfo
   6670 	smc_diag_linkinfo, smc_diag_lgrinfo): New structures.
   6671 	* netlink_sock_diag.c: Include "xlat/smc_link_group_roles.h".
   6672 	(decode_smc_diag_conninfo, decode_smc_diag_lgrinfo): New functions.
   6673 	(smc_diag_msg_nla_decoders): New array.
   6674 	(decode_smc_diag_msg): Use it.
   6675 	* xlat/smc_link_group_roles.in: New file.
   6676 
   6677 2017-07-10  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   6678 
   6679 	pathtrace.c: introduce user-provided sets of paths.
   6680 	* defs.h (struct path_set): New structure.
   6681 	(global_path_set): New variable prototype.
   6682 	(tracing_paths): Change macro body to use global_path_set variable.
   6683 	(pathtrace_select_set): Add "struct path_set *" argument.
   6684 	(pathtrace_match_set): Likewise.  Change return type to bool.
   6685 	(pathtrace_select, pathtrace_match): Change into thin macro wrappers
   6686 	around pathtrace_select_set and pathtrace_match_set, repsectively.
   6687 	* pathtrace.c (global_path_set): New variable.
   6688 	(storepath, pathtrace_select_set): Add "struct path_set *" argument.
   6689 	(pathmatch, upathmatch, fdmatch, pathtrace_match_set): Likewise.
   6690 	Change return type to bool.
   6691 
   6692 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6693 
   6694 	tests: check decoding of MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP.
   6695 	* tests/group_req.c: New file.
   6696 	* tests/gen_tests.in (group_req): New entry.
   6697 	* tests/pure_executables.list: Add group_req.
   6698 	* tests/.gitignore: Likewise.
   6699 
   6700 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6701 
   6702 	Mpersify struct group_req.
   6703 	The size of struct group_req depends on alignment of long and therefore
   6704 	has to be mpersified.
   6705 
   6706 	* print_group_req.c: New file.
   6707 	* Makefile.am (strace_SOURCES): Add it.
   6708 	* net.c (print_group_req): Move to print_group_req.c, wrap into
   6709 	MPERS_PRINTER_DECL.
   6710 
   6711 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6712 
   6713 	net: enhance decoding of MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP.
   6714 	* net.c (print_group_req): Allow option length greater than
   6715 	sizeof(struct group_req) to match the kernel behaviour.
   6716 	When the option length is invalid, print the address.
   6717 	* NEWS: Mention this.
   6718 
   6719 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6720 
   6721 	net: hook up MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP decoding for SOL_IPV6.
   6722 	As multicast socket options are shared between IPv4 and IPv6,
   6723 	they should be decoded both for SOL_IP and SOL_IPV6.
   6724 
   6725 	* net.c (print_setsockopt) <SOL_IPV6> [MCAST_JOIN_GROUP]: Handle
   6726 	MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
   6727 
   6728 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6729 
   6730 	xlat: add MCAST_* to sockipv6options.
   6731 	Multicast socket options are shared between IPv4 and IPv6.
   6732 
   6733 	* xlat/sockipv6options.in: Add MCAST_JOIN_GROUP, MCAST_BLOCK_SOURCE,
   6734 	MCAST_UNBLOCK_SOURCE, MCAST_LEAVE_GROUP, MCAST_JOIN_SOURCE_GROUP,
   6735 	MCAST_LEAVE_SOURCE_GROUP, and MCAST_MSFILTER.
   6736 
   6737 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6738 
   6739 	net: enhance decoding of IP_ADD_MEMBERSHIP et al socket options.
   6740 	* net.c (print_mreq, print_mreq6): Treat negative option length
   6741 	as invalid to match the kernel behaviour.  When the option length
   6742 	is invalid, print the address.
   6743 	* NEWS: Mention it.
   6744 	* tests/ip_mreq.c (main): Check it.  Update expected output.
   6745 
   6746 	net: enhance decoding of setsockopt's SO_LINGER negative option length.
   6747 	* net.c (print_set_linger): Treat negative option length as invalid
   6748 	to match the kernel behaviour.
   6749 	* tests/so_linger.c (main): Check it.
   6750 
   6751 	msghdr: use PRINT_FIELD_* macros.
   6752 	* msghdr.c (print_scm_creds): Use PRINT_FIELD_U and PRINT_FIELD_UID.
   6753 	(print_cmsg_ip_recverr): Use PRINT_FIELD_U.
   6754 	(print_struct_msghdr): Use PRINT_FIELD_U and PRINT_FIELD_FLAGS.
   6755 
   6756 	Intorduce PRINT_FIELD_SOCKADDR.
   6757 	* print_fields.h (PRINT_FIELD_SOCKADDR): New macro.
   6758 	* msghdr.c (print_cmsg_ip_recverr): Use it instead of print_sockaddr.
   6759 	* net.c (print_group_req): Likewise.
   6760 	* sock.c (PRINT_IFREQ_ADDR): Remove.
   6761 	(print_ifreq, print_ifconf_ifreq): Use PRINT_FIELD_SOCKADDR
   6762 	instead of PRINT_IFREQ_ADDR.
   6763 
   6764 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6765 
   6766 	print_sockaddr: remove "struct tcb *" argument.
   6767 	print_sockaddr does not use its first argument, remove it.
   6768 
   6769 	* defs.h (print_sockaddr): Remove argument.
   6770 	* sockaddr.c (print_sockaddr): Remove argument.  All callers updated.
   6771 	* sock.c (PRINT_IFREQ_ADDR): Likewise.
   6772 
   6773 2017-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   6774 
   6775 	net: use PRINT_FIELD_* macros.
   6776 	* net.c (print_tpacket_stats, print_tpacket_req): Use PRINT_FIELD_U.
   6777 	(print_group_req): Use PRINT_FIELD_IFINDEX.
   6778 	(print_packet_mreq): Use PRINT_FIELD_IFINDEX, PRINT_FIELD_U,
   6779 	and PRINT_FIELD_XVAL.
   6780 
   6781 	netlink_sock_diag: introduce PRINT_FIELD_INET_DIAG_SOCKID.
   6782 	* netlink_sock_diag.c (PRINT_FIELD_INET_DIAG_SOCKID): New macro.
   6783 	(decode_inet_diag_req_compat, decode_inet_diag_req_v2,
   6784 	decode_inet_diag_msg, decode_smc_diag_req, decode_smc_diag_msg): Use it
   6785 	instead of print_inet_diag_sockid.
   6786 
   6787 	Intorduce PRINT_FIELD_DEV.
   6788 	* print_fields.h (PRINT_FIELD_DEV): New macro.
   6789 	* dm.c (dm_decode_device, dm_decode_dm_name_list): Use it
   6790 	instead of print_dev_t.
   6791 	* loop.c (decode_loop_info, decode_loop_info64): Likewise.
   6792 	* netlink_sock_diag.c (decode_unix_diag_vfs): Likewise.
   6793 
   6794 	Intorduce PRINT_FIELD_INET4_ADDR.
   6795 	* print_fields.h (PRINT_FIELD_INET4_ADDR): New macro.
   6796 	* msghdr.c (print_cmsg_ip_pktinfo): Use it instead of manual
   6797 	tprintf statements.
   6798 	* net.c (print_mreq): Likewise.
   6799 	* sockaddr.c (print_sockaddr_data_in): Likewise.
   6800 
   6801 	Intorduce PRINT_FIELD_NET_PORT.
   6802 	* print_fields.h (PRINT_FIELD_NET_PORT): New macro.
   6803 	* netlink_sock_diag.c (print_inet_diag_sockid): Use it
   6804 	instead of a manual tprintf statement.
   6805 	* sockaddr.c (print_sockaddr_data_in, print_sockaddr_data_in6,
   6806 	print_sockaddr_data_ipx): Likewise.
   6807 
   6808 	Intorduce PRINT_FIELD_IFINDEX.
   6809 	* print_fields.h (PRINT_FIELD_IFINDEX): New macro.
   6810 	* msghdr.c (print_cmsg_ip_pktinfo): Use it instead of print_ifindex.
   6811 	* net.c (print_mreq6): Likewise.
   6812 	* netlink_sock_diag.c (print_packet_diag_mclist,
   6813 	print_inet_diag_sockid): Likewise.
   6814 	* sockaddr.c (print_sockaddr_data_in6, print_sockaddr_data_ll):
   6815 	Likewise.
   6816 
   6817 	Intorduce PRINT_FIELD_INET_ADDR.
   6818 	* print_fields.h (PRINT_FIELD_INET_ADDR): New macro.
   6819 	* net.c (print_mreq6): Use it instead of print_inet_addr.
   6820 	* netlink_sock_diag.c (print_inet_diag_sockid): Likewise.
   6821 	* sockaddr.c (print_sockaddr_data_in6): Likewise.
   6822 
   6823 	net: move print_ifindex to a separate file.
   6824 	* print_ifindex.c: New file.
   6825 	* Makefile.am (strace_SOURCES): Add it.
   6826 	* net.c (print_ifindex): Move to print_ifindex.c.
   6827 
   6828 	net: move parsers of bind, listen, and shutdown to separate files.
   6829 	* bind.c: New file.
   6830 	* listen.c: Likewise.
   6831 	* shutdown.c: Likewise.
   6832 	* Makefile.am (strace_SOURCES): Add them.
   6833 	* net.c (SYS_FUNC(bind)): Move to bind.c.
   6834 	(SYS_FUNC(listen)): Move to listen.c.
   6835 	(SYS_FUNC(shutdown)): Move to shutdown.c.
   6836 
   6837 2017-07-09  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6838 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   6839 
   6840 	tests: check decoding of packet_diag_msg attributes.
   6841 	* tests/netlink_sock_diag-v.sh: New file.
   6842 	* tests/Makefile.am (EXTRA_DIST): Add it.
   6843 	* tests/nlattr_packet_diag_msg.c: New file.
   6844 	* tests/gen_tests.in (nlattr_packet_diag_msg): New entry.
   6845 	* tests/pure_executables.list: Add nlattr_packet_diag_msg.
   6846 	* tests/.gitignore: Likewise.
   6847 
   6848 	netlink: decode AF_PACKET packet_diag_msg attributes.
   6849 	* linux/packet_diag.h (packet_diag_info, packet_diag_mclist,
   6850 	packet_diag_ring): New structures.
   6851 	(PDI_*): New macros.
   6852 	* netlink_sock_diag.c: Include <linux/filter.h>
   6853 	and "xlat/packet_diag_info_flags.h".
   6854 	(decode_packet_diag_info, decode_packet_diag_mclist,
   6855 	decode_packet_diag_ring, decode_packet_diag_filter): New functions.
   6856 	(packet_diag_msg_nla_decoders): New array.
   6857 	(decode_packet_diag_msg): Use it.
   6858 	* print_fields.h (PRINT_FIELD_QUOTED_STRING): New macro.
   6859 	* xlat/packet_diag_info_flags.in: New file.
   6860 
   6861 2017-07-09  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6862 
   6863 	tests: fix TEST_NLATTR_OBJECT and TEST_NLATTR_ARRAY for large objects.
   6864 	commit v4.17-161-gdbd0605 that adjusted TEST_NLATTR_OBJECT and
   6865 	TEST_NLATTR_ARRAY for large objects, only changed the pattern
   6866 	print length, large length still can be specified as nla_data_len,
   6867 	resulting to output mismatch.
   6868 
   6869 	* tests/test_nlattr.h (TEST_NLATTR_OBJECT): Pass "plen"
   6870 	both as nla_data_len and slen arguments of TEST_NLATTR_
   6871 	in len < sizeof(object) case.
   6872 	(TEST_NLATTR_ARRAY): Likewise, Pass "plen" both as nla_data_len
   6873 	and slen arguments of TEST_NLATTR_ in len < sizeof(object[0]) case.
   6874 
   6875 2017-07-09  JingPiao Chen  <chenjingpiao (a] gmail.com>
   6876 
   6877 	tests: introduce TEST_NLATTR_nla macro in test_nlattr.h.
   6878 	Explicitly make struct nlattr * pointer which is internal
   6879 	to TEST_NLATTR_ macro available to its varadic arguments.
   6880 
   6881 	* tests/test_nlattr.h (TEST_NLATTR_): Rename nla to TEST_NLATTR_nla.
   6882 
   6883 2017-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   6884 
   6885 	tests: check decoding of SO_PEERCRED socket option.
   6886 	* tests/so_peercred.c: New file.
   6887 	* tests/gen_tests.in (so_peercred): New entry.
   6888 	* tests/pure_executables.list: Add so_peercred.
   6889 	* tests/.gitignore: Likewise.
   6890 
   6891 	net: accept arbitrary option length for getsockopt's SO_PEERCRED.
   6892 	* print_fields.h (PRINT_FIELD_UID): New macro.
   6893 	* net.c (print_ucred): Rewrite to match the kernel behaviour.
   6894 	* NEWS: Mention this.
   6895 
   6896 	tests: check decoding of socket filters.
   6897 	* tests/sock_filter-v.c: New file.
   6898 	* tests/gen_tests.in (sock_filter-v): New entry.
   6899 	* tests/pure_executables.list: Add sock_filter-v.
   6900 	* tests/.gitignore: Likewise.
   6901 
   6902 	Implement decoding of linux socket filter programs.
   6903 	* bpf_sock_filter.c: New file.
   6904 	* Makefile.am (strace_SOURCES): Add it.
   6905 	* xlat/skf_ad.in: New file.
   6906 	* defs.h (decode_sock_fprog, print_sock_fprog): New prototypes.
   6907 	* fetch_bpf_fprog.c (get_bpf_fprog_size): New mpers printer.
   6908 	* net.c (print_getsockopt): Use decode_sock_fprog to print
   6909 	socket filter programs for SO_GET_FILTER socket option.
   6910 	(print_setsockopt): Use decode_sock_fprog and get_bpf_fprog_size
   6911 	to print socket filter programs for SO_ATTACH_FILTER
   6912 	and SO_ATTACH_REUSEPORT_CBPF socket options.
   6913 	* NEWS: Mention this.
   6914 
   6915 	tests: check decoding of SO_LINGER socket option.
   6916 	* tests/so_linger.c: New file.
   6917 	* tests/gen_tests.in (so_linger): New entry.
   6918 	* tests/pure_executables.list: Add so_linger.
   6919 	* tests/.gitignore: Likewise.
   6920 
   6921 	tests: fix print_quoted_hex output of bytes with high bit set.
   6922 	* tests/tests.h (print_quoted_memory, print_quoted_hex): Change the type
   6923 	of first argument from "const char *" to "const void *".
   6924 	* tests/print_quoted_string.c: Likewise.
   6925 	(print_quoted_hex): Print bytes as unsigned char objects to avoid
   6926 	unwanted sign extension.
   6927 	* tests/netlink_protocol.c (send_query): Remove the cast of print_quoted_hex
   6928 	first argument which is now redundant.
   6929 
   6930 	net: accept arbitrary option length for getsockopt's SO_LINGER.
   6931 	* net.c (print_linger): Rename to print_set_linger.
   6932 	(print_setsockopt): Replace print_linger with print_set_linger.
   6933 	(print_get_linger): New function that accepts arbitrary option length
   6934 	to match the kernel behaviour.
   6935 	(print_getsockopt): Replace print_linger with print_get_linger.
   6936 	* NEWS: Mention this.
   6937 
   6938 	net: accept large option length for SO_LINGER.
   6939 	* net.c (print_linger): Allow len > sizeof(struct linger) to match
   6940 	the kernel behaviour.
   6941 
   6942 	net: fix printing of struct linger's field names.
   6943 	* net.c: Include "print_fields.h".
   6944 	(print_linger): Print fields of struct linger using PRINT_FIELD_D.
   6945 
   6946 2017-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   6947 
   6948 	net: enhance decoding of getsockopt's optlen argument.
   6949 	As the last argument of getsockopt syscall has read-write semantics,
   6950 	print both user and kernel values when they differ.
   6951 
   6952 	* net.c (SYS_FUNC(getsockopt)): On entering syscall, fetch and save
   6953 	the length specified to the kernel.  On error, print the length saved
   6954 	on entering.  When the saved length and the length returned by the
   6955 	kernel differ, print both values.
   6956 	* NEWS: Mention this.
   6957 	* tests/net-icmp_filter.c (main): Update expected output.
   6958 
   6959 2017-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   6960 
   6961 	net: move printing of [gs]etsockopt's socklen argument to toplevel parsers
   6962 	* net.c (print_getsockopt, print_setsockopt): Remove "done" label,
   6963 	replace "goto done" statement with "return".
   6964 	Move printing of "len" argument ...
   6965 	(SYS_FUNC(getsockopt), SYS_FUNC(setsockopt)): ... here.
   6966 
   6967 2017-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   6968 
   6969 	Generalize seccomp filter parser.
   6970 	Linux socket filter uses almost the same classic BPF as seccomp filter,
   6971 	The only difference noticeable from strace PoV is the meaning of generic
   6972 	multiuse field.
   6973 
   6974 	Transform the parser of seccomp filters to a more generic parser
   6975 	of classic BPF, parametrized with a method of parsing the generic
   6976 	multiuse field in BPF_STMT.
   6977 
   6978 	* bpf_filter.c: New file.
   6979 	* bpf_filter.h: Likewise.
   6980 	* bpf_fprog.h: Likewise.
   6981 	* bpf_seccomp_filter.c: Likewise.
   6982 	* fetch_bpf_fprog.c: Likewise.
   6983 	* fetch_seccomp_fprog.c: Remove.
   6984 	* seccomp_fprog.h: Likewise.
   6985 	* Makefile.am (strace_SOURCES): Add bpf_filter.c, bpf_filter.h,
   6986 	bpf_fprog.h, bpf_seccomp_filter.c, and fetch_bpf_fprog.c.
   6987 	Remove fetch_seccomp_fprog.c and seccomp_fprog.h.
   6988 	* seccomp.c: Do not include linux/filter.h and xlat header files.
   6989 	Do not define SECCOMP_RET_ACTION.
   6990 	(bpf_filter, decode_bpf_code, decode_bpf_stmt, decode_bpf_jump,
   6991 	print_bpf_filter, print_seccomp_fprog, print_seccomp_filter): Remove.
   6992 	* defs.h (print_seccomp_filter): Rename to decode_seccomp_fprog.
   6993 	(SYS_FUNC(seccomp)): Replace print_seccomp_filter
   6994 	with decode_seccomp_fprog.
   6995 	* prctl.c (SYS_FUNC(prctl)): Likewise.
   6996 
   6997 2017-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   6998 
   6999 	Assume that <linux/filter.h> is always available.
   7000 	<linux/filter.h> was introduced in linux 2.1.75, way before
   7001 	the minimal kernel version supported by strace.
   7002 
   7003 	* configure.ac (AC_CHECK_HEADERS): Remove linux/filter.h.
   7004 	* seccomp.c: Assume HAVE_LINUX_FILTER_H.
   7005 	* tests/prctl-seccomp-filter-v.c: Likewise.
   7006 	* tests/seccomp-filter-v.c: Likewise.
   7007 	* tests/seccomp-filter.c: Likewise.
   7008 
   7009 2017-07-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   7010 
   7011 	xlat: add BPF_END to BPF_ALU opcode list.
   7012 	BPF_END is one of three eBPF-only opcodes for BPF_ALU class.
   7013 	Other two (BPF_MOV and BPF_ARSH) has been added earlier.
   7014 
   7015 	* xlat/bpf_op_alu.in: Add BPF_END.
   7016 
   7017 2017-07-07  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7018 
   7019 	netlink_sock_diag: print unrecognized data in hex.
   7020 	* netlink_sock_diag.c (decode_family): Replace printstrn with
   7021 	printstr_ex and set QUOTE_FORCE_HEX flag.
   7022 	* tests/netlink_sock_diag.c (test_odd_family_req,
   7023 	test_odd_family_msg): Update expected output.
   7024 
   7025 	netlink: print unrecognized nlattr in hex.
   7026 	* nlattr.c (fetch_nlattr): Replace printstrn
   7027 	with printstr_ex and set QUOTE_FORCE_HEX flag.
   7028 	* tests/nlattr.c (test_nlattr): Update expected output.
   7029 
   7030 	netlink: print unrecognized netlink messages in hex.
   7031 	* netlink.c (fetch_nlmsghdr): Replace printstrn
   7032 	with printstr_ex and set QUOTE_FORCE_HEX flag.
   7033 	* tests/netlink_protocol.c (send_query): Update expected output.
   7034 
   7035 	netlink: print unrecognized netlink payload in hex.
   7036 	* netlink.c (decode_payload): Replace printstrn
   7037 	with printstr_ex and set QUOTE_FORCE_HEX flag.
   7038 	* tests/netlink_protocol.c (send_query, test_nlmsgerr,
   7039 	test_nlmsg_done): Update expected output.
   7040 	* tests/netlink_generic.c (test_nlmsg_type): Likewise.
   7041 
   7042 	netlink: print unrecognized nlmsgerr in hex.
   7043 	* netlink.c (decode_nlmsgerr): Replace printstrn
   7044 	with printstr_ex and set QUOTE_FORCE_HEX flag.
   7045 	* tests/netlink_protocol.c (test_nlmsgerr): Update expected output.
   7046 
   7047 	netlink: print unrecognized attribute data in hex.
   7048 	* nlattr.c (decode_nlattr_with_data): Replace printstrn
   7049 	with printstr_ex and set QUOTE_FORCE_HEX flag.
   7050 	* tests/tests.h (print_quoted_hex): New prototype.
   7051 	* tests/print_quoted_string.c (print_quoted_hex): New function.
   7052 	* tests/test_nlattr.h (TEST_NLATTR_OBJECT, TEST_NLATTR_ARRAY): Use it
   7053 	for updated expected output.  Change the type of "plen" variable
   7054 	to unsigned int.
   7055 	* tests/nlattr.c (test_nlattr): Update expected output.
   7056 
   7057 	tests: print quotation marks in print_quoted_memory.
   7058 	* tests/print_quoted_string.c (print_quoted_memory): Print opening
   7059 	and closing quotation marks.
   7060 	* tests/getcwd.c (main): Do not print quotation marks around
   7061 	print_quoted_string.
   7062 	* tests/uname.c (main): Likewise.
   7063 	* tests/keyctl.c (print_quoted_string_limit): Do not print quotation
   7064 	marks around print_quoted_memory.
   7065 	* tests/netlink_protocol.c (send_query): Likewise.
   7066 	* tests/xattr.c (main): Likewise.
   7067 
   7068 2017-07-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   7069 
   7070 	strace.1: remove misleading remark that -i option is weakly supported.
   7071 	Given that -i functionality is covered by pc.test, the remark that
   7072 	it is weakly supported is wrong.
   7073 
   7074 	* strace.1 (BUGS): Remove the remark about weakly supported -i option.
   7075 
   7076 2017-07-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   7077 
   7078 	Post-release administrivia.
   7079 	* NEWS: Add a header line for the next release.
   7080 	* debian/changelog.in: Add a changelog entry for 4.18-1.
   7081 	* strace.spec.in: Likewise.
   7082 
   7083 2017-07-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   7084 
   7085 	Prepare for 4.18 release.
   7086 	* NEWS: Update for 4.18 release.
   7087 
   7088 2017-07-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   7089 
   7090 	tests: robustify create_nl_socket based tests against the race condition
   7091 	There is a race condition between the moment a netlink socket is created
   7092 	and the moment it is reported via SOCK_DIAG_BY_FAMILY interface.
   7093 	Add one more operation on the socket created by create_nl_socket
   7094 	to increase chances of winning the race.
   7095 
   7096 	* tests/create_nl_socket.c (create_nl_socket_ext): Add a getsockopt call
   7097 	with the created socket.
   7098 
   7099 2017-07-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   7100 
   7101 	Update NEWS.
   7102 
   7103 2017-07-04  Romain Naour  <romain.naour (a] smile.fr>
   7104 
   7105 	nios2: fix wrong access to "SP" register in user_pt_regs.
   7106 	Starting with linux commit v4.0-rc4~21^2, "SP" register
   7107 	is available via regs[PTR_SP] member of struct user_pt_regs.
   7108 
   7109 	* linux/nios2/arch_regs.h (nios2_sp_ptr): Change type
   7110 	to "unsigned int *".
   7111 	* linux/nios2/arch_regs.c (nios2_sp_ptr): Likewise.
   7112 	Replace .sp with .regs[PTR_SP].
   7113 
   7114 	Fixes: http://autobuild.buildroot.net/results/b9f/b9fc25b82f3280872fe1593ac252a8529ba83576
   7115 	Fixes: v4.16-34-g6117728a ("nios2: export nios2_sp_ptr")
   7116 
   7117 2017-07-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   7118 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   7119 
   7120 	tests: add multi-process check to qual_fault.test.
   7121 	Check that syscall counters used for tampering are per-tcb.
   7122 
   7123 	* tests/qual_fault.c: Include <fcntl.h> for open(),
   7124 	<sys/param.h> for PATH_MAX, and <sys/wait.h> for wait().
   7125 	(expfd): Rename to exp_fd, remove const qualifier and initialization.
   7126 	(gotfd): Rename to got_fd, remove const qualifier and initialization.
   7127 	(out_fd): New variable, for the expected strace output.
   7128 	(open_file): New helper function.
   7129 	(main): Remove st, add num_procs, proc, exp_prefix, got_prefix,
   7130 	out_prefix, pid_prefix.  Remove stat asserts, update argc assert.
   7131 	Add num_procs, exp_prefix, got_prefix, out_prefix, pid_prefix
   7132 	initialization.  Add per-process loop, open expfd, gotfd, out_fd, pidfd
   7133 	in each one, print process's pid to pidfd, print exit message to out_fd.
   7134 	Add wait() call for each forked process.
   7135 	* tests/qual_fault.test (N): increase to 100 in order to check
   7136 	concurrent process execution.
   7137 	(check_fault_injection): Take additional argument for the process
   7138 	count, pass it to qual_fault, add filename variables for expected strace
   7139 	output and pid file, pass them to qual_fault.
   7140 	Specify -ff parameter to strace invocation.
   7141 	Compare write and strace output for the each process.
   7142 	Update all check_fault_injection invocation with process count argument,
   7143 	add an invocation with 4 concurrent processes.
   7144 	* tests/init.sh (TIMEOUT_DURATION): Raise from 120 to 300.
   7145 
   7146 2017-07-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   7147 
   7148 	tests: adjust TEST_NLATTR_OBJECT and TEST_NLATTR_ARRAY for large objects
   7149 	* tests/test_nlattr.h (TEST_NLATTR_OBJECT, TEST_NLATTR_ARRAY): Add
   7150 	support for objects larger than DEFAULT_STRLEN.
   7151 	* tests/nlattr_inet_diag_msg.c (main): Change pattern size
   7152 	from DEFAULT_STRLEN to 4096.
   7153 	* tests/nlattr_netlink_diag_msg.c: Likewise.
   7154 	* tests/nlattr_unix_diag_msg.c: Likewise.
   7155 
   7156 	Reported-by: JingPiao Chen <chenjingpiao (a] gmail.com>
   7157 
   7158 2017-07-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   7159 
   7160 	tests: move DEFAULT_STRLEN macro to tests.h.
   7161 	* tests/tests.h [!DEFAULT_STRLEN] (DEFAULT_STRLEN): New macro.
   7162 	* tests/mincore.c (DEFAULT_STRLEN): Remove.
   7163 	* tests/mmsg_name.c: Likewise.
   7164 	* tests/msg_control.c: Likewise.
   7165 	* tests/netlink_protocol.c: Likewise.
   7166 	* tests/nlattr.c: Likewise.
   7167 	* tests/nlattr_inet_diag_msg.c: Likewise.
   7168 	* tests/nlattr_netlink_diag_msg.c: Likewise.
   7169 	* tests/nlattr_unix_diag_msg.c: Likewise.
   7170 	* tests/printstr.c: Likewise.
   7171 	* tests/xattr.c: Likewise.
   7172 	* tests/execve.c: Likewise.
   7173 	(main): Initialize str_a and str_b arrays at run time.
   7174 	* tests/execveat.c: Likewise.
   7175 
   7176 	Suggested-by: JingPiao Chen <chenjingpiao (a] gmail.com>
   7177 
   7178 2017-07-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   7179 
   7180 	tests: use unified diff in order to improve test log readability.
   7181 	* tests/init.sh (match_diff): Add -u option to the diff invocation.
   7182 
   7183 2017-07-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   7184 
   7185 	Fix error diagnostics in case of zero argc.
   7186 	* strace.c (init): Adjust argc along with argv,
   7187 	check that adjusted argc is sane.
   7188 	* tests/zeroargc.c: New file.
   7189 	* tests/.gitignore: Add zeroargc.
   7190 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   7191 	* tests/options-syntax.test: Check strace error diagnostics
   7192 	in case of zero argc.
   7193 
   7194 2017-07-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   7195 
   7196 	Use program_invocation_name instead of a local progname variable.
   7197 	Emulate program_invocation_name only if it is not provided by libc.
   7198 
   7199 	* configure.ac: Check for program_invocation_name variable.
   7200 	* strace.c (progname): Remove.
   7201 	[!HAVE_PROGRAM_INVOCATION_NAME] (program_invocation_name): New variable.
   7202 	(verror_msg, error_msg_and_help): Use it instead of progname.
   7203 	(init): Initialize program_invocation_name instead of progname.
   7204 
   7205 2017-07-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   7206 	    Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   7207 
   7208 	Introduce generic STRINGIFY and STRINGIFY_VAL macros.
   7209 	* macros.h (STRINGIFY, STRINGIFY_VAL): New macros.
   7210 	* mpers_type.h: Include "macros.h".
   7211 	[IN_MPERS] (STRINGIFY): Remove.
   7212 	* tests/sockname.c (TEST_SYSCALL_STR__, TEST_SYSCALL_STR_): Remove.
   7213 	(TEST_SYSCALL_STR): Use STRINGIFY_VAL.
   7214 
   7215 2017-07-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   7216 
   7217 	Introduce macros.h.
   7218 	Introduce a separate header file for generic macros shared between
   7219 	strace and its tests.  Start this unification with ARRAY_SIZE macro.
   7220 
   7221 	* defs.h: Include "macros.h".
   7222 	(ARRAY_SIZE): Move ...
   7223 	* macros.h: ... to new file.
   7224 	* Makefile.am (strace_SOURCES): Add it.
   7225 	* tests/tests.h: Include "macros.h".
   7226 	(ARRAY_SIZE): Remove.  All callers updated.
   7227 
   7228 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7229 
   7230 	quota: use PRINT_FIELD_FLAGS.
   7231 	* quota.c (struct xfs_dqblk): Change d_flags field's type from int8_t
   7232 	to uint8_t.
   7233 	(decode_cmd_data): Use PRINT_FIELD_FLAGS.
   7234 
   7235 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7236 
   7237 	Unify different generic PRINT_FIELD_* implementations.
   7238 	Create a new header print_fields.h and move generic PRINT_FIELD_*
   7239 	macros there.
   7240 
   7241 	* print_fields.h: New file.
   7242 	* Makefile.am (strace_SOURCES): Add it.
   7243 	* netlink_sock_diag.c: Include "print_fields.h".
   7244 	(PRINT_FIELD_U, PRINT_FIELD_X, PRINT_FIELD_COOKIE, PRINT_FIELD_FLAGS,
   7245 	PRINT_FIELD_XVAL): Move to print_fields.h file.
   7246 	* quota.c: Include "print_fields.h".
   7247 	(PRINT_FIELD_D): Move to print_fields.h file.
   7248 	(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
   7249 	* statx.c: Include "print_fields.h".
   7250 	(PRINT_FIELD_U): Remove.
   7251 	(SYS_FUNC(statx)): Update PRINT_FIELD_U callers.
   7252 	* tests/quotactl.h: Include "print_fields.h".
   7253 	* tests/quotactl-xfs.c: Update callers of PRINT_FIELD_* macros.
   7254 	* tests/quotactl.c: Likewise.
   7255 	(PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): Remove.
   7256 	* tests/test_nlattr.h: Include "print_fields.h".
   7257 	(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
   7258 	* tests/xstatx.c: Include "print_fields.h".
   7259 	(PRINT_FIELD_U): Remove.
   7260 	(print_stat): Update PRINT_FIELD_U callers.
   7261 	* tests/tests.h [!STRACE_PRINTF] (STRACE_PRINTF): Define to printf.
   7262 
   7263 2017-07-01  Eugeniy Paltsev  <Eugeniy.Paltsev (a] synopsys.com>
   7264 
   7265 	arc: fix wrong access to "sp" member in user_regs_struct.
   7266 	"sp" register is a member of "scratch" structure (which is nested
   7267 	in user_regs_struct)
   7268 
   7269 	* linux/arc/arch_regs.c: Replace .sp with .scratch.sp .
   7270 
   7271 	Fixes: v4.16-31-g134042a5 ("arc: export arc_sp_ptr")
   7272 
   7273 2017-07-01  Khem Raj  <raj.khem (a] gmail.com>
   7274 
   7275 	aarch64, tile: replace struct ucontext with ucontext_t.
   7276 	glibc >= 2.26 has dropped the tag struct ucontext from ucontext_t type.
   7277 
   7278 	* linux/arm/arch_sigreturn.c (arch_sigreturn) [AARCH64]: Replace
   7279 	struct ucontext with ucontext_t.
   7280 	* linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise.
   7281 
   7282 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7283 
   7284 	tests: enhance nlattr_unix_diag_msg test.
   7285 	* tests/nlattr_unix_diag_msg.c: Include "test_nlattr.h".
   7286 	(test_unix_diag_vfs, test_unix_diag_icons, test_unix_diag_rqlen):
   7287 	Remove.
   7288 	(init_unix_diag_msg): Add const qualifier to arguments and variables.
   7289 	(print_unix_diag_msg, print_uint): New functions.
   7290 	(main): Use them and macros from test_nlattr.h file.
   7291 
   7292 2017-07-01  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7293 
   7294 	tests: check decoding of netlink unix_diag_msg attributes.
   7295 	* tests/nlattr_unix_diag_msg.c: New file.
   7296 	* tests/gen_tests.in (nlattr_unix_diag_msg): New entry.
   7297 	* tests/pure_executables.list: Add nlattr_unix_diag_msg.
   7298 	* tests/.gitignore: Likewise.
   7299 
   7300 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7301 
   7302 	netlink_sock_diag: ensure that structure field names are printed properly
   7303 	* netlink_sock_diag.c (decode_unix_diag_vfs, decode_unix_diag_rqlen):
   7304 	Use PRINT_FIELD_U to print structure fields.
   7305 
   7306 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7307 
   7308 	netlink_sock_diag: add const qualifiers.
   7309 	Add const qualifiers to auto variables and function arguments.
   7310 	This change does not affect the code generated by the compiler,
   7311 	the purpose of these "const" qualifiers is to highlight the intent.
   7312 
   7313 	* netlink_sock_diag.c (decode_unix_diag_vfs, decode_unix_diag_inode,
   7314 	decode_unix_diag_rqlen): Add const qualifier to tcp, addr, and len
   7315 	arguments.
   7316 
   7317 2017-07-01  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7318 
   7319 	netlink: decode AF_UNIX unix_diag_msg attributes.
   7320 	* netlink_sock_diag.c (unix_diag_msg_nla_decoders): New array.
   7321 	(decode_unix_diag_msg): Use it.
   7322 	* linux/unix_diag.h (unix_diag_vfs, unix_diag_rqlen): New structures.
   7323 
   7324 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7325 
   7326 	tests: enhance nlattr_netlink_diag_msg test.
   7327 	* tests/nlattr_netlink_diag_msg.c: Include "test_nlattr.h".
   7328 	(test_netlink_diag_groups, test_netlink_diag_rx_ring,
   7329 	test_netlink_diag_flags): Remove.
   7330 	(init_netlink_diag_msg): Add const qualifier to arguments and variables.
   7331 	(print_netlink_diag_msg, print_xlong): New functions.
   7332 	(main): Use them and macros from test_nlattr.h file.
   7333 
   7334 2017-07-01  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7335 
   7336 	tests: check decoding of netlink_diag_msg attributes.
   7337 	* tests/nlattr_netlink_diag_msg.c: New file.
   7338 	* tests/gen_tests.in (nlattr_netlink_diag_msg): New entry.
   7339 	* tests/pure_executables.list: Add nlattr_netlink_diag_msg.
   7340 	* tests/.gitignore: Likewise.
   7341 
   7342 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7343 
   7344 	netlink_sock_diag: ensure that structure field names are printed properly
   7345 	* netlink_sock_diag.c (decode_netlink_diag_ring): Use PRINT_FIELD_U
   7346 	to print structure fields.
   7347 
   7348 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7349 
   7350 	netlink_sock_diag: add const qualifiers.
   7351 	Add const qualifiers to auto variables and function arguments.
   7352 	This change does not affect the code generated by the compiler,
   7353 	the purpose of these "const" qualifiers is to highlight the intent.
   7354 
   7355 	* netlink_sock_diag.c (print_group, decode_netlink_diag_groups,
   7356 	decode_netlink_diag_ring, decode_netlink_diag_flags): Add const
   7357 	qualifier to tcp, addr, and len arguments.
   7358 
   7359 2017-07-01  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7360 
   7361 	netlink: decode AF_NETLINK netlink_diag_msg attributes.
   7362 	* linux/netlink_diag.h (netlink_diag_ring): New structure.
   7363 	(NDIAG_FLAG_*): New macros.
   7364 	* netlink_sock_diag.c: Include "xlat/netlink_socket_flags.h".
   7365 	(print_group, decode_netlink_diag_groups, decode_netlink_diag_ring,
   7366 	decode_netlink_diag_flags): New functions.
   7367 	(netlink_diag_msg_nla_decoders): New array.
   7368 	(decode_netlink_diag_msg): Use it.
   7369 	* xlat/netlink_socket_flags.in: New file.
   7370 
   7371 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7372 
   7373 	netlink_sock_diag: print inet_diag_sockid.idiag_if as an interface index
   7374 	* netlink_sock_diag.c (print_inet_diag_sockid): Print idiag_if field
   7375 	using print_ifindex.
   7376 	* tests/nlattr_inet_diag_msg.c: Include <net/if.h>.
   7377 	(IFINDEX_LO): New macro.
   7378 	(init_inet_diag_msg): Set inet_diag_sockid.idiag_if field.
   7379 	(print_inet_diag_msg): Update expected output.
   7380 
   7381 2017-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   7382 	    JingPiao Chen  <chenjingpiao (a] gmail.com>
   7383 
   7384 	tests: check decoding of several standard netlink attributes.
   7385 	* tests/nlattr_inet_diag_msg.c (main): Check decoding of uint32_t,
   7386 	uint8_t, and zero-terminated string attributes.
   7387 
   7388 2017-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   7389 
   7390 	tests: enhance nlattr_inet_diag_msg test.
   7391 	* tests/test_nlattr.h: New file.
   7392 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   7393 	* tests/nlattr_inet_diag_msg.c: Include "test_nlattr.h".
   7394 	(test_inet_diag_meminfo, test_inet_diag_vegasinfo,
   7395 	test_inet_diag_dctcpinfo, test_inet_diag_bbrinfo): Remove.
   7396 	(address): New variable.
   7397 	(init_inet_diag_msg): Remove "address" argument, add const qualifier
   7398 	to all remaining arguments.
   7399 	(print_inet_diag_msg, print_uint): New functions.
   7400 	(main): Use macros from test_nlattr.h file.
   7401 
   7402 2017-06-30  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7403 
   7404 	tests: check decoding of netlink inet_diag_msg attributes.
   7405 	* tests/nlattr_inet_diag_msg.c: New file.
   7406 	* tests/gen_tests.in (nlattr_inet_diag_msg): New entry.
   7407 	* tests/pure_executables.list: Add nlattr_inet_diag_msg.
   7408 	* tests/.gitignore: Likewise.
   7409 
   7410 2017-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   7411 
   7412 	netlink_sock_diag: ensure that structure field names are printed properly
   7413 	* netlink_sock_diag.c (PRINT_FIELD_X): New macro.
   7414 	(decode_inet_diag_meminfo, decode_tcpvegas_info, decode_tcp_dctcp_info,
   7415 	decode_tcp_bbr_info): Use it and PRINT_FIELD_U to print structure
   7416 	fields.
   7417 
   7418 2017-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   7419 
   7420 	netlink_sock_diag: add const qualifiers.
   7421 	Add const qualifiers to auto variables and function arguments.
   7422 	This change does not affect the code generated by the compiler,
   7423 	the purpose of these "const" qualifiers is to highlight the intent.
   7424 
   7425 	* netlink_sock_diag.c (print_meminfo, decode_meminfo,
   7426 	decode_inet_diag_meminfo, decode_tcpvegas_info, decode_tcp_dctcp_info,
   7427 	decode_tcp_bbr_info): Add const qualifier to tcp, addr, and len
   7428 	arguments.
   7429 
   7430 2017-06-30  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7431 
   7432 	netlink: decode AF_INET inet_diag_msg attributes.
   7433 	* linux/inet_diag.h (inet_diag_meminfo, tcpvegas_info,
   7434 	tcp_dctcp_info, tcp_bbr_info): New structures.
   7435 	* linux/sock_diag.h (SK_MEMINFO_VARS): New macro.
   7436 	* netlink_sock_diag.c: Include  <linux/sock_diag.h>.
   7437 	(print_meminfo, decode_meminfo, decode_inet_diag_meminfo,
   7438 	decode_tcpvegas_info, decode_tcp_dctcp_info, decode_tcp_bbr_info):
   7439 	New functions.
   7440 	(inet_diag_msg_nla_decoders): New array.
   7441 	(decode_inet_diag_msg): Use it.
   7442 
   7443 2017-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   7444 
   7445 	nlattr: add const qualifiers to auto variables and function arguments.
   7446 	This change does not affect the code generated by the compiler,
   7447 	the purpose of these "const" qualifiers is to highlight the intent.
   7448 
   7449 	* nlattr.c (decode_nlattr_with_data, decode_nla_str, decode_nla_strn,
   7450 	decode_nla_##name): Add const qualifier to tcp, addr, and len arguments.
   7451 
   7452 2017-06-30  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7453 	    Fabien Siron  <fabien.siron (a] epita.fr>
   7454 
   7455 	netlink: introduce nla_decoder_t to parse netlink attributes data.
   7456 	* nlattr.h (nla_decoder_t): New typedef.
   7457 	(DECL_NLA): New macro.
   7458 	(decode_nlattr): Add decoders, size and opaque_data argument.
   7459 	* nlattr.c: (decode_nlattr_with_data): Likewise.
   7460 	(decode_nla_*): New functions.
   7461 	* netlink_sock_diag.c (decode_inet_diag_req_compat)
   7462 	(decode_inet_diag_req_v2, decode_inet_diag_msg)
   7463 	(decode_netlink_diag_msg, (decode_packet_diag_msg)
   7464 	(decode_smc_diag_msg, decode_unix_diag_msg): Add decoders,
   7465 	size and opaque_data arguments. All callers updated.
   7466 
   7467 2017-06-30  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7468 
   7469 	netlink: add a basic netlink attribute parser of AF_SMC diag.
   7470 	* netlink_sock_diag.c: Include "xlat/smc_diag_attrs.h".
   7471 	(decode_smc_diag_msg): Use decode_nlattr.
   7472 	* xlat/smc_diag_attrs.in: New file.
   7473 
   7474 2017-06-30  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7475 	    Fabien Siron  <fabien.siron (a] epita.fr>
   7476 
   7477 	netlink: add a basic netlink attribute parser of AF_INET diag.
   7478 	* linux/inet_diag.h (INET_DIAG_REQ_*): New enum.
   7479 	* netlink_sock_diag.c: Include "xlat/inet_diag_attrs.h"
   7480 	and "xlat/inet_diag_req_attrs.h".
   7481 	(decode_inet_diag_req_compat, decode_inet_diag_req_v2,
   7482 	 decode_inet_diag_msg): Use decode_nlattr.
   7483 	* xlat/inet_diag_attrs.in: New file.
   7484 	* xlat/inet_diag_req_attrs.in: Likewise.
   7485 
   7486 	netlink: add a basic netlink attribute parser of AF_PACKET diag.
   7487 	* linux/packet_diag.h (PACKET_DIAG_*): New enum.
   7488 	* netlink_sock_diag.c: Include "xlat/packet_diag_attrs.h".
   7489 	(decode_packet_diag_msg): Use decode_nlattr.
   7490 	* xlat/packet_diag_attrs.in: New file.
   7491 
   7492 	netlink: add a basic netlink attribute parser of AF_NETLINK diag.
   7493 	* linux/netlink_diag.h (NETLINK_DIAG_*): New enum.
   7494 	* netlink_sock_diag.c: Include "xlat/netlink_diag_attrs.h".
   7495 	(decode_netlink_diag_msg): Use decode_nlattr.
   7496 	* xlat/netlink_diag_attrs.in: New file.
   7497 
   7498 2017-06-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   7499 
   7500 	netlink_sock_diag: ensure that structure field names are printed properly
   7501 	* netlink_sock_diag.c (PRINT_FIELD_U, PRINT_FIELD_COOKIE,
   7502 	PRINT_FIELD_FLAGS, PRINT_FIELD_XVAL): New macros.
   7503 	(decode_unix_diag_req, decode_unix_diag_msg, decode_netlink_diag_req,
   7504 	decode_netlink_diag_msg, decode_packet_diag_req, decode_packet_diag_msg,
   7505 	print_inet_diag_sockid, decode_inet_diag_req_compat,
   7506 	decode_inet_diag_req_v2, decode_inet_diag_msg, decode_smc_diag_req,
   7507 	decode_smc_diag_msg): Use them to print structure fields.
   7508 
   7509 2017-06-29  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   7510 
   7511 	Update ioctl entries from linux v4.12-rc7.
   7512 	* linux/32/ioctls_inc_align16.h: Update from linux v4.12-rc7
   7513 	(with f7a320ff commit applied on top) using ioctls_gen.sh.
   7514 	* linux/32/ioctls_inc_align32.h: Likewise.
   7515 	* linux/32/ioctls_inc_align64.h: Likewise.
   7516 	* linux/64/ioctls_inc.h: Likewise.
   7517 	* linux/x32/ioctls_inc0.h: Likewise.
   7518 	* NEWS: Mention this.
   7519 
   7520 2017-06-29  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   7521 
   7522 	maint: fix ioctls_sym.sh premature termination.
   7523 	When the list of headers do not fit into the command line, xargs splits
   7524 	it into several lists and then passes them to grep.  If no headers from
   7525 	a list match the grep pattern, grep exits with a non-zero status that
   7526 	causes xargs to exit with a non-zero status, too.
   7527 
   7528 	* maint/ioctls_sym.sh: Use "find -exec +" instead of xargs,
   7529 	ignore its exit status.
   7530 
   7531 2017-06-27  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7532 
   7533 	tests: introduce NLMSG_ATTR macro.
   7534 	* tests/tests.h (NLMSG_ATTR): New macro.
   7535 	* tests/nlattr.c (test_nlattr, test_nla_type): Use it.
   7536 
   7537 2017-06-27  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7538 
   7539 	netlink: pass NLMSG_DONE messages to family specific payload decoders.
   7540 	While many NLMSG_DONE messages indeed have payload containing
   7541 	just one integer, there are exceptions. Handle this by passing
   7542 	payloads of NLMSG_DONE messages to family specific netlink
   7543 	payload decoders.
   7544 
   7545 	* netlink.c (print_nlmsghdr): Do not skip family detection
   7546 	for nlmsg_type == NLMSG_DONE.
   7547 	(decode_nlmsg_type): Skip family specific type decoders
   7548 	for type == NLMSG_DONE.
   7549 	(decode_nlmsg_flags): Skip family specific decoding of flags
   7550 	for type == NLMSG_DONE.
   7551 	(decode_netlink_sock_diag): Skip for nlmsg_type == NLMSG_DONE.
   7552 
   7553 2017-06-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   7554 
   7555 	Unexport die_out_of_memory.
   7556 	Print more specific error diagnostics than a generic "Out of memory"
   7557 	when an error happens outside xmalloc.c.
   7558 
   7559 	* defs.h (die_out_of_memory): Remove prototype.
   7560 	* strace.c (strace_popen, init): Call perror_msg_and_die instead
   7561 	of die_out_of_memory.
   7562 	* unwind.c (unwind_tcb_init): Likewise.
   7563 	* xmalloc.c (die_out_of_memory): Add static qualifier.
   7564 
   7565 2017-06-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   7566 
   7567 	Check -s argument early.
   7568 	* util.c (printstr_ex): Move the check that -s argument
   7569 	does not exceed -1U / 4 ...
   7570 	* strace.c (init): ... here.
   7571 	* tests/options-syntax.test: Check it.
   7572 
   7573 2017-06-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   7574 
   7575 	Include "netlink.h" instead of <linux/netlink.h>
   7576 	* net.c: Include "netlink.h" instead of <linux/netlink.h>.
   7577 	* sockaddr.c: Likewise.
   7578 	* tests/create_nl_socket.c: Likewise.
   7579 	* tests/net-sockaddr.c: Likewise.
   7580 	* tests/netlink_audit.c: Likewise.
   7581 	* tests/netlink_generic.c: Likewise.
   7582 	* tests/netlink_inet_diag.c: Likewise.
   7583 	* tests/netlink_netfilter.c: Likewise.
   7584 	* tests/netlink_route.c: Likewise.
   7585 	* tests/netlink_selinux.c: Likewise.
   7586 	* tests/netlink_xfrm.c: Likewise.
   7587 	* tests/net-yy-netlink.c: Include "netlink.h" instead
   7588 	of <linux/netlink.h>, remove fallback definition of NETLINK_SOCK_DIAG.
   7589 	* tests/netlink_netlink_diag.c: Likewise.
   7590 	* tests/netlink_protocol.c: Likewise.
   7591 	* tests/netlink_sock_diag.c: Likewise.
   7592 	* tests/netlink_unix_diag.c: Likewise.
   7593 	* tests/nlattr.c: Likewise.
   7594 
   7595 2017-06-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   7596 
   7597 	netlink: provide a fallback definition of NETLINK_SOCK_DIAG.
   7598 	Add a fallback definition of NETLINK_SOCK_DIAG to netlink.h
   7599 	instead of adding these fallback definitions to every file.
   7600 
   7601 	* netlink.h: Provide a fallback definition of NETLINK_SOCK_DIAG.
   7602 	* socketutils.c: Include "netlink.h" instead of <linux/netlink.h>,
   7603 	remove fallback definition of NETLINK_SOCK_DIAG.
   7604 
   7605 2017-06-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   7606 
   7607 	Update prctl ARCH_* constants.
   7608 	* xlat/archvals.in: Add ARCH_GET_CPUID and ARCH_SET_CPUID
   7609 	introduced by linux kernel commit v4.12-rc1~153^2~2.
   7610 
   7611 2017-06-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   7612 
   7613 	Update V4L2_* constants.
   7614 	* xlat/v4l2_buf_types.in: Add V4L2_BUF_TYPE_META_CAPTURE introduced
   7615 	by linux kernel commit v4.12-rc1~85^2~71.
   7616 	* xlat/v4l2_device_capabilities_flags.in: Add V4L2_CAP_META_CAPTURE
   7617 	introduced by the same commit.
   7618 	* xlat/v4l2_control_flags.in: Add V4L2_CTRL_FLAG_HAS_PAYLOAD,
   7619 	V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, and V4L2_CTRL_FLAG_MODIFY_LAYOUT
   7620 	introduced by linux kernel commits v3.17-rc1~112^2~363,
   7621 	v4.1-rc1~59^2~1^2~63, and v4.12-rc1~85^2~62, respectively.
   7622 	* xlat/v4l2_control_types.in: Add V4L2_CTRL_TYPE_U8, V4L2_CTRL_TYPE_U16,
   7623 	and V4L2_CTRL_TYPE_U32 introduced by linux kernel commits
   7624 	v3.17-rc1~112^2~343 and v3.17-rc1~112^2~112.
   7625 
   7626 	Update SCTP_* constants.
   7627 	* xlat/socksctpoptions.in: Add SCTP_ENABLE_STREAM_RESET,
   7628 	SCTP_RESET_STREAMS, SCTP_RESET_ASSOC, SCTP_ADD_STREAMS,
   7629 	SCTP_RECONFIG_SUPPORTED, and SCTP_PR_STREAM_STATUS introduced
   7630 	by linux kernel commits v4.11-rc1~124^2~387^2~1, v4.11-rc1~124^2~387^2,
   7631 	v4.11-rc1~124^2~166^2~2, v4.11-rc1~124^2~166^2, v4.12-rc1~64^3~469^2,
   7632 	and v4.12-rc1~64^3~276, respectively.
   7633 
   7634 	Update RTM_* constants.
   7635 	* xlat/nl_route_types.in: Add RTM_DELNETCONF introduced
   7636 	by linux kernel commit v4.12-rc1~64^3~312^2~6.
   7637 
   7638 	Update NDIAG_SHOW_* constants.
   7639 	* linux/netlink_diag.h (NDIAG_SHOW_FLAGS): New constant introduced
   7640 	by linux kernel commit v4.12-rc1~64^3~260.
   7641 	* xlat/netlink_diag_show.in: Add it.
   7642 
   7643 	Update KEYCTL_* constants.
   7644 	* xlat/keyctl_commands.in: Add KEYCTL_RESTRICT_KEYRING introduced
   7645 	by linux kernel commit v4.12-rc1~123^2~7^2~2^2~3.
   7646 
   7647 	Update ARPHRD_* constants.
   7648 	* xlat/arp_hardware_types.in: Add ARPHRD_VSOCKMON introduced
   7649 	by linux kernel commit v4.12-rc1~129^2~118^2~2.
   7650 
   7651 	Update SO_* constants.
   7652 	* xlat/sockoptions.in: Add SO_MEMINFO, SO_INCOMING_NAPI_ID,
   7653 	and SO_COOKIE introduced by linux kernel commits v4.12-rc1~64^3~389,
   7654 	v4.12-rc1~64^3~341^2, and v4.12-rc1~64^3~221^2~1, respectively.
   7655 
   7656 2017-06-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   7657 
   7658 	tests: check more corner cases of nlattr decoding.
   7659 	* tests/nlattr.c (test_nlattr): Check decoding in case of invalid
   7660 	struct nlattr.nla_len.
   7661 
   7662 2017-06-21  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7663 
   7664 	tests: check decoding of netlink attribute.
   7665 	* tests/nlattr.c: New file.
   7666 	* tests/gen_tests.in (nlattr): New entry.
   7667 	* tests/pure_executables.list: Add nlattr.
   7668 	* tests/.gitignore: Likewise.
   7669 
   7670 2017-06-21  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7671 	    Fabien Siron  <fabien.siron (a] epita.fr>
   7672 
   7673 	netlink: introduce a basic netlink attributes parser.
   7674 	* linux/unix_diag.h (UNIX_DIAG_*): New enum.
   7675 	* nlattr.c: New file.
   7676 	* nlattr.h: Likewise.
   7677 	* Makefile.am (strace_SOURCES): Add them.
   7678 	* netlink_sock_diag.c: Include "nlattr.h" and "xlat/unix_diag_attrs.h".
   7679 	(decode_unix_diag_msg): Use decode_nlattr.
   7680 	* xlat/unix_diag_attrs.in: New file.
   7681 
   7682 2017-06-21  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7683 
   7684 	netlink: introduce netlink.h.
   7685 	* netlink.h: New file.
   7686 	* Makefile.am (strace_SOURCES): Add it.
   7687 	* netlink_sock_diag.c: Include "netlink.h",
   7688 	remove <sys/socket.h> and <linux/netlink.h>.
   7689 	* netlink.c: Likewise.
   7690 	(NLMSG_HDRLEN): Move to netlink.h.
   7691 	* tests/netlink_protocol.c: Replace <linux/netlink.h> with "netlink.h".
   7692 	* tests/netlink_sock_diag.c: Likewise.
   7693 
   7694 2017-06-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   7695 
   7696 	tests: add SET_STRUCT macro to tests.h.
   7697 	* tests/netlink_sock_diag.c (INIT_STRUCT): Rename to SET_STRUCT,
   7698 	all callers updated.  Move ...
   7699 	* tests/tests.h: ... here.
   7700 
   7701 2017-06-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   7702 
   7703 	tests: fix potential unaligned access in netlink_sock_diag.test.
   7704 	Despite our efforts made to avoid unaligned access, gcc appears to be
   7705 	generating instructions that might cause unaligned access when copying
   7706 	structures to unaligned addresses.
   7707 
   7708 	Fix this issue by replacing copying of structures to unaligned addresses
   7709 	with memcpy calls.
   7710 
   7711 	* tests/netlink_sock_diag.c (INIT_STRUCT): New macro.
   7712 	(test_odd_family_req, test_odd_family_msg, test_unix_diag_req,
   7713 	test_unix_diag_msg, test_netlink_diag_req, test_netlink_diag_msg,
   7714 	test_packet_diag_req, test_packet_diag_msg, test_inet_diag_sockid,
   7715 	test_inet_diag_req, test_inet_diag_req_v2, test_inet_diag_msg,
   7716 	test_smc_diag_req, test_smc_diag_msg): Use it to initialize potentially
   7717 	unaligned struct nlmsghdr.  Do not access nlh->nlmsg_len.
   7718 
   7719 2017-06-19  Masatake YAMATO  <yamato (a] redhat.com>
   7720 
   7721 	tests: check decoding of NETLINK_GENERIC message types.
   7722 	* tests/netlink_generic.c: New file.
   7723 	* tests/gen_tests.in (netlink_generic): New entry.
   7724 	* tests/pure_executables.list: Add netlink_generic.
   7725 	* tests/.gitignore: Likewise.
   7726 
   7727 2017-06-19  Masatake YAMATO  <yamato (a] redhat.com>
   7728 
   7729 	netlink: add decoding of NETLINK_GENERIC protocol families.
   7730 	NETLINK_GENERIC is a protocol stacked on netlink protocol.
   7731 
   7732 	When a NETLINK_GENERIC subsystem registers its "family" name in the
   7733 	kernel at run time, an integer value associated with this name is
   7734 	assigned by the kernel.  This integer value is specified in struct
   7735 	nlmsghdr.nlmsg_type of subsequent communications with the
   7736 	NETLINK_GENERIC subsystem.
   7737 
   7738 	This change implements decoding of NETLINK_GENERIC message types in
   7739 	symbolic form, for example:
   7740 
   7741 	  $ ./strace -yy -e 'sendto' ip tcp_metrics > /dev/null
   7742 	  sendto(4<NETLINK:[GENERIC:12345]>, {{len=20, type=tcp_metrics, ...
   7743 	  +++ exited with 0 +++
   7744 
   7745 	Note that type= specifying the NETLINK_GENERIC protocol family
   7746 	is decoded properly.
   7747 
   7748 	* netlink.c (decode_nlmsg_type_generic): New function.
   7749 	(nlmsg_types): Add NETLINK_GENERIC entry.
   7750 
   7751 2017-06-19  Masatake YAMATO  <yamato (a] redhat.com>
   7752 
   7753 	socketutils: build a dynamic xlat table for NETLINK_GENERIC decoding.
   7754 	* configure.ac (AC_CHECK_HEADERS): Add linux/genetlink.h.
   7755 	* defs.h (genl_families_xlat): New prototype.
   7756 	* socketutils.c [HAVE_LINUX_GENETLINK_H]: Include <linux/genetlink.h>.
   7757 	[HAVE_LINUX_GENETLINK_H] (genl_send_dump_families,
   7758 	genl_parse_families_response): New helper functions.
   7759 	(genl_families_xlat): New function for building the xlat table
   7760 	for NETLINK_GENERIC decoding.
   7761 
   7762 2017-06-19  Masatake YAMATO  <yamato (a] redhat.com>
   7763 
   7764 	dyxlat: new interface for building xlat tables dynamically.
   7765 	xlat tables are usually generated at build time.
   7766 
   7767 	printxval is suitable for printing struct nlmsghdr.nlmsg_type for
   7768 	NETLINK_GENERIC protocol.  However, the corresponding xlat table
   7769 	cannot be defined at build time because the values are registered
   7770 	by the kernel at run time.
   7771 
   7772 	This change introduces dyxlat functions for building xlat tables
   7773 	dynamically.  The primary use case is decoding nlmsg_type but this
   7774 	interface can be used for other purposes.
   7775 
   7776 	* defs.h (struct dyxlat): New opaque data type.
   7777 	(dyxlat_alloc, dyxlat_free, dyxlat_add_pair): New function declarations.
   7778 	* dyxlat.c: New file.
   7779 	* Makefile.am (strace_SOURCES): Add it.
   7780 
   7781 2017-06-19  Masatake YAMATO  <yamato (a] redhat.com>
   7782 
   7783 	Introduce xstrndup function.
   7784 	* configure.ac (AC_CHECK_FUNCS): Add strndup.
   7785 	* defs.h (xstrndup): New prototype.
   7786 	* xmalloc.c (xstrndup): New function.
   7787 
   7788 2017-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   7789 
   7790 	netlink: do not print extra braces around payloadless nlmsghdr.
   7791 	* netlink.c (decode_nlmsghdr_with_payload): Print braces before
   7792 	print_nlmsghdr and after decode_payload iff decode_payload is invoked.
   7793 	* tests/netlink_audit.c (test_nlmsg_type): Update expected output.
   7794 	* tests/netlink_netfilter.c: Likewise.
   7795 	* tests/netlink_selinux.c: Likewise.
   7796 	* tests/netlink_protocol.c (send_query): Likewise.
   7797 	* tests/netlink_route.c (test_nlmsg_type, test_nlmsg_flags): Likewise.
   7798 	* tests/netlink_sock_diag.c: Likewise.
   7799 	* tests/netlink_xfrm.c: Likewise.
   7800 
   7801 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7802 
   7803 	Strip argument name of type "struct tcb *" from function prototypes.
   7804 	"struct tcb *" was used in most prototypes along with "struct tcb *tcp",
   7805 	this change converts the latter form to the former for consistency.
   7806 
   7807 	Fix a few spacing style issues.
   7808 	Reported by kernel's checkpatch.pl script.
   7809 
   7810 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7811 
   7812 	Strip redundant trailing semicolons.
   7813 	Strip trailing semicolons from macro definitions.
   7814 	Strip extra semicolons from statements terminations.
   7815 
   7816 	Reported by kernel's checkpatch.pl script.
   7817 
   7818 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7819 
   7820 	Fix macros encosure in a do/while loop.
   7821 	Enclose macros with multiple statements and macros starting
   7822 	with "if" statement in a do/while loop.
   7823 	Do not enclose single statement macros in a do/while loop.
   7824 
   7825 	Reported by kernel's checkpatch.pl script.
   7826 
   7827 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7828 
   7829 	Use __func__ instead of gcc specific __FUNCTION__
   7830 	Reported by kernel's checkpatch.pl script.
   7831 
   7832 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7833 
   7834 	Fix a few initialization style issues.
   7835 	Do not initialise statics and globals to 0, NULL, or false.
   7836 
   7837 	Reported by kernel's checkpatch.pl script.
   7838 
   7839 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7840 
   7841 	Fix function prototypes with unspecified arguments.
   7842 	Change functions declared as taking unspecified number of arguments
   7843 	of unspecified type to functions that take no arguments.
   7844 
   7845 	Reported by kernel's checkpatch.pl script.
   7846 
   7847 2017-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   7848 
   7849 	Fix a few sizeof style issues.
   7850 	Reported by kernel's checkpatch.pl script.
   7851 
   7852 	Fix a few misspellings in comments.
   7853 	Reported by kernel's checkpatch.pl script.
   7854 
   7855 2017-06-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   7856 
   7857 	print_mreq: remove superfluous print_quoted_string calls.
   7858 	The string returned by inet_ntoa(3) has IPv4 dotted-decimal notation,
   7859 	no need to quote it.
   7860 
   7861 	* net.c (print_mreq): Remove print_quoted_string calls.
   7862 
   7863 2017-06-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   7864 
   7865 	tests: check decoding of incomplete SCM_TIMESTAMP* control messages.
   7866 	* tests/msg_control.c (test_scm_timestamp, test_scm_timestampns,
   7867 	test_scm_timestamping): Check decoding of incomplete control messages.
   7868 
   7869 2017-06-15  Miroslav Lichvar  <mlichvar (a] redhat.com>
   7870 
   7871 	msghdr: print SCM_TIMESTAMP* control messages.
   7872 	Add support for printing control messages containing software and/or
   7873 	hardware timestamps, which are typically enabled by NTP and PTP
   7874 	implementations.
   7875 
   7876 	* print_timeval.c (print_struct_timeval_data_size): New mpers printer.
   7877 	* print_timespec.c (print_struct_timespec_data_size,
   7878 	print_struct_timespec_array_data_size): Likewise.
   7879 	* msghdr.c (print_scm_timestamp, print_scm_timestampns,
   7880 	print_scm_timestamping): New functions.
   7881 	(cmsg_socket_printers): Add them.
   7882 	* NEWS: Mention this change.
   7883 	* tests/msg_control.c: Include "xlat.h" and "xlat/scmvals.h".
   7884 	(test_scm_timestamp, test_scm_timestampns, test_scm_timestamping):
   7885 	New functions.
   7886 	(test_sol_socket): Use them.
   7887 
   7888 2017-06-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7889 
   7890 	tests: check decoding of NETLINK_SOCK_DIAG AF_SMC messages.
   7891 	* tests/netlink_sock_diag.c: Include <linux/smc_diag.h>.
   7892 	(SMC_ACTIVE): New macro.
   7893 	(test_smc_diag_req, test_smc_diag_msg): New functions.
   7894 	(main): Use them.
   7895 
   7896 	netlink: add a basic socket diag parser of AF_SMC messages.
   7897 	* linux/smc_diag.h: New file.
   7898 	* Makefile.am (EXTRA_DIST): Add it.
   7899 	* netlink_sock_diag.c: Include <linux/smc_diag.h>,
   7900 	"xlat/smc_diag_extended_flags.h" and "xlat/smc_states.h".
   7901 	(decode_smc_diag_req, decode_smc_diag_msg): New functions.
   7902 	(diag_decoders): Add AF_SMC.
   7903 	* xlat/smc_diag_extended_flags.in: New file.
   7904 	* xlat/smc_states.in: Likewise.
   7905 
   7906 2017-06-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7907 	    Fabien Siron  <fabien.siron (a] epita.fr>
   7908 
   7909 	tests: check decoding of NETLINK_SOCK_DIAG AF_INET messages.
   7910 	* tests/netlink_sock_diag.c: Include <arpa/inet.h>
   7911 	and <linux/inet_diag.h>.
   7912 	(test_inet_diag_sockid, test_inet_diag_req, test_inet_diag_req_v2,
   7913 	test_inet_diag_msg): New functions.
   7914 	(mian): Use them.
   7915 
   7916 	netlink: add a basic socket diag parser of AF_INET and AF_INET6 messages
   7917 	* defs.h (inet_protocols): New xlat prototype.
   7918 	* linux/inet_diag.h (inet_diag_req): New structure.
   7919 	(INET_DIAG_*): New enum.
   7920 	* netlink_sock_diag.c: Include <arpa/inet.h>, <linux/inet_diag.h>
   7921 	and "xlat/inet_diag_extended_flags.h".
   7922 	(print_inet_diag_sockid, decode_inet_diag_req_compat)
   7923 	(decode_inet_diag_req_v2, decode_inet_diag_req)
   7924 	(decode_inet_diag_msg): New functions.
   7925 	(diag_decoders): Add AF_INET and AF_INET6;
   7926 	* xlat/inet_diag_extended_flags.in: New file.
   7927 
   7928 2017-06-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   7929 
   7930 	Introduce print_inet_addr.
   7931 	* defs.h (print_inet_addr): New prototype.
   7932 	* sockaddr.c (print_inet_addr): New function.
   7933 	(print_sockaddr_data_in6): Use it.
   7934 	* net.c (print_mreq6): Likewise.
   7935 	* tests/ip_mreq.c (main): Update expected output.
   7936 
   7937 2017-06-15  JingPiao Chen  <chenjingpiao (a] gmail.com>
   7938 	    Fabien Siron  <fabien.siron (a] epita.fr>
   7939 
   7940 	tests: check decoding of NETLINK_SOCK_DIAG AF_PACKET messages.
   7941 	* tests/netlink_sock_diag.c: Include <linux/if_ether.h>
   7942 	and <linux/packet_diag.h>.
   7943 	(test_packet_diag_req, test_packet_diag_msg): New functions.
   7944 	(main): Use them.
   7945 
   7946 	netlink: add a basic socket diag parser of AF_PACKET messages.
   7947 	* linux/packet_diag.h: New file.
   7948 	* Makefile.am (EXTRA_DIST): Add it.
   7949 	* defs.h (ethernet_protocols): New xlat prototype.
   7950 	* netlink_sock_diag.c: Include <linux/packet_diag.h>
   7951 	and "xlat/packet_diag_show.h".
   7952 	(decode_packet_diag_req, decode_packet_diag_msg): New functions.
   7953 	(diag_decoders): Add AF_PACKET.
   7954 	* xlat/packet_diag_show.in: New file.
   7955 
   7956 	tests: check decoding of NETLINK_SOCK_DIAG AF_NETLINK messages.
   7957 	* tests/netlink_sock_diag.c: Include <linux/netlink_diag.h>.
   7958 	(test_netlink_diag_req, test_netlink_diag_msg): New functions.
   7959 	(main): Use them.
   7960 
   7961 	netlink: add a basic socket diag parser of AF_NETLINK messages.
   7962 	* linux/netlink_diag.h (NDIAG_SHOW_GROUPS, NDIAG_SHOW_RING_CFG):
   7963 	New macros.
   7964 	* netlink_sock_diag.c: Include <linux/netlink_diag.h>,
   7965 	"xlat/netlink_diag_show.h" and "xlat/netlink_states.h".
   7966 	(decode_netlink_diag_req, decode_netlink_diag_msg): New functions.
   7967 	(diag_decoders): Add AF_NETLINK.
   7968 	* xlat/netlink_diag_show.in: New file.
   7969 	* xlat/netlink_states.in: Likewise.
   7970 
   7971 2017-06-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   7972 	    Fabien Siron  <fabien.siron (a] epita.fr>
   7973 	    JingPiao Chen  <chenjingpiao (a] gmail.com>
   7974 
   7975 	tests: check decoding of NETLINK_SOCK_DIAG AF_UNIX messages.
   7976 	* tests/netlink_sock_diag.c: Include <netinet/tcp.h>
   7977 	and <linux/unix_diag.h>.
   7978 	(test_odd_family_req, test_odd_family_msg, test_unix_diag_req,
   7979 	test_unix_diag_msg): New functions.
   7980 	(main): Use them.
   7981 
   7982 	netlink: add a basic socket diag parser of AF_UNIX messages.
   7983 	* defs.h (socktypes): New xlat prototype.
   7984 	* linux/unix_diag.h (UDIAG_SHOW_VFS, UDIAG_SHOW_ICONS, UDIAG_SHOW_RQLEN,
   7985 	UDIAG_SHOW_MEMINFO): New macros.
   7986 	* netlink_sock_diag.c: Include <sys/socket.h>, <linux/netlink.h>,
   7987 	<linux/unix_diag.h>, "xlat/tcp_states.h", "xlat/tcp_state_flags.h",
   7988 	and "xlat/unix_diag_show.h".
   7989 	(decode_unix_diag_req, decode_unix_diag_msg): New functions.
   7990 	(netlink_diag_decoder_t): New typedef.
   7991 	(diag_decoders): New array.
   7992 	(decode_netlink_sock_diag): Use it.
   7993 	* xlat/tcp_state_flags.in: New file.
   7994 	* xlat/tcp_states.in: Likewise.
   7995 	* xlat/unix_diag_show.in: Likewise.
   7996 
   7997 	netlink: introduce family specific payload decoders.
   7998 	* defs.h (netlink_decoder_t): New typedef.
   7999 	(DECL_NETLINK): New macro.
   8000 	(decode_netlink_sock_diag): New prototype.
   8001 	* netlink.c (netlink_decoders): New array.
   8002 	(decode_payload): Use it to invoke netlink family specific decoders.
   8003 	* netlink_sock_diag.c: New file.
   8004 	* Makefile.am (strace_SOURCES): Add it.
   8005 
   8006 2017-06-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   8007 
   8008 	Update SCM_* constants.
   8009 	* xlat/scmvals.in: Add SCM_TIMESTAMP, SCM_TIMESTAMPNS, SCM_TIMESTAMPING,
   8010 	SCM_WIFI_STATUS, and SCM_TIMESTAMPING_OPT_STATS.
   8011 
   8012 2017-06-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   8013 
   8014 	netlink: refactor decode_nlmsg_type.
   8015 	* netlink.c (decode_nlmsg_type_default, decode_nlmsg_type_netfilter):
   8016 	New functions.
   8017 	(nlmsg_types_decoder_t): New typedef.
   8018 	(nlmsg_types): Add decoder field.
   8019 	(decode_nlmsg_type): Use it.
   8020 
   8021 2017-06-14  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8022 
   8023 	tests: extend printstr test.
   8024 	* tests/printstr.c (main): Add a case for short read.
   8025 
   8026 2017-06-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   8027 
   8028 	v4l2: fix preprocessor checks.
   8029 	Fix checks for struct v4l2_window.global_alpha and struct
   8030 	v4l2_sdr_format.buffersize.
   8031 
   8032 	* v4l2.c (print_v4l2_format_fmt): Do not assume that
   8033 	HAVE_STRUCT_V4L2_WINDOW_GLOBAL_ALPHA and
   8034 	HAVE_STRUCT_V4L2_SDR_FORMAT_BUFFERSIZE are defined.
   8035 	* tests/ioctl_v4l2.c (init_v4l2_format, dprint_ioctl_v4l2): Likewise.
   8036 
   8037 2017-06-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   8038 
   8039 	Move xlat related functions to a separate file.
   8040 	* util.c (xlookup, xlat_bsearch_compare, xlat_search, printxvals,
   8041 	printxval_searchn, addflags, sprintflags, printflags_ex): Move ...
   8042 	* xlat.c: ... to this new file.
   8043 	* Makefile.am (strace_SOURCES): Add it.
   8044 
   8045 2017-06-12  Masatake YAMATO  <yamato (a] redhat.com>
   8046 
   8047 	socketeutils: extend receive_responses further.
   8048 	This is the second patch in series of implementing NETLINK_GENERIC
   8049 	protocol decoder.
   8050 
   8051 	This change allows passing of opaque user data to the callback function.
   8052 
   8053 	* socketutils.c (receive_responses): Change the type of proto_name
   8054 	argument from "const char *" to "void *" to allow passing
   8055 	of arbitrary data to the callback function.
   8056 	Rename proto_name to opaque_data, make it the last argument.
   8057 	Pass it to the callback function as the last argument.
   8058 	(inet_parse_response, unix_parse_response, netlink_parse_response):
   8059 	Change the type of proto_name argument from "const char *" to "void *",
   8060 	rename it to opaque_data, make it the last argument.
   8061 	Introduce a local variable proto_name to convert the type
   8062 	of opaque_data argument from "void *" to "const char *".
   8063 	(unix_get, inet_get, netlink_get): Cast the protocol name from
   8064 	"const char *" to "void *" for passing to the callback function.
   8065 
   8066 2017-06-12  Masatake YAMATO  <yamato (a] redhat.com>
   8067 
   8068 	socketeutils: extend receive_responses to handle other netlink types.
   8069 	This is the first patch in series of implementing NETLINK_GENERIC
   8070 	protocol decoder.
   8071 
   8072 	receive_responses was written for decoding kernel responses of type
   8073 	SOCK_DIAG_BY_FAMILY, other types were ignored.
   8074 
   8075 	This change makes the type of netlink response a parameter
   8076 	so the function can be used for other types of communication.
   8077 
   8078 	* socketutils.c (receive_responses): add a new parameter
   8079 	expected_msg_type to handle types other than SOCK_DIAG_BY_FAMILY.
   8080 
   8081 2017-06-12  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8082 
   8083 	tests: fix typo.
   8084 	* tests/dup3.c (SKIP_MAIN_UNDEFINED): Remove duplicated &&.
   8085 
   8086 2017-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   8087 
   8088 	Introduce printflags_ex function.
   8089 	Add printflags_ex extension over printflags64 that, similar
   8090 	to printxvals, takes a NULL-terminated sequence of xlat pointers.
   8091 
   8092 	* defs.h (printflags_ex): New prototype.
   8093 	(printflags64): Turn into a thin wrapper around printflags_ex.
   8094 	* netlink.c (decode_nlmsg_flags): Use printflags_ex.
   8095 	* util.c (printflags_ex): New function.
   8096 	(printflags64): Remove.
   8097 	* xlat/netlink_get_flags.in: Remove entries listed
   8098 	in xlat/netlink_flags.in file.
   8099 	* xlat/netlink_new_flags.in: Likewise.
   8100 
   8101 2017-06-08  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8102 
   8103 	tests: add check for decoding netlink get and new flags.
   8104 	* tests/netlink_route.c (test_nlmsg_flags): New function, checks
   8105 	decoding of NETLINK_ROUTE get and new flags.
   8106 	(main): Use it.
   8107 	* tests/netlink_sock_diag.c (test_nlmsg_flags): New function, checks
   8108 	decoding of NETLINK_SOCK_DIAG get flags.
   8109 	(main): Use it.
   8110 	* tests/netlink_xfrm.c: (test_nlmsg_flags): New function, checks
   8111 	decoding of NETLINK_XFRM get and new flags.
   8112 	(main): Use it.
   8113 
   8114 2017-06-08  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8115 	    Fabien Siron  <fabien.siron (a] epita.fr>
   8116 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8117 
   8118 	netlink: implement generic nlmsg_flags decoding.
   8119 	* netlink.c: Include "xlat/netlink_get_flags.h"
   8120 	and "xlat/netlink_new_flags.h".
   8121 	(decode_nlmsg_flags): New function.
   8122 	(print_nlmsghdr): Use it.
   8123 	* xlat/netlink_get_flags.in: New file.
   8124 	* xlat/netlink_new_flags.in: Likewise.
   8125 
   8126 2017-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   8127 
   8128 	xlat: provide fallback definitions for XFRM_MSG_* constants.
   8129 	Some of XFRM_MSG_* constants were introduced later than the header file
   8130 	where they are defined.
   8131 
   8132 	* xlat/nl_xfrm_types.in: Add default values for constants.
   8133 
   8134 2017-06-05  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   8135 
   8136 	syscall.c: split trace_syscall() into 6 functions.
   8137 	This change removes the trace_syscall function.  Now, the code that uses
   8138 	syscall.c trace functions is expected to check whether it is a syscall
   8139 	entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make
   8140 	an appropriate sequence of function calls.
   8141 
   8142 	* defs.h: Update comment on TCB_INSYSCALL.
   8143 	(trace_syscall): Remove prototype.
   8144 	(syscall_entering_decode, syscall_entering_trace,
   8145 	syscall_entering_finish, syscall_exiting_decode, syscall_exiting_trace,
   8146 	syscall_exiting_finish): New prototypes.
   8147 	* strace.c (trace_syscall): New static replacement for old trace_syscall.
   8148 	* syscall.c (trace_syscall): Remove.
   8149 	(trace_syscall_entering): Split into ...
   8150 	(syscall_entering_decode, syscall_entering_trace,
   8151 	syscall_entering_finish): ... new functions.
   8152 	(trace_syscall_exiting): Split into ...
   8153 	(syscall_exiting_decode, syscall_exiting_trace,
   8154 	syscall_exiting_finish): ... new functions.
   8155 
   8156 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8157 
   8158 	tests: guard against missing linux/netfilter/nfnetlink.h.
   8159 	nfnetlink was introduced in linux by commit v2.6.14-rc1~1035^2~217,
   8160 	add a guard for the case when system headers are not fresh enough.
   8161 
   8162 	* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/nfnetlink.h.
   8163 	* tests/netlink_netfilter.c: Check for HAVE_LINUX_NETFILTER_NFNETLINK_H.
   8164 
   8165 2017-06-05  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8166 
   8167 	tests: check decoding of NETLINK_XFRM message types.
   8168 	* tests/netlink_xfrm.c: New file.
   8169 	* tests/gen_tests.in (netlink_xfrm): New entry.
   8170 	* tests/pure_executables.list: Add netlink_xfrm.
   8171 	* tests/.gitignore: Likewise.
   8172 
   8173 	tests: check decoding of NETLINK_SELINUX message types.
   8174 	* tests/netlink_selinux.c: New file.
   8175 	* tests/gen_tests.in (netlink_selinux): New entry.
   8176 	* tests/pure_executables.list: Add netlink_selinux.
   8177 	* tests/.gitignore: Likewise.
   8178 
   8179 	tests: check decoding of NETLINK_NETFILTER message types.
   8180 	* tests/netlink_netfilter.c: New file.
   8181 	* tests/gen_tests.in (netlink_netfilter): New entry.
   8182 	* tests/pure_executables.list: Add netlink_netfilter.
   8183 	* tests/.gitignore: Likewise.
   8184 
   8185 	tests: check decoding of NETLINK_AUDIT message types.
   8186 	* tests/netlink_audit.c: New file.
   8187 	* tests/gen_tests.in (netlink_audit): New entry.
   8188 	* tests/pure_executables.list: Add netlink_audit.
   8189 	* tests/.gitignore: Likewise.
   8190 
   8191 	tests: check decoding of NETLINK_ROUTE message types.
   8192 	* tests/netlink_route.c: New file.
   8193 	* tests/gen_tests.in (netlink_route): New entry.
   8194 	* tests/pure_executables.list: Add netlink_route.
   8195 	* tests/.gitignore: Likewise.
   8196 
   8197 	tests: check decoding of NETLINK_SOCK_DIAG message types.
   8198 	* tests/netlink_sock_diag.c: New file.
   8199 	* tests/netlink_sock_diag.test: New test.
   8200 	* tests/pure_executables.list: Add netlink_sock_diag.
   8201 	* tests/.gitignore: Likewise.
   8202 	* tests/Makefile.am (DECODER_TESTS): Add netlink_sock_diag.test.
   8203 
   8204 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8205 
   8206 	tests: use create_nl_socket in netlink_protocol.test.
   8207 	* tests/netlink_protocol.c (main): Use create_nl_socket.
   8208 
   8209 	tests: change netlink_protocol.test to trace sendto syscalls only.
   8210 	* tests/gen_tests.in (netlink_protocol): Replace %network with sendto.
   8211 	* tests/netlink_protocol.c (main): Update expected output.
   8212 
   8213 	tests: enhance create_nl_socket diagnostics messages.
   8214 	* tests/tests.h (create_nl_socket): Rename to create_nl_socket_ext,
   8215 	add a string argument.
   8216 	(create_nl_socket): New macro wrapper around create_nl_socket_ext.
   8217 	* tests/create_nl_socket.c (create_nl_socket): Rename
   8218 	to create_nl_socket_ext, add a string argument, include it
   8219 	in diagnostic messages.
   8220 
   8221 	tests: use const and designated initializers in create_nl_socket.c.
   8222 	* tests/create_nl_socket.c: Stop including <string.h>.
   8223 	(create_nl_socket): Use const and designated initializers.
   8224 
   8225 2017-06-05  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8226 
   8227 	tests: add create_nl_socket function to libtests.
   8228 	* tests/create_nl_socket.c: New file.
   8229 	* tests/tests.h (create_nl_socket): New prototype.
   8230 	* tests/Makefile.am (libtests_a_SOURCES): Add create_nl_socket.c.
   8231 
   8232 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8233 	    Fabien Siron  <fabien.siron (a] epita.fr>
   8234 
   8235 	netlink: add decoding of NETLINK_NETFILTER message types.
   8236 	* xlat/nl_netfilter_msg_types.in: New file.
   8237 	* xlat/nl_netfilter_subsys_ids.in: Likewise.
   8238 	* netlink.c: Include "xlat/nl_netfilter_msg_types.h"
   8239 	and "xlat/nl_netfilter_subsys_ids.h".
   8240 	(nlmsg_types): Add NETLINK_NETFILTER.
   8241 	(decode_nlmsg_type): Handle NETLINK_NETFILTER.
   8242 
   8243 	netlink: add decoding of NETLINK_XFRM message types.
   8244 	* xlat/nl_xfrm_types.in: New file.
   8245 	* netlink.c: Include "xlat/nl_xfrm_types.h".
   8246 	(nlmsg_types): Add NETLINK_XFRM.
   8247 
   8248 	netlink: add decoding of NETLINK_SELINUX message types.
   8249 	* xlat/nl_selinux_types.in: New file.
   8250 	* netlink.c: Include "xlat/nl_selinux_types.h".
   8251 	(nlmsg_types): Add NETLINK_SELINUX.
   8252 
   8253 	netlink: add decoding of NETLINK_ROUTE message types.
   8254 	* xlat/nl_route_types.in: New file.
   8255 	* netlink.c: Include <linux/rtnetlink.h> and "xlat/nl_route_types.h".
   8256 	(nlmsg_types): Add NETLINK_ROUTE.
   8257 
   8258 	netlink: add decoding of NETLINK_AUDIT message types.
   8259 	* xlat/nl_audit_types.in: New file.
   8260 	* netlink.c: Include <linux/audit.h> and "xlat/nl_audit_types.h".
   8261 	(nlmsg_types): Add NETLINK_AUDIT.
   8262 
   8263 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8264 	    Fabien Siron  <fabien.siron (a] epita.fr>
   8265 
   8266 	netlink: implement generic nlmsg_type decoding.
   8267 	Implement a pluggable mechanism of nlmsg_type decoding.
   8268 	Add decoding of NETLINK_SOCK_DIAG types.
   8269 
   8270 	* linux/sock_diag.h (SOCK_DESTROY): New macro.
   8271 	* xlat/nl_sock_diag_types.in: New file.
   8272 	* netlink.c: Include xlat/nl_sock_diag_types.h.
   8273 	(get_fd_nl_family, decode_nlmsg_type): New functions.
   8274 	(print_nlmsghdr): Use them for nlmsg_type decoding.
   8275 
   8276 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8277 
   8278 	netlink: add netlink family argument to printers and decoders.
   8279 	* netlink.c (NL_FAMILY_ERROR, NL_FAMILY_DEFAULT): New constants.
   8280 	(print_nlmsghdr): Add netlink family argument, change return type
   8281 	to int, return family.
   8282 	(decode_nlmsghdr_with_payload, decode_nlmsgerr, decode_payload): Add
   8283 	netlink family argument.  All callers updated.
   8284 
   8285 2017-06-05  Fabien Siron  <fabien.siron (a] epita.fr>
   8286 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8287 
   8288 	Add file descriptor argument to decode_netlink.
   8289 	* defs.h (decode_netlink): Add file descriptor argument.
   8290 	* io.c (print_iovec): Specify file descriptor to decode_netlink.
   8291 	* net.c (decode_sockbuf): Likewise.
   8292 	* netlink.c (print_nlmsghdr, decode_nlmsghdr_with_payload,
   8293 	decode_nlmsgerr, decode_payload, decode_nlmsghdr_with_payload,
   8294 	decode_netlink): Likewise.
   8295 	All callers updated.
   8296 
   8297 	Introduce getfdinode to obtain inode from fd.
   8298 	* defs.h (getfdinode): New prototype.
   8299 	* utils.c (getfdinode): New function.
   8300 
   8301 2017-06-05  Fabien Siron  <fabien.siron (a] epita.fr>
   8302 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8303 
   8304 	Introduce get_sockaddr_by_inode.
   8305 	Add a way to get socket information without printing it.
   8306 
   8307 	* defs.h (get_sockaddr_by_inode): New prototype.
   8308 	* socketutils.c (get_sockaddr_by_inode): New function.
   8309 
   8310 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8311 
   8312 	socketutils.c: introduce get_sockaddr_by_inode_uncached.
   8313 	* socketutils.c (get_sockaddr_by_inode_uncached): New function.
   8314 	(print_sockaddr_by_inode_uncached): Use it.
   8315 
   8316 2017-06-05  Fabien Siron  <fabien.siron (a] epita.fr>
   8317 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8318 
   8319 	socketutils.c: use get_sockaddr_by_inode_cached.
   8320 	* socketutils.c (unix_print, inet_print, tcp_v4_print, tcp_v6_print,
   8321 	udp_v4_print, udp_v6_print, netlink_print): Remove.
   8322 	(unix_get, inet_get, tcp_v4_get, tcp_v6_get, udp_v4_get,
   8323 	udp_v6_get, netlink_get): New functions.
   8324 	(protocols): Update.
   8325 
   8326 2017-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   8327 
   8328 	socketutils.c: move inet_print closer to its first use.
   8329 	* socketutils.c (inet_print): Move right before tcp_v4_print.
   8330 
   8331 2017-06-05  Fabien Siron  <fabien.siron (a] epita.fr>
   8332 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8333 
   8334 	socketutils.c: introduce cache_inode_details.
   8335 	cache_inode_details gives a way to obtain cache information without
   8336 	printing it.
   8337 
   8338 	* socketutils.c (cache_and_print_inode_details): Rename
   8339 	to cache_inode_details.  Do not print cached information.
   8340 	(inet_parse_response, unix_parse_response, netlink_parse_response):
   8341 	Use cache_inode_details instead of cache_and_print_inode_details.
   8342 	(inet_print, unix_print, netlink_print): Call
   8343 	print_sockaddr_by_inode_cached.
   8344 
   8345 2017-06-05  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   8346 
   8347 	strace.c: move termination code to a separate function.
   8348 	This will be needed for the pull-style API.
   8349 
   8350 	* strace.c (terminate): New function.
   8351 	(main): Use it.
   8352 
   8353 2017-06-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   8354 
   8355 	tests: avoid hitting SO_SNDBUF limit in sendfile/sendfile64 tests.
   8356 	Do not assume that an executable is small enough and SO_SNDBUF is large
   8357 	enough so that the executable could be sendfile'ed into a socket pair.
   8358 
   8359 	* tests/sendfile.c (main): Create a regular file of the right size
   8360 	to avoid hitting SO_SNDBUF limit.
   8361 	* tests/sendfile64.c: Likewise.
   8362 
   8363 	Reported-by: Andreas Schwab <schwab (a] linux-m68k.org>
   8364 
   8365 2017-06-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   8366 
   8367 	Move netlink_protocols definition from net.c to netlink.c.
   8368 	The side effect of #include "xlat/netlink_protocols.h" is
   8369 	NETLINK_* constants properly defined in that header file.
   8370 	While net.c does not use these constants itself, netlink.c
   8371 	is going to need them soon.
   8372 
   8373 	* net.c: Move inclusion of "xlat/netlink_protocols.h" ...
   8374 	* netlink.c: ... here.
   8375 
   8376 2017-06-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   8377 
   8378 	travis: switch from gcc-6 to gcc-7.
   8379 	* .travis.yml (matrix): Change gcc-6 to gcc-7.
   8380 
   8381 	tests: extend checking of NLMSG_DONE decoding.
   8382 	* tests/netlink_protocol.c (test_nlmsg_done):  Use designated
   8383 	initializers.  Check decoding of messages with non-integer payload.
   8384 
   8385 2017-06-04  JingPiao Chen  <chenjingpiao (a] gmail.com>
   8386 
   8387 	netlink: decode NLMSG_DONE messages.
   8388 	* netlink.c (decode_payload): Decode NLMSG_DONE messages.
   8389 	* tests/netlink_protocol.c (test_nlmsg_done): New function
   8390 	for checking decoding of NLMSG_DONE messages.
   8391 	(main): Use it.
   8392 
   8393 2017-06-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   8394 
   8395 	socketutils.c: introduce get_sockaddr_by_inode_cached.
   8396 	* socketutils.c (get_sockaddr_by_inode_cached): New function.
   8397 	(print_sockaddr_by_inode_cached): Use it.
   8398 
   8399 2017-06-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   8400 
   8401 	Unexport print_sockaddr_by_inode_cached.
   8402 	Change print_sockaddr_by_inode to be the only function exposed,
   8403 	hide print_sockaddr_by_inode_cached as a part of implementation.
   8404 
   8405 	* defs.h (print_sockaddr_by_inode_cached): Remove prototype.
   8406 	(print_sockaddr_by_inode): Add struct tcb * and descriptor arguments.
   8407 	* socketutils.c (print_sockaddr_by_inode_cached): Make static.
   8408 	(print_sockaddr_by_inode): Rename to print_sockaddr_by_inode_uncached,
   8409 	make static.
   8410 	(print_sockaddr_by_inode): New function.
   8411 	* util.c (printfd): Update to use new print_sockaddr_by_inode.
   8412 
   8413 2017-06-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   8414 
   8415 	Introduce str_strip_prefix_len function and STR_STRIP_PREFIX macro.
   8416 	Address proliferation of string prefix check implementations.
   8417 
   8418 	* defs.h (str_strip_prefix_len): New inline function.
   8419 	(STR_STRIP_PREFIX): New macro.
   8420 	* qualify.c (strip_prefix): Remove.
   8421 	(parse_inject_token): Use STR_STRIP_PREFIX instead of strip_prefix.
   8422 	(qualify): Use str_strip_prefix_len.
   8423 	* socketutils.c (netlink_parse_response): Likewise.
   8424 	* util.c (printfd): Likewise.
   8425 
   8426 2017-06-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   8427 
   8428 	netlink: move NLMSG_ERROR payload length check to nlmsgerr decoder.
   8429 	Move decoder specific check to the decoder.
   8430 
   8431 	* netlink.c (decode_payload): Move NLMSG_ERROR payload length check ...
   8432 	(decode_nlmsgerr): ... here.
   8433 
   8434 2017-06-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   8435 
   8436 	strace.c: handle PTRACE_EVENT_EXEC like other events.
   8437 	There is nothing unusual about PTRACE_EVENT_EXEC that would require
   8438 	a special treatment.
   8439 
   8440 	* strace.c (next_event): Move PTRACE_EVENT_EXEC handling to the main
   8441 	switch statement.
   8442 
   8443 2017-06-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   8444 
   8445 	strace.c: remove dead code.
   8446 	As strace does not use WCONTINUED flag, there is no need to handle
   8447 	WIFCONTINUED status.
   8448 
   8449 	* strace.c (print_debug_info) [WIFCONTINUED]: Remove.
   8450 	(next_event): Remove redundant !WIFSTOPPED check.
   8451 
   8452 2017-06-02  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   8453 
   8454 	strace.c: refactor trace into two functions.
   8455 	This change decouples waiting for next event from reacting to it.  This
   8456 	makes the control flow easier to understand, and serves as a preparation
   8457 	for implementing a pull-style API for LuaJIT.
   8458 
   8459 	* strace.c (enum trace_event): New enum.
   8460 	(trace): Split into ...
   8461 	(next_event, dispatch_event): ... new functions.
   8462 	(main): Use them.
   8463 
   8464 2017-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   8465 
   8466 	scno.am: include config.h before syscallent.h.
   8467 	This fixes generation of syscallent.i and subsequent scno.h files
   8468 	on mips where syscallent.h checks macros defined in config.h.
   8469 
   8470 	* scno.am (syscallent.i): Add $(top_builddir)/config.h
   8471 	to prerequisites, include it.
   8472 	* NEWS: Mention this fix.
   8473 
   8474 	Reported-by: David Robins <dbrobins (a] i4031.net>
   8475 
   8476 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8477 
   8478 	tests: check decoding of sigaction syscall.
   8479 	* tests/sigaction.c: New file.
   8480 	* tests/gen_tests.in (sigaction): New entry.
   8481 	* tests/pure_executables.list: Add sigaction.
   8482 	* tests/.gitignore: Likewise.
   8483 
   8484 	tests: rename sigaction.test to rt_sigaction.test.
   8485 	* tests/sigaction.awk: Rename to rt_sigaction.awk.
   8486 	* tests/sigaction.c: Rename to tests/rt_sigaction.c.
   8487 	* tests/sigaction.test: Rename to tests/rt_sigaction.test.
   8488 	* tests/.gitignore: Replace sigaction with rt_sigaction.
   8489 	* tests/pure_executables.list: Likewise.
   8490 	* tests/Makefile.am (DECODER_TESTS): Replace sigaction.test
   8491 	with rt_sigaction.test.
   8492 	(EXTRA_DIST): Replace sigaction.awk with rt_sigaction.awk.
   8493 
   8494 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8495 
   8496 	sparc: enhance decoding of signal number argument of sigaction syscall.
   8497 	On sparc, unlike all other architectures, old sigaction syscall takes
   8498 	a negated signal number.
   8499 
   8500 	* signal.c (SYS_FUNC(sigaction)) [SPARC || SPARC64]: Enhance printing
   8501 	of negative signal number argument.
   8502 
   8503 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8504 
   8505 	signal: enhance printing of old_sigaction.mask.
   8506 	* signal.c (decode_old_sigaction): Print old_sigaction.mask
   8507 	using tprint_old_sigmask_val.
   8508 
   8509 	signal: limit scope of struct old_sigaction32 definition.
   8510 	* signal.c (struct old_sigaction32): Define only if [!current_wordsize].
   8511 
   8512 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8513 
   8514 	signal: fix decoding of struct old_sigaction on some architectures.
   8515 	On alpha, struct old_sigaction.sa_flags has a 32-bit type.
   8516 
   8517 	On mips, only first word of old_sigaction.sa_mask is read.
   8518 
   8519 	On all architectures except alpha and mips that have old sigaction
   8520 	syscall, struct old_sigaction has sa_restorer field that has to be
   8521 	decoded.
   8522 
   8523 	* signal.c (struct old_sigaction) [ALPHA]: Change sa_flags type
   8524 	to unsigned int, add ATTRIBUTE_PACKED.
   8525 	[MIPS]: Dhrink sa_mask array to 1 element.
   8526 	[!ALPHA && !MIPS]: Define sa_restorer field unconditionally.
   8527 	(struct old_sigaction32): Likewise.
   8528 	(decode_old_sigaction) [!current_wordsize]: Initialize sa_restorer field
   8529 	from old_sigaction32.sa_restorer unconditionally.
   8530 	[!ALPHA && !MIPS]: Print old_sigaction.sa_restorer if SA_RESTORER flag
   8531 	is set.
   8532 	* NEWS: Mention this change.
   8533 
   8534 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8535 
   8536 	xlat: rename SA_STACK to SA_ONSTACK.
   8537 	SA_ONSTACK is the standard name while its alias SA_STACK is not even
   8538 	defined on many platforms.
   8539 
   8540 	* xlat/sigact_flags.in (SA_STACK): Rename to SA_ONSTACK.
   8541 
   8542 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8543 
   8544 	tests: check decoding of sigpending syscall.
   8545 	* tests/sigpending.c: New file.
   8546 	* tests/gen_tests.in (sigpending): New entry.
   8547 	* tests/pure_executables.list: Add sigpending.
   8548 	* tests/.gitignore: Likewise.
   8549 
   8550 	tests: check decoding of sigprocmask syscall.
   8551 	* tests/sigprocmask.c: New file.
   8552 	* tests/gen_tests.in (sigprocmask): New entry.
   8553 	* tests/pure_executables.list: Add sigprocmask.
   8554 	* tests/.gitignore: Likewise.
   8555 
   8556 2017-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8557 
   8558 	alpha: rename sys_sigprocmask to sys_osf_sigprocmask.
   8559 	Parsers of sigprocmask and osf_sigprocmask syscalls are different
   8560 	anyway, so rename the function to match the syscall name.
   8561 
   8562 	* signal.c [ALPHA] (SYS_FUNC(sigprocmask)): Rename
   8563 	to SYS_FUNC(osf_sigprocmask).
   8564 	* linux/alpha/syscallent.h: Update sys_func.
   8565 
   8566 2017-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8567 
   8568 	Enable coverage when strace is self terminated by signal.
   8569 	The data collected by -fprofile-arcs during program run is saved
   8570 	on program exit.  When program is terminated by signal, the data
   8571 	is not saved.  However, libgcov provides an interface to dump
   8572 	the data at runtime.
   8573 
   8574 	* m4/ax_code_coverage.m4 (AX_CODE_COVERAGE): Add -DENABLE_COVERAGE_GCOV
   8575 	to CODE_COVERAGE_CPPFLAGS.
   8576 	* strace.c [ENABLE_COVERAGE_GCOV] (__gcov_flush): New prototype.
   8577 	(main) [ENABLE_COVERAGE_GCOV]: Call __gcov_flush() before raise()
   8578 	and sigprocmask() calls that might cause program termination.
   8579 
   8580 2017-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8581 
   8582 	tests: check termination signal forwarding.
   8583 	* tests/run_expect_termsig.c: New file.
   8584 	* tests/unblock_reset_raise.c: Likewise.
   8585 	* tests/termsig.test: New test.
   8586 	* tests/.gitignore: Add run_expect_termsig and unblock_reset_raise.
   8587 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   8588 	(MISC_TESTS): Add termsig.test.
   8589 
   8590 2017-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8591 
   8592 	Fix termination signal forwarding.
   8593 	When traced command is terminated by a blocked signal, unblock
   8594 	that signal to ensure strace termination with the same signal.
   8595 
   8596 	* strace.c (main): Unblock the signal raised for strace termination.
   8597 	* NEWS: Mention this change.
   8598 
   8599 2017-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8600 
   8601 	Do not reset SIGCHLD handler in tracees to SIG_DFL.
   8602 	While strace resets SIGCHLD handler to the default action so that
   8603 	waitpid definitely works without losing track of children, tracees
   8604 	should not inherit this change.
   8605 
   8606 	* strace.c (struct exec_params): Add child_sa field.
   8607 	(init): When setting SIGCHLD handler to SIG_DFL, save the old handler.
   8608 	(exec_or_die): Restore SIGCHLD handler if it was different from SIG_DFL
   8609 	at startup.
   8610 	* NEWS: Mention this change.
   8611 
   8612 2017-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8613 
   8614 	Refactor setting of signal handlers to reduce redundancy.
   8615 	* strace.c (set_sigaction): New function.
   8616 	(init): Use it instead of sigaction with sigaddset.
   8617 
   8618 	tests: check how signals are unblocked in interactive mode.
   8619 	* tests/block_reset_raise_run.c: New file.
   8620 	* tests/interactive_block.test: New test.
   8621 	* tests/.gitignore: Add block_reset_raise_run.
   8622 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   8623 	(MISC_TESTS): Add interactive_block.test.
   8624 
   8625 2017-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8626 
   8627 	Fix unblocking of signals in interactive mode.
   8628 	In interactive mode (-I2), those signals that were blocked at startup
   8629 	will remain blocked for the whole period of strace execution.
   8630 
   8631 	* strace.c (empty_set): Rename to start_set.  All users changed.
   8632 	(init): Initialize start_set and blocked_set to the set of currently
   8633 	blocked signals.
   8634 	(startup_attach, trace): Use SIG_SETMASK instead of SIG_BLOCK.
   8635 	* NEWS: Mention this change.
   8636 
   8637 2017-05-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   8638 
   8639 	Cleanup interactive check.
   8640 	* strace.c (init): Check for INTR_WHILE_WAIT mode the same way
   8641 	as in other places.
   8642 
   8643 	tests: check decoding of signal syscall.
   8644 	* tests/signal.c: New file.
   8645 	* tests/gen_tests.in (signal): New entry.
   8646 	* tests/pure_executables.list: Add signal.
   8647 	* tests/.gitignore: Likewise.
   8648 
   8649 2017-05-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8650 
   8651 	Unify capitalisation of (c) in copyright notices.
   8652 
   8653 2017-05-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   8654 
   8655 	Post-release administrivia.
   8656 	* NEWS: Add a header line for the next release.
   8657 	* debian/changelog.in: Add a changelog entry for 4.17-1.
   8658 	* strace.spec.in: Likewise.
   8659 
   8660 2017-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   8661 
   8662 	Prepare for 4.17 release.
   8663 	* NEWS: Update for 4.17 release.
   8664 
   8665 	powerpc64, sparc, sparc64: wire up statx syscall.
   8666 	* linux/powerpc64/syscallent.h [383]: Add statx entry.
   8667 	* linux/sparc/syscallent.h [360]: Likewise.
   8668 	* linux/sparc64/syscallent.h [360]: Likewise.
   8669 
   8670 2017-05-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   8671 
   8672 	Fix compat personality support for sgetmask syscall.
   8673 	* signal.c (SYS_FUNC(sgetmask)): Replace sprintsigmask_val
   8674 	with sprint_old_sigmask_val.
   8675 	* tests/sxetmask.c (main): Check decoding of signal mask containing
   8676 	RT signals.
   8677 
   8678 2017-05-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   8679 
   8680 	Fix decoding of sgetmask and ssetmask syscalls.
   8681 	Old ssetmask syscall takes an argument and returns a value of type int.
   8682 	Old sgetmask syscall may return an error.
   8683 
   8684 	* signal.c (SYS_FUNC(ssetmask)): Explicitly convert the argument
   8685 	and return value to unsigned int, print it using sprint_old_sigmask_val.
   8686 	(SYS_FUNC(sgetmask)): Do not print the mask in case of syserror.
   8687 	* tests/sxetmask.c: New file.
   8688 	* tests/gen_tests.in (sxetmask): New entry.
   8689 	* tests/pure_executables.list: Add sxetmask.
   8690 	* tests/.gitignore: Likewise.
   8691 	* NEWS: Mention this fix.
   8692 
   8693 2017-05-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8694 
   8695 	Add copyright headers.
   8696 
   8697 2017-05-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8698 	    Elvira Khabirova  <lineprinter0 (a] gmail.com>
   8699 
   8700 	Add scripts for automating copyright notices update.
   8701 	* maint/update_copyright_years.awk: New file.
   8702 	* maint/update_copyright_years.sh: Likewise.
   8703 
   8704 2017-05-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8705 
   8706 	Fix typos in copyright notices.
   8707 
   8708 	unwind.c: remove non-ASCII character from comment.
   8709 
   8710 2017-05-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   8711 
   8712 	Rename sys_sig[gs]etmask to sys_s[gs]etmask to match syscall names.
   8713 	* signal.c (SYS_FUNC(sigsetmask)): Rename to SYS_FUNC(ssetmask).
   8714 	(SYS_FUNC(siggetmask)): Rename to SYS_FUNC(sgetmask).
   8715 	* linux/arm/syscallent.h (sgetmask, ssetmask): Update sys_func.
   8716 	* linux/bfin/syscallent.h: Likewise.
   8717 	* linux/crisv10/syscallent.h: Likewise.
   8718 	* linux/hppa/syscallent.h: Likewise.
   8719 	* linux/i386/syscallent.h: Likewise.
   8720 	* linux/m68k/syscallent.h: Likewise.
   8721 	* linux/microblaze/syscallent.h: Likewise.
   8722 	* linux/mips/syscallent-o32.h: Likewise.
   8723 	* linux/powerpc/syscallent.h: Likewise.
   8724 	* linux/powerpc64/syscallent.h: Likewise.
   8725 	* linux/sh/syscallent.h: Likewise.
   8726 	* linux/sh64/syscallent.h: Likewise.
   8727 	* linux/sparc/syscallent.h: Likewise.
   8728 	* linux/sparc64/syscallent.h: Likewise.
   8729 
   8730 	tests: enhance sigsuspend.test.
   8731 	* tests/sigsuspend.c (sigtxt): New variable.
   8732 	(main): Change signal masks to contain all signals except USR1 and USR2.
   8733 
   8734 2017-05-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   8735 
   8736 	Fix compat personality support for old sigsuspend syscall.
   8737 	* signal.c (sprint_old_sigmask_val): New function.
   8738 	(tprint_old_sigmask_val): New macro.
   8739 	(SYS_FUNC(sigsuspend)): Use it.
   8740 
   8741 2017-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   8742 
   8743 	Move errnoent.sh, signalent.sh, and syscallent.sh to maint subdirectory.
   8744 	Also do not include them into release tarballs.  These files are
   8745 	intended for developers who are expected to use a git repository.
   8746 
   8747 	* errnoent.sh: Move to maint subdirectory.
   8748 	* signalent.sh: Likewise.
   8749 	* syscallent.sh: Likewise.
   8750 	* HACKING-scripts: Update.
   8751 	* Makefile.am (EXTRA_DIST): Remove errnoent.sh, signalent.sh,
   8752 	and syscallent.sh.
   8753 
   8754 2017-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   8755 
   8756 	Do not include maint subdirectory into release tarballs.
   8757 	These files are intended for developers who are expected to use
   8758 	a git repository.
   8759 
   8760 	* Makefile.am (EXTRA_DIST): Remove maint/ioctls_gen.sh,
   8761 	maint/ioctls_hex.sh, maint/ioctls_sym.sh, and maint/print_ioctlent.c.
   8762 
   8763 2017-05-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8764 
   8765 	linux/ia64/syscallent.h: remove tabulation, add spaces in file comment.
   8766 
   8767 	linux/mtd-abi.h: remove non-ASCII character from file comment.
   8768 
   8769 2017-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   8770 
   8771 	alpha, cris, mips, ppc, sh, sparc: fix decoding of sigsuspend syscall.
   8772 	On some architectures old sigsuspend syscall takes the signal mask from
   8773 	the 3rd argument, on some from the 1st.  And, if it wasn't peculiar
   8774 	enough, the signal mask is passed by value on all architectures except
   8775 	mips where it's passed by reference.
   8776 
   8777 	* signal.c (SYS_FUNC(sigsuspend)): Take the signal mask from the last
   8778 	argument.
   8779 	* linux/alpha/syscallent.h (sigsuspend): Set nargs to 1.
   8780 	* linux/crisv10/syscallent.h: Likewise.
   8781 	* linux/mips/syscallent-o32.h: Likewise.
   8782 	* linux/powerpc/syscallent.h: Likewise.
   8783 	* linux/powerpc64/syscallent.h: Likewise.
   8784 	* linux/sh/syscallent.h: Likewise.
   8785 	* linux/sh64/syscallent.h: Likewise.
   8786 	* linux/sparc/syscallent.h: Likewise.
   8787 	* linux/sparc64/syscallent.h: Likewise.
   8788 	* tests/sigsuspend.c: New file.
   8789 	* tests/gen_tests.in (sigsuspend): New entry.
   8790 	* tests/pure_executables.list: Add sigsuspend.
   8791 	* tests/.gitignore: Likewise.
   8792 	* NEWS: Mention this fix.
   8793 
   8794 2017-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   8795 
   8796 	tests: raise default timeout for individual tests.
   8797 	Recently added tests based on pure_executables.list are quite slow
   8798 	by their nature, the one minute default timeout is no longer enough
   8799 	for some of not so fast architectures.
   8800 
   8801 	* tests/init.sh (TIMEOUT_DURATION): Raise from 60 to 120.
   8802 
   8803 2017-05-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8804 
   8805 	Update NEWS.
   8806 
   8807 2017-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   8808 
   8809 	Update TCP_* constants.
   8810 	* xlat/socktcpoptions.in: Add TCP_FASTOPEN_CONNECT introduced
   8811 	by linux kernel commit v4.11-rc1~124^2~321^2.
   8812 
   8813 2017-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   8814 
   8815 	Update AF_* constants.
   8816 	* xlat/addrfams.in: Add AF_SMC introduced by linux kernel
   8817 	commit v4.11-rc1~94^2~43^2~13.
   8818 
   8819 2017-04-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   8820 
   8821 	tests: enhance madvise decoder check.
   8822 	* tests/mmap.c (main): Remove madvise check.
   8823 	* tests/madvise.c: New file.
   8824 	* tests/gen_tests.in (madvise): New entry.
   8825 	* tests/.gitignore: Add madvise.
   8826 	* tests/pure_executables.list: Likewise.
   8827 
   8828 2017-04-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8829 
   8830 	tests: add -etrace=?... test.
   8831 	Check for some architecture-specific syscalls which are not present
   8832 	on most architectures.
   8833 
   8834 	* gen_tests.in: Add trace_question test.
   8835 	* tests/trace_question.in: New file.
   8836 	* tests/Makefile.am (EXTRA_DIST): Add it.
   8837 
   8838 2017-04-25  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8839 
   8840 	tests: add more information to generated header comments.
   8841 	* tests/gen_tests.sh: Update header comment with the source string
   8842 	used for test generation.
   8843 
   8844 	tests: move generated common header comment into a variable.
   8845 	* tests/gen_tests.sh: Move generated file header comment
   8846 	into a variable, use it in all cases.
   8847 
   8848 2017-04-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   8849 
   8850 	tests: use TAIL_ALLOC_OBJECT_CONST_PTR in v4l2 test.
   8851 	* tests/ioctl_v4l2.c (main): Use TAIL_ALLOC_OBJECT_CONST_PTR.
   8852 
   8853 2017-04-25  Edgar Kaziahmedov  <edos (a] linux.com>
   8854 
   8855 	tests: Check decoding of VIDIOC_G/S_TUNER's arg.
   8856 	* tests/ioctl_v4l2.c (main): Add checks for VIDIOC_G/S_TUNER's arg.
   8857 
   8858 	v4l2: Add decoding for VIDIOC_G/S_TUNER's arg.
   8859 	* v4l2.c: Include "xlat/v4l2_tuner_types.h", "xlat/v4l2_tuner_capabilities.h",
   8860 	"xlat/v4l2_tuner_rxsubchanses.h", and "xlat/v4l2_tuner_audmodes.h".
   8861 	(print_v4l2_tuner): New function. Add decoding for VIDIOC_G/S_TUNER's arg.
   8862 	(v4l2_ioctl): Add new cases for decoding VIDIOC_G/S_TUNER's arg.
   8863 	* xlat/v4l2_tuner_types.in: Add V4L2_TUNER_RADIO and
   8864 	V4L2_TUNER_ANALOG_TV introduced by linux kernel commit
   8865 	2.5.46~39^2~23^2~4.
   8866 	Add V4L2_TUNER_DIGITAL_TV introduced by linux kernel
   8867 	commit v2.6.11-rc4~55^2~20.
   8868 	Add V4L2_TUNER_ADC and V4L2_TUNER_RF introduced by linux kernel commit
   8869 	v3.15-rc1~85^2~215.
   8870 	Add V4L2_TUNER_SDR introduced by linux kernel commit v4.4-rc1~118^2~17
   8871 	(as the replacement of V4L2_TUNER_ADC).
   8872 	* xlat/v4l2_tuner_capabilities.in: Add V4L2_TUNER_CAP_LOW,
   8873 	V4L2_TUNER_CAP_NORM, V4L2_TUNER_CAP_STEREO, V4L2_TUNER_CAP_LANG2,
   8874 	V4L2_TUNER_CAP_SAP, and V4L2_TUNER_CAP_LANG1 introduced by linux kernel
   8875 	commit 2.5.46~39^2~23^2~4.
   8876 	Add V4L2_TUNER_CAP_HWSEEK_BOUNDED and V4L2_TUNER_CAP_HWSEEK_WRAP
   8877 	introduced by linux kernel commit v3.6-rc1~28^2~306.
   8878 	Add V4L2_TUNER_CAP_RDS introduced by linux commit v2.6.32-rc1~679^2~189.
   8879 	Add V4L2_TUNER_CAP_RDS_BLOCK_IO and V4L2_TUNER_CAP_RDS_CONTROLS
   8880 	introduced by linux kernel commit v2.6.37-rc1~64^2~110.
   8881 	Add V4L2_TUNER_CAP_FREQ_BANDS introduced by linux kernel commit
   8882 	v3.6-rc1~28^2~46.
   8883 	Add V4L2_TUNER_CAP_HWSEEK_PROG_LIM introduced by linux kernel commit
   8884 	v3.6-rc1~28^2~40.
   8885 	Add V4L2_TUNER_CAP_1HZ introduced by linux kernel commit
   8886 	v3.15-rc1~85^2~214.
   8887 	* xlat/v4l2_tuner_audmodes.in: Add V4L2_TUNER_MODE_MONO,
   8888 	V4L2_TUNER_MODE_STEREO, V4L2_TUNER_MODE_LANG2, V4L2_TUNER_MODE_SAP, and
   8889 	V4L2_TUNER_MODE_LANG1 introduced by linux kernel commit
   8890 	2.5.46~39^2~23^2~4.
   8891 	Add V4L2_TUNER_MODE_LANG1_LANG2 introduced by linux kernel commit
   8892 	v2.6.17-rc1~739^2~9.
   8893 	* xlat/v4l2_tuner_rxsubchanses.in: Add V4L2_TUNER_SUB_MONO,
   8894 	V4L2_TUNER_SUB_STEREO, V4L2_TUNER_SUB_LANG2, V4L2_TUNER_SUB_SAP, and
   8895 	V4L2_TUNER_SUB_LANG1 introduced by linux kernel commit
   8896 	2.5.46~39^2~23^2~4.
   8897 	Add V4L2_TUNER_SUB_RDS introduced by linux kernel commit
   8898 	v2.6.32-rc1~679^2~189.
   8899 
   8900 2017-04-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   8901 
   8902 	tests: check decoding of invalid tv_sec and tv_usec values.
   8903 	* tests/futimesat.c (main): Check decoding of invalid tv_sec and tv_usec
   8904 	values.
   8905 	* tests/xetitimer.c (main): Likewise.
   8906 	* tests/xettimeofday.c (main): Likewise.
   8907 	* tests/xselect.c (main): Likewise.
   8908 	* tests/xutimes.c (main): Likewise.
   8909 
   8910 	tests: check decoding of invalid tv_sec and tv_nsec values.
   8911 	* tests/aio.c (main): Check decoding of invalid tv_sec and tv_nsec
   8912 	values.
   8913 	* tests/clock_nanosleep.c (main): Likewise.
   8914 	* tests/clock_xettime.c (main): Likewise.
   8915 	* tests/futex.c (main): Likewise.
   8916 	* tests/nanosleep.c (main): Likewise.
   8917 	* tests/ppoll.c (main): Likewise.
   8918 	* tests/pselect6.c (main): Likewise.
   8919 	* tests/recvmmsg-timeout.c (main): Likewise.
   8920 	* tests/rt_sigtimedwait.c (main): Likewise.
   8921 	* tests/semop.c (main): Likewise.
   8922 	* tests/timer_xettime.c (main): Likewise.
   8923 	* tests/timerfd_xettime.c (main): Likewise.
   8924 	* tests/utimensat.c (main): Likewise.
   8925 
   8926 2017-04-24  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8927 
   8928 	Print time in ISO 8601 format in time syscall decoder.
   8929 	* print_time.c (SYS_FUNC(time)): Print timestamp stringification
   8930 	(via sprinttime) for the value stored in the argument and return value
   8931 	(return RVAL_STR in the latter case).
   8932 	* tests/time.c (main): Update expected output.
   8933 
   8934 2017-04-24  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8935 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8936 
   8937 	Print string representation of timestamps in parsers of *utime* syscalls
   8938 	* print_timespec.c (print_timespec_t_utime): Use sprinttime_nsec
   8939 	to format a string representation of time, use tprints_comment
   8940 	to print it as a comment.
   8941 	* print_timeval.c (print_timeval_t_utime): New function.
   8942 	(print_timeval_utimes): Use it instead of print_timeval_t.
   8943 	[ALPHA] (print_timeval32_t_utime): New function.
   8944 	[ALPHA] (print_timeval32_utimes): Use it instead of print_timeval32_t.
   8945 	* tests/futimesat.c (print_tv): Update expected output.
   8946 	* tests/utimensat.c (print_ts): Likewise.
   8947 	* tests/xutimes.c (print_tv): Likewise.
   8948 
   8949 2017-04-24  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8950 
   8951 	tests: add support for printing timestamp with microsecond precision.
   8952 	It will be needed later.
   8953 
   8954 	* tests/tests.h (print_time_t_usec): New prototype.
   8955 	* tests/print_time.c (print_time_t_usec): New function, a thin wrapper
   8956 	around print_time_t_ex.
   8957 
   8958 2017-04-24  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   8959 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   8960 
   8961 	Print microseconds/nanoseconds as non-negative.
   8962 	Negative micro/nanoseconds values are treated as invalid by kernel
   8963 	anyway, and in one case (timespec_valid in include/linux/time.h)
   8964 	it is even checked by conversion to unsigned long.
   8965 
   8966 	* print_timespec.c (timespec_fmt): Change tv_sec format to %lld and
   8967 	tv_nsec format to %llu.
   8968 	(print_timespec_t): Cast tv_sec to long long and process tv_nsec with
   8969 	zero_extend_signed_to_ull.
   8970 	(sprint_timespec): Likewise.
   8971 	* print_timeval.c (timeval_fmt): Change tv_sec format to %lld and
   8972 	tv_usec format to %llu.
   8973 	(print_timeval_t): Cast tv_sec to long long and process tv_nsec with
   8974 	zero_extend_signed_to_ull.
   8975 	(sprint_timeval, print_timeval32_t, sprint_timeval32): Likewise.
   8976 	* defs.h (TIMESPEC_TEXT_BUFSIZE): Update.
   8977 	* tests/adjtimex.c (main): Change tv_sec printing format to %lld, cast
   8978 	it to long long; change tv_usec printing format to %llu, process it with
   8979 	zero_extend_signed_to_ull.
   8980 	* tests/clock_nanosleep.c (main): Change tv_sec printing format to %lld,
   8981 	cast it to long long; change tv_nsec printing format to %llu, process it
   8982 	with zero_extend_signed_to_ull.
   8983 	* tests/clock_xettime.c (main): Likewise.
   8984 	* tests/futex.c (main): Likewise.
   8985 	* tests/futimesat.c (print_tv): Likewise.
   8986 	* tests/getrusage.c (invoke_print): Likewise.
   8987 	* tests/mq_sendrecv.c (do_send, do_recv, main): Likewise.
   8988 	* tests/nanosleep.c (main): Likewise.
   8989 	* tests/pselect6.c (main): Likewise.
   8990 	* tests/restart_syscall.c (main): Likewise.
   8991 	* tests/rt_sigtimedwait.c (iterate, main): Likewise.
   8992 	* tests/sched_rr_get_interval.c (main): Likewise.
   8993 	* tests/semop.c (main): Likewise.
   8994 	* tests/timer_xettime.c (main): Likewise.
   8995 	* tests/timerfd_xettime.c (main): Likewise.
   8996 	* tests/waitid.c (main): Likewise.
   8997 	* tests/xetitimer.c (main): Likewise.
   8998 	* tests/xettimeofday.c (main): Likewise.
   8999 	* tests/xselect.c (main): Likewise.
   9000 	* tests/xutimes.c (print_tv): Likewise.
   9001 	* tests/wait4.c (sprint_rusage): Likewise.
   9002 	* tests/waitid.c (sprint_rusage): Likewise.
   9003 	* tests/utimensat.c (print_ts): Likewise.
   9004 	(main): Add check for higher bits of tv_sec/tv_nsec.
   9005 
   9006 2017-04-24  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9007 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   9008 
   9009 	Always print raw values of time data fields.
   9010 	Refactor sprinttime: implement sprinttime_nsec and sprinttime_usec
   9011 	that handle nanoseconds and microseconds, respectively.
   9012 	Always print raw values of time data fields, format string
   9013 	representations of time as comments.
   9014 
   9015 	* defs.h (sprinttime): Change argument type from time_t to long long.
   9016 	(sprinttime_nsec, sprinttime_usec): New prototypes.
   9017 	* util.c (sprinttime_ex, sprinttime_nsec, sprinttime_usec): New
   9018 	functions.
   9019 	(sprinttime): Turn into a thin wrapper around sprinttime_ex.
   9020 	* stat.h (struct strace_stat): Add has_nsec field.
   9021 	* fetch_struct_stat.c (HAVE_NSEC): New macro.
   9022 	(fetch_struct_stat): Initialize has_nsec field with HAVE_NSEC.
   9023 	* fetch_struct_stat64.c (HAVE_NSEC): New macro.
   9024 	(fetch_struct_stat64): Initialize has_nsec field with HAVE_NSEC.
   9025 	* print_struct_stat.c (print_struct_stat) <PRINT_ST_TIME>:
   9026 	Print raw values of time fields, use sprinttime_nsec to format a string
   9027 	representation of time, use tprints_comment to print it as a comment.
   9028 	* statx.c (SYS_FUNC(statx)) <PRINT_FIELD_TIME>: Likewise.
   9029 	* utime.c (SYS_FUNC(utime)): Print raw values of struct utimbuf.actime
   9030 	and struct utimbuf.modtime fields, use sprinttime to format a string
   9031 	representation of time, use tprints_comment to print it as a comment.
   9032 	* tests/tests.h (print_time_t_nsec): Add int argument.
   9033 	* tests/print_time.c (print_time_t_ex): New function.
   9034 	(print_time_t_nsec): Add int argument, turn into a thin wrapper around
   9035 	print_time_t_ex.
   9036 	* tests/utime.c (main): Update expected output.
   9037 	* tests/xstatx.c [!IS_STATX] (HAVE_NSEC): New macro.
   9038 	[!IS_STATX] (PRINT_ST_TIME), [IS_STATX] (PRINT_FIELD_TIME): Update
   9039 	expected output.
   9040 	* NEWS: Mention this timestamps representation improvement.
   9041 
   9042 2017-04-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   9043 
   9044 	Introduce tprintf_comment and tprints_comment functions.
   9045 	* defs.h (tprintf_comment, tprints_comment): New prototypes.
   9046 	* strace.c (tvprintf): New function.
   9047 	(tprintf): Use it.
   9048 	(tprintf_comment, tprints_comment): New functions.
   9049 	* aio.c (tprint_lio_opcode): Use tprints_comment.
   9050 	* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
   9051 	dm_decode_dm_name_list, dm_decode_dm_target_versions,
   9052 	dm_decode_dm_target_msg, dm_decode_string, dm_known_ioctl): Likewise.
   9053 	* futex.c (SYS_FUNC(futex)): Likewise.
   9054 	* perf.c (print_perf_event_attr): Likewise.
   9055 	* seccomp.c (decode_bpf_code): Likewise.
   9056 	* util.c (printxvals, printxval_searchn, printflags64): Likewise.
   9057 	* btrfs.c (print_u64, btrfs_print_key_type, btrfs_print_objectid,
   9058 	print_key_value_internal): Likewise.
   9059 	(btrfs_ioctl): Use tprints_comment and tprintf_comment.
   9060 	* dirent.c (SYS_FUNC(getdents)): Likewise.
   9061 	* dirent64.c (SYS_FUNC(getdents64)): Likewise.
   9062 	* execve.c (printargc): Use tprintf_comment.
   9063 	* tests/btrfs.c (btrfs_test_get_dev_stats_ioctl,
   9064 	btrfs_test_features_ioctls): Update expected output.
   9065 
   9066 	Make output of execve/execveat syscall parsers more structured.
   9067 	* execve.c (printargc): Always print the address, format the number
   9068 	of variables as a comment.
   9069 	* tests/execve.c: Update expected output.
   9070 	* tests/execveat.c: Likewise.
   9071 	* tests/qual_syscall.test: Likewise.
   9072 	* tests/strace-r.expected: Likewise.
   9073 	* tests/strace-t.test: Likewise.
   9074 	* tests/strace-tt.test: Likewise.
   9075 	* tests/strace-ttt.test: Likewise.
   9076 	* tests/threads-execve.c: Likewise.
   9077 	* tests/threads-execve.test: Likewise.
   9078 
   9079 	dm: fix diagnostics about misplaced parts of struct dm_ioctl.
   9080 	* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
   9081 	dm_decode_dm_name_list, dm_decode_dm_target_versions,
   9082 	dm_decode_dm_target_msg, dm_decode_string, dm_known_ioctl): Fix
   9083 	diagnostics about various misplaced parts of struct dm_ioctl.
   9084 	* tests/ioctl_dm.c: Update expected output.
   9085 
   9086 	print_mq_attr: fix typo.
   9087 	* print_mq_attr.c (printmqattr): Fix the last argument of printflags64.
   9088 
   9089 2017-04-23  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9090 
   9091 	tests: add faulty pointer check to time test.
   9092 	* tests/time.c (main): Add check for an inaccessible pointer.
   9093 
   9094 2017-04-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   9095 
   9096 	tests: fix print_time_t_nsec usage in xstatx.c.
   9097 	* tests/xstatx.c (print_stat): Pass tv_nsec field through
   9098 	zero_extend_signed_to_ull before feeding it to print_time_t_nsec.
   9099 
   9100 2017-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   9101 
   9102 	tests: fix netlink_protocol on sparc.
   9103 	* tests/netlink_protocol.c (test_nlmsgerr): Do not access fields of an
   9104 	unaligned structure, this makes architectures like sparc very unhappy.
   9105 
   9106 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9107 
   9108 	util: return pointer to string literal directly in sprinttime.
   9109 	There is no sense to copy it to static buffer first.
   9110 
   9111 	* util.c (sprinttime): Just return "0", do not copy it to internal
   9112 	buffer first.
   9113 
   9114 2017-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   9115 
   9116 	tests: remove stat.sample creation from gen_tests.in.
   9117 	stat.sample is created by appropriate executables and never removed.
   9118 
   9119 	* tests/gen_tests.in (trace_fstat, trace_lstat, trace_stat,
   9120 	trace_stat_like): Remove stat.sample creation.
   9121 
   9122 2017-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   9123 
   9124 	tests: tabulate fstat.test.
   9125 	* tests/gen_tests.in (fstat): New entry.
   9126 	(fstat64, oldfstat): Update.
   9127 	* tests/fstat.test: Remove.
   9128 	* tests/Makefile.am (DECODER_TESTS): Remove fstat.test.
   9129 
   9130 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9131 
   9132 	Implement -e trace=%stat option.
   9133 	linux/*/syscallent*.h part is updated automatically by:
   9134 
   9135 	    sed -i '/statx/! s/TF|TSTA,/TF|TST|TSTA,/' linux/*/syscallent*.h
   9136 
   9137 	* sysent.h (TRACE_STAT): New macro.
   9138 	* syscall.c: Alias LST to TRACE_STAT around syscallent.h inclusion.
   9139 	* qualify.c (lookup_class): Add TRACE_STAT for "%stat".
   9140 	* strace.1 (.SS Filtering): Add information about %stat syscall class.
   9141 	* NEWS: Mention this change.
   9142 	* linux/aarch64/syscallent.h (stat): Add TST flag.
   9143 	* linux/ia64/syscallent.h: Likewise.
   9144 	* linux/mips/syscallent-n32.h: Likewise.
   9145 	* linux/mips/syscallent-n64.h: Likewise.
   9146 	* linux/s390x/syscallent.h: Likewise.
   9147 	* linux/x32/syscallent.h: Likewise.
   9148 	* linux/x86_64/syscallent.h: Likewise.
   9149 	* linux/arm/syscallent.h (oldstat, stat, stat64): Likewise.
   9150 	* linux/bfin/syscallent.h: Likewise.
   9151 	* linux/crisv10/syscallent.h: Likewise.
   9152 	* linux/i386/syscallent.h: Likewise.
   9153 	* linux/m68k/syscallent.h: Likewise.
   9154 	* linux/microblaze/syscallent.h: Likewise.
   9155 	* linux/mips/syscallent-o32.h: Likewise.
   9156 	* linux/powerpc/syscallent.h: Likewise.
   9157 	* linux/sh64/syscallent.h: Likewise.
   9158 	* linux/sh/syscallent.h: Likewise.
   9159 	* linux/avr32/syscallent.h (stat, stat64): Likewise.
   9160 	* linux/hppa/syscallent.h: Likewise.
   9161 	* linux/s390/syscallent.h: Likewise.
   9162 	* linux/sparc64/syscallent.h: Likewise.
   9163 	* linux/sparc/syscallent.h: Likewise.
   9164 	* linux/xtensa/syscallent.h: Likewise.
   9165 	* linux/powerpc64/syscallent.h (oldstat, stat): Likewise.
   9166 	* linux/alpha/syscallent.h (osf_old_stat, osf_stat, stat, stat64): Likewise.
   9167 	* linux/mips/syscallent-compat.h (bsd43_oldstat, bsd43_stat, posix_stat,
   9168 	svr4_stat, svr4_xstat, sysv_stat, sysv_xstat): Likewise.
   9169 	* tests/gen_tests.in (trace_stat): New entry.
   9170 	* tests/trace_stat.in: New file.
   9171 	* tests/Makefile.am (EXTRA_DIST): Add it.
   9172 	* tests/ksysent.c (TST): New macro, defined to 0.
   9173 	* tests/nsyscalls.c: Likewise.
   9174 
   9175 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9176 
   9177 	Implement -e trace=%lstat option.
   9178 	linux/*/syscallent*.h part is updated automatically by:
   9179 
   9180 	    sed -i '/TSTA,.*lx\?stat/ s/TSTA,/TLST|&/' linux/*/syscallent*.h
   9181 
   9182 	* sysent.h (TRACE_LSTAT): New macro.
   9183 	* syscall.c: Alias TLST to TRACE_LSTAT around syscallent.h inclusion.
   9184 	* qualify.c (lookup_class): Add TRACE_LSTAT for "%lstat".
   9185 	* strace.1 (.SS Filtering): Add information about %lstat syscall class.
   9186 	* NEWS: Mention this change.
   9187 	* linux/aarch64/syscallent.h (lstat): Likewise.
   9188 	* linux/ia64/syscallent.h: Likewise.
   9189 	* linux/mips/syscallent-n32.h: Likewise.
   9190 	* linux/mips/syscallent-n64.h: Likewise.
   9191 	* linux/s390x/syscallent.h: Likewise.
   9192 	* linux/x32/syscallent.h: Likewise.
   9193 	* linux/x86_64/syscallent.h: Likewise.
   9194 	* linux/arm/syscallent.h (lstat, lstat64, oldlstat): Likewise.
   9195 	* linux/bfin/syscallent.h: Likewise.
   9196 	* linux/crisv10/syscallent.h: Likewise.
   9197 	* linux/i386/syscallent.h: Likewise.
   9198 	* linux/m68k/syscallent.h: Likewise.
   9199 	* linux/microblaze/syscallent.h: Likewise.
   9200 	* linux/mips/syscallent-o32.h: Likewise.
   9201 	* linux/powerpc/syscallent.h: Likewise.
   9202 	* linux/sh64/syscallent.h: Likewise.
   9203 	* linux/sh/syscallent.h: Likewise.
   9204 	* linux/sparc64/syscallent.h: Likewise.
   9205 	* linux/sparc/syscallent.h: Likewise.
   9206 	* linux/avr32/syscallent.h (lstat, lstat64): Likewise.
   9207 	* linux/hppa/syscallent.h: Likewise.
   9208 	* linux/powerpc64/syscallent.h: Likewise.
   9209 	* linux/s390/syscallent.h: Likewise.
   9210 	* linux/xtensa/syscallent.h: Likewise.
   9211 	* linux/alpha/syscallent.h (lstat, lstat64, osf_lstat, osf_old_lstat): Likewise.
   9212 	* linux/mips/syscallent-compat.h (bsd43_lstat, posix_lstat, svr4_lstat,
   9213 	sysv_lstat): Likewise.
   9214 	* tests/gen_tests.in (trace_lstat): New entry.
   9215 	* tests/trace_lstat.in: New file.
   9216 	* tests/Makefile.am (EXTRA_DIST): Add it.
   9217 	* tests/ksysent.c (TLST): New macro, defined to 0.
   9218 	* tests/nsyscalls.c: Likewise.
   9219 
   9220 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9221 
   9222 	Implement -e trace=%fstat option.
   9223 	linux/*/syscallent*.h part is updated automatically by:
   9224 
   9225 	    sed -i -e '/TSTA.*fx\?stat/ s/TSTA,/TFST|&/' \
   9226 	           -e 's/\(TD|TF|TFST|TSTA,\)[[:space:]]/\1/' linux/*/syscallent*.h
   9227 
   9228 	* sysent.h (TRACE_FSTAT): New macro.
   9229 	* syscall.c: Alias TFST to TRACE_FSTAT around syscallent.h inclusion.
   9230 	* qualify.c (lookup_class): Add TRACE_FSTAT for "%fstat".
   9231 	* strace.1 (.SS Filtering): Add information about %fstat syscall class.
   9232 	* NEWS: Mention this change.
   9233 	* linux/32/syscallent.h (fstat64, fstatat64): Add TFST flag.
   9234 	* linux/64/syscallent.h (fstat, newfstatat): Likewise.
   9235 	* linux/aarch64/syscallent.h: Likewise.
   9236 	* linux/ia64/syscallent.h: Likewise.
   9237 	* linux/mips/syscallent-n32.h: Likewise.
   9238 	* linux/mips/syscallent-n64.h: Likewise.
   9239 	* linux/s390x/syscallent.h: Likewise.
   9240 	* linux/x32/syscallent.h: Likewise.
   9241 	* linux/x86_64/syscallent.h: Likewise.
   9242 	* linux/arm/syscallent.h (fstat, fstat64, fstatat64, oldfstat): Likewise.
   9243 	* linux/bfin/syscallent.h: Likewise.
   9244 	* linux/crisv10/syscallent.h: Likewise.
   9245 	* linux/i386/syscallent.h: Likewise.
   9246 	* linux/m68k/syscallent.h: Likewise.
   9247 	* linux/microblaze/syscallent.h: Likewise.
   9248 	* linux/mips/syscallent-o32.h: Likewise.
   9249 	* linux/powerpc/syscallent.h: Likewise.
   9250 	* linux/sh64/syscallent.h: Likewise.
   9251 	* linux/sh/syscallent.h: Likewise.
   9252 	* linux/avr32/syscallent.h (fstat, fstat64, fstatat64): Likewise.
   9253 	* linux/hppa/syscallent.h: Likewise.
   9254 	* linux/s390/syscallent.h: Likewise.
   9255 	* linux/sparc64/syscallent.h: Likewise.
   9256 	* linux/sparc/syscallent.h: Likewise.
   9257 	* linux/xtensa/syscallent.h: Likewise.
   9258 	* linux/alpha/syscallent.h (fstat, fstat64, fstatat64, osf_fstat,
   9259 	osf_old_fstat): Likewise.
   9260 	* linux/powerpc64/syscallent.h (fstat, newfstatat, oldfstat): Likewise.
   9261 	* linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_oldfstat, posix_fstat,
   9262 	svr4_fstat, sysv_fstat): Likewise.
   9263 	* tests/gen_tests.in (trace_fstat): New entry.
   9264 	* tests/trace_fstat.in: New file.
   9265 	* tests/Makefile.am (EXTRA_DIST): Add it.
   9266 	* tests/ksysent.c (TFST): New macro, defined to 0.
   9267 	* tests/nsyscalls.c: Likewise.
   9268 
   9269 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9270 
   9271 	Implement -e trace=%%stat option.
   9272 	linux/*/syscallent*.h part is updated automatically by:
   9273 
   9274 	    sed -i '/TSFA\|stat[iu]s/! s/,[[:space:]]\?\([[:space:]]*SEN(.*stat\)/|TSTA,\1/' \
   9275 	        linux/*/syscallent*.h
   9276 
   9277 	* sysent.h (TRACE_STAT_LIKE): New macro.
   9278 	* syscall.c: Alias TSTA to TRACE_STAT_LIKE around syscallent.h inclusion.
   9279 	* qualify.c (lookup_class): Add TRACE_STAT_LIKE for "%%stat".
   9280 	* strace.1 (.SS Filtering): Add information about %%stat syscall class.
   9281 	* NEWS: Mention this change.
   9282 	* linux/32/syscallent.h (fstat64, fstatat64, statx): Add TSTA flag.
   9283 	* linux/64/syscallent.h (fstat, newfstatat, statx): Likewise.
   9284 	* linux/aarch64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise.
   9285 	* linux/alpha/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9286 	osf_fstat, osf_lstat, osf_old_fstat, osf_old_lstat, osf_old_stat, osf_stat,
   9287 	stat, stat64): Likewise.
   9288 	* linux/arm/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
   9289 	oldlstat, oldstat, stat, stat64, statx): Likewise.
   9290 	* linux/avr32/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
   9291 	stat64): Likewise.
   9292 	* linux/bfin/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9293 	oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
   9294 	* linux/crisv10/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9295 	oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
   9296 	* linux/hppa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
   9297 	stat64): Likewise.
   9298 	* linux/i386/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
   9299 	oldlstat, oldstat, stat, stat64, statx): Likewise.
   9300 	* linux/ia64/syscallent.h (fstat, lstat, newfstatat, stat): Likewise.
   9301 	* linux/m68k/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
   9302 	oldlstat, oldstat, stat, stat64, statx): Likewise.
   9303 	* linux/microblaze/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9304 	oldfstat, oldlstat, oldstat, stat, stat64): Likewise.
   9305 	* linux/mips/syscallent-compat.h (bsd43_fstat, bsd43_lstat, bsd43_oldfstat,
   9306 	bsd43_oldstat, bsd43_stat, posix_fstat, posix_lstat, posix_stat, svr4_fstat,
   9307 	svr4_fxstat, svr4_lstat, svr4_lxstat, svr4_stat, svr4_xstat, sysv_fstat,
   9308 	sysv_fxstat, sysv_lstat, sysv_lxstat, sysv_stat, sysv_xstat): Likewise.
   9309 	* linux/mips/syscallent-n32.h (fstat, lstat, newfstatat, stat, statx): Likewise.
   9310 	* linux/mips/syscallent-n64.h (fstat, lstat, newfstatat, stat, statx): Likewise.
   9311 	* linux/mips/syscallent-o32.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9312 	oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise.
   9313 	* linux/powerpc64/syscallent.h (fstat, lstat, newfstatat, oldfstat, oldlstat,
   9314 	oldstat, stat): Likewise.
   9315 	* linux/powerpc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9316 	oldfstat, oldlstat, oldstat, stat, stat64, statx): Likewise.
   9317 	* linux/s390/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
   9318 	stat64, statx): Likewise.
   9319 	* linux/s390x/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
   9320 	* linux/sh64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
   9321 	oldlstat, oldstat, stat, stat64): Likewise.
   9322 	* linux/sh/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, oldfstat,
   9323 	oldlstat, oldstat, stat, stat64): Likewise.
   9324 	* linux/sparc64/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9325 	oldlstat, stat, stat64): Likewise.
   9326 	* linux/sparc/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64,
   9327 	oldlstat, stat, stat64): Likewise.
   9328 	* linux/x32/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
   9329 	* linux/x86_64/syscallent.h (fstat, lstat, newfstatat, stat, statx): Likewise.
   9330 	* linux/xtensa/syscallent.h (fstat, fstat64, fstatat64, lstat, lstat64, stat,
   9331 	stat64, statx): Likewise.
   9332 	* tests/gen_tests.in (trace_stat_like): New entry.
   9333 	* tests/trace_stat_like.in: New file.
   9334 	* tests/Makefile.am (EXTRA_DIST): Add it.
   9335 	* tests/ksysent.c (TSTA): New macro, defined to 0.
   9336 	* tests/nsyscalls.c: Likewise.
   9337 
   9338 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9339 
   9340 	qualify: add syntax for optional non-matching syscall qualification.
   9341 	It may be useful in case syscall is not present on the target
   9342 	architecture.
   9343 
   9344 	* qualify.c (qualify_syscall): Add ignore_fail flag, set it to true
   9345 	in case syscall qualification is led by a question mark(s).
   9346 	* strace.1 (.SS Filtering): Document ability to use question marks
   9347 	in syscall qualification.
   9348 
   9349 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9350 
   9351 	linux/alpha/syscallent.h: add TSFA flag to osf_getfsstat.
   9352 	In accordance with [1].
   9353 
   9354 	[1] https://www.freebsd.org/cgi/man.cgi?query=getfsstat&sektion=2
   9355 
   9356 	* linux/alpha/syscallent.h (osf_getfsstat): Add TSFA flag.
   9357 	* strace.1 (.SS Filtering) <%%statfs>: Update equivalent regexp.
   9358 
   9359 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9360 
   9361 	linux/mips/syscallent-compat.h: add some TD/TF flags for *stat* variants
   9362 	*xstat syscalls are, according to [1], like their *stat counterparts,
   9363 	but with additional argument with fixed value.
   9364 
   9365 	[1] http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf
   9366 
   9367 	* linux/mips/syscallent-compat.h (*_xstat, *_lxstat, bsd43_oldstat):
   9368 	Add TF flag.
   9369 	(*_fxstat, bsd43_oldfstat): Add TD flag.
   9370 
   9371 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9372 
   9373 	Implement -e trace=%%statfs option.
   9374 	linux/*/syscallent*.h part is updated automatically by:
   9375 
   9376 	    sed -i 's/\(TSF\),[[:space:]]\?/\1|TSFA,/' linux/*/syscallent*.h
   9377 	    sed -i 's/\(TFSF\),/\1|TSFA,/' linux/*/syscallent*.h
   9378 	    sed -i 's/0\(,.*ustat\)/TSFA\1/' linux/*/syscallent*.h
   9379 
   9380 	* sysent.h (TRACE_STATFS_LIKE): New macro.
   9381 	* syscall.c: Alias TSFA to TRACE_STATFS_LIKE around syscallent.h inclusion.
   9382 	* qualify.c (lookup_class): Add SCHED_STATFS_LIKE for "%%statfs".
   9383 	* strace.1 (.SS Filtering): Add information about %%statfs syscall class.
   9384 	* NEWS: Mention this change.
   9385 	* linux/32/syscallent.h (statfs64, fstatfs64): Add TSFA flag.
   9386 	* linux/64/syscallent.h (statfs, fstatfs): Likewise.
   9387 	* linux/aarch64/syscallent.h (statfs, fstatfs, ustat): Likewise.
   9388 	* linux/mips/syscallent-n64.h: Likewise.
   9389 	* linux/x32/syscallent.h: Likewise.
   9390 	* linux/x86_64/syscallent.h: Likewise.
   9391 	* linux/arm/syscallent.h (statfs, statfs64, fstatfs, fstatfs64, ustat):
   9392 	Likewise.
   9393 	* linux/avr32/syscallent.h: Likewise.
   9394 	* linux/bfin/syscallent.h: Likewise.
   9395 	* linux/crisv10/syscallent.h: Likewise.
   9396 	* linux/hppa/syscallent.h: Likewise.
   9397 	* linux/i386/syscallent.h: Likewise.
   9398 	* linux/ia64/syscallent.h: Likewise.
   9399 	* linux/m68k/syscallent.h: Likewise.
   9400 	* linux/microblaze/syscallent.h: Likewise.
   9401 	* linux/mips/syscallent-n32.h: Likewise.
   9402 	* linux/mips/syscallent-o32.h: Likewise.
   9403 	* linux/powerpc/syscallent.h: Likewise.
   9404 	* linux/powerpc64/syscallent.h: Likewise.
   9405 	* linux/s390/syscallent.h: Likewise.
   9406 	* linux/s390x/syscallent.h: Likewise.
   9407 	* linux/sh/syscallent.h: Likewise.
   9408 	* linux/sh64/syscallent.h: Likewise.
   9409 	* linux/sparc/syscallent.h: Likewise.
   9410 	* linux/sparc64/syscallent.h: Likewise.
   9411 	* linux/xtensa/syscallent.h: Likewise.
   9412 	* linux/alpha/syscallent.h (osf_statfs, osf_statfs64, statfs,
   9413 	ofs_fstatfs, osf_fstatfs64, ustat): Likewise.
   9414 	* linux/mips/syscallent-compat.h (*_statfs, *_statvfs, *_fstatfs): Likewise.
   9415 	* tests/gen_tests.in (trace_statfs_like): New entry.
   9416 	* tests/trace_statfs_like.in: New file.
   9417 	* tests/Makefile.am (EXTRA_DIST): Add it.
   9418 	* tests/ksysent.c (TSFA): New macro, defined to 0.
   9419 	* tests/nsyscalls.c: Likewise.
   9420 
   9421 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9422 
   9423 	Implement -e trace=%fstatfs option.
   9424 	linux/*/syscallent*.h part is updated automatically by:
   9425 
   9426 	    sed -i 's/TD,[[:space:]]\([[:space:]]*SEN.*[_"]fstatv\?fs\)/TD|TFSF,\1/' \
   9427 	           linux/*/syscallent*.h
   9428 
   9429 	* sysent.h (TRACE_FSTATFS): New macro.
   9430 	* syscall.c: Alias TFSF to TRACE_FSTATFS around syscallent.h inclusion.
   9431 	* qualify.c (lookup_class): Add SCHED_FSTATFS for "%fstatfs".
   9432 	* strace.1 (.SS Filtering): Add information about %fstatfs syscall class.
   9433 	* NEWS: Mention this change.
   9434 	* linux/32/syscallent.h (fstatfs64): Add TFSF flag.
   9435 	* linux/64/syscallent.h (fstatfs): Likewise.
   9436 	* linux/aarch64/syscallent.h: Likewise.
   9437 	* linux/mips/syscallent-n64.h: Likewise.
   9438 	* linux/x32/syscallent.h: Likewise.
   9439 	* linux/x86_64/syscallent.h: Likewise.
   9440 	* linux/arm/syscallent.h (fstatfs, fstatfs64):
   9441 	Likewise.
   9442 	* linux/avr32/syscallent.h: Likewise.
   9443 	* linux/bfin/syscallent.h: Likewise.
   9444 	* linux/crisv10/syscallent.h: Likewise.
   9445 	* linux/hppa/syscallent.h: Likewise.
   9446 	* linux/i386/syscallent.h: Likewise.
   9447 	* linux/ia64/syscallent.h: Likewise.
   9448 	* linux/m68k/syscallent.h: Likewise.
   9449 	* linux/microblaze/syscallent.h: Likewise.
   9450 	* linux/mips/syscallent-n32.h: Likewise.
   9451 	* linux/mips/syscallent-o32.h: Likewise.
   9452 	* linux/powerpc/syscallent.h: Likewise.
   9453 	* linux/powerpc64/syscallent.h: Likewise.
   9454 	* linux/s390/syscallent.h: Likewise.
   9455 	* linux/s390x/syscallent.h: Likewise.
   9456 	* linux/sh/syscallent.h: Likewise.
   9457 	* linux/sh64/syscallent.h: Likewise.
   9458 	* linux/sparc/syscallent.h: Likewise.
   9459 	* linux/sparc64/syscallent.h: Likewise.
   9460 	* linux/xtensa/syscallent.h: Likewise.
   9461 	* linux/alpha/syscallent.h (ofs_fstatfs, osf_fstatfs64): Likewise.
   9462 	* linux/mips/syscallent-compat.h (*_fstatfs, *_fstatvfs): Likewise.
   9463 	* tests/gen_tests.in (trace_fstatfs): New entry.
   9464 	* tests/trace_fstatfs.in: New file.
   9465 	* tests/Makefile.am (EXTRA_DIST): Add it.
   9466 	* tests/ksysent.c (TFSF): New macro, defined to 0.
   9467 	* tests/nsyscalls.c: Likewise.
   9468 
   9469 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9470 
   9471 	sysent.h: format syscall flag macros.
   9472 	Add some tabulation and leading zeroes to the values.
   9473 
   9474 2017-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   9475 
   9476 	tests: tabulate sched.test.
   9477 	Rewrite sched.test using test_trace_expr().
   9478 
   9479 	* tests/gen_tests.in (sched): New entry.
   9480 	* tests/sched.in: New file, derived from a set of tests in sched.test.
   9481 	* tests/sched.test: Remove.
   9482 	* tests/Makefile.am (DECODER_TESTS): Remove sched.test.
   9483 	(EXTRA_DIST): Add sched.in.
   9484 
   9485 2017-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   9486 
   9487 	tests: tabulate regex.test.
   9488 	Rewrite regex.test using test_trace_expr().
   9489 
   9490 	* tests/gen_tests.in (regex): New entry.
   9491 	* tests/regex.in: New file, derived from a set of tests in regex.test.
   9492 	* tests/regex.test: Remove.
   9493 	* tests/Makefile.am (DECODER_TESTS): Remove regex.test.
   9494 	(EXTRA_DIST): Add regex.in.
   9495 
   9496 2017-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   9497 
   9498 	tests: tabulate clock.test.
   9499 	Rewrite clock.test using test_trace_expr().
   9500 
   9501 	* tests/gen_tests.in (clock): New entry.
   9502 	* tests/clock.in: New file, derived from a set of tests in clock.test.
   9503 	* tests/clock.test: Remove.
   9504 	* tests/Makefile.am (DECODER_TESTS): Remove clock.test.
   9505 	(EXTRA_DIST): Add clock.in.
   9506 
   9507 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9508 
   9509 	tests: tabulate trace_statfs.test.
   9510 	Rewrite trace_statfs.test using test_trace_expr().
   9511 
   9512 	* tests/gen_tests.in (trace_statfs): New entry.
   9513 	* tests/trace_statfs.in: New file, derived from a set of tests
   9514 	in trace_statfs.test.
   9515 	* tests/trace_statfs.test: Remove.
   9516 	* tests/Makefile.am (DECODER_TESTS): Remove trace_statfs.test.
   9517 	(EXTRA_DIST): Add trace_statfs.in.
   9518 
   9519 2017-04-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9520 
   9521 	tests/init.sh: add helpers for running set of programs.
   9522 	This introduces three new helpers:
   9523 	prog_set_subtract subtracts one program set from another,
   9524 	test_pure_prog_set runs strace check on a set of programs,
   9525 	test_trace_expr tests trace expressions.
   9526 
   9527 	* tests/init.sh (prog_set_subtract, test_pure_prog_set,
   9528 	test_trace_expr): New functions.
   9529 
   9530 2017-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   9531 
   9532 	tests: extend gen_tests.sh further.
   9533 	* tests/gen_tests.sh: Extend support of arbitrary rules.
   9534 
   9535 2017-04-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9536 
   9537 	tests/xstat.c: do not remove sample file after test.
   9538 	As tests are executed in separate directories now, there is no need to
   9539 	remove sample file.
   9540 
   9541 	* tests/xstat.c (main): Remove unlink calls.
   9542 
   9543 2017-04-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9544 
   9545 	tests: use fixed name for stat tests sample file.
   9546 	As tests are now run in separate directories.
   9547 
   9548 	* tests/xstatx.c: Use fixed "stat.sample" name for sample file.
   9549 	* tests/fstat.test: Use it as an argument for -P option.
   9550 	* tests/gen_tests.in (fstat64, lstat, lstat64, newfstatat, oldlstat,
   9551 	oldstat, stat, stat64, statx): Likewise.
   9552 
   9553 2017-04-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9554 
   9555 	Derive copyright year from the git commit date.
   9556 	This solves problems like the need to update test suite on every
   9557 	New Year's Eve.
   9558 
   9559 	* Makefile.am (dist-hook): Generate .year.
   9560 	* copyright-year-gen: New file.
   9561 	* configure.ac (copyright_year): New m4 variable, defined as the output
   9562 	of copyright-year-gen script.
   9563 	(AC_COPYRIGHT): Use it.
   9564 	(COPYRIGHT_YEAR): New output variable and preprocessor macro.
   9565 	* strace.c (print_version): Use COPYRIGHT_YEAR.
   9566 	* strace.spec.in (%prep): Save the value of COPYRIGHT_YEAR autoconf
   9567 	variable to .year file.
   9568 	* tests/strace-V.test (config_year): New variable, derived from config.h.
   9569 	Add sanity checks for $config_year and use it in expected output.
   9570 
   9571 	Reported-by: Andreas Schwab <schwab (a] suse.de>
   9572 
   9573 2017-04-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   9574 
   9575 	tests: move /proc/ checks from scripts to executables.
   9576 	Move most of /proc/self/task/ and /proc/self/fd/ checks from scripts
   9577 	to xecutables.
   9578 
   9579 	* tests/attach-f-p.test: Move /proc/self/task/ check ...
   9580 	* tests/attach-f-p-cmd.c (main): ... here.
   9581 	* tests/fstat.test: Move /proc/self/fd/ check ...
   9582 	* tests/xstatx.c (main): ... here.
   9583 	* tests/net-y-unix.test: Move /proc/self/fd/ check ...
   9584 	* tests/net-y-unix.c (main): ... here.
   9585 	* tests/net-yy-inet.test: Move /proc/self/fd/ check ...
   9586 	* tests/net-yy-inet.c (main): ... here.
   9587 	* tests/net-yy-netlink.test: Move /proc/self/fd/ check ...
   9588 	* tests/net-yy-netlink.c (main): ... here.
   9589 	* tests/net-yy-unix.test: Move /proc/self/fd/ check ...
   9590 	* tests/net-yy-unix.c (main): ... here.
   9591 
   9592 2017-04-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   9593 
   9594 	tests: tabulate pread64-pwrite64.test.
   9595 	* tests/gen_tests.in (pread64-pwrite64): New entry.
   9596 	* tests/pread64-pwrite64.c: (main): Skip the test if /proc/self/fd/
   9597 	is not available.
   9598 	* tests/pread64-pwrite64.test: Remove.
   9599 	* tests/Makefile.am (DECODER_TESTS): Remove pread64-pwrite64.test.
   9600 
   9601 	tests: tabulate read-write.test.
   9602 	* tests/gen_tests.in (read-write): New entry.
   9603 	* tests/read-write.c: (main): Skip the test if /proc/self/fd/
   9604 	is not available.
   9605 	* tests/read-write.test: Remove.
   9606 	* tests/Makefile.am (DECODER_TESTS): Remove read-write.test.
   9607 
   9608 	tests: add skip_if_unavailable function to libtests.
   9609 	* tests/skip_unavailable.c: New file.
   9610 	* tests/tests.h (skip_if_unavailable): New prototype.
   9611 	* tests/Makefile.am (libtests_a_SOURCES): Add skip_unavailable.c.
   9612 
   9613 	tests: tabulate netlink_protocol.test.
   9614 	* tests/gen_tests.in (netlink_protocol): New entry.
   9615 	* tests/netlink_protocol.test: Remove.
   9616 	* tests/Makefile.am (DECODER_TESTS): Remove netlink_protocol.test.
   9617 
   9618 	tests: tabulate statfs.test.
   9619 	* tests/gen_tests.in (statfs): New entry.
   9620 	(fstatfs, fstatfs64, statfs64): Update.
   9621 	* tests/statfs.test: Remove.
   9622 	* tests/Makefile.am (DECODER_TESTS): Remove statfs.test.
   9623 
   9624 2017-04-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   9625 
   9626 	tests: skip statfs related tests if their sample files are not available
   9627 	* tests/xstatfsx.c (print_statfs): Skip the test if open failed.
   9628 
   9629 	tests: extend gen_tests.sh to support arbitrary test_* rules.
   9630 	* tests/gen_tests.sh: Add support of arbitrary test_* rules.
   9631 
   9632 	tests: change gen_tests.sh to read its input as raw input.
   9633 	* tests/gen_tests.sh: Specify -r option to read.
   9634 	* tests/gen_tests.in (shmxt): Update.
   9635 
   9636 2017-04-18  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   9637 
   9638 	strace.1: s/regex expression/regular expression/
   9639 
   9640 2017-04-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   9641 
   9642 	strace.1: enhance %statfs description.
   9643 	* strace.1 (.SS Filtering) <%statfs>: Fix the list of syscalls,
   9644 	add an equivalent regex expression.
   9645 
   9646 	netlink: decode NLMSG_ERROR messages.
   9647 	* netlink.c (decode_nlmsgerr, decode_payload): New functions.
   9648 	(decode_nlmsghdr_with_payload): Use decode_payload.
   9649 	* tests/netlink_protocol.c (send_query): Check decoding
   9650 	of NLMSG_ERROR messages.
   9651 	* NEWS: Mention this change.
   9652 
   9653 	netlink: avoid using unaligned sizeof(struct nlmsghdr) unnecessarily.
   9654 	* netlink.c (NLMSG_HDRLEN): Redefine.
   9655 	(decode_nlmsghdr_with_payload, decode_netlink): Use it instead
   9656 	of sizeof(struct nlmsghdr).
   9657 
   9658 	Fix the length argument passed from print_iovec to decode_netlink.
   9659 	* io.c (print_iovec): Pass the actual length to decode_netlink
   9660 	instead of the original length.
   9661 	* NEWS: Mention this fix.
   9662 
   9663 	numa: fix printing of error values in move_pages status array.
   9664 	* numa.c (print_status): Do not lose a minus sign when printing
   9665 	a symbolic error code.
   9666 	* tests/move_pages.c (print_status_array): Update expected output.
   9667 
   9668 	tests: generate pure_executables part of check_PROGRAMS automatically.
   9669 	* tests/gen_pure_executables.sh: New file.
   9670 	* bootstrap: Invoke it.
   9671 	* tests/Makefile.am: Include pure_executables.am.
   9672 	(check_PROGRAMS): Add $(PURE_EXECUTABLES).  Remove everything listed
   9673 	in pure_executables.list.
   9674 	(EXTRA_DIST): Add gen_pure_executables.sh.
   9675 	* tests/.gitignore: Add pure_executables.am.
   9676 
   9677 	tests: make EXTRA_DIST sorted.
   9678 	* tests/Makefile.am (EXTRA_DIST): Sort.
   9679 
   9680 	tests: check decoding of alpha specific osf_utimes syscall.
   9681 	* tests/osf_utimes.c: New file.
   9682 	* tests/gen_tests.in (osf_utimes): New entry.
   9683 	* tests/Makefile.am (check_PROGRAMS): Add osf_utimes.
   9684 	* tests/pure_executables.list: Likewise.
   9685 	* tests/.gitignore: Likewise.
   9686 
   9687 	tests: parametrize utimes.c.
   9688 	* tests/xutimes.c: New file, based on utimes.c.
   9689 	* tests/utimes.c [__NR_utimes] (TEST_SYSCALL_NR, TEST_SYSCALL_STR,
   9690 	TEST_STRUCT): New macros.
   9691 	[__NR_utimes]: Replace all the rest with include "xutimes.c".
   9692 	* tests/Makefile.am (EXTRA_DIST): Add xutimes.c.
   9693 
   9694 2017-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   9695 
   9696 	alpha: fix tracing flags of osf_select and osf_utimes syscalls.
   9697 	* linux/alpha/syscallent.h (osf_select): Add TD flag.
   9698 	(osf_utimes): Add TF flag.
   9699 	* NEWS: Mention alpha specific fixes.
   9700 
   9701 2017-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   9702 
   9703 	alpha: rename print_timeval32_pair to print_timeval32_utimes.
   9704 	This follows the rename of print_timeval_item to print_timeval_utimes.
   9705 
   9706 	* defs.h [ALPHA] (print_timeval32_pair): Rename
   9707 	to print_timeval32_utimes.
   9708 	* print_timeval.c [ALPHA] (print_timeval32_pair): Likewise.
   9709 	* utimes.c [ALPHA] (SYS_FUNC(osf_utimes)): Replace print_timeval32_pair
   9710 	with print_timeval32_utimes.
   9711 
   9712 2017-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   9713 
   9714 	tests: do more rigorous testing of utimes syscall parser.
   9715 	* tests/utimes.c (errstr): New variable.
   9716 	(print_ts, k_utimes): New functions.
   9717 	(main): Use them to do more rigorous testing of utimes syscall parser.
   9718 	* tests/gen_tests.in (utimes): Update -a option.
   9719 
   9720 	tests: do more rigorous testing of futimesat syscall parser.
   9721 	* tests/futimesat.c (errstr): New variable.
   9722 	(print_ts, k_futimesat): New functions.
   9723 	(main): Use them to do more rigorous testing of futimesat syscall parser.
   9724 
   9725 2017-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   9726 
   9727 	Fix printing of inaccessible times argument of utimes and futimesat syscalls
   9728 	When the whole pair of struct timeval structures cannot be fetched from
   9729 	tracee's memory, print the address.  This behavior follows the kernel's
   9730 	that uses copy_from_user for the whole pair, too.
   9731 
   9732 	* print_timeval.c (print_timeval_item): Remove.
   9733 	(print_timeval_pair): Rename to print_timeval_utimes, all callers
   9734 	updated.  Fetch the whole timeval_t array with a single
   9735 	umove_or_printaddr call.
   9736 	* tests/futimesat.c (main): Update expected output.
   9737 	* tests/utimes.c (main): Likewise.
   9738 
   9739 2017-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   9740 
   9741 	tests: rewrite utimensat.test without relying on libc utimensat wrapper.
   9742 	The new test also does more rigorous testing.
   9743 
   9744 	* tests/utimensat.c: Stop including <assert.h> and <errno.h>, include
   9745 	<unistd.h> and <asm/unistd.h>, check __NR_utimensat instead
   9746 	of HAVE_UTIMENSAT.
   9747 	(errstr): New variable.
   9748 	(k_utimensat): New function, a thin wrapper around
   9749 	syscall(__NR_utimensat).
   9750 	(main): Use them instead of utimensat.
   9751 	* tests/gen_tests.in (utimensat): New entry.
   9752 	* tests/utimensat.test: Remove.
   9753 	* tests/Makefile.am (DECODER_TESTS): Remove it.
   9754 
   9755 2017-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   9756 
   9757 	tests: use fixed timestamps in utime related tests.
   9758 	* tests/clock.test: Remove futimesat, utime, utimensat, and utimes tests
   9759 	from the list of exceptions.
   9760 	* tests/utime.c (main): Do not use time(), use fixed timestamp instead.
   9761 	* tests/futimesat.c (main): Do not use gettimeofday(), use fixed
   9762 	timestamps instead.
   9763 	* tests/utimensat.c (main): Likewise.
   9764 	* tests/utimes.c (main): Likewise.
   9765 
   9766 2017-04-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   9767 
   9768 	xtensa: wire up new syscalls.
   9769 	* linux/xtensa/syscallent.h [348..350]: New pkey_* entries.
   9770 
   9771 	Reported-by: Victor Krapivensky <krapivenskiy.va (a] phystech.edu>
   9772 
   9773 2017-04-15  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   9774 
   9775 	Update statx parser and syscall entries lists to the upstream.
   9776 	* linux/32/syscallent.h [291]: Add statx entry.
   9777 	* linux/64/syscallent.h [291]: Likewise.
   9778 	* linux/arm/syscallent.h [397]: Likewise.
   9779 	* linux/m68k/syscallent.h [379]: Likewise.
   9780 	* linux/mips/syscallent-n32.h [6330]: Likewise.
   9781 	* linux/mips/syscallent-n64.h [5326]: Likewise.
   9782 	* linux/mips/syscallent-o32.h [4366]: Likewise.
   9783 	* linux/powerpc/syscallent.h [383]: Likewise.
   9784 	* linux/s390/syscallent.h [379]: Likewise.
   9785 	* linux/s390x/syscallent.h [379]: Likewise.
   9786 	* linux/xtensa/syscallent.h [351]: Likewise.
   9787 	* statx.h (struct_statx): Update.
   9788 	* statx.c (SYS_FUNC(statx)): Print struct_statx.stx_attributes_mask.
   9789 	* tests/xstatx.c (print_stat, main): Update to test decoding
   9790 	of struct_statx.stx_attributes_mask.
   9791 
   9792 2017-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   9793 
   9794 	tests: add more regex match checks.
   9795 	* tests/qual_syscall.test: Add regex match checks.
   9796 
   9797 	tests: make mq_sendrecv* test executables reenterable.
   9798 	* tests/mq_sendrecv.c (MQ_NAME): Remove.
   9799 	(mq_name): New static variable.
   9800 	(cleanup): Use it instead of MQ_NAME.
   9801 	(main): Initialize it dynamically using the pid of process.  Use it
   9802 	instead of MQ_NAME.
   9803 
   9804 	tests: make mq test executable reenterable.
   9805 	* tests/mq.c (NAME): Remove.
   9806 	(main): Replace the fixed message queue name with a dynamically
   9807 	made name containing the pid of process.
   9808 	* tests/gen_tests.in (mq): Update -a option.
   9809 
   9810 	tests: make net-yy-netlink test executable reenterable.
   9811 	* tests/net-yy-netlink.c (main): Use getpid() instead of a fixed
   9812 	magic number.
   9813 
   9814 	tests: tabulate shmxt.test.
   9815 	* tests/gen_tests.in (shmxt): New entry.
   9816 	* tests/shmxt.test: Remove.
   9817 	* tests/Makefile.am (DECODER_TESTS): Remove shmxt.test.
   9818 
   9819 2017-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   9820 
   9821 	Revert "Implement -e trace=%sched option"
   9822 	-e trace=%sched became redundant as -e trace=/sched does the same.
   9823 
   9824 	This reverts commit 811638e9c1805438a63c14f9704b8b00ac922623.
   9825 
   9826 	* syscall.c (TSC): Remove.
   9827 	* sysent.h (TRACE_SCHED): Remove.
   9828 	* qualify.c (lookup_class): Remove %sched.
   9829 	* strace.1 (.SS Filtering): Likewise.
   9830 	* NEWS: Likewise.
   9831 	* linux/32/syscallent.h: Remove TSC flag from sched* syscalls.
   9832 	* linux/64/syscallent.h: Likewise.
   9833 	* linux/alpha/syscallent.h: Likewise.
   9834 	* linux/arm/syscallent.h: Likewise.
   9835 	* linux/avr32/syscallent.h: Likewise.
   9836 	* linux/bfin/syscallent.h: Likewise.
   9837 	* linux/crisv10/syscallent.h: Likewise.
   9838 	* linux/hppa/syscallent.h: Likewise.
   9839 	* linux/i386/syscallent.h: Likewise.
   9840 	* linux/ia64/syscallent.h: Likewise.
   9841 	* linux/m68k/syscallent.h: Likewise.
   9842 	* linux/microblaze/syscallent.h: Likewise.
   9843 	* linux/mips/syscallent-n32.h: Likewise.
   9844 	* linux/mips/syscallent-n64.h: Likewise.
   9845 	* linux/mips/syscallent-o32.h: Likewise.
   9846 	* linux/powerpc/syscallent.h: Likewise.
   9847 	* linux/powerpc64/syscallent.h: Likewise.
   9848 	* linux/s390/syscallent.h: Likewise.
   9849 	* linux/s390x/syscallent.h: Likewise.
   9850 	* linux/sh/syscallent.h: Likewise.
   9851 	* linux/sh64/syscallent.h: Likewise.
   9852 	* linux/sparc/syscallent.h: Likewise.
   9853 	* linux/sparc64/syscallent.h: Likewise.
   9854 	* linux/x32/syscallent.h: Likewise.
   9855 	* linux/x86_64/syscallent.h: Likewise.
   9856 	* linux/xtensa/syscallent.h: Likewise.
   9857 	* tests/sched.test: Replace trace=%sched with trace=/sched.
   9858 	* tests/ksysent.c (TSC): Remove.
   9859 	* tests/nsyscalls.c: Likewise.
   9860 
   9861 2017-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   9862 
   9863 	Revert "Implement -e trace=%clock option"
   9864 	-e trace=%clock became redundant as -e trace=/clock does the same.
   9865 
   9866 	This reverts commit 0a13d2391c413e3847b71ec0c1d38f56e353b1b5.
   9867 
   9868 	* syscall.c (TCL): Remove.
   9869 	* sysent.h (TRACE_CLOCK): Remove.
   9870 	* qualify.c (lookup_class): Remove %clock.
   9871 	* strace.1 (.SS Filtering): Likewise.
   9872 	* NEWS: Likewise.
   9873 	* linux/32/syscallent.h: Remove TCL flag from clock_* syscalls.
   9874 	* linux/64/syscallent.h: Likewise.
   9875 	* linux/alpha/syscallent.h: Likewise.
   9876 	* linux/arm/syscallent.h: Likewise.
   9877 	* linux/avr32/syscallent.h: Likewise.
   9878 	* linux/bfin/syscallent.h: Likewise.
   9879 	* linux/crisv10/syscallent.h: Likewise.
   9880 	* linux/hppa/syscallent.h: Likewise.
   9881 	* linux/i386/syscallent.h: Likewise.
   9882 	* linux/ia64/syscallent.h: Likewise.
   9883 	* linux/m68k/syscallent.h: Likewise.
   9884 	* linux/microblaze/syscallent.h: Likewise.
   9885 	* linux/mips/syscallent-n32.h: Likewise.
   9886 	* linux/mips/syscallent-n64.h: Likewise.
   9887 	* linux/mips/syscallent-o32.h: Likewise.
   9888 	* linux/powerpc/syscallent.h: Likewise.
   9889 	* linux/powerpc64/syscallent.h: Likewise.
   9890 	* linux/s390/syscallent.h: Likewise.
   9891 	* linux/s390x/syscallent.h: Likewise.
   9892 	* linux/sh/syscallent.h: Likewise.
   9893 	* linux/sh64/syscallent.h: Likewise.
   9894 	* linux/sparc/syscallent.h: Likewise.
   9895 	* linux/sparc64/syscallent.h: Likewise.
   9896 	* linux/x32/syscallent.h: Likewise.
   9897 	* linux/x86_64/syscallent.h: Likewise.
   9898 	* linux/xtensa/syscallent.h: Likewise.
   9899 	* tests/clock.test: Replace trace=%clock with trace=/clock.
   9900 	* tests/ksysent.c (TCL): Remove.
   9901 	* tests/nsyscalls.c: Likewise.
   9902 
   9903 2017-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   9904 
   9905 	tests: robustify regex.test.
   9906 	* tests/regex.test: Use trace_statfs.test as a template instead
   9907 	of clock.test and sched.test, not because of more interesting
   9908 	regular expressions but to fix build on platforms where
   9909 	clock.test and sched.test are not reenterable.
   9910 
   9911 2017-04-14  JingPiao Chen  <chenjingpiao (a] gmail.com>
   9912 
   9913 	Implement -e trace=/regex option.
   9914 	* qualify.c: Include <regex.h>.
   9915 	(qualify_syscall_regex): New function.
   9916 	(qualify_syscall): Use it.
   9917 	* strace.1: Document -e trace=/regex option.
   9918 	* NEWS: Mention -e trace=/regex option.
   9919 	* tests/regex.test: New test.
   9920 	* tests/Makefile.am (DECODER_TESTS): Add it.
   9921 	* tests/options-syntax.test: Add checks for invaild regexp
   9922 	and for regexp that doesn't match a syscall.
   9923 
   9924 2017-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   9925 
   9926 	tests: fix ioctl_nsfs.test on hppa.
   9927 	* tests/ioctl_nsfs.c (test_user_namespace): Specify an address
   9928 	in the middle of a mapped page as child_stack address argument
   9929 	of the clone call.
   9930 	[IA64] (clone): Update.
   9931 
   9932 2017-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   9933 
   9934 	tests: fix ioctl_nsfs.test on ia64.
   9935 	glibc on ia64 provides no clone() function, but there is a __clone2
   9936 	function instead.  It is documented but no prototype is provided by
   9937 	glibc.
   9938 
   9939 	* tests/ioctl_nsfs.c [IA64] (__clone2): New prototype.
   9940 	[IA64] (clone): New macro wrapper around __clone2.
   9941 
   9942 2017-04-13  Edgar Kaziahmedov  <edos (a] linux.com>
   9943 
   9944 	tests: check decoding of the remaining V4L2_BUF_TYPE_* types.
   9945 	* tests/ioctl_v4l2.c (init_v4l2_format, print_ioctl_v4l2): New functions
   9946 	to avoid code duplication in VIDIOC_S_FMT and VIDIOC_TRY_FMT tests.
   9947 	(main) <VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT>: Use them.  Add
   9948 	checks for remaining V4L2_BUF_TYPE_* types.
   9949 
   9950 	v4l2: Implement decoding of the remaining V4L2_BUF_TYPE_* types.
   9951 	* v4l2.c: Include "xlat/v4l2_vbi_flags.h" and "xlat/v4l2_sliced_flags.h".
   9952 	(struct_v4l2_clip): New typedef.  Mpersify it.
   9953 	(print_v4l2_clip): New function.
   9954 	(print_v4l2_format_fmt): Use it.  Add struct tcb argument.  Implement
   9955 	decoding of the remaining V4L2_BUF_TYPE_* types.
   9956 	* xlat/v4l2_vbi_flags.in: Add V4L2_VBI_UNSYNC and V4L2_VBI_INTERLACED
   9957 	introduced by linux kernel commit v2.5.46~39^2~23^2~4.
   9958 	Add V4L2_VBI_ITU_525_F1_START, V4L2_VBI_ITU_525_F2_START,
   9959 	V4L2_VBI_ITU_625_F1_START, and V4L2_VBI_ITU_625_F2_START introduced by
   9960 	linux kernel commit v3.17-rc1~112^2~217.
   9961 	* xlat/v4l2_sliced_flags.in: Add V4L2_SLICED_TELETEXT_B, V4L2_SLICED_VPS,
   9962 	V4L2_SLICED_CAPTION_525, V4L2_SLICED_WSS_625, V4L2_SLICED_VBI_525, and
   9963 	V4L2_SLICED_VBI_625 introduced by linux kernel commit v2.6.14-rc2~64.
   9964 	* configure.ac (AC_CHECK_DECLS): Add V4L2_BUF_TYPE_SDR_CAPTURE and
   9965 	V4L2_BUF_TYPE_SDR_OUTPUT.
   9966 	(AC_CHECK_MEMBERS): Add struct v4l2_window.global_alpha and
   9967 	struct v4l2_sdr_format.buffersize.
   9968 	* NEWS: Mention this change.
   9969 
   9970 2017-04-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   9971 
   9972 	travis: use mainline kernel uapi headers for coverage.
   9973 	* .travis.yml (matrix) <CHECK=coverage>: Add KHEADERS=torvalds/linux.
   9974 	* travis-build.sh: Handle $KHEADERS.
   9975 	* travis-install.sh: Likewise.
   9976 
   9977 	travis: switch from clang-3.6 to clang-3.8.
   9978 	* .travis.yml (matrix): Change clang-3.6 to clang-3.8.
   9979 
   9980 2017-04-13  Nikolay Marchuk  <marchuk.nikolay.a (a] gmail.com>
   9981 
   9982 	Implement decoding of NS_* ioctl commands.
   9983 	* configure.ac (AC_CHECK_HEADERS): Add linux/nsfs.h.
   9984 	* defs.h (DECL_IOCTL(nsfs)): New prototype.
   9985 	(setns_types): Make global.
   9986 	* ioctl.c (ioctl_decode): Call nsfs_ioctl for 0xb7 code.
   9987 	* nsfs.c: New file.
   9988 	* nsfs.h: Likewise.
   9989 	* Makefile.am (strace_SOURCES): Add them.
   9990 	* tests/ioctl_nsfs.c: New file.
   9991 	* tests/ioctl_nsfs.test: Likewise.
   9992 	* tests/.gitignore: Add ioctl_nsfs.
   9993 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   9994 	(DECODER_TESTS): Add ioctl_nsfs.test.
   9995 	* NEWS: Mention this change.
   9996 
   9997 2017-04-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   9998 
   9999 	travis: copy coverage test suite log to the travis log.
   10000 	* travis-build.sh (coverage): Print tests*/test-suite.log
   10001 	and tests*/ksysent.log.
   10002 
   10003 2017-04-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   10004 
   10005 	travis: add gcc-6.
   10006 	* .travis.yml (matrix): Add gcc-6 entries.
   10007 	* travis-build.sh: Handle gcc*.
   10008 	* travis-install.sh: Handle gcc-*.
   10009 
   10010 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10011 
   10012 	tests: robustify gen_tests.sh against in-tree builds.
   10013 	* tests/gen_tests.sh: Use abs_srcdir instead of srcdir to construct
   10014 	a path to gen_tests.sh in implicit make rules.
   10015 
   10016 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10017 
   10018 	trace_syscall_exiting: do not call get_regs for filtered syscalls.
   10019 	This saves up to 25% of ptrace syscalls in case of trace filtering.
   10020 
   10021 	* syscall.c (trace_syscall_exiting): Do not call gettimeofday
   10022 	and get_regs for filtered syscalls.
   10023 	* NEWS: Mention this change.
   10024 	* tests/get_regs.test: New test.
   10025 	* tests/Makefile.am (MISC_TESTS): Add it.
   10026 
   10027 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10028 
   10029 	Delay get_regs invocation.
   10030 	strace used to call get_regs on every stop of a tracee, including cases
   10031 	when the result is going to be discarded.  Prepare to change this lavish
   10032 	practice by delaying get_regs invocation until its result is actually
   10033 	needed.
   10034 
   10035 	* defs.h (get_regs): Remove.
   10036 	* strace.c (trace): Do not call get_regs.
   10037 	* syscall.c (get_regs): Add static qualifier.
   10038 	(trace_syscall_exiting, print_pc, get_scno): Call get_regs.
   10039 
   10040 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10041 
   10042 	startup_tcb: move get_scno invocation to a more convenient place.
   10043 	* strace.c (trace): Move get_scno invocation ...
   10044 	(startup_tcb): ... here.  This is a no-op change that slightly improves
   10045 	readability.
   10046 
   10047 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10048 
   10049 	get_regs: guard against subsequent invocations.
   10050 	At this moment there is only one call to get_regs,
   10051 	but there is going to be more of them, so a guard is needed.
   10052 
   10053 	This change also adds a clear_regs call before get_regs,
   10054 	which essentially reverts commit v4.9-288-ge9bfff6.
   10055 
   10056 	* strace.c (trace): Call clear_regs before get_regs.
   10057 	* syscall.c (get_regs): Skip if get_regs_error != -1.
   10058 
   10059 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10060 
   10061 	syscall: move definitions of automatic variables closer to their use.
   10062 	* syscall.c (trace_syscall_entering, trace_syscall_exiting): Move
   10063 	definitions of automatic variables closer to their first use.  This
   10064 	change slightly improves readability.
   10065 
   10066 	tests: check decoding of gettid syscall.
   10067 	* tests/gettid.c: New file.
   10068 	* tests/.gitignore: Add gettid.
   10069 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   10070 	* tests/gen_tests.in (gettid): New entry.
   10071 
   10072 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10073 
   10074 	tests: fix build on alpha.
   10075 	* tests/getpid.c: Skip if __NR_getpid is not defined.
   10076 	* tests/getppid.c: Skip if __NR_getppid is not defined.
   10077 
   10078 	Fixes: fd1041f6 ("tests: add tests for getpid and getppid syscalls")
   10079 
   10080 2017-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   10081 
   10082 	Fix build with old linux/netlink.h.
   10083 	* socketutils.c: Provide a fallback definition of NETLINK_SOCK_DIAG.
   10084 
   10085 	Fixes: 5c256356 ("Do not include xlat/netlink_protocols.h twice")
   10086 
   10087 2017-04-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   10088 
   10089 	Do not include xlat/netlink_protocols.h twice.
   10090 	Make netlink_protocols a global xlat array defined in net.c file.
   10091 
   10092 	* defs.h (netlink_protocols): New prototype.
   10093 	* socketutils.c: Stop including "xlat/netlink_protocols.h".
   10094 
   10095 2017-04-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   10096 
   10097 	Do not include xlat/clocknames.h twice.
   10098 	Make clocknames a global xlat array defined in time.c file.
   10099 
   10100 	* defs.h (clocknames): New prototype.
   10101 	* perf.c: Stop including "xlat/clocknames.h".
   10102 
   10103 2017-04-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   10104 
   10105 	Remove unused xlat/openmodessol.in.
   10106 	* xlat/openmodessol.in: Remove file unused since commit
   10107 	v4.10-45-gdf4dd8b.
   10108 
   10109 	Remove unused xlat/aclipc.in.
   10110 	* xlat/aclipc.in: Remove file unused since commit v4.9-46-g681452b.
   10111 
   10112 2017-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   10113 
   10114 	tests: remove statfs.expected.
   10115 	statfs.expected is unused since commit v4.11-515-g67c2f67.
   10116 
   10117 	* tests/statfs.expected: Remove.
   10118 	* tests/Makefile.am (EXTRA_DIST): Remove it.
   10119 
   10120 2017-04-07  Sandhya Bankar  <bankarsandhya512 (a] gmail.com>
   10121 
   10122 	tests: add tests for getpid and getppid syscalls.
   10123 
   10124 	[ldv: rewritten everything]
   10125 
   10126 	* tests/getpid.c: New file.
   10127 	* tests/getppid.c: Likewise.
   10128 	* tests/.gitignore: Add getpid and getppid.
   10129 	* tests/pure_executables.list: Likewise.
   10130 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   10131 	* tests/gen_tests.in (getpid, getppid): New entries.
   10132 
   10133 2017-04-07  Edgar Kaziahmedov  <edos (a] linux.com>
   10134 
   10135 	Update V4L2_* constants.
   10136 	* xlat/v4l2_buf_flags.in: Add V4L2_BUF_FLAG_PREPARED,
   10137 	V4L2_BUF_FLAG_NO_CACHE_INVALIDATE, and V4L2_BUF_FLAG_NO_CACHE_CLEAN
   10138 	introduced by linux kernel commit v3.2-rc1~63^2~55.
   10139 	Add V4L2_BUF_FLAG_TIMESTAMP_MASK, V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN,
   10140 	and V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC introduced by linux kernel commit
   10141 	v3.9-rc1~93^2~536.
   10142 	Add V4L2_BUF_FLAG_TIMESTAMP_COPY introduced by linux kernel commit
   10143 	v3.10-rc1~136^2~560.
   10144 	Add V4L2_BUF_FLAG_TSTAMP_SRC_MASK, V4L2_BUF_FLAG_TSTAMP_SRC_EOF,
   10145 	and V4L2_BUF_FLAG_TSTAMP_SRC_SOE introduced by linux kernel commit
   10146 	v3.15-rc1~85^2~186.
   10147 	Add V4L2_BUF_FLAG_LAST introduced by linux kernel commit
   10148 	v4.2-rc1~107^2~389.
   10149 	* xlat/v4l2_buf_types.in: Add V4L2_BUF_TYPE_SDR_CAPTURE
   10150 	and V4L2_BUF_TYPE_SDR_OUTPUT introduced by linux kernel commits
   10151 	v3.15-rc1~85^2~213 and v4.4-rc1~118^2~14, respectively.
   10152 	* xlat/xlat/v4l2_colorspaces.in: Add V4L2_COLORSPACE_ADOBERGB
   10153 	and V4L2_COLORSPACE_BT2020 introduced by linux kernel commit
   10154 	v3.19-rc1~29^2~72.
   10155 	Add V4L2_COLORSPACE_RAW and V4L2_COLORSPACE_DCI_P3 introduced by linux
   10156 	kernel commits v4.2-rc1~107^2~182 and v4.4-rc1~118^2~120, respectively.
   10157 	* xlat/v4l2_device_capabilities_flags.in: Add V4L2_CAP_SDR_CAPTURE,
   10158 	V4L2_CAP_EXT_PIX_FORMAT, and V4L2_CAP_SDR_OUTPUT introduced by linux
   10159 	kernel commits v3.15-rc1~85^2~210, v3.17-rc1~112^2~327,
   10160 	and v4.4-rc1~118^2~14, respectively.
   10161 	* xlat/v4l2_memories.in: Add V4L2_MEMORY_OVERLAY introduced
   10162 	in linux 2.5.46.  Add V4L2_MEMORY_DMABUF introduced by linux kernel
   10163 	commit v3.8-rc1~115^2^2~52.
   10164 
   10165 2017-04-07  Abhishek Tiwari  <erabhishektiwarics (a] gmail.com>
   10166 
   10167 	Implement -e trace=%statfs option.
   10168 	linux/*/syscallent*.h part is modified automatically by:
   10169 
   10170 		sed -i 's/TF\(,[[:space:]]*SEN.*[_"]statv\?fs\)/TF|TSF\1/' \
   10171 			linux/*/syscallent*.h
   10172 
   10173 	[ldv: rewritten trace_statfs.test using sched.test as a template]
   10174 
   10175 	* sysent.h (TRACE_STATFS): New macro.
   10176 	* syscall.c: Alias TSF to TRACE_STATFS around syscallent.h inclusion.
   10177 	* qualify.c (lookup_class): Add SCHED_STATFS for "%statfs".
   10178 	* strace.1 (.SS Filtering): Add information about %statfs syscall class.
   10179 	* NEWS: Mention this change.
   10180 	* linux/64/syscallent.h (statfs): Add TSF flag.
   10181 	* linux/aarch64/syscallent.h: Likewise.
   10182 	* linux/x32/syscallent.h: Likewise.
   10183 	* linux/x86_64/syscallent.h: Likewise.
   10184 	* linux/mips/syscallent-n64.h: Likewise.
   10185 	* linux/32/syscallent.h (statfs64): Likewise.
   10186 	* linux/arm/syscallent.h (statfs, statfs64): Likewise.
   10187 	* linux/avr32/syscallent.h: Likewise.
   10188 	* linux/bfin/syscallent.h: Likewise.
   10189 	* linux/crisv10/syscallent.h: Likewise.
   10190 	* linux/hppa/syscallent.h: Likewise.
   10191 	* linux/i386/syscallent.h: Likewise.
   10192 	* linux/ia64/syscallent.h: Likewise.
   10193 	* linux/m68k/syscallent.h: Likewise.
   10194 	* linux/microblaze/syscallent.h: Likewise.
   10195 	* linux/mips/syscallent-n32.h: Likewise.
   10196 	* linux/mips/syscallent-o32.h: Likewise.
   10197 	* linux/powerpc/syscallent.h: Likewise.
   10198 	* linux/powerpc64/syscallent.h: Likewise.
   10199 	* linux/s390/syscallent.h: Likewise.
   10200 	* linux/s390x/syscallent.h: Likewise.
   10201 	* linux/sh/syscallent.h: Likewise.
   10202 	* linux/sh64/syscallent.h: Likewise.
   10203 	* linux/sparc/syscallent.h: Likewise.
   10204 	* linux/sparc64/syscallent.h: Likewise.
   10205 	* linux/xtensa/syscallent.h: Likewise.
   10206 	* linux/alpha/syscallent.h (osf_statfs, osf_statfs64, statfs): Likewise.
   10207 	* linux/mips/syscallent-compat.h (*_statfs, *_statvfs): Likewise.
   10208 	* tests/trace_statfs.test: New test.
   10209 	* tests/Makefile.am (DECODER_TESTS): Add it.
   10210 	* tests/ksysent.c (TSF): New macro, defined to 0.
   10211 	* tests/nsyscalls.c: Likewise.
   10212 
   10213 2017-04-06  Rishi Bhatt  <bhatt.rishi062 (a] gmail.com>
   10214 
   10215 	Implement -e trace=%clock option.
   10216 	linux/*/syscallent.h part is modified automatically by
   10217 	sed -i 's/0\(,[[:space:]]*SEN(clock_\)/TCL\1/' linux/*/syscallent*.h
   10218 
   10219 	[ldv: rewritten clock.test using sched.test as a template]
   10220 
   10221 	* sysent.h (TRACE_CLOCK): New macro.
   10222 	* syscall.c: Alias TCL to TRACE_CLOCK around syscallent.h inclusion.
   10223 	* qualify.c (lookup_class): Add TRACE_CLOCK for "%clock".
   10224 	* strace.1 (.SS Filtering): Add information about %clock syscall class.
   10225 	* NEWS: Mention this change.
   10226 	* linux/32/syscallent.h: Add TCL flag for clock_* syscalls.
   10227 	* linux/64/syscallent.h: Likewise.
   10228 	* linux/alpha/syscallent.h: Likewise.
   10229 	* linux/arm/syscallent.h: Likewise.
   10230 	* linux/avr32/syscallent.h: Likewise.
   10231 	* linux/bfin/syscallent.h: Likewise.
   10232 	* linux/crisv10/syscallent.h: Likewise.
   10233 	* linux/hppa/syscallent.h: Likewise.
   10234 	* linux/i386/syscallent.h: Likewise.
   10235 	* linux/ia64/syscallent.h: Likewise.
   10236 	* linux/m68k/syscallent.h: Likewise.
   10237 	* linux/microblaze/syscallent.h: Likewise.
   10238 	* linux/mips/syscallent-n32.h: Likewise.
   10239 	* linux/mips/syscallent-n64.h: Likewise.
   10240 	* linux/mips/syscallent-o32.h: Likewise.
   10241 	* linux/powerpc/syscallent.h: Likewise.
   10242 	* linux/powerpc64/syscallent.h: Likewise.
   10243 	* linux/s390/syscallent.h: Likewise.
   10244 	* linux/s390x/syscallent.h: Likewise.
   10245 	* linux/sh/syscallent.h: Likewise.
   10246 	* linux/sh64/syscallent.h: Likewise.
   10247 	* linux/sparc/syscallent.h: Likewise.
   10248 	* linux/sparc64/syscallent.h: Likewise.
   10249 	* linux/x32/syscallent.h: Likewise.
   10250 	* linux/x86_64/syscallent.h: Likewise.
   10251 	* linux/xtensa/syscallent.h: Likewise.
   10252 	* tests/clock.test: New test.
   10253 	* tests/Makefile.am (DECODER_TESTS): Add it.
   10254 	* tests/ksysent.c (TCL): New macro, defined to 0.
   10255 	* tests/nsyscalls.c: Likewise.
   10256 
   10257 2017-04-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   10258 
   10259 	tests: tabulate xattr.test.
   10260 	* tests/gen_tests.in (xattr): New entry.
   10261 	* tests/xattr.test: Remove.
   10262 	* tests/Makefile.am (DECODER_TESTS): Remove xattr.test.
   10263 
   10264 2017-04-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   10265 
   10266 	tests: generalize scripts that check non-abbreviated decoding of ioctls.
   10267 	* tests/ioctl-v.sh: New file.
   10268 	* tests/Makefile.am (EXTRA_DIST): Add it.
   10269 	(DECODER_TESTS): Remove ioctl_evdev-v.test, ioctl_loop-v.test,
   10270 	and ioctl_rtc-v.test.
   10271 	* tests/gen_tests.in (ioctl_evdev-v, ioctl_loop-v, ioctl_rtc-v):
   10272 	New entries.
   10273 	* tests/ioctl_evdev-v.test: Remove.
   10274 	* tests/ioctl_loop-v.test: Ditto.
   10275 	* tests/ioctl_rtc-v.test: Ditto.
   10276 
   10277 2017-04-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   10278 
   10279 	tests: tabulate stereotypical test scripts.
   10280 	Convert test scripts that follow simple testing patterns to a table.
   10281 	Generate all these scripts from gen_tests.in file using gen_tests.sh
   10282 	script at bootstrap time.
   10283 
   10284 	The largest set of test scripts has been converted using
   10285 	the following command:
   10286 
   10287 	grep -l ^run_strace_match_diff *.test |while read f; do
   10288 		n="${f%.test}"
   10289 		grep '^[^#]' "$f" |
   10290 		grep -Evq '^(\. "\${srcdir=\.}/init\.sh"|run_strace_match_diff)' ||
   10291 		sed -n 's/^run_strace_match_diff\(.*\)/'$n'\1/p' "$f"
   10292 	done
   10293 
   10294 	The second largest set of test scripts has been converted using
   10295 	the following command:
   10296 
   10297 	grep -l srcdir= *.test |while read f; do
   10298 		n="${f%.test}"
   10299 		grep '^[^#]' "$f" |
   10300 		grep -Fvq srcdir= ||
   10301 		sed -n 's/^. "\${srcdir=.}\/\([^"]\+\)".*/'$n'\t+\1/p' "$f"
   10302 	done
   10303 
   10304 	* tests/gen_tests.in: New file.
   10305 	* tests/gen_tests.sh: New file.
   10306 	* bootstrap: Invoke it.
   10307 	* tests/.gitignore: Add *.gen.test and gen_tests.am.
   10308 	* tests/_newselect.test: Remove.
   10309 	* tests/accept.test: Ditto.
   10310 	* tests/accept4.test: Ditto.
   10311 	* tests/access.test: Ditto.
   10312 	* tests/acct.test: Ditto.
   10313 	* tests/add_key.test: Ditto.
   10314 	* tests/adjtimex.test: Ditto.
   10315 	* tests/aio.test: Ditto.
   10316 	* tests/alarm.test: Ditto.
   10317 	* tests/bpf.test: Ditto.
   10318 	* tests/btrfs.test: Ditto.
   10319 	* tests/chmod.test: Ditto.
   10320 	* tests/chown.test: Ditto.
   10321 	* tests/chown32.test: Ditto.
   10322 	* tests/chroot.test: Ditto.
   10323 	* tests/clock_adjtime.test: Ditto.
   10324 	* tests/clock_nanosleep.test: Ditto.
   10325 	* tests/clock_xettime.test: Ditto.
   10326 	* tests/copy_file_range.test: Ditto.
   10327 	* tests/creat.test: Ditto.
   10328 	* tests/delete_module.test: Ditto.
   10329 	* tests/dup.test: Ditto.
   10330 	* tests/dup2.test: Ditto.
   10331 	* tests/dup3.test: Ditto.
   10332 	* tests/epoll_create.test: Ditto.
   10333 	* tests/epoll_create1.test: Ditto.
   10334 	* tests/epoll_ctl.test: Ditto.
   10335 	* tests/epoll_pwait.test: Ditto.
   10336 	* tests/epoll_wait.test: Ditto.
   10337 	* tests/erestartsys.test: Ditto.
   10338 	* tests/execveat-v.test: Ditto.
   10339 	* tests/execveat.test: Ditto.
   10340 	* tests/faccessat.test: Ditto.
   10341 	* tests/fadvise64_64.test: Ditto.
   10342 	* tests/fallocate.test: Ditto.
   10343 	* tests/fanotify_init.test: Ditto.
   10344 	* tests/fanotify_mark.test: Ditto.
   10345 	* tests/fchdir.test: Ditto.
   10346 	* tests/fchmod.test: Ditto.
   10347 	* tests/fchmodat.test: Ditto.
   10348 	* tests/fchown.test: Ditto.
   10349 	* tests/fchown32.test: Ditto.
   10350 	* tests/fchownat.test: Ditto.
   10351 	* tests/fcntl.test: Ditto.
   10352 	* tests/fcntl64.test: Ditto.
   10353 	* tests/fdatasync.test: Ditto.
   10354 	* tests/file_handle.test: Ditto.
   10355 	* tests/file_ioctl.test: Ditto.
   10356 	* tests/finit_module.test: Ditto.
   10357 	* tests/flock.test: Ditto.
   10358 	* tests/fork-f.test: Ditto.
   10359 	* tests/fstat64.test: Ditto.
   10360 	* tests/fstatat64.test: Ditto.
   10361 	* tests/fstatfs.test: Ditto.
   10362 	* tests/fstatfs64.test: Ditto.
   10363 	* tests/fsync.test: Ditto.
   10364 	* tests/ftruncate.test: Ditto.
   10365 	* tests/ftruncate64.test: Ditto.
   10366 	* tests/futimesat.test: Ditto.
   10367 	* tests/get_mempolicy.test: Ditto.
   10368 	* tests/getcpu.test: Ditto.
   10369 	* tests/getcwd.test: Ditto.
   10370 	* tests/getdents.test: Ditto.
   10371 	* tests/getdents64.test: Ditto.
   10372 	* tests/getegid.test: Ditto.
   10373 	* tests/getegid32.test: Ditto.
   10374 	* tests/geteuid.test: Ditto.
   10375 	* tests/geteuid32.test: Ditto.
   10376 	* tests/getgid.test: Ditto.
   10377 	* tests/getgid32.test: Ditto.
   10378 	* tests/getgroups.test: Ditto.
   10379 	* tests/getgroups32.test: Ditto.
   10380 	* tests/getpeername.test: Ditto.
   10381 	* tests/getpgrp.test: Ditto.
   10382 	* tests/getrandom.test: Ditto.
   10383 	* tests/getresgid.test: Ditto.
   10384 	* tests/getresgid32.test: Ditto.
   10385 	* tests/getresuid.test: Ditto.
   10386 	* tests/getresuid32.test: Ditto.
   10387 	* tests/getrlimit.test: Ditto.
   10388 	* tests/getrusage.test: Ditto.
   10389 	* tests/getsid.test: Ditto.
   10390 	* tests/getsockname.test: Ditto.
   10391 	* tests/getuid32.test: Ditto.
   10392 	* tests/getxxid.test: Ditto.
   10393 	* tests/inet-cmsg.test: Ditto.
   10394 	* tests/init_module.test: Ditto.
   10395 	* tests/inotify.test: Ditto.
   10396 	* tests/inotify_init1.test: Ditto.
   10397 	* tests/int_0x80.test: Ditto.
   10398 	* tests/ioctl_block.test: Ditto.
   10399 	* tests/ioctl_evdev.test: Ditto.
   10400 	* tests/ioctl_loop.test: Ditto.
   10401 	* tests/ioctl_mtd.test: Ditto.
   10402 	* tests/ioctl_rtc.test: Ditto.
   10403 	* tests/ioctl_scsi.test: Ditto.
   10404 	* tests/ioctl_sg_io_v3.test: Ditto.
   10405 	* tests/ioctl_sg_io_v4.test: Ditto.
   10406 	* tests/ioctl_uffdio.test: Ditto.
   10407 	* tests/ioctl_v4l2.test: Ditto.
   10408 	* tests/ioperm.test: Ditto.
   10409 	* tests/iopl.test: Ditto.
   10410 	* tests/ioprio.test: Ditto.
   10411 	* tests/ip_mreq.test: Ditto.
   10412 	* tests/ipc.test: Ditto.
   10413 	* tests/ipc_msg.test: Ditto.
   10414 	* tests/ipc_sem.test: Ditto.
   10415 	* tests/ipc_shm.test: Ditto.
   10416 	* tests/kcmp.test: Ditto.
   10417 	* tests/kexec_file_load.test: Ditto.
   10418 	* tests/kexec_load.test: Ditto.
   10419 	* tests/keyctl.test: Ditto.
   10420 	* tests/kill.test: Ditto.
   10421 	* tests/lchown.test: Ditto.
   10422 	* tests/lchown32.test: Ditto.
   10423 	* tests/link.test: Ditto.
   10424 	* tests/linkat.test: Ditto.
   10425 	* tests/lookup_dcookie.test: Ditto.
   10426 	* tests/lstat.test: Ditto.
   10427 	* tests/lstat64.test: Ditto.
   10428 	* tests/mbind.test: Ditto.
   10429 	* tests/membarrier.test: Ditto.
   10430 	* tests/memfd_create.test: Ditto.
   10431 	* tests/migrate_pages.test: Ditto.
   10432 	* tests/mincore.test: Ditto.
   10433 	* tests/mkdir.test: Ditto.
   10434 	* tests/mkdirat.test: Ditto.
   10435 	* tests/mknod.test: Ditto.
   10436 	* tests/mknodat.test: Ditto.
   10437 	* tests/mlock.test: Ditto.
   10438 	* tests/mlock2.test: Ditto.
   10439 	* tests/mlockall.test: Ditto.
   10440 	* tests/mmap64.test: Ditto.
   10441 	* tests/mmsg-silent.test: Ditto.
   10442 	* tests/mmsg.test: Ditto.
   10443 	* tests/mmsg_name-v.test: Ditto.
   10444 	* tests/mmsg_name.test: Ditto.
   10445 	* tests/mount.test: Ditto.
   10446 	* tests/move_pages.test: Ditto.
   10447 	* tests/mq.test: Ditto.
   10448 	* tests/mq_sendrecv-read.test: Ditto.
   10449 	* tests/mq_sendrecv-write.test: Ditto.
   10450 	* tests/mq_sendrecv.test: Ditto.
   10451 	* tests/msg_control-v.test: Ditto.
   10452 	* tests/msg_control.test: Ditto.
   10453 	* tests/msg_name.test: Ditto.
   10454 	* tests/munlockall.test: Ditto.
   10455 	* tests/nanosleep.test: Ditto.
   10456 	* tests/net-icmp_filter.test: Ditto.
   10457 	* tests/net-sockaddr.test: Ditto.
   10458 	* tests/newfstatat.test: Ditto.
   10459 	* tests/old_mmap.test: Ditto.
   10460 	* tests/oldfstat.test: Ditto.
   10461 	* tests/oldlstat.test: Ditto.
   10462 	* tests/oldstat.test: Ditto.
   10463 	* tests/open.test: Ditto.
   10464 	* tests/openat.test: Ditto.
   10465 	* tests/pause.test: Ditto.
   10466 	* tests/perf_event_open.test: Ditto.
   10467 	* tests/perf_event_open_nonverbose.test: Ditto.
   10468 	* tests/perf_event_open_unabbrev.test: Ditto.
   10469 	* tests/pipe2.test: Ditto.
   10470 	* tests/pkey_alloc.test: Ditto.
   10471 	* tests/pkey_free.test: Ditto.
   10472 	* tests/pkey_mprotect.test: Ditto.
   10473 	* tests/ppoll-v.test: Ditto.
   10474 	* tests/ppoll.test: Ditto.
   10475 	* tests/preadv-pwritev.test: Ditto.
   10476 	* tests/preadv.test: Ditto.
   10477 	* tests/preadv2-pwritev2.test: Ditto.
   10478 	* tests/printstr.test: Ditto.
   10479 	* tests/prlimit64.test: Ditto.
   10480 	* tests/process_vm_readv.test: Ditto.
   10481 	* tests/process_vm_writev.test: Ditto.
   10482 	* tests/pselect6.test: Ditto.
   10483 	* tests/ptrace.test: Ditto.
   10484 	* tests/pwritev.test: Ditto.
   10485 	* tests/quotactl-v.test: Ditto.
   10486 	* tests/quotactl-xfs-v.test: Ditto.
   10487 	* tests/quotactl-xfs.test: Ditto.
   10488 	* tests/quotactl.test: Ditto.
   10489 	* tests/readahead.test: Ditto.
   10490 	* tests/readdir.test: Ditto.
   10491 	* tests/readlink.test: Ditto.
   10492 	* tests/readlinkat.test: Ditto.
   10493 	* tests/reboot.test: Ditto.
   10494 	* tests/recvfrom.test: Ditto.
   10495 	* tests/recvmmsg-timeout.test: Ditto.
   10496 	* tests/recvmsg.test: Ditto.
   10497 	* tests/remap_file_pages.test: Ditto.
   10498 	* tests/rename.test: Ditto.
   10499 	* tests/renameat.test: Ditto.
   10500 	* tests/renameat2.test: Ditto.
   10501 	* tests/request_key.test: Ditto.
   10502 	* tests/rmdir.test: Ditto.
   10503 	* tests/rt_sigpending.test: Ditto.
   10504 	* tests/rt_sigprocmask.test: Ditto.
   10505 	* tests/rt_sigqueueinfo.test: Ditto.
   10506 	* tests/rt_sigreturn.test: Ditto.
   10507 	* tests/rt_sigsuspend.test: Ditto.
   10508 	* tests/rt_sigtimedwait.test: Ditto.
   10509 	* tests/rt_tgsigqueueinfo.test: Ditto.
   10510 	* tests/sched_get_priority_mxx.test: Ditto.
   10511 	* tests/sched_rr_get_interval.test: Ditto.
   10512 	* tests/sched_xetaffinity.test: Ditto.
   10513 	* tests/sched_xetattr.test: Ditto.
   10514 	* tests/sched_xetparam.test: Ditto.
   10515 	* tests/sched_xetscheduler.test: Ditto.
   10516 	* tests/sched_yield.test: Ditto.
   10517 	* tests/seccomp-filter-v.test: Ditto.
   10518 	* tests/seccomp-filter.test: Ditto.
   10519 	* tests/select.test: Ditto.
   10520 	* tests/semop.test: Ditto.
   10521 	* tests/sendfile.test: Ditto.
   10522 	* tests/sendfile64.test: Ditto.
   10523 	* tests/set_mempolicy.test: Ditto.
   10524 	* tests/setdomainname.test: Ditto.
   10525 	* tests/setfsgid.test: Ditto.
   10526 	* tests/setfsgid32.test: Ditto.
   10527 	* tests/setfsuid.test: Ditto.
   10528 	* tests/setfsuid32.test: Ditto.
   10529 	* tests/setgid.test: Ditto.
   10530 	* tests/setgid32.test: Ditto.
   10531 	* tests/setgroups.test: Ditto.
   10532 	* tests/setgroups32.test: Ditto.
   10533 	* tests/sethostname.test: Ditto.
   10534 	* tests/setns.test: Ditto.
   10535 	* tests/setregid.test: Ditto.
   10536 	* tests/setregid32.test: Ditto.
   10537 	* tests/setresgid.test: Ditto.
   10538 	* tests/setresgid32.test: Ditto.
   10539 	* tests/setresuid.test: Ditto.
   10540 	* tests/setresuid32.test: Ditto.
   10541 	* tests/setreuid.test: Ditto.
   10542 	* tests/setreuid32.test: Ditto.
   10543 	* tests/setrlimit.test: Ditto.
   10544 	* tests/setuid.test: Ditto.
   10545 	* tests/setuid32.test: Ditto.
   10546 	* tests/shutdown.test: Ditto.
   10547 	* tests/siginfo.test: Ditto.
   10548 	* tests/signal_receive.test: Ditto.
   10549 	* tests/signalfd4.test: Ditto.
   10550 	* tests/sigreturn.test: Ditto.
   10551 	* tests/socketcall.test: Ditto.
   10552 	* tests/splice.test: Ditto.
   10553 	* tests/stat.test: Ditto.
   10554 	* tests/stat64.test: Ditto.
   10555 	* tests/statfs64.test: Ditto.
   10556 	* tests/statx.sh: Ditto.
   10557 	* tests/statx.test: Ditto.
   10558 	* tests/swap.test: Ditto.
   10559 	* tests/symlink.test: Ditto.
   10560 	* tests/symlinkat.test: Ditto.
   10561 	* tests/sync.test: Ditto.
   10562 	* tests/sync_file_range.test: Ditto.
   10563 	* tests/sync_file_range2.test: Ditto.
   10564 	* tests/sysinfo.test: Ditto.
   10565 	* tests/syslog.test: Ditto.
   10566 	* tests/tee.test: Ditto.
   10567 	* tests/time.test: Ditto.
   10568 	* tests/timer_create.test: Ditto.
   10569 	* tests/timer_xettime.test: Ditto.
   10570 	* tests/timerfd_xettime.test: Ditto.
   10571 	* tests/times-fail.test: Ditto.
   10572 	* tests/times.test: Ditto.
   10573 	* tests/truncate.test: Ditto.
   10574 	* tests/truncate64.test: Ditto.
   10575 	* tests/ugetrlimit.test: Ditto.
   10576 	* tests/umask.test: Ditto.
   10577 	* tests/umoven-illptr.test: Ditto.
   10578 	* tests/umovestr-illptr.test: Ditto.
   10579 	* tests/umovestr3.test: Ditto.
   10580 	* tests/unlink.test: Ditto.
   10581 	* tests/unlinkat.test: Ditto.
   10582 	* tests/unshare.test: Ditto.
   10583 	* tests/userfaultfd.test: Ditto.
   10584 	* tests/ustat.test: Ditto.
   10585 	* tests/utime.test: Ditto.
   10586 	* tests/utimes.test: Ditto.
   10587 	* tests/vfork-f.test: Ditto.
   10588 	* tests/vhangup.test: Ditto.
   10589 	* tests/vmsplice.test: Ditto.
   10590 	* tests/wait4-v.test: Ditto.
   10591 	* tests/wait4.test: Ditto.
   10592 	* tests/waitid-v.test: Ditto.
   10593 	* tests/waitid.test: Ditto.
   10594 	* tests/waitpid.test: Ditto.
   10595 	* tests/xattr-strings.test: Ditto.
   10596 	* tests/xet_robust_list.test: Ditto.
   10597 	* tests/xetitimer.test: Ditto.
   10598 	* tests/xetpgid.test: Ditto.
   10599 	* tests/xetpriority.test: Ditto.
   10600 	* tests/xettimeofday.test: Ditto.
   10601 	* tests/Makefile.am (DECODER_TESTS, MISC_TESTS): Remove them.
   10602 	Include gen_tests.am.
   10603 	(TESTS): Add $(GEN_TESTS).
   10604 	(XFAIL_TESTS_x86_64, XFAIL_TESTS_x32): Rename int_0x80.test
   10605 	to int_0x80.gen.test.
   10606 	(EXTRA_DIST): Add gen_tests.in and gen_tests.sh, remove statx.sh.
   10607 	(clean-local-check): Remove $(GEN_TESTS:.gen.test=.dir).
   10608 
   10609 2017-04-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   10610 
   10611 	tests: handle test scripts with .gen.test suffix.
   10612 	* tests/init.sh: If script name ends with .gen.test,
   10613 	set NAME variable with .gen.test suffix stripped.
   10614 
   10615 2017-04-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   10616 
   10617 	mpers.awk: add support for multidimensional arrays.
   10618 	* mpers.awk (update_upper_bound): New function, which maintains new "count"
   10619 	property for storing total element count and updates "upper_bound"
   10620 	property which now contains string with array dimensions.
   10621 	(/^DW_AT_upper_bound/, /^DW_AT_count/): Use it.
   10622 	(what_is) <case "array_type">: Use "count" property in order to calculate
   10623 	returned_size, do not embody returned string in square brackets.
   10624 	* mpers_test.sh: Add checks for multidimensional arrays.
   10625 
   10626 2017-04-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   10627 
   10628 	mpers.awk: prepare for adding support of multidimensional arrays.
   10629 	* mpers.awk (what_is) <case "structure_type", case "union_type">:
   10630 	Move formatting of array upper_bound ...
   10631 	<case "array_type">: ... here.
   10632 
   10633 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10634 
   10635 	tests: cleanup temporary files removals.
   10636 	As every test now runs in its own subdirectory, there is no need
   10637 	to remove leftover files manually by each test.
   10638 
   10639 	* tests/init.sh (run_strace_match_diff): Do not remove $EXP.
   10640 	* tests/brk.test: Likewise.
   10641 	* tests/options-syntax.test: Likewise.
   10642 	* tests/qual_inject-retval.test (check_injection): Likewise.
   10643 	* tests/qual_signal.test (test_one_sig): Likewise.
   10644 	* tests/sched.test: Likewise.
   10645 	* tests/seccomp-strict.test: Likewise.
   10646 	* tests/strace-V.test: Likewise.
   10647 	* tests/strace-tt.test: Likewise.
   10648 	* tests/strace-ttt.test: Likewise.
   10649 	* tests/threads-execve.test: Likewise.
   10650 	* tests/attach-f-p.test: Use $EXP instead of $OUT, do not remove it.
   10651 	* tests/personality.test: Likewise.
   10652 	* tests/poll.test: Likewise.
   10653 	* tests/fstat.test: Likewise.
   10654 	* tests/ipc.sh: Likewise.
   10655 	* tests/restart_syscall.test: Likewise.
   10656 	* tests/utimensat.test: Likewise.
   10657 	* tests/attach-p-cmd.test: Likewise.  Do not remove
   10658 	attach-p-cmd.test-lock.
   10659 	* tests/detach-running.test: Do not remove $LOG.
   10660 	* tests/detach-sleeping.test: Likewise.
   10661 	* tests/detach-stopped.test: Likewise.
   10662 	* tests/redirect.test: Do not remove $OUT.
   10663 	* tests/strace-S.test: Likewise.
   10664 	* tests/getdents.test: Do not remove $LOG.dir.
   10665 	* tests/getdents64.test: Likewise.
   10666 	* tests/readdir.test: Likewise.
   10667 	* tests/btrfs-v.test: Do not remove $EXP and $OUT.
   10668 	* tests/btrfs-vw.test: Likewise.
   10669 	* tests/btrfs-w.test: Likewise.
   10670 	* tests/execve-v.test: Likewise.
   10671 	* tests/execve.test: Likewise.
   10672 	* tests/fadvise64.test: Likewise.
   10673 	* tests/getuid.test: Likewise.
   10674 	* tests/ioctl.test: Likewise.
   10675 	* tests/ioctl_dm-v.test: Likewise.
   10676 	* tests/ioctl_dm.test: Likewise.
   10677 	* tests/ioctl_evdev-v.test: Likewise.
   10678 	* tests/ioctl_loop-nv.test: Likewise.
   10679 	* tests/ioctl_loop-v.test: Likewise.
   10680 	* tests/ioctl_loop.test: Likewise.
   10681 	* tests/ioctl_rtc-v.test: Likewise.
   10682 	* tests/ioctl_sock_gifconf.test: Likewise.
   10683 	* tests/llseek.test: Likewise.
   10684 	* tests/lseek.test: Likewise.
   10685 	* tests/mmap.test: Likewise.
   10686 	* tests/net-y-unix.test: Likewise.
   10687 	* tests/net-yy-inet.test: Likewise.
   10688 	* tests/net-yy-netlink.test: Likewise.
   10689 	* tests/net-yy-unix.test: Likewise.
   10690 	* tests/opipe.test: Likewise.
   10691 	* tests/prctl-arg2-intptr.test: Likewise.
   10692 	* tests/prctl-dumpable.test: Likewise.
   10693 	* tests/prctl-name.test: Likewise.
   10694 	* tests/prctl-no-args.test: Likewise.
   10695 	* tests/prctl-pdeathsig.test: Likewise.
   10696 	* tests/prctl-seccomp-filter-v.test: Likewise.
   10697 	* tests/prctl-seccomp-strict.test: Likewise.
   10698 	* tests/prctl-securebits.test: Likewise.
   10699 	* tests/prctl-tid_address.test: Likewise.
   10700 	* tests/prctl-tsc.test: Likewise.
   10701 	* tests/umovestr2.test: Likewise.
   10702 	* tests/uname.test: Likewise.
   10703 	* tests/pread64-pwrite64.test: Do nore remove pread64-pwrite64-tmpfile.
   10704 	* tests/read-write.test: Do nore remove read-write-tmpfile.
   10705 	* tests/qual_fault.test (check_fault_injection): Do not remove $EXP,
   10706 	$outexp, and $outgot.
   10707 	* tests/redirect-fds.test (check_fd): Reorder removal of work files.
   10708 	* tests/pc.test: Use $EXP instead of $EXPECTED, do not remove it.
   10709 	* tests/strace-t.test: Likewise.
   10710 	* tests/scm_rights-fd.test: Likewise.  Use dir instead of $LOG.dir,
   10711 	do not remove it.
   10712 	* tests/strace-ff.test: Do not remove $OUT and $LOG.* files.
   10713 
   10714 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10715 
   10716 	tests: enhance sched.test negative check.
   10717 	* tests/sched.test: Test that trace=%sched doesn't match
   10718 	anything besides sched_* syscalls by checking it against all test
   10719 	executables without side effects listed in pure_executables.list
   10720 	except sched_* and times.
   10721 
   10722 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10723 
   10724 	tests: add a list of executables without side effects.
   10725 	These are executables that could be used by several different tests
   10726 	simultaneously.
   10727 
   10728 	* tests/pure_executables.list: New file.
   10729 	* tests/Makefile.am (EXTRA_DIST): Add it.
   10730 
   10731 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10732 
   10733 	tests: use fixed socket address in net-yy-unix.test.
   10734 	This allows net-yy-unix invocation without arguments.
   10735 
   10736 	* tests/net-yy-unix.c (TEST_SOCKET): New macro.
   10737 	(void): Use it instead of av[1].
   10738 	* tests/net-yy-unix.test: Do not specify arguments for the test
   10739 	executable.
   10740 
   10741 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10742 
   10743 	tests: use fixed socket address in net-y-unix.test.
   10744 	This allows net-y-unix invocation without arguments.
   10745 
   10746 	* tests/net-y-unix.c (TEST_SOCKET): New macro.
   10747 	(void): Use it instead of av[1].
   10748 	* tests/net-y-unix.test: Do not specify arguments for the test
   10749 	executable.
   10750 
   10751 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10752 
   10753 	tests: run every test except ksysent.test in its own subdirectory.
   10754 	Many test executables create temporary files in the current work
   10755 	directory for the duration of their execution.
   10756 	This level of test isolation allows more test executables to be invoked
   10757 	several times simultaneously.
   10758 
   10759 	* tests/.gitignore: Add *.dir, remove *.log.*, *.tmp, *.tmp-*,
   10760 	and *.tmp.* patterns.
   10761 	* tests/Makefile.am (clean-local, clean-local-check): New rules.
   10762 	(.PHONY): Add clean-local-check.
   10763 	(CLEANFILES): Remove all but ksysent.h.
   10764 	* tests/init.sh: Strip test-specific prefix from LOG, OUT, and EXP
   10765 	variables.  When invoked from a test, create a new test-specific
   10766 	directory, chdir into it, and add more ../ prefix to STRACE variable.
   10767 	(run_prog): Replace "./" with "../".
   10768 	* tests/attach-f-p.test: Replace "./" with "../".
   10769 	* tests/attach-p-cmd.test: Likewise.
   10770 	* tests/bexecve.test: Likewise.
   10771 	* tests/btrfs-v.test: Likewise.
   10772 	* tests/btrfs-vw.test: Likewise.
   10773 	* tests/btrfs-w.test: Likewise.
   10774 	* tests/count.test: Likewise.
   10775 	* tests/detach-running.test: Likewise.
   10776 	* tests/detach-sleeping.test: Likewise.
   10777 	* tests/detach-stopped.test: Likewise.
   10778 	* tests/mmap.test: Likewise.
   10779 	* tests/net-y-unix.test: Likewise.
   10780 	* tests/net-yy-inet.test: Likewise.
   10781 	* tests/net-yy-netlink.test: Likewise.
   10782 	* tests/net-yy-unix.test: Likewise.
   10783 	* tests/net.test: Likewise.
   10784 	* tests/opipe.test: Likewise.
   10785 	* tests/poll.test: Likewise.
   10786 	* tests/prctl-seccomp-strict.test: Likewise.
   10787 	* tests/qual_fault-exit_group.test: Likewise.
   10788 	* tests/qual_fault.test: Likewise.
   10789 	* tests/qual_inject-error-signal.test: Likewise.
   10790 	* tests/qual_inject-retval.test: Likewise.
   10791 	* tests/qual_inject-signal.test: Likewise.
   10792 	* tests/qual_signal.test: Likewise.
   10793 	* tests/qual_syscall.test: Likewise.
   10794 	* tests/readv.test: Likewise.
   10795 	* tests/redirect-fds.test: Likewise.
   10796 	* tests/sched.test: Likewise.
   10797 	* tests/scm_rights-fd.test: Likewise.
   10798 	* tests/seccomp-strict.test: Likewise.
   10799 	* tests/strace-C.test: Likewise.
   10800 	* tests/strace-E.expected: Likewise.
   10801 	* tests/strace-E.test: Likewise.
   10802 	* tests/strace-S.test: Likewise.
   10803 	* tests/strace-T.test: Likewise.
   10804 	* tests/strace-V.test: Likewise.
   10805 	* tests/strace-ff.test: Likewise.
   10806 	* tests/strace-k.test: Likewise.
   10807 	* tests/strace-r.expected: Likewise.
   10808 	* tests/strace-r.test: Likewise.
   10809 	* tests/strace-t.test: Likewise.
   10810 	* tests/strace-tt.test: Likewise.
   10811 	* tests/strace-ttt.test: Likewise.
   10812 	* tests/sun_path.test: Likewise.
   10813 	* tests/uname.test: Likewise.
   10814 	* tests/unix-pair-send-recv.test: Likewise.
   10815 	* tests/unix-pair-sendto-recvfrom.test: Likewise.
   10816 
   10817 2017-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   10818 
   10819 	tests: make test executables invocable outside current work directory.
   10820 	Most of test executables were ready for the upcoming change,
   10821 	this change prepares all the rest.
   10822 
   10823 	* tests/getdents.c (main): Use fixed name for the sample directory.
   10824 	* tests/getdents64.c (main): Likewise.
   10825 	* tests/readdir.c (main): Likewise.
   10826 	* tests/mknod.c (sample): Change to a pointer.
   10827 	(main): Use av[0] as a sample.
   10828 	* tests/symlink.c (main): Use av[0] as a linkpath.
   10829 	* tests/umode_t.c (sample): Change to a pointer.
   10830 	(test_syscall): Fix expected output.
   10831 	(main): Use av[0] as a sample.
   10832 
   10833 2017-03-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   10834 
   10835 	tests: cleanup access.test.
   10836 	* tests/access.test: Use run_strace_match_diff.
   10837 	* tests/access.c (main): Update expected output.
   10838 
   10839 2017-03-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   10840 
   10841 	tests: cleanup oldfstat.test.
   10842 	* tests/oldfstat.test: Use fstat.test.
   10843 
   10844 2017-03-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   10845 
   10846 	aarch64: workaround gcc+kernel bug.
   10847 	Due to a subtle gcc bug that leads to miscompiled aarch64 kernels,
   10848 	the 3rd argument of sched_getattr syscall is not quite 32-bit
   10849 	on aarch64 as on other architectures.  For more details see
   10850 	https://sourceforge.net/p/strace/mailman/message/35721703/
   10851 
   10852 	* defs.h (print_abnormal_hi): New prototype.
   10853 	* util.c (print_abnormal_hi): New function.
   10854 	* sched.c (SYS_FUNC(sched_getattr)) [AARCH64]: Use it.
   10855 	* tests/sched_xetattr.c (main) [__arm64__ || __aarch64__]: Test it.
   10856 
   10857 2017-03-29  Abhishek Tiwari  <erabhishektiwarics (a] gmail.com>
   10858 
   10859 	alpha, mips: fix missing flags in stat related compatibility syscalls.
   10860 	Following commands do the fix:
   10861 
   10862 	Add TF flag, fixed by:
   10863 		git grep -Fl '_stat' linux/*/syscallent* | xargs sed -i \
   10864 	  		's/0\(,[[:space:]]*SEN(.*_l\?stat[^i]\)/TF\1/'
   10865 
   10866 	Add TD flag, fixed by:
   10867 		git grep -Fl '_stat' linux/*/syscallent* | xargs sed -i \
   10868 		  's/0\(,[[:space:]]*SEN(.*_fstat\)/TD\1/'
   10869 
   10870 	* linux/alpha/syscallent.h: Add TF and TD flags to stat related
   10871 	compat syscall entries.
   10872 	* linux/mips/syscallent-compat.h: Likewise.
   10873 
   10874 2017-03-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   10875 
   10876 	alpha: fix the number of arguments in alpha specific syscalls.
   10877 	* linux/alpha/syscallent.h (getxgid, osf_stat, osf_lstat, osf_fstat,
   10878 	osf_sysinfo, sethae): Set nargs according to arch/alpha/kernel/osf_sys.c
   10879 	from linux v4.10.
   10880 
   10881 	alpha: update comments about not implemented syscalls.
   10882 	* linux/alpha/syscallent.h: Sync "not implemented" comments
   10883 	with arch/alpha/kernel/systbls.S from linux v4.10.
   10884 
   10885 2017-03-23  Quentin Monnet  <quentin.monnet (a] 6wind.com>
   10886 
   10887 	Update BPF_MAP_TYPE_* constants.
   10888 	* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_ARRAY_OF_MAPS
   10889 	and BPF_MAP_TYPE_HASH_OF_MAPS constants.
   10890 
   10891 2017-03-23  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   10892 
   10893 	Update ioctl entries from linux v4.11-rc3.
   10894 	* linux/32/ioctls_inc_align16.h: Update from linux v4.11-rc3 using ioctls_gen.sh.
   10895 	* linux/32/ioctls_inc_align32.h: Likewise.
   10896 	* linux/32/ioctls_inc_align64.h: Likewise.
   10897 	* linux/64/ioctls_inc.h: Likewise.
   10898 	* linux/x32/ioctls_inc0.h: Likewise.
   10899 	* linux/arm/ioctls_arch0.h: Likewise.
   10900 	* linux/i386/ioctls_arch0.h: Likewise.
   10901 	* linux/powerpc/ioctls_arch0.h: Likewise.
   10902 	* linux/s390/ioctls_arch0.h: Likewise.
   10903 	* linux/s390x/ioctls_arch0.h: Likewise.
   10904 	* linux/x86_64/ioctls_arch0.h: Likewise.
   10905 	* NEWS: Mention this.
   10906 
   10907 	maint: update for linux 4.11.
   10908 	* maint/ioctls_sym.sh (ppc_list): Add KVM_PPC_GET_RMMU_INFO
   10909 	and KVM_PPC_CONFIGURE_V3_MMU.
   10910 
   10911 2017-03-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   10912 
   10913 	test: rename README to README.md.
   10914 	* test/README: Rename to README.md, turn ../tests reference into an URL.
   10915 
   10916 	test: update README.
   10917 	* test/README: Tell the reader what this directory is actually for.
   10918 
   10919 	test: rewrite skodic.c demo.
   10920 	* test/skodic.c: Rewrite this demo to simplify its use.
   10921 
   10922 2017-03-18  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   10923 
   10924 	Implement decoding of statx syscall.
   10925 	* linux/i386/syscallent.h [383]: Add statx entry.
   10926 	* linux/x32/syscallent.h [332]: Likewise.
   10927 	* linux/x86_64/syscallent.h [332]: Likewise.
   10928 	* pathtrace.c (pathtrace_match): Handle SEN_statx.
   10929 	* statx.c: New file.
   10930 	* statx.h: Likewise.
   10931 	* Makefile.am (strace_SOURCES): Add them.
   10932 	* tests/.gitignore: Add statx.
   10933 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   10934 	(DECODER_TESTS): Add statx.test.
   10935 	* tests/statx.c: New file.
   10936 	* tests/statx.test: Likewise.
   10937 	* tests/xstatx.c: Modify to support statx.
   10938 	* xlat/at_statx_sync_types.in: New file.
   10939 	* xlat/statx_attrs.in: Likewise.
   10940 	* xlat/statx_masks.in: Likewise.
   10941 	* NEWS: Mention this change.
   10942 
   10943 2017-03-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   10944 
   10945 	tests: check for out of bounds fetch in parsers of stat family syscalls.
   10946 	* tests/xstatx.c (main): Create STRUCT_STAT object using
   10947 	TAIL_ALLOC_OBJECT_CONST_PTR.
   10948 
   10949 	tests: check unexpected syscall errors returned by stat family syscalls.
   10950 	* tests/xstatx.c (main) [!OLD_STAT]: Do not skip the test
   10951 	in case of EOVERFLOW.
   10952 	Treat errors other than ENOSYS and EOVERFLOW as fatal.
   10953 
   10954 2017-03-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   10955 
   10956 	tests: move try_run_prog to init.sh.
   10957 	Looks like try_run_prog may be of general use by other syscall class
   10958 	tests.
   10959 
   10960 	* tests/sched.test (try_run_prog): Move it...
   10961 	* tests/init: ... here.
   10962 
   10963 2017-03-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   10964 
   10965 	tests/sched.test: rc should be a local variable in try_run_prog.
   10966 	* tests/sched.test (try_run_prog): Add local rc.
   10967 
   10968 2017-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   10969 
   10970 	tests: check decoding of int 0x80 on x86_64, x32, and x86.
   10971 	* tests/int_0x80.c: New file.
   10972 	* tests/int_0x80.test: New test.
   10973 	* tests/.gitignore: Add int_0x80.
   10974 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   10975 	(MISC_TESTS, XFAIL_TESTS_x86_64, XFAIL_TESTS_x32): Add int_0x80.test.
   10976 	(XFAIL_TESTS): Add $(XFAIL_TESTS_$(ARCH)).
   10977 	(CLEANFILES): Add $(TESTS:=.tmp.out) and $(TESTS:=.tmp.exp).
   10978 
   10979 2017-03-16  Damien Profeta  <damien.profeta (a] amadeus.com>
   10980 
   10981 	strace-graph: handle pid looping.
   10982 	* strace-graph: On long running process or heavily forking one (like
   10983 	compilation), it can happen that a parent get 2 different children with
   10984 	the same pid.  By tracking the currently runnig pid and adding the start
   10985 	timestamp to the pid, the graph can now handle that case.
   10986 
   10987 	Closes: https://github.com/strace/strace/pull/7
   10988 
   10989 2017-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   10990 
   10991 	tests: use TAIL_ALLOC_OBJECT_CONST_PTR.
   10992 	Automatically convert tests to use TAIL_ALLOC_OBJECT_CONST_PTR macro
   10993 	with the following sed expression:
   10994 
   10995 	sed -ri \
   10996 	's/^([[:space:]]*)(([^*]+[[:alnum:]_])( \*)?) *\*( *const )?([^ =]+) = tail_alloc\(sizeof\((\2|\*\6)\)\);/\1TAIL_ALLOC_OBJECT_CONST_PTR(\2, \6);/' \
   10997 	tests/*.c
   10998 
   10999 2017-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   11000 
   11001 	tests: use TAIL_ALLOC_OBJECT_VAR_PTR.
   11002 	Automatically convert tests to use TAIL_ALLOC_OBJECT_VAR_PTR macro
   11003 	with the following sed expression:
   11004 
   11005 	sed -ri \
   11006 	's/^([[:space:]]*)(([^*]+[[:alnum:]_])( \*)?) *\*([^ =]+) = tail_alloc\(sizeof\((\2|\*\5)\)\);/\1TAIL_ALLOC_OBJECT_VAR_PTR(\2, \5);/' \
   11007 	tests/{move_pages,net-sockaddr,sendfile}.c
   11008 
   11009 2017-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   11010 
   11011 	tests: add TAIL_ALLOC_OBJECT_{CONST,VAR}_PTR to tests.h.
   11012 	Introduce a new macros for the most widespread use of tail_alloc.
   11013 
   11014 	* tests/tests.h (TAIL_ALLOC_OBJECT_CONST_PTR,
   11015 	TAIL_ALLOC_OBJECT_VAR_PTR): New macros.
   11016 
   11017 2017-03-16  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   11018 
   11019 	Decode RUSAGE_THREAD.
   11020 	* xlat/usagewho.in: Add values for existing entities, add
   11021 	RUSAGE_THREAD.
   11022 	* tests/getrusage.c: Test decoding of RUSAGE_THREAD.
   11023 
   11024 2017-03-15  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   11025 
   11026 	tests/sched.test: use heredoc in order to avoid spawning of subprocess.
   11027 	Pipelined commands executed in subprocesses (some shells have special
   11028 	provision for last command in the pipeline, but it is not guaranteed
   11029 	and not POSIX), so exit codes of these subprocesses can be lost.
   11030 	In order to avoid creating subprocesses, input for read commands
   11031 	is better to supply via heredoc and not pipe.
   11032 
   11033 	* tests/sched.test: Move test cases to heredoc.
   11034 
   11035 2017-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   11036 
   11037 	tests: do not skip sched.test if one of its subtests skips.
   11038 	* tests/sched.test (try_run_prog): New function.
   11039 	Use it instead of run_prog.
   11040 
   11041 2017-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   11042 
   11043 	tests: do not check decoding of setitimer syscall outside xetitimer.test
   11044 	xetitimer.test already implements a comprehensive test of setitimer
   11045 	syscall parser, no need to duplicate its parts in other tests.
   11046 
   11047 	* tests/clock_nanosleep.c (main): Remove setitimer expected output.
   11048 	* tests/nanosleep.c (main): Likewise.
   11049 	* tests/clock_nanosleep.test: Remove setitimer from the trace set.
   11050 	* tests/nanosleep.test: Likewise.
   11051 
   11052 2017-03-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   11053 
   11054 	tests: check decoding of getitimer and setitimer corner cases.
   11055 	* tests/sched_xetattr.c: Include <unistd.h> and <asm/unistd.h>.
   11056 	(main): Check that pointer and integer arguments of getitimer
   11057 	and setitimer syscalls are decoded properly.
   11058 	* tests/xetitimer.test: Add -a option.
   11059 
   11060 2017-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11061 
   11062 	tests: rewrite sigreturn syscall decoding check from match_grep to match_diff
   11063 	Unlike the former test that was based on match_grep,
   11064 	the new one uses match_diff and does more rigorous testing.
   11065 
   11066 	* tests/sigreturn.c: Rewrite.
   11067 	* tests/sigreturn.test: Likewise.
   11068 
   11069 2017-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11070 
   11071 	ia64, mips, x86_64: remove no longer used parsers of sigreturn syscalls.
   11072 	As there is no sigreturn syscall on ia64, mips n32, mips n64, x32,
   11073 	and x86_64, no longer used parsers could be safely removed.
   11074 
   11075 	* linux/ia64/arch_sigreturn.c: Remove.
   11076 	* Makefile.am (EXTRA_DIST): Remove it.
   11077 	* linux/mips/arch_sigreturn.c (arch_sigreturn): Remove [!LINUX_MIPSO32].
   11078 	* linux/x86_64/arch_sigreturn.c (arch_sigreturn): Remove.
   11079 
   11080 2017-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11081 
   11082 	Move sigreturn parser to libstrace.
   11083 	All architectures have rt_sigreturn, but only old ones also have
   11084 	sigreturn.  Since not all architectures need a parser of sigreturn
   11085 	syscall, remove the warning and move the parser to libstrace.
   11086 
   11087 	* Makefile.am (strace_SOURCES): Move sigreturn.c ...
   11088 	(libstrace_a_SOURCES): ... here.
   11089 	* linux/arch_sigreturn.c: Remove warning.
   11090 
   11091 2017-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11092 
   11093 	tests: check decoding of rt_sigreturn syscall.
   11094 	* tests/rt_sigreturn.c: New file.
   11095 	* tests/rt_sigreturn.test: New test.
   11096 	* tests/.gitignore: Add rt_sigreturn.
   11097 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   11098 	(DECODER_TESTS): Add rt_sigreturn.test.
   11099 
   11100 	Implement proper decoding of rt_sigreturn syscall.
   11101 	* rt_sigreturn.c: New file.
   11102 	* Makefile.am (strace_SOURCES): Add it.
   11103 	* linux/dummy.h (sys_rt_sigreturn): Remove.
   11104 	* linux/64/syscallent.h (rt_sigreturn): Change sys_func to rt_sigreturn.
   11105 	* linux/hppa/syscallent.h (rt_sigreturn): Likewise.
   11106 	* linux/ia64/syscallent.h (rt_sigreturn): Likewise.
   11107 	* linux/s390/syscallent.h (rt_sigreturn): Likewise.
   11108 	* linux/s390x/syscallent.h (rt_sigreturn): Likewise.
   11109 	* linux/x86_64/syscallent.h (rt_sigreturn): Likewise.
   11110 	* linux/x32/syscallent.h (rt_sigreturn, 64:rt_sigreturn): Likewise.
   11111 	* NEWS: Mention this change.
   11112 
   11113 2017-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11114 
   11115 	Introduce get_rt_sigframe_addr function.
   11116 	Add get_rt_sigframe_addr function for all supported architectures.
   11117 	It is going to be used in a parser of rt_sigreturn syscall.
   11118 
   11119 	* defs.h (get_rt_sigframe_addr): New function prototype.
   11120 	* rt_sigframe.c: New file.
   11121 	* Makefile.am (strace_SOURCES): Add it.
   11122 	* linux/aarch64/arch_rt_sigframe.c: New file.
   11123 	* linux/alpha/arch_rt_sigframe.c: Likewise.
   11124 	* linux/arc/arch_rt_sigframe.c: Likewise.
   11125 	* linux/arm/arch_rt_sigframe.c: Likewise.
   11126 	* linux/avr32/arch_rt_sigframe.c: Likewise.
   11127 	* linux/bfin/arch_rt_sigframe.c: Likewise.
   11128 	* linux/crisv10/arch_rt_sigframe.c: Likewise.
   11129 	* linux/crisv32/arch_rt_sigframe.c: Likewise.
   11130 	* linux/hppa/arch_rt_sigframe.c: Likewise.
   11131 	* linux/i386/arch_rt_sigframe.c: Likewise.
   11132 	* linux/ia64/arch_rt_sigframe.c: Likewise.
   11133 	* linux/m68k/arch_rt_sigframe.c: Likewise.
   11134 	* linux/metag/arch_rt_sigframe.c: Likewise.
   11135 	* linux/microblaze/arch_rt_sigframe.c: Likewise.
   11136 	* linux/mips/arch_rt_sigframe.c: Likewise.
   11137 	* linux/nios2/arch_rt_sigframe.c: Likewise.
   11138 	* linux/or1k/arch_rt_sigframe.c: Likewise.
   11139 	* linux/powerpc/arch_rt_sigframe.c: Likewise.
   11140 	* linux/powerpc64/arch_rt_sigframe.c: Likewise.
   11141 	* linux/riscv/arch_rt_sigframe.c: Likewise.
   11142 	* linux/s390/arch_rt_sigframe.c: Likewise.
   11143 	* linux/s390x/arch_rt_sigframe.c: Likewise.
   11144 	* linux/sh/arch_rt_sigframe.c: Likewise.
   11145 	* linux/sh64/arch_rt_sigframe.c: Likewise.
   11146 	* linux/sparc/arch_rt_sigframe.c: Likewise.
   11147 	* linux/sparc64/arch_rt_sigframe.c: Likewise.
   11148 	* linux/tile/arch_rt_sigframe.c: Likewise.
   11149 	* linux/x32/arch_rt_sigframe.c: Likewise.
   11150 	* linux/x86_64/arch_rt_sigframe.c: Likewise.
   11151 	* linux/xtensa/arch_rt_sigframe.c: Likewise.
   11152 	* Makefile.am (EXTRA_DIST): Add them.
   11153 
   11154 2017-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11155 
   11156 	Introduce struct_rt_sigframe type.
   11157 	Add rt_sigframe.h files with definitions of struct_rt_sigframe type
   11158 	for all supported architectures.
   11159 	These definitions are going to be used in a parser of rt_sigreturn
   11160 	syscall.
   11161 
   11162 	* linux/rt_sigframe.h: New file.
   11163 	* linux/bfin/rt_sigframe.h: Likewise.
   11164 	* linux/crisv10/rt_sigframe.h: Likewise.
   11165 	* linux/crisv32/rt_sigframe.h: Likewise.
   11166 	* linux/hppa/rt_sigframe.h: Likewise.
   11167 	* linux/i386/rt_sigframe.h: Likewise.
   11168 	* linux/ia64/rt_sigframe.h: Likewise.
   11169 	* linux/m68k/rt_sigframe.h: Likewise.
   11170 	* linux/mips/rt_sigframe.h: Likewise.
   11171 	* linux/powerpc64/rt_sigframe.h: Likewise.
   11172 	* linux/s390/rt_sigframe.h: Likewise.
   11173 	* linux/s390x/rt_sigframe.h: Likewise.
   11174 	* linux/sh64/rt_sigframe.h: Likewise.
   11175 	* linux/sparc/rt_sigframe.h: Likewise.
   11176 	* linux/sparc64/rt_sigframe.h: Likewise.
   11177 	* linux/tile/rt_sigframe.h: Likewise.
   11178 	* linux/x32/rt_sigframe.h: Likewise.
   11179 	* linux/x86_64/rt_sigframe.h: Likewise.
   11180 	* Makefile.am (EXTRA_DIST): Add them.
   11181 
   11182 2017-03-13  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   11183 
   11184 	unwind.c: fix a possible buffer overflow.
   11185 	Linux does not prevent a user from creating a lot of nested directories
   11186 	with length of the absolute path of the deepest one exceeding PATH_MAX,
   11187 	then chdir'ing into it, creating a file there and mmap'ing it. Since the
   11188 	length of the prefix preceding the pathname in /proc/[pid]/maps is not
   11189 	necessary 80 (it's 73 on my machine), an overflow is possible.
   11190 
   11191 	* unwind.c (build_mmap_cache): Fix a possible buffer overflow.
   11192 
   11193 2017-03-13  Victor Krapivensky  <krapivenskiy.va (a] phystech.edu>
   11194 
   11195 	util.c: remove a wrong comment.
   11196 	4924dbd6d750665cf383b20ab4fd67e48219ab91 modified the return type, but
   11197 	not the comment.
   11198 
   11199 2017-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11200 
   11201 	riscv: export riscv_sp_ptr.
   11202 	Export SP register for later use by get_rt_sigframe_addr.
   11203 
   11204 	* linux/riscv/arch_regs.h: New file.
   11205 	* Makefile.am (EXTRA_DIST): Add it.
   11206 	* linux/riscv/arch_regs.c (riscv_sp_ptr): New variable.
   11207 
   11208 2017-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11209 
   11210 	or1k: export or1k_sp_ptr.
   11211 	Export SP register for later use by get_rt_sigframe_addr.
   11212 
   11213 	* linux/or1k/arch_regs.h: New file.
   11214 	* Makefile.am (EXTRA_DIST): Add it.
   11215 	* linux/or1k/arch_regs.c (or1k_sp_ptr): New variable.
   11216 
   11217 2017-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11218 
   11219 	nios2: export nios2_sp_ptr.
   11220 	Export SP register for later use by get_rt_sigframe_addr.
   11221 
   11222 	* linux/nios2/arch_regs.h: New file.
   11223 	* Makefile.am (EXTRA_DIST): Add it.
   11224 	* linux/nios2/arch_regs.c (nios2_sp_ptr): New variable.
   11225 
   11226 2017-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11227 
   11228 	metag: export metag_sp_ptr.
   11229 	Export SP register for later use by get_rt_sigframe_addr.
   11230 
   11231 	* linux/metag/arch_regs.h: New file.
   11232 	* Makefile.am (EXTRA_DIST): Add it.
   11233 	* linux/metag/arch_regs.c (metag_sp_ptr): New variable.
   11234 
   11235 2017-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11236 
   11237 	avr32: export avr32_sp_ptr.
   11238 	Export SP register for later use by get_rt_sigframe_addr.
   11239 
   11240 	* linux/avr32/arch_regs.h: New file.
   11241 	* Makefile.am (EXTRA_DIST): Add it.
   11242 	* linux/avr32/arch_regs.c (avr32_sp_ptr): New variable.
   11243 
   11244 2017-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11245 
   11246 	arc: export arc_sp_ptr.
   11247 	Export SP register for later use by get_rt_sigframe_addr.
   11248 
   11249 	* linux/arc/arch_regs.h: New file.
   11250 	* Makefile.am (EXTRA_DIST): Add it.
   11251 	* linux/arc/arch_regs.c (arc_sp_ptr): New variable.
   11252 
   11253 2017-03-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   11254 
   11255 	Introduce print_sigset_addr function.
   11256 	As the definition of NSIG_BYTES is based on NSIG defined in <signal.h>,
   11257 	NSIG_BYTES cannot be used in files that use kernel sigset_t.
   11258 
   11259 	Add another wrapper around print_sigset_addr_len_limit function that
   11260 	takes one argument less than print_sigset_addr_len wrapper.  This new
   11261 	wrapper is going to be used in cases when the length argument is equal
   11262 	to NSIG_BYTES.
   11263 
   11264 	* defs.h (print_sigset_addr): New function prototype.
   11265 	* signal.c (print_sigset_addr): New function.
   11266 	* linux/alpha/arch_sigreturn.c (arch_sigreturn): Replace
   11267 	print_sigset_addr_len with print_sigset_addr.
   11268 	* linux/arm/arch_sigreturn.c (arch_sigreturn): Likewise.
   11269 	* linux/crisv10/arch_sigreturn.c (arch_sigreturn): Likewise.
   11270 	* linux/ia64/arch_sigreturn.c (arch_sigreturn): Likewise.
   11271 	* linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise.
   11272 	* linux/mips/arch_sigreturn.c (arch_sigreturn): Likewise.
   11273 	* linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise.
   11274 	* linux/x86_64/arch_sigreturn.c (arch_sigreturn): Likewise.
   11275 
   11276 2017-03-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11277 
   11278 	README.md: rework guidelines about sending bug reports.
   11279 
   11280 2017-03-08  Abhishek Tiwari  <erabhishektiwarics (a] gmail.com>
   11281 
   11282 	Update information on how to build strace from git repository.
   11283 	* INSTALL-git.md: Describe how to build strace from git repository.
   11284 	* README.md: Add reference to INSTALL-git.md.
   11285 	* README-hacking: Likewise.
   11286 
   11287 2017-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   11288 
   11289 	README.md: fix references to in-tree files.
   11290 	* README.md: Change references to COPYING and NEWS files from absolute
   11291 	to relative.
   11292 
   11293 2017-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   11294 
   11295 	INSTALL: regenerate from install.texi.
   11296 	Regenerate INSTALL from install.texi using the following command:
   11297 	makeinfo --plaintext install.texi > INSTALL
   11298 
   11299 	* INSTALL: Regenerate from install.texi.
   11300 
   11301 2017-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   11302 
   11303 	install.texi: remove irrelevant sections.
   11304 	Remove "Multiple Architectures" and "Particular Systems" sections using
   11305 	the following filter script:
   11306 
   11307 	awk '/^@node (Multiple Architectures|Particular Systems)/{skip=1;next}
   11308 	/^@node/{skip=0} {if(!skip)print}'
   11309 
   11310 	* install.texi (Multiple Architectures, Particular Systems): Remove.
   11311 
   11312 2017-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   11313 
   11314 	install.texi: import from GNU Autoconf.
   11315 	install.texi from GNU Autoconf is the ultimate source of INSTALL file.
   11316 	This edition of install.texi has been downloaded from
   11317 	https://git.savannah.gnu.org/cgit/autoconf.git/plain/doc/install.texi?id=63f3c78cdb0ccc85751543e387ef2a7252d5f0a2
   11318 
   11319 	* install.texi: Import from GNU Autoconf.
   11320 
   11321 2017-03-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   11322 	    Md Haris Iqbal  <haris.phnx (a] gmail.com>
   11323 
   11324 	Implement -e trace=%sched option for tracing sched_* syscalls.
   11325 	Based on the patch by Md Haris Iqbal
   11326 	(https://sourceforge.net/p/strace/mailman/message/35111320/)
   11327 
   11328 	linux/*/syscallent.h part is modified automatically by:
   11329 
   11330 	    git grep -Fl 'SEN(sched_' linux/ | xargs sed -i \
   11331 	        's/0\(,[[:space:]]*SEN(sched_\)/TSC\1/'
   11332 
   11333 	* sysent.h (TRACE_SCHED): New definition.
   11334 	* syscall.c: Alias TSC to TRACE_SCHED around syscallent.h inclusion.
   11335 	* linux/32/syscallent.h: Add TSC flag for sched_* sycalls.
   11336 	* linux/64/syscallent.h: Likewise.
   11337 	* linux/alpha/syscallent.h: Likewise.
   11338 	* linux/arm/syscallent.h: Likewise.
   11339 	* linux/avr32/syscallent.h: Likewise.
   11340 	* linux/bfin/syscallent.h: Likewise.
   11341 	* linux/crisv10/syscallent.h: Likewise.
   11342 	* linux/hppa/syscallent.h: Likewise.
   11343 	* linux/i386/syscallent.h: Likewise.
   11344 	* linux/ia64/syscallent.h: Likewise.
   11345 	* linux/m68k/syscallent.h: Likewise.
   11346 	* linux/microblaze/syscallent.h: Likewise.
   11347 	* linux/mips/syscallent-n32.h: Likewise.
   11348 	* linux/mips/syscallent-n64.h: Likewise.
   11349 	* linux/mips/syscallent-o32.h: Likewise.
   11350 	* linux/powerpc/syscallent.h: Likewise.
   11351 	* linux/powerpc64/syscallent.h: Likewise.
   11352 	* linux/s390/syscallent.h: Likewise.
   11353 	* linux/s390x/syscallent.h: Likewise.
   11354 	* linux/sh/syscallent.h: Likewise.
   11355 	* linux/sh64/syscallent.h: Likewise.
   11356 	* linux/sparc/syscallent.h: Likewise.
   11357 	* linux/sparc64/syscallent.h: Likewise.
   11358 	* linux/x32/syscallent.h: Likewise.
   11359 	* linux/x86_64/syscallent.h: Likewise.
   11360 	* linux/xtensa/syscallent.h: Likewise.
   11361 	* qualify.c (lookup_class): Add TRACE_SCHED for "%sched".
   11362 	* tests/ksysent.c: Define TSC to 0.
   11363 	* tests/nsyscalls.c: Likewise.
   11364 	* tests/sched.test: New test.
   11365 	* tests/Makefile.am (DECODER_TESTS): Add sched.test.
   11366 	* strace.1 (.SS Filtering): Add information about %sched syscall class.
   11367 	* NEWS: Mention this change.
   11368 
   11369 2017-03-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   11370 
   11371 	Add "%" prefix for syscall classes in qualify.
   11372 	(as suggested in
   11373 	https://www.mail-archive.com/strace-devel@lists.sourceforge.net/msg05147.html )
   11374 
   11375 	In order to move them to a different namespace than syscall names. This is
   11376 	already a problem in case of ipc class which shadows ipc syscall.
   11377 
   11378 	Old behaviour is retained in order to preserve backwards compatibility.
   11379 
   11380 	* qualify.c (lookup_class) <syscall_class>: Add %-prefixed class definitions.
   11381 	* strace.1 (.SS Filtering): Add information regarding %-prefixed class
   11382 	syntax, declare legacy class syntax deprecated.
   11383 	* tests/net.test: Update to use %-prefixed syscall class name.
   11384 	* tests/netlink_protocol.test: Likewise.
   11385 	* tests/qual_fault-exit_group.test: Likewise.
   11386 	* tests/qual_syscall.test: Likewise.
   11387 	* tests/scm_rights-fd.test: Likewise.
   11388 	* tests/sigreturn.test: Likewise.
   11389 	* tests/uio.test: Likewise.
   11390 	* NEWS: Mention this change.
   11391 
   11392 2017-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   11393 
   11394 	tests: simplify print_time_t.
   11395 	* tests/print_time.c (print_time_t): Treat localtime errors as fatal.
   11396 
   11397 2017-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   11398 
   11399 	Update homepage URL.
   11400 	* README: Change homepage URL to https://strace.io
   11401 	* debian/control: Likewise.
   11402 	* strace.spec.in: Likewise.
   11403 
   11404 2017-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   11405 
   11406 	tests: transform print_time_t into print_time_t_nsec.
   11407 	* tests/print_time.c (print_time_t): Rename to print_time_t_nsec,
   11408 	take second argument and print it.
   11409 	* tests/tests.h (print_time_t): Rename to print_time_t_nsec,
   11410 	add second argument.
   11411 	* tests/utime.c (main): Use print_time_t_nsec instead of print_time_t.
   11412 	* tests/xstatx.c (print_stat): Likewise.  Pass nanoseconds
   11413 	to print_time_t_nsec instead of printing them.
   11414 
   11415 	tests: use print_time_t in utime.test.
   11416 	* tests/utime.c (print_tm): Remove.
   11417 	(main): Use print_time_t instead of print_tm.
   11418 
   11419 2017-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   11420 
   11421 	tests: move print_time function to libtests.
   11422 	Rename print_time function to print_time_t and move it to libtests.
   11423 
   11424 	* tests/print_time.c: New file.
   11425 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   11426 	* tests/tests.h (print_time_t): New prototype.
   11427 	* tests/print_time.c (print_time): Remove.
   11428 	(print_stat): Replace print_time with print_time_t.
   11429 
   11430 2017-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   11431 
   11432 	tests: macroize printing of atime, mtime, and ctime fields in xstatx.c.
   11433 	Introduce a macro for printing similar time related fields.
   11434 
   11435 	* print_struct_stat.c (PRINT_ST_TIME): New macro.
   11436 	(print_stat): Use it.
   11437 
   11438 2017-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   11439 
   11440 	print_struct_stat.c: macroize printing of atime, mtime, and ctime fields
   11441 	Introduce a macro for printing similar time related fields.
   11442 
   11443 	* print_struct_stat.c (PRINT_ST_TIME): New macro.
   11444 	(print_struct_stat): Use it.
   11445 
   11446 2017-02-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   11447 
   11448 	x32: fix decoding of flags argument of preadv2 and pwritev2 syscalls.
   11449 	x32 is the only linux architecture where preadv2 and pwritev2 syscalls
   11450 	take 5 arguments instead of 6.
   11451 
   11452 	* io.c (PREADV2_PWRITEV2_FLAGS_ARG_NO): New macro.
   11453 	(SYS_FUNC(preadv2), SYS_FUNC(pwritev2)): Use it.
   11454 	* linux/x32/syscallent.h (preadv2, pwritev2): Change nargs to 5.
   11455 	* NEWS: Mention this fix.
   11456 	* tests/preadv2-pwritev2.c (main): Fix invocation of preadv2
   11457 	and pwritev2 syscalls on x32.
   11458 
   11459 2017-02-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   11460 
   11461 	tests: rewrite ppoll syscall decoding check from match_grep to match_diff
   11462 	Unlike the former test that was based on match_grep,
   11463 	the new one uses match_diff and does more rigorous testing.
   11464 
   11465 	* tests/ppoll-v.c: New file.
   11466 	* tests/ppoll-v.test: New test.
   11467 	* tests/ppoll.c: Rewrite.
   11468 	* tests/ppoll.test: Likewise.
   11469 	* tests/ppoll.expected: Remove.
   11470 	* tests/ppoll-v.expected: Remove.
   11471 	* tests/.gitignore: Add ppoll-v.
   11472 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   11473 	(DECODER_TESTS): Add ppoll-v.test.
   11474 	(EXTRA_DIST): Remove ppoll.expected and ppoll-v.expected.
   11475 
   11476 2017-02-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   11477 
   11478 	tests: move get_sigset_size function to libtests.
   11479 	* tests/get_sigset_size.c: New file.
   11480 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   11481 	* tests/tests.h (get_sigset_size): New prototype.
   11482 	* tests/ptrace.c: Do not check for __NR_rt_sigprocmask.
   11483 	(main): Use get_sigset_size.
   11484 	* tests/signalfd4.c: Do not check for __NR_rt_sigprocmask.
   11485 	(get_sigset_size): Remove.
   11486 
   11487 2017-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   11488 
   11489 	sched: enhance decoding of sched_setattr syscall.
   11490 	Implement read/write semantics of struct sched_attr.size argument
   11491 	of sched_setattr syscall.  Do not print members of struct sched_attr
   11492 	besides sched_attr.size when the specified structure size is less than
   11493 	the minimal size allowed by the kernel.
   11494 
   11495 	* sched.c (print_sched_attr): Fetch struct sched_attr.size and use it
   11496 	as the structure size.  Print struct sched_attr.size only when the
   11497 	structure size is less than SCHED_ATTR_MIN_SIZE.
   11498 	(SYS_FUNC(sched_setattr)): Call print_sched_attr with zero size
   11499 	argument.  Print struct sched_attr.size returned by the kernel
   11500 	on exiting syscall in case of E2BIG. Print the last syscall argument
   11501 	on exiting syscall.
   11502 	(SYS_FUNC(sched_getattr)): Do not call print_sched_attr with zero size
   11503 	argument.
   11504 	* NEWS: Mention it.
   11505 	* tests/sched_xetattr.c (main): Check it.
   11506 
   11507 2017-02-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   11508 
   11509 	tests: check decoding of sched_[gs]etattr corner cases.
   11510 	* tests/sched_xetattr.c (main): Check that integer arguments
   11511 	of sched_getattr and sched_setattr syscalls are decoded properly
   11512 	by adding a few cases with filled higher 32 bits.
   11513 	Check that pointer argument is decoded properly
   11514 	on F8ILL_KULONG_SUPPORTED architectures.
   11515 
   11516 2017-02-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   11517 
   11518 	Move definition of struct sched_attr to a separate header file.
   11519 	Avoid multiple defintions of struct sched_attr by creating a separate
   11520 	header file with its definition and using it in other places.
   11521 
   11522 	* sched_attr.h: New file.
   11523 	* Makefile.am (strace_SOURCES): Add it.
   11524 	* sched.c: Include it.
   11525 	(print_sched_attr): Use it.
   11526 	* tests/sched_xetattr.c: Include it.
   11527 	(main): Use it.
   11528 
   11529 2017-02-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   11530 
   11531 	tests: rewrite sched_xetattr.test from match_grep to match_diff.
   11532 	Unlike the previous edition of the test that was based on match_grep,
   11533 	the new one is match_diff based and does more rigorous testing.
   11534 
   11535 	* tests/adjtimex.c: Include "xlat.h" and "xlat/schedulers.h",
   11536 	(sys_sched_getattr, sys_sched_setattr): New functions.
   11537 	(main): Use them.  Update expected output.
   11538 	* tests/adjtimex.test: Use run_strace_match_diff.
   11539 
   11540 2017-02-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   11541 
   11542 	Use tprints instead of tprintf in a few more places.
   11543 	* bpf.c (bpf_obj_manage, bpf_prog_attach_detach): Replace tprintf
   11544 	with tprints for printing strings without format specifiers.
   11545 	* dm.c (dm_decode_dm_target_spec): Likewise.
   11546 	* mq.c (SYS_FUNC(mq_timedreceive)): Likewise.
   11547 	* perf.c (print_perf_event_attr): Likewise.
   11548 	* syscall.c (trace_syscall_exiting): Likewise.
   11549 
   11550 2017-02-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   11551 
   11552 	bpf: update BPF_PROG_ATTACH decoding.
   11553 	Implement decoding of BPF_F_ALLOW_OVERRIDE flag of BPF_PROG_ATTACH
   11554 	command introduced by linux kernel commit v4.10-rc7-174-g7f67763.
   11555 
   11556 	* configure.ac: Check for union bpf_attr.attach_flags
   11557 	instead of union bpf_attr.attach_type.
   11558 	* xlat/bpf_attach_flags.in: New file.
   11559 	* bpf.c: Include "xlat/bpf_attach_flags.h".
   11560 	(bpf_prog_attach_detach): Rename print_attach_bpf_fd argument
   11561 	to print_attach.  Add attach_flags field to the structure,
   11562 	print it in case of BPF_PROG_ATTACH.
   11563 	* tests/bpf.c: Check for HAVE_UNION_BPF_ATTR_ATTACH_FLAGS
   11564 	instead of HAVE_UNION_BPF_ATTR_ATTACH_TYPE.
   11565 	(prog_cgroup): Initialize attach_flags field.
   11566 	(main): Update expected output.
   11567 
   11568 2017-02-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   11569 
   11570 	tests: rewrite adjtimex.test from match_grep to match_diff.
   11571 	Unlike the previous edition of the test that was based on match_grep,
   11572 	the new one is match_diff based and does more rigorous testing.
   11573 
   11574 	* tests/adjtimex.c: Include "xlat.h", "xlat/adjtimex_state.h",
   11575 	and "xlat/adjtimex_status.h".
   11576 	(main): Update expected output.
   11577 	* tests/adjtimex.test: Use run_strace_match_diff.
   11578 
   11579 2017-02-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   11580 
   11581 	tests: replace casts of 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
   11582 	* tests/init_delete_module.h (bogus_zero): Remove.
   11583 	* tests/delete_module.c (main): Replace bogus_zero and
   11584 	(kernel_ulong_t) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
   11585 	* tests/finit_module.c (main): Replace bogus_zero
   11586 	with F8ILL_KULONG_MASK.
   11587 	* tests/init_module.c (main): Likewise.
   11588 	* tests/pipe2.c (main): Likewise.
   11589 	* tests/epoll_ctl.c (invoke_syscall): Replace
   11590 	(unsigned long) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
   11591 	* tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo): Likewise.
   11592 	* tests/fanotify_init.c (main): Likewise.
   11593 	* tests/xetpgid.c (main): Likewise.
   11594 	* tests/xetpriority.c (main): Likewise.
   11595 	(kernel_ulong_t) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
   11596 	* tests/fanotify_mark.c (main): Likewise.
   11597 	* tests/file_handle.c (main): Likewise.
   11598 	* tests/kexec_load.c (main): Likewise.
   11599 	* tests/setfsugid.c (main): Likewise.
   11600 	* tests/getgroups.c (main): Replace (long) 0xffffffff00000000ULL
   11601 	with F8ILL_KULONG_MASK.
   11602 	* tests/setgroups.c (main): Replace (long) 0xffffffff00000000ULL
   11603 	and (unsigned long) 0xffffffff00000000ULL with F8ILL_KULONG_MASK.
   11604 
   11605 2017-02-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   11606 
   11607 	tests: fill higher bits of integer arguments of fcntl* syscalls.
   11608 	Check that integer arguments of fcntl and fcntl64 syscalls are decoded
   11609 	properly by casting them to kernel_ulong_t and filling higher bits.
   11610 
   11611 	* tests/struct_flock.c (invoke_test_syscall): Cast "fd" and "cmd"
   11612 	syscall arguments to kernel_ulong_t, fill their higher 32 bits.
   11613 
   11614 2017-02-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   11615 
   11616 	tests: use sprintrc in tests of fcntl and fcntl64 syscalls.
   11617 	* tests/struct_flock.c (EINVAL_STR): Remove.
   11618 	(test_flock_einval, test_flock): Use sprintrc instead of EINVAL_STR.
   11619 	* tests/fcntl.c (test_flock64_einval): Likewise.
   11620 	* tests/fcntl64.c (test_flock64_einval, test_flock64): Likewise.
   11621 
   11622 2017-02-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   11623 
   11624 	Post-release administrivia.
   11625 	* NEWS: Add a header line for the next release.
   11626 	* debian/changelog.in: Add a changelog entry for 4.16-1.
   11627 	* strace.spec.in: Likewise.
   11628 
   11629 2017-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   11630 
   11631 	Prepare for 4.16 release.
   11632 	* NEWS: Update for 4.16 release.
   11633 
   11634 2017-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   11635 
   11636 	.mailmap: add addresses of JingPiao Chen.
   11637 	* .mailmap: Add both addresses of JingPiao Chen here to avoid
   11638 	duplications in CREDITS file.
   11639 
   11640 	tests: skip scno tampering tests on compat mips abi.
   11641 	* tests/scno_tampering.sh: In case of mips abi, skip the test
   11642 	unless it is the native abi.
   11643 
   11644 2017-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   11645 
   11646 	Fix -Werror=duplicate-decl-specifier compilation issues.
   11647 	capability.c:82:28: error: duplicate "const" declaration specifier
   11648 	capability.c:110:33: error: duplicate "const" declaration specifier
   11649 	rt_tgsigqueueinfo.c:42:61: error: duplicate "const" declaration specifier
   11650 	utime.c:66:23: error: duplicate "const" declaration specifier
   11651 	waitid.c:147:20: error: duplicate "const" declaration specifier
   11652 
   11653 	* capability.c (cap_user_header_t, cap_user_data_t): Remove.
   11654 	(get_cap_header): Change return type
   11655 	to "const struct user_cap_header_struct *".
   11656 	(print_cap_header, print_cap_data): Change the type of last argument
   11657 	to "const struct user_cap_header_struct * const".
   11658 	(SYS_FUNC(capget)): Change type of "h" variable
   11659 	to "const struct user_cap_header_struct *".
   11660 	(SYS_FUNC(capset)): Change type of "h" variable
   11661 	to "const struct user_cap_header_struct * const".
   11662 	* tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo): Change the type of last
   11663 	argument to "const void *const".
   11664 	* tests/utime.c (main): Change the type of "tail_u" variable
   11665 	to "const struct utimbuf *const".
   11666 	* tests/waitid.c (do_waitid): Change the type of 3rd argument
   11667 	to "const siginfo_t *const".
   11668 
   11669 2017-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   11670 
   11671 	tests: rewrite pipe syscall decoding check from match_grep to match_diff
   11672 	* configure.ac (AC_CHECK_FUNCS): Remove pipe2.
   11673 	* tests/pipe.c: Include <asm/unistd.h>, skip the test if [!__NR_pipe]
   11674 	instead of [!HAVE_PIPE2].
   11675 	(main): Do not call pipe2.
   11676 	* tests/pipe.test: Skip the test if libc pipe wrapper does not use
   11677 	pipe syscall, rewrite from match_grep to match_diff.
   11678 	* tests/pipe.expected: Update expected output.
   11679 
   11680 2017-02-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   11681 
   11682 	tests: rewrite pipe2 syscall decoding check from match_grep to match_diff
   11683 	Unlike pipe.test that is based on match_grep, the new test
   11684 	is based on match_diff and does more rigorous testing.
   11685 
   11686 	* tests/pipe2.c: New file.
   11687 	* tests/pipe2.test: New test.
   11688 	* tests/.gitignore: Add pipe2.
   11689 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   11690 	(DECODER_TESTS): Add pipe2.test.
   11691 
   11692 2017-02-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   11693 
   11694 	tests: rewrite mq.test from match_grep to match_diff.
   11695 	Unlike the previous edition of the test that was based on match_grep,
   11696 	the new one is match_diff based and does more rigorous testing.
   11697 
   11698 	* tests/mq.c: Include <stdio.h>.
   11699 	(NAME): New macro.
   11700 	(main): Use it.  Print expected output.
   11701 	* tests/mq.expected: Remove.
   11702 	* tests/Makefile.am (EXTRA_DIST): Remove mq.expected.
   11703 	* tests/mq.test: Use run_strace_match_diff.
   11704 
   11705 2017-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   11706 
   11707 	Simplify struct inject_opts.rval semantics.
   11708 	Drop use of INJECT_OPTS_RVAL_DISABLE special inject_opts.rval value,
   11709 	INJECT_OPTS_RVAL_DEFAULT is enough.
   11710 
   11711 	* defs.h (INJECT_OPTS_RVAL_DISABLE): Remove.
   11712 	* qualify.c (qualify_inject_common): Do not replace
   11713 	INJECT_OPTS_RVAL_DEFAULT with INJECT_OPTS_RVAL_DISABLE
   11714 	in inject_opts.rval.
   11715 	* syscall.c (tamper_with_syscall_entering): Check
   11716 	for INJECT_OPTS_RVAL_DEFAULT instead of INJECT_OPTS_RVAL_DISABLE.
   11717 
   11718 2017-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   11719 
   11720 	tests: check signal injection along with fault injection.
   11721 	* tests/qual_inject-error-signal.c: New file.
   11722 	* tests/qual_inject-error-signal.expected: Likewise.
   11723 	* tests/qual_inject-error-signal.test: New test.
   11724 	* tests/.gitignore: Add qual_inject-error-signal.
   11725 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   11726 	(MISC_TESTS): Add qual_inject-error-signal.test.
   11727 	(EXTRA_DIST): Add qual_inject-error-signal.expected.
   11728 
   11729 	tests: simplify qual_inject-signal.test.
   11730 	* tests/qual_inject-signal.test: Use $NAME instead of qual_inject-signal.
   11731 
   11732 2017-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   11733 
   11734 	Make symbolic errno values match case-insensitive.
   11735 	Follow the example of case-insensitive symbolic signal values in signal
   11736 	and inject expressions and make symbolic errno values in inject
   11737 	expressions case-insensitive.
   11738 
   11739 	* qualify.c (find_errno_by_name): Use strcasecmp instead of strcmp
   11740 	to match symbolic errno values.
   11741 	* tests/qual_fault.c (main): Likewise.
   11742 	* tests/qual_fault.test: Test case-insensitive symbolic errno match.
   11743 
   11744 2017-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   11745 
   11746 	tests: check case-insensitive symbolic signal match.
   11747 	* tests/qual_signal.test: Test case-insensitive symbolic signal match.
   11748 
   11749 2017-02-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   11750 
   11751 	Update NEWS.
   11752 
   11753 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11754 
   11755 	Update NEWS.
   11756 
   11757 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11758 
   11759 	strace.spec.in: fix dist version checks.
   11760 	* strace.spec.in: Fix libunwind availability check.
   11761 
   11762 	Reported-by: Eugene Syromyatnikov <evgsyr (a] gmail.com>
   11763 
   11764 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11765 
   11766 	tests: update ipc_sem.test for new glibc.
   11767 	Starting with commit glibc-2.24-553-g40c0a78, glibc may pass NULL
   11768 	address to semctl like other libcs.
   11769 
   11770 	* tests/ipc_sem.c (main) [__GLIBC__]: Remove.
   11771 
   11772 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11773 
   11774 	tests: fix typo in bpf.test.
   11775 	* tests/bpf.c (main): Add missing semicolon.
   11776 
   11777 	Fixes: ad427721 ("tests: rewrite bpf.test from match_grep to match_diff")
   11778 
   11779 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11780 
   11781 	tests: check signal injection.
   11782 	* tests/qual_inject-signal.c: New file.
   11783 	* tests/qual_inject-signal.expected: Likewise.
   11784 	* tests/qual_inject-signal.test: New test.
   11785 	* tests/.gitignore: Add qual_inject-signal.
   11786 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   11787 	(MISC_TESTS): Add qual_inject-signal.test.
   11788 	(EXTRA_DIST): Add qual_inject-signal.expected.
   11789 
   11790 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11791 
   11792 	Implement -e inject= option.
   11793 	Introduce -e inject= as a general injection option,
   11794 	limit -e fault= option to syscall fault injection.
   11795 
   11796 	Change default return code of syscall fault injection to ENOSYS.
   11797 
   11798 	* qualify.c (parse_inject_token): Add fault_tokens_only argument,
   11799 	do not accept retval= and signal= tokens when fault_tokens_only
   11800 	is set to true.
   11801 	(parse_inject_expression): Add fault_tokens_only argument,
   11802 	forward it to parse_inject_token.
   11803 	(qualify_inject_common): New function.
   11804 	(qualify_fault): Use it.
   11805 	(qualify_inject): New function.
   11806 	(qual_options): New entry.
   11807 	* strace.1: Describe -e inject= option.
   11808 	* NEWS: Mention -e inject= option.
   11809 	* tests/qual_fault-syntax.test: Test that -e fault= option does not
   11810 	support retval=, signal=, and multiple error= tokens.
   11811 	* tests/qual_fault.c (DEFAULT_ERRNO): Set to ENOSYS unconditionally.
   11812 	* tests/qual_inject-retval.test: Replace -e fault= option
   11813 	with -e inject= option.
   11814 	* tests/qual_inject-syntax.test: New test.
   11815 	* tests/Makefile.am (MISC_TESTS): Add it.
   11816 
   11817 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11818 
   11819 	tests: prepare for introduction of -e inject= option.
   11820 	Rename files related to fault injection to avoid further confusion.
   11821 
   11822 	* tests/fault_injection-exit_group.expected: Rename
   11823 	to tests/qual_fault-exit_group.expected.
   11824 	* tests/fault_injection-exit_group.test: Rename
   11825 	to tests/qual_fault-exit_group.test.
   11826 	* tests/fault_syntax.test: Rename to tests/qual_fault-syntax.test.
   11827 	* tests/fault_injection.c: Rename to tests/qual_fault.c.
   11828 	* tests/fault_injection.test: Rename to tests/qual_fault.test.
   11829 	* tests/fault_injection-retval.c: Rename to tests/qual_inject-retval.c.
   11830 	* tests/fault_injection-retval.test: Rename
   11831 	to tests/qual_inject-retval.test.
   11832 	* tests/fault_injection.sh: Rename to tests/scno_tampering.sh.
   11833 	* tests/.gitignore: Update.
   11834 	* tests/Makefile.am (check_PROGRAMS, DECODER_TESTS, MISC_TESTS,
   11835 	EXTRA_DIST): Update.
   11836 
   11837 2017-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   11838 
   11839 	Prepare for introduction of -e inject= option.
   11840 	As -e fault= injection syntax has been extended to configure various
   11841 	kinds of injections besides fault injection, the original option name
   11842 	bacame too narrow.
   11843 
   11844 	This change renames internal constants, types, and functions from
   11845 	"fault" to more generic inject/tamper ones.
   11846 
   11847 	* defs.h (fault_opts): Rename to inject_opts.
   11848 	(FAULT_OPTS_RVAL_DEFAULT): Rename to INJECT_OPTS_RVAL_DEFAULT.
   11849 	(FAULT_OPTS_RVAL_DISABLE): Rename to INJECT_OPTS_RVAL_DISABLE.
   11850 	(struct tcb): Rename fault_vec field to inject_vec.
   11851 	(TCB_FAULT_INJ): Rename to TCB_TAMPERED.
   11852 	(QUAL_FAULT): Rename to QUAL_INJECT.
   11853 	(fault_vec): Rename to inject_vec.
   11854 	All users changed.
   11855 	* qualify.c (fault_set): Rename to inject_set.
   11856 	(parse_fault_token): Rename to parse_inject_token.
   11857 	(parse_fault_expression): Rename to parse_inject_expression.
   11858 	All callers changed.
   11859 	* syscall.c (fault_vec): Rename to inject_vec.
   11860 	(tcb_fault_opts): Rename to tcb_inject_opts.
   11861 	(inject_syscall_fault_entering): Rename to tamper_with_syscall_entering.
   11862 	(update_syscall_fault_exiting): Rename to tamper_with_syscall_exiting.
   11863 	(syscall_fault_injected): Rename to syscall_tampered.
   11864 	All callers changed.
   11865 
   11866 2017-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   11867 
   11868 	tests: make Makefile.am lists sorted in C locale.
   11869 	* tests/Makefile.am (check_PROGRAMS, DECODER_TESTS, MISC_TESTS,
   11870 	EXTRA_DIST): Make sorted in C locale.
   11871 
   11872 2017-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   11873 
   11874 	tests: use ARG_STR in msg_control.test.
   11875 	Drop local VAL_STR macro in favour of ARG_STR macro from tests/tests.h.
   11876 
   11877 	* tests/msg_control.c (VAL_STR): Remove.
   11878 	(test_sol_socket, test_sol_ip): Replace VAL_STR with ARG_STR.
   11879 
   11880 2017-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   11881 
   11882 	powerpc, powerpc64: wire up new syscalls.
   11883 	* linux/powerpc/syscallent.h [382]: Add kexec_file_load entry.
   11884 	* linux/powerpc64/syscallent.h [382]: Likewise.
   11885 
   11886 	microblaze: wire up new syscalls.
   11887 	* linux/microblaze/syscallent.h [392..397]: New entries.
   11888 
   11889 	avr32: wire up new syscalls.
   11890 	* linux/avr32/syscallent.h [328..330]: New entries.
   11891 
   11892 2017-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   11893 
   11894 	Update IPV6_* constants.
   11895 	* xlat/sockipv6options.in: Add IPV6_RECVFRAGSIZE introduced
   11896 	by linux kernel commit v4.10-rc1~202^2~340^2~1.
   11897 
   11898 	Update IP_* constants.
   11899 	* xlat/sockipoptions.in: Add IP_RECVFRAGSIZE introduced
   11900 	by linux kernel commit v4.10-rc1~202^2~340^2~2.
   11901 
   11902 2017-02-06  Jacob Goense  <dugo (a] xs4all.nl>
   11903 
   11904 	or1k: fix build.
   11905 	This fixes a typo in the arch_set_success for the or1k architecture.
   11906 
   11907 	* linux/or1k/set_error.c (arch_setsuccess): Rename to arch_set_success.
   11908 
   11909 	Fixes: 41d647c ("Implement success injection")
   11910 	Closes: https://github.com/strace/strace/pull/6
   11911 
   11912 2017-02-04  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   11913 
   11914 	Update ioctl entries from linux 4.10.
   11915 	* linux/32/ioctls_inc_align16.h: Update from linux v4.10 using ioctls_gen.sh.
   11916 	* linux/32/ioctls_inc_align32.h: Likewise.
   11917 	* linux/32/ioctls_inc_align64.h: Likewise.
   11918 	* linux/64/ioctls_inc.h: Likewise.
   11919 	* linux/x32/ioctls_inc0.h: Likewise.
   11920 	* NEWS: Mention this.
   11921 
   11922 	maint: update for linux 4.10.
   11923 	* maint/ioctls_sym.sh: Update workaround for linux/if_pppox.h file.
   11924 
   11925 	maint: add workaround for m68k.
   11926 	* maint/ioctls_sym.sh: Skip asm/amigayle.h.
   11927 
   11928 2017-01-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   11929 
   11930 	tests: check decoding of bpf corner cases.
   11931 	* tests/bpf.c (bogus_bpf): New function.
   11932 	(BOGUS_BPF): New macro.
   11933 	(main): Use them.
   11934 	* tests/bpf.test: Add -a option.
   11935 
   11936 2017-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   11937 
   11938 	tests: rewrite bpf.test from match_grep to match_diff.
   11939 	* tests/bpf.c (errstr): New variable.
   11940 	(sys_bpf): New function.
   11941 	(map_create, map_any, prog_load, obj_manage, prog_cgroup): Use it.
   11942 	(main): Update expected output.
   11943 	* tests/bpf.test: Use run_strace_match_diff.
   11944 
   11945 	bpf: move common code to a separate function.
   11946 	* bpf.c (bpf_prog_attach_detach): New function.
   11947 	(bpf_prog_attach, bpf_prog_detach): Use it.
   11948 
   11949 2017-01-29  Quentin Monnet  <quentin.monnet (a] 6wind.com>
   11950 
   11951 	Update bpf syscall decoding.
   11952 	Implement decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH,
   11953 	and BPF_PROG_DETACH commands.
   11954 
   11955 	* bpf.c: Include "xlat/bpf_attach_type.h".
   11956 	(bpf_obj_manage, bpf_prog_attach, bpf_prog_detach): New functions.
   11957 	(SYS_FUNC(bpf)): Use them.
   11958 	* configure.ac: Check for union bpf_attr.bpf_fd and union
   11959 	bpf_attr.attach_type.
   11960 	* xlat/bpf_attach_type.in: New file.
   11961 	* xlat/bpf_commands.in: Update list of BPF_* command constants.
   11962 	* xlat/bpf_map_types.in: Update list of BPF_MAP_TYPE_* constants.
   11963 	* xlat/bpf_prog_types.in: Update list of BPF_PROG_TYPE_* constants.
   11964 	* tests/bpf.c [HAVE_UNION_BPF_ATTR_BPF_FD] (obj_manage): New function.
   11965 	[HAVE_UNION_BPF_ATTR_ATTACH_TYPE] (prog_cgroup): Likewise.
   11966 	(main): Use them.
   11967 
   11968 2017-01-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   11969 
   11970 	tests: check success injection.
   11971 	* tests/fault_injection-retval.c: New file.
   11972 	* tests/fault_injection-retval.test: New test.
   11973 	* tests/.gitignore: Add fault_injection-retval.
   11974 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   11975 	(MISC_TESTS): Add fault_injection-retval.test.
   11976 
   11977 2017-01-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   11978 
   11979 	Implement success injection.
   11980 	This extends fault injection syntax with :retval= option.
   11981 	When :retval=VALUE is specified, the syscall number is replaced by -1
   11982 	and a bogus success VALUE is returned to the callee.
   11983 
   11984 	* defs.h (fault_opts): Remove err field, add rval field.
   11985 	(MAX_ERRNO_VALUE, FAULT_OPTS_RVAL_DEFAULT, FAULT_OPTS_RVAL_DISABLE):
   11986 	New macros.
   11987 	* qualify.c (parse_fault_token): Handle retval= token.
   11988 	(qualify_fault): Update fault_opts initialization after the move
   11989 	from struct fault_opts.err to struct fault_opts.rval.
   11990 	* syscall.c (arch_set_success): New prototype.
   11991 	(inject_syscall_fault_entering): Check opts->rval instead of opts->err.
   11992 	(update_syscall_fault_exiting): Implement retval injection.
   11993 	* strace.1: Update the section on fault injection.
   11994 	* NEWS: Mention retval= option.
   11995 	* linux/aarch64/set_error.c (arch_set_success): New function.
   11996 	* linux/alpha/set_error.c: Likewise.
   11997 	* linux/arc/set_error.c: Likewise.
   11998 	* linux/arm/set_error.c: Likewise.
   11999 	* linux/avr32/set_error.c: Likewise.
   12000 	* linux/bfin/set_error.c: Likewise.
   12001 	* linux/crisv10/set_error.c: Likewise.
   12002 	* linux/hppa/set_error.c: Likewise.
   12003 	* linux/i386/set_error.c: Likewise.
   12004 	* linux/ia64/set_error.c: Likewise.
   12005 	* linux/m68k/set_error.c: Likewise.
   12006 	* linux/metag/set_error.c: Likewise.
   12007 	* linux/microblaze/set_error.c: Likewise.
   12008 	* linux/mips/set_error.c: Likewise.
   12009 	* linux/nios2/set_error.c: Likewise.
   12010 	* linux/or1k/set_error.c: Likewise.
   12011 	* linux/powerpc/set_error.c: Likewise.
   12012 	* linux/riscv/set_error.c: Likewise.
   12013 	* linux/s390/set_error.c: Likewise.
   12014 	* linux/sh/set_error.c: Likewise.
   12015 	* linux/sh64/set_error.c: Likewise.
   12016 	* linux/sparc/set_error.c: Likewise.
   12017 	* linux/sparc64/set_error.c: Likewise.
   12018 	* linux/tile/set_error.c: Likewise.
   12019 	* linux/x86_64/set_error.c: Likewise.
   12020 	* linux/xtensa/set_error.c: Likewise.
   12021 
   12022 	Closes: https://github.com/strace/strace/issues/3
   12023 
   12024 2017-01-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   12025 
   12026 	mips: rewrite configure check without sgidefs.h.
   12027 	Use builtin macros provided by gcc >= 3.4 instead of sgidefs.h macros.
   12028 
   12029 	* configure.ac <mips>: Do not include <asm/sgidefs.h>, use _ABIO32
   12030 	instead of _MIPS_SIM_ABI32, _ABIN32 instead of _MIPS_SIM_NABI32,
   12031 	and _ABI64 instead of _MIPS_SIM_ABI64.
   12032 
   12033 2017-01-20  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   12034 
   12035 	.gitignore: add missing files that should be ignored.
   12036 	* .gitignore: Add /ioctl_iocdef.[ih].
   12037 
   12038 	Fixes: 5679fad ("ioctlsort: get ioctl definitions from host, not build")
   12039 
   12040 2017-01-20  Andre McCurdy  <armccurdy (a] gmail.com>
   12041 
   12042 	mips: use <asm/sgidefs.h>
   12043 	Build fix for MIPS with musl libc.
   12044 
   12045 	The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
   12046 	but not by musl. Regardless of the libc, the kernel headers provide
   12047 	<asm/sgidefs.h> which provides the same definitions, so use that
   12048 	instead.
   12049 
   12050 	* configure.ac: Replace <sgidefs.h> with <asm/sgidefs.h>.
   12051 
   12052 2017-01-20  JingPiao Chen  <chenjingpiao (a] gmail.com>
   12053 
   12054 	Implement decoding of ustat syscall.
   12055 	* configure.ac (AC_CHECK_HEADERS): Add ustat.h.
   12056 	* ustat.c: New file.
   12057 	* Makefile.am (strace_SOURCES): Add it.
   12058 	* linux/dummy.h: Remove sys_ustat.
   12059 	* tests/ustat.c: New file.
   12060 	* tests/ustat.test: New test.
   12061 	* tests/.gitignore: Add ustat.
   12062 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12063 	(DECODER_TESTS): Add ustat.test.
   12064 
   12065 	Makefile.am: allow indented DEF_MPERS_TYPE includes.
   12066 	* Makefile.am (m%_type_defs.h): Change sed regular expression to allow
   12067 	arbitrary number of whitespace characters between "#" symbol
   12068 	and "include" directive.
   12069 
   12070 	strace.1: fix formatting.
   12071 	* strace.1: Remove misplaced .TP macros.
   12072 
   12073 2017-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   12074 
   12075 	tests: drop non-USE_ASM_STAT case support.
   12076 	With the switch of fstatat family tests to USE_ASM_STAT variant,
   12077 	there are no non-USE_ASM_STAT users left.  Remove support of unused
   12078 	non-USE_ASM_STAT case.
   12079 
   12080 	* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_mtim.tv_nsec.
   12081 	* tests/fstatat.c (USE_ASM_STAT): Remove.
   12082 	* tests/fstatx.c: Likewise.
   12083 	* tests/lstatx.c: Likewise.
   12084 	* tests/xstatx.c: Assume USE_ASM_STAT.
   12085 	[!USE_ASM_STAT]: Remove.
   12086 
   12087 2017-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   12088 
   12089 	tests: call newfstatat and fstatat64 syscalls directly.
   12090 	Do not use glibc wrappers to call newfstatat and fstatat64.
   12091 	These wrappers have various problems, e.g. they segfault on sparc64
   12092 	and mips64 if BOGUS_STRUCT_STAT is not disabled, and they do wrong
   12093 	conversion of timestamps on mips64.
   12094 
   12095 	* tests/fstatat.c (TEST_SYSCALL_INVOKE): Invoke the relevant syscall
   12096 	directly.
   12097 	(USE_ASM_STAT): Define.
   12098 	* tests/fstatat64.c (TEST_BOGUS_STRUCT_STAT): Remove.
   12099 	(STRUCT_STAT, STRUCT_STAT_STR, STRUCT_STAT_IS_STAT64): Define.
   12100 
   12101 	Based on patch by James Cowgill <james410 (a] cowgill.org.uk>.
   12102 
   12103 2017-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   12104 
   12105 	tests: remove redundant SAMPLE_SIZE definitions.
   12106 	Remove all definitions of SAMPLE_SIZE that are identical to the fallback
   12107 	definition in tests/xstatx.c.
   12108 
   12109 	* tests/fstat64.c (SAMPLE_SIZE): Remove.
   12110 	* tests/lstat64.c (SAMPLE_SIZE): Remove.
   12111 	* tests/stat64.c (SAMPLE_SIZE): Remove.
   12112 
   12113 2017-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   12114 
   12115 	tests: change SAMPLE_SIZE type to libc_off_t.
   12116 	As ftruncate libc function and our create_sample function that calls
   12117 	ftruncate both take size argument of type libc_off_t, change the type
   12118 	of SAMPLE_SIZE constant to libc_off_t.
   12119 
   12120 	* tests/fstat.c (SAMPLE_SIZE): Cast to libc_off_t.
   12121 	* tests/lstat.c (SAMPLE_SIZE): Likewise.
   12122 	* tests/oldfstat.c (SAMPLE_SIZE): Likewise.
   12123 	* tests/oldlstat.c (SAMPLE_SIZE): Likewise.
   12124 	* tests/oldstat.c (SAMPLE_SIZE): Likewise.
   12125 	* tests/stat.c (SAMPLE_SIZE): Likewise.
   12126 	* tests/xstatx.c (SAMPLE_SIZE): Likewise.
   12127 
   12128 2017-01-13  Alexey Neyman  <stilor (a] att.net>
   12129 
   12130 	ioctlsort: get ioctl definitions from host, not build.
   12131 	When cross-compiling, ioctlsort must obtain _IOC_* values from the
   12132 	host, build's values may be incompatible.
   12133 
   12134 	* ioctl_iocdef.c: New file.
   12135 	* Makefile.am (EXTRA_DIST): Add it.
   12136 	(ioctl_iocdef.i, ioctl_iocdef.h): New rules.
   12137 	(ioctlsort%.o): Depend on ioctl_iocdef.h.
   12138 	(CLEANFILES): Add ioctl_iocdef.h and ioctl_iocdef.i.
   12139 	* ioctlsort.c: Include "ioctl_iocdef.h" instead of <linux/ioctl.h>.
   12140 
   12141 2017-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   12142 
   12143 	tests: treat struct stat mismatch as an error.
   12144 	If the test detects struct stat mismatch, this is likely an error
   12145 	in definitions of a stat structure that might affect strace as well.
   12146 	Fail the test instead of skipping it to attract more attention.
   12147 
   12148 	* tests/xstatx.c (main): Return 1 instead of 77
   12149 	in case of struct stat mismatch.
   12150 
   12151 2017-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   12152 
   12153 	tests: rewrite diagnostics about struct stat mismatch.
   12154 	* tests/xstatx.c (LOG_STAT_OFFSETOF_SIZEOF): New macro.
   12155 	(main): Use it to print struct stat mismatch details.
   12156 
   12157 	tests: fix typo in tests/xstatx.c.
   12158 	* tests/xstatx.c [!IS_FSTAT]: Define IS_FSTAT instead of IS_STAT.
   12159 
   12160 2017-01-12  JingPiao Chen  <chenjingpiao (a] gmail.com>
   12161 
   12162 	tests: fix typo in mlock.c.
   12163 	* tests/mlock.c [!(__NR_mlock && __NR_munlock)]: Fix spelling
   12164 	of SKIP_MAIN_UNDEFINED.
   12165 
   12166 2017-01-12  JingPiao Chen  <chenjingpiao (a] gmail.com>
   12167 
   12168 	strace: move description of -k option to the appropriate place.
   12169 	Follow the example of strace.1 and put the description of -k option
   12170 	into the  output format group.
   12171 
   12172 	* strace.c (usage): Move description of -k option to the output
   12173 	format group.
   12174 
   12175 2017-01-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   12176 
   12177 	Remove redundant commas at the end of structure initializers.
   12178 	Automatically remove redundant commas using the following
   12179 	sed expression:
   12180 
   12181 	git grep -El ',[[:space:]]+}' |xargs sed -ri 's/,([[:space:]]+\})/\1/'
   12182 
   12183 	* linux/32/syscallent.h: Remove redundant commas at the end of structure
   12184 	initializers.
   12185 	* linux/64/syscallent.h: Likewise.
   12186 	* linux/alpha/syscallent.h: Likewise.
   12187 	* linux/arm/syscallent.h: Likewise.
   12188 	* linux/avr32/syscallent.h: Likewise.
   12189 	* linux/bfin/syscallent.h: Likewise.
   12190 	* linux/crisv10/syscallent.h: Likewise.
   12191 	* linux/hppa/syscallent.h: Likewise.
   12192 	* linux/i386/syscallent.h: Likewise.
   12193 	* linux/ia64/syscallent.h: Likewise.
   12194 	* linux/m68k/syscallent.h: Likewise.
   12195 	* linux/microblaze/syscallent.h: Likewise.
   12196 	* linux/microblaze/userent.h: Likewise.
   12197 	* linux/mips/syscallent-n32.h: Likewise.
   12198 	* linux/mips/syscallent-n64.h: Likewise.
   12199 	* linux/mips/syscallent-o32.h: Likewise.
   12200 	* linux/powerpc/syscallent.h: Likewise.
   12201 	* linux/powerpc64/syscallent.h: Likewise.
   12202 	* linux/s390/syscallent.h: Likewise.
   12203 	* linux/s390x/syscallent.h: Likewise.
   12204 	* linux/sh/syscallent.h: Likewise.
   12205 	* linux/sh64/syscallent.h: Likewise.
   12206 	* linux/sparc/syscallent.h: Likewise.
   12207 	* linux/sparc64/syscallent.h: Likewise.
   12208 	* linux/x32/syscallent.h: Likewise.
   12209 	* linux/x86_64/syscallent.h: Likewise.
   12210 	* linux/xtensa/syscallent.h: Likewise.
   12211 	* tests/kexec_file_load.c: Likewise.
   12212 
   12213 	Reported-by: Eugene Syromyatnikov <evgsyr (a] gmail.com>
   12214 
   12215 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12216 
   12217 	tests: check decoding of scsi ioctl commands.
   12218 	* tests/ioctl_scsi.c: New file.
   12219 	* tests/ioctl_scsi.test: New test.
   12220 	* tests/.gitignore: Add ioctl_scsi.
   12221 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12222 	(DECODER_TESTS): Add ioctl_scsi.test.
   12223 
   12224 	scsi: implement decoding of all SG_* ioctl commands.
   12225 	* print_sg_req_info.c: New file.
   12226 	* Makefile.am (strace_SOURCES): Add it.
   12227 	* xlat/sg_scsi_reset.in: New file.
   12228 	* scsi.c: Include "xlat/sg_scsi_reset.h".
   12229 	(scsi_ioctl): Implement decoding of all SG_* ioctl commands.
   12230 
   12231 	scsi: prepare for decoding of other SG_* ioctl commands.
   12232 	* scsi.c (scsi_ioctl): Introduce a switch statement.
   12233 
   12234 	tests: check decoding of ioctl SG_IO v3 commands.
   12235 	* tests/ioctl_sg_io_v3.c: New file.
   12236 	* tests/ioctl_sg_io_v3.test: New test.
   12237 	* tests/.gitignore: Add ioctl_sg_io_v3.
   12238 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12239 	(DECODER_TESTS): Add ioctl_sg_io_v3.test.
   12240 
   12241 	tests: check decoding of ioctl SG_IO v4 commands.
   12242 	* tests/ioctl_sg_io_v4.c: New file.
   12243 	* tests/ioctl_sg_io_v4.test: New test.
   12244 	* tests/.gitignore: Add ioctl_sg_io_v4.
   12245 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12246 	(DECODER_TESTS): Add ioctl_sg_io_v4.test.
   12247 
   12248 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12249 
   12250 	scsi: add fallback definitions for SG_* ioctl command constants.
   12251 	Unfortunately, <scsi/sg.h> from libc does not provide all constants
   12252 	recognized by the kernel.
   12253 
   12254 	* xlat/scsi_sg_commands.in: New file.
   12255 	* scsi.c: Include "xlat/scsi_sg_commands.h" instead of providing
   12256 	a fallback definition of SG_IO.
   12257 
   12258 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12259 
   12260 	xlat: provide fallback definitions for BSG_FLAG_* constants.
   12261 	BSG_FLAG_* constants were introduced later than the header file where
   12262 	they are defined.
   12263 
   12264 	* xlat/bsg_flags.in: Add default values for constants.
   12265 
   12266 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12267 
   12268 	xlat: provide fallback definitions for SG_FLAG_* constants.
   12269 	Unfortunately, <scsi/sg.h> from libc does not provide all constants
   12270 	recognized by the kernel.
   12271 
   12272 	* xlat/sg_io_flags.in: Add default values for constants.
   12273 
   12274 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12275 
   12276 	sg_io_v4: print din_resid and dout_resid fields as signed integers.
   12277 	* sg_io_v4.c (decode_response): Print din_resid and dout_resid fields
   12278 	using %d format.
   12279 
   12280 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12281 
   12282 	sg_io: cleanup printing of sg_io buffers.
   12283 	Turn print_sg_io_buffer into a universal sg_io buffer printer.
   12284 
   12285 	* sg_io_v3.c (print_sg_io_buffer): Add iovec_count argument.
   12286 	Call tprint_iov_upto when iovec_count is non-zero.
   12287 	(decode_request, decode_response): Do not call tprint_iov_upto directly,
   12288 	use print_sg_io_buffer instead.
   12289 	* sg_io_v4.c: Likewise.
   12290 
   12291 2017-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   12292 
   12293 	sg_io: decode structures on exiting syscall in case of syserror.
   12294 	The SCSI driver, starting with kernel commit v2.6.25-rc1~1230^2~78,
   12295 	translates its "struct request.errors" to ioctl errors after
   12296 	filling in all the output members of the SG_IO header structure.
   12297 
   12298 	As there is no easy way to tell SCSI layer errors from other syscall
   12299 	errors, decode the structure on exiting syscall in case of syserror,
   12300 	too.
   12301 
   12302 	* scsi.c (scsi_ioctl): Do not call set_tcb_priv_ulong, use
   12303 	get_tcb_priv_data instead of get_tcb_priv_ulong, call decode_sg_io
   12304 	unconditionally.
   12305 	* sg_io_v3.c (decode_request): Save a copy of struct_sg_io_hdr using
   12306 	set_tcb_priv_data.
   12307 	(decode_response): Restore it using get_tcb_priv_data.  Print its i/o
   12308 	fields when umove call fails.  Pass IOV_DECODE_STR to tprint_iov_upto
   12309 	unconditionally.
   12310 	* sg_io_v4.c (decode_request): Save a copy of struct sg_io_v4 using
   12311 	set_tcb_priv_data.
   12312 	(decode_response): Restore it using get_tcb_priv_data.  Print its i/o
   12313 	fields when umove call fails.  Pass IOV_DECODE_STR to tprint_iov_upto
   12314 	unconditionally.
   12315 
   12316 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12317 
   12318 	sg_io: reorder printing of fields to follow structure order.
   12319 	* sg_io_v4.c (decode_request): Print timeout, flags, and usr_ptr fields
   12320 	after dout_xferp field.
   12321 
   12322 	sg_io_v3: print sg_io_hdr.duration field as unsigned integer.
   12323 	* sg_io_v3.c (decode_response): Print duration field using %u format.
   12324 
   12325 	sg_io_v3: print msg_status field.
   12326 	* sg_io_v3.c (decode_response): Print msg_status field.
   12327 
   12328 	sg_io: print names of array fields and corresponding length fields.
   12329 	* sg_io_v3.c (decode_request): Print names of cmd_len, cmdp,
   12330 	and dxferp fields.
   12331 	(decode_response): Print names of dxferp, sb_len_wr, and sbp fields.
   12332 	* sg_io_v4.c (decode_request): Print names of request_len, request,
   12333 	dout_xfer_len, and dout_xferp fields.
   12334 	(decode_response): Print names of response_len, response,
   12335 	and din_xferp fields.
   12336 
   12337 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12338 
   12339 	sg_io_v3: print status fields using %#x format specifier.
   12340 	The formerly used format string %02x led to misleading output as there
   12341 	was no clear indication sometimes whether the printed integer was
   12342 	decimal or hexadecimal.
   12343 
   12344 	* sg_io_v3.c (decode_response): Print status and masked_status fields
   12345 	using %#x format specifier instead of %02x.
   12346 
   12347 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12348 
   12349 	sg_io_v4: print status fields in a hexadecimal form.
   12350 	The tradition is to print scsi status codes in a hexadecimal form.
   12351 
   12352 	* sg_io_v4.c (decode_response): Print driver_status, transport_status,
   12353 	and device_status fields using %#x format specifier instead of %u.
   12354 
   12355 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12356 
   12357 	sg_io_v4: print request_tag and generated_tag fields in hex.
   12358 	The tradition is to print scsi tags in a hexadecimal form.
   12359 
   12360 	* sg_io_v4.c (decode_request): Print request_tag field
   12361 	using ("%#" PRI__x64) format string.
   12362 	(decode_response): Print generated_tag field using ("%#" PRI__x64)
   12363 	format string.
   12364 
   12365 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12366 
   12367 	sg_io_v4: print usr_ptr field in a hexadecimal form.
   12368 	As the nature of this field is pointer-like, print it
   12369 	in a hexadecimal form.
   12370 
   12371 	* sg_io_v4.c (decode_request): Print usr_ptr field
   12372 	using ("%#" PRI__x64) format string.
   12373 
   12374 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12375 
   12376 	sg_io_v4: do not print spare_in and spare_out fields.
   12377 	As the kernel does not touch these fields, there is no use
   12378 	to print them.
   12379 
   12380 	* sg_io_v4.c (decode_request): Do not print spare_in field.
   12381 	(decode_response): Do not print spare_out field.
   12382 
   12383 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12384 
   12385 	sg_io: decode struct sg_io_hdr.info and struct sg_io_v4.info.
   12386 	Print struct sg_io_hdr.info and struct sg_io_v4.info using printflags.
   12387 
   12388 	* xlat/sg_io_info.in: New file.
   12389 	* defs.h (sg_io_info): New xlat prototype.
   12390 	* sg_io_v3.c: Include "xlat/sg_io_info.h".
   12391 	(decode_response): Print struct_sg_io_hdr.info using printflags.
   12392 	* sg_io_v4.c: (decode_response): Print struct sg_io_v4.info
   12393 	using printflags.
   12394 
   12395 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12396 
   12397 	sg_io: decode struct sg_io_hdr.flags and struct sg_io_v4.flags.
   12398 	Print struct sg_io_hdr.flags and struct sg_io_v4.flags using printflags.
   12399 
   12400 	* xlat/sg_io_flags.in: New file.
   12401 	* sg_io_v3.c: Include "xlat/sg_io_flags.h".
   12402 	(decode_request): Print struct_sg_io_hdr.flags using printflags.
   12403 	* xlat/bsg_flags.in: New file.
   12404 	* sg_io_v4.c: Include "xlat/bsg_flags.h".
   12405 	(decode_request): Print struct sg_io_v4.flags using printflags.
   12406 
   12407 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12408 
   12409 	Mpersify struct sg_io_hdr.
   12410 	struct sg_io_hdr contains pointers and therefore has to be mpersified.
   12411 
   12412 	* defs.h (decode_sg_io_v3): Remove prototype.
   12413 	* sg_io_v3.c (struct_sg_io_hdr): Typedef to struct sg_io_hdr.
   12414 	Mpersify it.
   12415 	(decode_sg_io_v3): Wrap into MPERS_PRINTER_DECL.
   12416 
   12417 2017-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   12418 
   12419 	Split scsi.c.
   12420 	Move decoders of SG_IO v3 and v4 APIs into separate files,
   12421 	compile generic SG_IO decoder unconditionally.
   12422 
   12423 	* sg_io_v3.c: New file.
   12424 	* sg_io_v4.c: Likewise.
   12425 	* Makefile.am (strace_SOURCES): Add them.
   12426 	* defs.h (decode_sg_io_v3, decode_sg_io_v4): New prototypes.
   12427 	* ioctl.c (ioctl_decode): Remove [HAVE_SCSI_SG_H] condition.
   12428 	* scsi.c: (print_sg_io_res): Remove.
   12429 	(print_sg_io_req): Rename to decode_sg_io, replace print_sg_io_v3_req
   12430 	with decode_sg_io_v3, replace print_sg_io_v4_req with decode_sg_io_v4,
   12431 	compile uncoditionally.
   12432 	(scsi_ioctl): Replace print_sg_io_req and print_sg_io_res
   12433 	with decode_sg_io, compile uncoditionally.
   12434 	Move [HAVE_SCSI_SG_H] code to sg_io_v3.c.
   12435 	Move [HAVE_LINUX_BSG_H] code to sg_io_v4.c.
   12436 
   12437 2017-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   12438 
   12439 	scsi: detect and print changes of interface id.
   12440 	* scsi.c (print_sg_io_v3_res): Detect and print changes
   12441 	of struct sg_io_hdr.interface_id field between entering and exiting
   12442 	syscall.
   12443 	(print_sg_io_v4_res): Detect and print changes of struct sg_io_v4.guard
   12444 	field between entering and exiting syscall.
   12445 
   12446 	scsi: print field names of all fields being printed.
   12447 	* scsi.c (print_sg_io_v3_req): Always print the name
   12448 	of struct sg_io_hdr.interface_id field.
   12449 	(print_sg_io_v4_req): Always print the name of struct sg_io_v4.guard
   12450 	field.
   12451 	(print_sg_io_req): Print unknown interface id as an integer.
   12452 	(scsi_ioctl): Save interface id on entering syscall and use it
   12453 	on exiting syscall.
   12454 
   12455 	scsi: print struct sg_io_hdr.dxfer_direction field name.
   12456 	* scsi.c (print_sg_io_v3_req): Print struct sg_io_hdr.dxfer_direction
   12457 	field name.
   12458 
   12459 	scsi: print "protocol" and "subprotocol" field names of struct sg_io_v4.
   12460 	* scsi.c (print_sg_io_v4_req): Print field names
   12461 	of struct sg_io_v4.protocol and struct sg_io_v4.subprotocol.
   12462 
   12463 2017-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   12464 
   12465 	Print hexadecimal integer in error diagnostics using %#x.
   12466 	The formerly used format string %x led to misleading output as there was
   12467 	no clear indication sometimes whether the printed integer was decimal or
   12468 	hexadecimal.
   12469 
   12470 	* aio.c (startup_child, test_ptrace_seize): Print status
   12471 	using %#x format specifier instead of %x.
   12472 
   12473 2017-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   12474 
   12475 	aio: print hexadecimal integer using %#x.
   12476 	The formerly used format string %x led to misleading output as there was
   12477 	no clear indication sometimes whether the printed integer was decimal or
   12478 	hexadecimal.
   12479 
   12480 	* aio.c (print_common_flags): Print struct iocb.aio_flags using %#x
   12481 	format specifier instead of %x.
   12482 	* tests/aio.c (main): Likewise.
   12483 
   12484 2017-01-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   12485 
   12486 	scsi: rewrite print_sg_io_buffer using printstr_ex(QUOTE_FORCE_HEX)
   12487 	As printstr_ex has got QUOTE_FORCE_HEX flag support, there is no need
   12488 	to implement it manually any longer.
   12489 
   12490 	* scsi.c (print_uchar): Remove.
   12491 	(print_sg_io_buffer): Rewrite using printstr_ex(QUOTE_FORCE_HEX).
   12492 
   12493 2017-01-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12494 
   12495 	getrandom: print string as hex-escaped.
   12496 	Since there is no reason to interpret the value returned by getrandom as
   12497 	ASCII string, it makes sense to always print it as a hex-escaped string.
   12498 
   12499 	* getrandom.c (SYS_FUNC(getrandom)): Use printstr_ex instead
   12500 	of printstrn, set QUOTE_FORCE_HEX in user_style parameter in order
   12501 	to force hex-escaped string formatting.
   12502 	* tests/getrandom.test: Remove no longer needed -xx flag as the string
   12503 	is always printed in hexadecimal format now.
   12504 
   12505 	Suggested-by: JingPiao Chen <chenjingpiao (a] gmail.com>
   12506 
   12507 2017-01-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12508 
   12509 	util: add support for forcing printing string as hex-escaped.
   12510 	This could be useful in cases when some binary data should not be
   12511 	interpreted as an ASCII string, but rather as an array of byte values.
   12512 
   12513 	* defs.h (QUOTE_FORCE_HEX): New macro constant.
   12514 	* util.c (quote_string): Enable use_hex when QUOTE_FORCE_HEX is set
   12515 	in user_style parameter.
   12516 
   12517 2017-01-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12518 
   12519 	term: do not abort decoding in case of non-verbose output.
   12520 	The case of unset verbose is handled by umoven_or_printaddr, moreover,
   12521 	exiting at this point is plain wrong and leads to last argument not
   12522 	being printed while it should be.
   12523 
   12524 	* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
   12525 	decode_modem_flags): Do not check verbose flags explicitly and do not
   12526 	exit early if it is not set.
   12527 
   12528 2017-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   12529 
   12530 	tests: skip fault injection tests on hppa if the kernel is too old.
   12531 	* tests/fault_injection.sh: Add the minimal kernel version for hppa.
   12532 
   12533 2017-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   12534 
   12535 	tests: skip readahead.test on MIPS n64 when built with glibc < 2.25.
   12536 	Due to a bug in glibc readahead syscall wrapper on MIPS n64,
   12537 	this wrapper cannot be used in readahead.test.
   12538 
   12539 	* tests/readahead.c [HAVE_READAHEAD && LINUX_MIPSN64 && glibc < 2.25]:
   12540 	Undefine HAVE_READAHEAD.
   12541 
   12542 	Reported-by: James Cowgill <james410 (a] cowgill.org.uk>
   12543 
   12544 2017-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   12545 
   12546 	tests: replace init_magic with fill_memory.
   12547 	Use the same fill_memory/fill_memory_ex interface in all affected tests.
   12548 
   12549 	* tests/ioctl_block.c (init_magic): Remove.
   12550 	(main): Replace init_magic with fill_memory.
   12551 	* tests/ioctl_evdev.c: Likewise.
   12552 	* tests/ioctl_v4l2.c: Likewise.
   12553 	* tests/ioctl_mtd.c (magic, init_magic): Remove.
   12554 	(main): Replace init_magic with fill_memory.
   12555 	* tests/ioctl_rtc.c: Likewise.
   12556 
   12557 2017-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   12558 
   12559 	tests: rewrite ioctl_v4l2 test without reliance on init_magic.
   12560 	* tests/ioctl_v4l2.c (cc0, cc1, cc2, cc3, fourcc): New macros.
   12561 	(main): Use them.  Rewrite expected output without assumptions
   12562 	on any particular magic data.
   12563 
   12564 2017-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   12565 
   12566 	tests: remove redundant casts in fill_memory{,_ex} invocations.
   12567 	* tests/ioctl_loop.c (main): Remove redundant casts of fill_memory
   12568 	first argument.
   12569 	* tests/kexec_load.c (main): Likewise.
   12570 	* tests/perf_event_open.c (main): Likewise.
   12571 	* tests/quotactl.c (main): Likewise.
   12572 	* tests/mq_sendrecv.c (main): Remove redundant casts of fill_memory_ex
   12573 	first argument.
   12574 	* tests/quotactl-xfs.c (main): Likewise.
   12575 
   12576 2017-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   12577 
   12578 	tests: change the type of fill_memory{,_ex} first argument to void *
   12579 	As these functions behave like memset, it's more convenient to have
   12580 	the first argument of type void * like memset.
   12581 
   12582 	* tests/fill_memory.c (fill_memory, fill_memory_ex): Change the type
   12583 	of first argument from "char *" to "void *".
   12584 	* tests/tests.h (fill_memory, fill_memory_ex): Likewise.
   12585 
   12586 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12587 
   12588 	tests: check non-verbose decoding of LOOP_* ioctls.
   12589 	* tests/ioctl_loop-nv.c: New file.
   12590 	* tests/ioctl_loop-nv.test: New test.
   12591 	* tests/ioctl_loop.c [!ABBREV] (ABBREV): Define to 0.
   12592 	(print_loop_info, print_loop_info64): Handle [ABBREV != 0] case.
   12593 	* tests/.gitignore: Add ioctl_loop-nv.
   12594 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12595 
   12596 	tests: add more checks of LOOP_* ioctls decoding.
   12597 	* tests/ioctl_loop.c: Include <linux/ioctl.h>.
   12598 	(magic, lmagic): Move static constants ...
   12599 	(main): ... here.  Change types of magic constants to kernel_ulong_t.
   12600 	Add more checks.
   12601 
   12602 2017-01-04  JingPiao Chen  <chenjingpiao (a] gmail.com>
   12603 	    Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12604 
   12605 	tests: check decoding of LOOP_* ioctls.
   12606 	* tests/ioctl_loop.c: New file.
   12607 	* tests/ioctl_loop-v.c: Likewise.
   12608 	* tests/ioctl_loop.test: New test.
   12609 	* tests/ioctl_loop-v.test: Likewise.
   12610 	* tests/.gitignore: Add ioctl_loop and ioctl_loop-v.
   12611 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12612 	(DECODER_TESTS): Add ioctl_loop.test and ioctl_loop-v.test.
   12613 
   12614 2017-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   12615 
   12616 	Drop vsprintf.c.
   12617 	Drop custom vfprintf implementation that was disabled by default.
   12618 	Apparently nobody tests strace with this vfprintf enabled, otherwise
   12619 	multiple uses of format specifiers not supported by this custom vfprintf
   12620 	would not left unnoticed.
   12621 
   12622 	The GNU C library is not the only libc available, so those who want
   12623 	faster implementations of libc functions are encouraged to try building
   12624 	strace with other libc implementations.
   12625 
   12626 	* vsprintf.c: Remove.
   12627 	* Makefile.am (strace_SOURCES): Remove vsprintf.c.
   12628 	* defs.h (USE_CUSTOM_PRINTF, strace_vfprintf): Remove.
   12629 	* strace.c (tprintf): Replace strace_vfprintf with vfprintf.
   12630 
   12631 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12632 
   12633 	loop: remove unnecessary verbose check.
   12634 	The verbose flag is responsible for dereferencing of addresses, and it
   12635 	is perfectly handled by umove_or_printaddr; moreover, this early exit
   12636 	leads to incorrect formatting of last argument.
   12637 
   12638 	* loop.c (loop_ioctl): Do not check verbose flag explicitly and do not
   12639 	exit early if it is not set.
   12640 
   12641 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12642 
   12643 	loop: fix lo_encrypt_key field output.
   12644 	lo_encrypt_key is a sized string with its size specified by
   12645 	lo_encrypt_key_size field, so take lo_encrypt_key_size into account.
   12646 
   12647 	* loop.c (decode_loop_info, decode_loop_info64): Use minimum of
   12648 	LO_KEY_SIZE and lo_encrypt_key_size field value as lo_encrypt_key size.
   12649 
   12650 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12651 
   12652 	loop: print lo_encrypt_key_size field of struct loop_info as unsigned.
   12653 	It is converted to an unsigned value in kernel (see loop_info64_from_old
   12654 	in drivers/block/loop.c), so let's print it that way despite its type.
   12655 
   12656 	* loop.c (decode_loop_info): Print lo_encrypt_key_size as an uint32_t
   12657 	value.
   12658 
   12659 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12660 
   12661 	tests: add more checks of unknown ioctl command formatting.
   12662 	* tests/ioctl.c (main): Additional check for unknown ioctl command
   12663 	decoding.
   12664 	* tests/ioctl_evdev.c (main): Likewise.
   12665 	* tests/ioctl_dm.c: Include <linux/ioctl.h> for _IOC_SIZE and _IOC_NR.
   12666 	(main) <dummy_dm_ioctl1, dummy_dm_ioctl2, dummy_dm_arg>: New constants.
   12667 	Add more checks for unknown command formatting.
   12668 
   12669 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12670 
   12671 	ioctl: do not print explicit 0x prefix and do not specify minimum width.
   12672 	Specifying output width for size argument is rather misleading - it can
   12673 	be up to 14 bits in size.  The use of explicit "0x" prefix is
   12674 	discouraged because 0x0 looks ugly.  Usage of width specification along
   12675 	with alternate form flag leads to inconsistent output for 0.
   12676 	Let's use just plain %#x qualifiers instead.
   12677 
   12678 	* ioctl.c (ioctl_print_code): Change printf qualifiers for ioctl command
   12679 	type, number and size to "%#x".
   12680 	* tests/ioctl.c (main): Update expected test output.
   12681 	* tests/ioctl_dm.c (main): Likewise.
   12682 	* tests/ioctl_evdev.c (main): Likewise.
   12683 
   12684 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12685 
   12686 	loop: fix printing of the reserved field array items.
   12687 	They are of char type, so "hh" length modifier should be used (otherwise
   12688 	they are printed incorrectly as they are sign extended implicitly when
   12689 	passed as printf arguments in case char is a signed type which is true
   12690 	for most compilers).
   12691 
   12692 	* loop.c (decode_loop_info): Change "%#x" printf qualifier to "%#hhx"
   12693 	in printing routine for array elements of the "reserved" field of
   12694 	loop_info structure.
   12695 
   12696 2017-01-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12697 
   12698 	tests: check ioctl(SIOCGIFCONF) decoding.
   12699 	* tests/ioctl_sock_gifconf.c: New file.
   12700 	* tests/ioctl_sock_gifconf.test: New test.
   12701 	* tests/.gitignore: Add ioctl_sock_gifconf.
   12702 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12703 	(DECODER_TESTS): Add ioctl_sock_gifconf.test.
   12704 
   12705 	dm.c: add copyright notice.
   12706 
   12707 2017-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   12708 
   12709 	Add scno.h and syscallent.i to .gitignore files.
   12710 	* .gitignore: Add /scno.h and /syscallent.i.
   12711 	* tests/.gitignore: Add scno.h and syscallent.i.
   12712 
   12713 2017-01-04  JingPiao Chen  <chenjingpiao (a] gmail.com>
   12714 
   12715 	tests/.gitignore: add generated files that should be ignored.
   12716 	* tests/.gitignore: Replace addkey with add_key, add attach-f-p-cmd.
   12717 
   12718 2017-01-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   12719 
   12720 	Remove checks of __NR_* availability from strace source code.
   12721 	* strace.c: Remove __NR_tkill checks, assume it is always defined.
   12722 	* util.c: Remove __NR_process_vm_readv checks and fallback definitions,
   12723 	assume it is always defined.
   12724 
   12725 	Include "scno.h" in files that check __NR_* constants.
   12726 	* strace.c: Include "scno.h".
   12727 	* util.c: Likewise.
   12728 
   12729 	Generate scno.h for use during the build of strace itself.
   12730 	* Makefile.am: Include scno.am.
   12731 	($(strace_OBJECTS)): New rule.
   12732 
   12733 2017-01-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   12734 
   12735 	Generate scno.h without invoking a generated executable helper.
   12736 	Generate scno.h using only those tools that are available for cross
   12737 	build.  This allows to use scno.h during the build of strace itself.
   12738 
   12739 	* scno.am: New file.
   12740 	* scno.head: New file.
   12741 	* Makefile.am (EXTRA_DIST): Add it.
   12742 	* tests/generate_scno.c: Remove.
   12743 	* tests/.gitignore: Remove generate_scno.
   12744 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12745 	(CLEANFILES): Remove scno.h.
   12746 	(scno.h, $(scno_dependants)): Remove rules.
   12747 	(scno_dependants): Remove.
   12748 	($(objects)): New rule.
   12749 	Include ../scno.am.
   12750 
   12751 2017-01-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   12752 
   12753 	Update all publicly shown copyright year number ranges.
   12754 	* COPYING: Update copyright year number range.
   12755 	* configure.ac: Likewise.
   12756 	* strace.c: Likewise.
   12757 	* tests/strace-V.test: Use the current year for the check.
   12758 
   12759 2016-12-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   12760 
   12761 	defs.h: stop including <asm/unistd.h>
   12762 	Limit the number of files where <asm/unistd.h> is included
   12763 	to only those few that need it.
   12764 
   12765 	* defs.h: Do not include <asm/unistd.h>.
   12766 	* clone.c: Include <asm/unistd.h>.
   12767 	* strace.c: Likewise.
   12768 	* syscall.c: Likewise.
   12769 	* util.c: Likewise.
   12770 
   12771 2016-12-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   12772 
   12773 	tests: do not use BUILT_SOURCES.
   12774 	* tests/Makefile.am (ksysent.$(OBJEXT)): New rule.
   12775 	(BUILT_SOURCES): Remove.
   12776 
   12777 2016-12-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   12778 
   12779 	Fix cross build.
   12780 	This fixes cross build regression introduced by commit
   12781 	v4.15-39-g605a705a63d533dceb3c2d489468fcd3aed3963c.
   12782 
   12783 	* tests/Makefile.am (BUILT_SOURCES): Remove scno.h
   12784 	(objects, scno_dependants): New variables.
   12785 	($(scno_dependants)): New rule.
   12786 
   12787 	Reported-by: Joakim Bech <joakim.bech (a] linaro.org>
   12788 
   12789 2016-12-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   12790 
   12791 	tests: do not use defs.h and syscall.h.
   12792 	* tests/generate_scno.c: Include "tests.h", "sysent.h", <stdio.h>,
   12793 	<string.h>, and <asm/unistd.h> instead of "defs.h" and "syscall.h".
   12794 	* tests/ksysent.c: Likewise.
   12795 	* tests/nsyscalls.c: Include "tests.h", "sysent.h", <errno.h>,
   12796 	<stdio.h>, and <unistd.h> instead of "defs.h" and "syscall.h".
   12797 
   12798 	Move definition of struct sysent and trace flags to a separate file.
   12799 	* sysent.h: New file.
   12800 	* Makefile.am (strace_SOURCES): Add it.
   12801 	* defs.h: Include it.
   12802 	(struct sysent, TRACE_FILE, TRACE_IPC, TRACE_NETWORK, TRACE_PROCESS,
   12803 	TRACE_SIGNAL, TRACE_DESC, TRACE_MEMORY, SYSCALL_NEVER_FAILS,
   12804 	STACKTRACE_INVALIDATE_CACHE, STACKTRACE_CAPTURE_ON_ENTER,
   12805 	TRACE_INDIRECT_SUBCALL, COMPAT_SYSCALL_TYPES): Remove.
   12806 
   12807 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12808 
   12809 	Mpersify SIOC* ioctls.
   12810 	struct ifreq and struct ifconf are ABI-dependent and should have been
   12811 	mpersified.
   12812 
   12813 	* defs.h (sock_ioctl): Remove prototype.
   12814 	* sock.c (struct_ifconf, struct_ifreq): New typedefs.
   12815 	(DEF_MPERS_TYPE(struct_ifconf), DEF_MPERS_TYPE(struct_ifreq),
   12816 	MPERS_DEFS): New includes.
   12817 	(print_ifreq, print_ifc_len, print_ifconf_ifreq): Replace struct ifreq
   12818 	with struct_ifreq.
   12819 	(decode_ifconf): Replace struct ifconf with struct_ifconf, struct ifreq
   12820 	with struct_fireq.
   12821 	(sock_ioctl): Wrap into MPERS_PRINTER_DECL.
   12822 
   12823 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12824 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   12825 
   12826 	sock: rewrite decode_ifconf.
   12827 	* sock.c (decode_ifconf): Rewrite.
   12828 
   12829 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12830 
   12831 	xlat: update LOOP_* ioctl flags constants.
   12832 	* configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_USE_AOPS
   12833 	and LO_FLAGS_DIRECT_IO.
   12834 	* xlat/loop_flags_options.in: Likewise.  Add default values
   12835 	for constants.
   12836 
   12837 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12838 
   12839 	loop: add fallback definitions for LOOP_* ioctl command constants.
   12840 	Since these are architecture-independent and have been added over the
   12841 	kernel's lifetime, it makes sense to have these definitions in strace
   12842 	itself.
   12843 
   12844 	* xlat/loop_cmds.in: New file.
   12845 	* loop.c: Include "xlat/loop_cmds.h".
   12846 	(loop_ioctl): Eliminate conditional compilation based on availability
   12847 	of LOOP_* constant definitions.
   12848 
   12849 2016-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   12850 
   12851 	xlat: extend syntax.
   12852 	* xlat/gen.sh: Implement #stop directive that stops preprocessor
   12853 	at the line it has been encountered during the first pass.  This could
   12854 	be used, for example, to provide fallback definitions for constants
   12855 	without defining xlat tables.
   12856 
   12857 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12858 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   12859 
   12860 	loop: mpersify struct loop_info and loop_ioctl function.
   12861 	struct loop_info contains fields of type long, so it definitely should
   12862 	have been mpersified.
   12863 
   12864 	* defs.h (loop_ioctl): Remove prototype.
   12865 	* loop.c (struct_loop_info): New typedef.
   12866 	Include DEF_MPERS_TYPE(struct_loop_info) and MPERS_DEFS.
   12867 	(decode_loop_info): Replace struct loop_info with struct_loop_info.
   12868 	Cast lo_inode, lo_init[0], and lo_init[1] to kernel_ulong_t and print
   12869 	them using appropriate format specifiers.
   12870 	(loop_ioctl): Wrap into MPERS_PRINTER_DECL.
   12871 
   12872 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12873 
   12874 	loop: print lo_device and lo_rdevice fields using print_dev_t.
   12875 	* loop.c (decode_loop_info, decode_loop_info64): Use print_dev_t
   12876 	for printing lo_device and lo_rdevice fields.
   12877 
   12878 2016-12-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12879 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   12880 
   12881 	Move device number printing code into a separate routine.
   12882 	* print_dev_t.c: New file.
   12883 	* Makefile.am (strace_SOURCES): Add it.
   12884 	* defs.h (print_dev_t): New prototype.
   12885 	* dm.c: Do not include <sys/sysmacros.h>.
   12886 	(dm_decode_device, dm_print_dev, dm_decode_dm_name_list): Use
   12887 	print_dev_t function for printing device numbers.
   12888 	* mknod.c: Do not include <sys/sysmacros.h>.
   12889 	(decode_mknod): Use print_dev_t function for printing device number.
   12890 	* print_struct_stat.c: Do not include <sys/sysmacros.h>.
   12891 	(print_struct_stat): Use print_dev_t function for printing device
   12892 	numbers.
   12893 
   12894 2016-12-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   12895 
   12896 	tests: enhance invalid address decoding check in seccomp-strict.test.
   12897 	* tests/seccomp-strict.c (main): Change the type of addr variable
   12898 	containg the invalid address from unsigned long to kernel_ulong_t,
   12899 	print it using %#llx format.
   12900 
   12901 2016-12-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   12902 
   12903 	tests: check decoding of prctl PR_GET_TID_ADDRESS operation.
   12904 	* tests/prctl-tid_address.c: New file.
   12905 	* tests/prctl-tid_address.test: New test.
   12906 	* tests/.gitignore: Add prctl-tid_address.
   12907 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   12908 	(DECODER_TESTS): Add prctl-tid_address.test.
   12909 
   12910 2016-12-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   12911 
   12912 	Update the publicly shown copyright information.
   12913 	Set the publicly shown copyright holder to "The strace developers.".
   12914 
   12915 	* COPYING: Update copyright information.
   12916 	* configure.ac: Add AC_COPYRIGHT.
   12917 	* strace.c (print_version): New function.
   12918 	(init): Use it.
   12919 	* tests/strace-V.test: Update expected output.
   12920 
   12921 2016-12-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   12922 
   12923 	configure: specify project URL.
   12924 	* configure.ac (AC_INIT): Add URL.
   12925 
   12926 2016-12-28  Seraphime Kirkovski  <kirkseraph (a] gmail.com>
   12927 
   12928 	Document signal injection.
   12929 	* strace.1: Describe :signal=SIG option of the fault injection syntax.
   12930 	* NEWS: Mention signal injection.
   12931 
   12932 2016-12-28  Seraphime Kirkovski  <kirkseraph (a] gmail.com>
   12933 
   12934 	Implement signal injection.
   12935 	This extends the fault injection capability with :signal=SIG option
   12936 	which injects a signal on entering each syscall from the specified set.
   12937 
   12938 	:signal and :error options are complementary, if they are both specified
   12939 	the syscall will be fault injected as usual and the specified signal
   12940 	will be delivered to the tracee.
   12941 
   12942 	* defs.h (struct fault_opts): Change the type of err field to int16_t,
   12943 	add signo field.
   12944 	(trace_syscall): Add a pointer argument.
   12945 	* qualify.c: Include "nsig.h".
   12946 	(parse_fault_token): Handle signal= option.
   12947 	(qualify_fault): Update default fault_opts.
   12948 	* strace.c (trace): Forward signal number from trace_syscall
   12949 	to ptrace_restart(PTRACE_SYSCALL).
   12950 	* syscall.c (inject_syscall_fault_entering): Add pointer argument,
   12951 	save there the signal number specified by fault options.  Do not inject
   12952 	a syscall fault unless instructed by fault options.
   12953 	(update_syscall_fault_exiting): Update the error code injection check.
   12954 	(trace_syscall_entering): Add pointer argument, forward it to
   12955 	inject_syscall_fault_entering.
   12956 	(trace_syscall): Add pointer argument, forward it to
   12957 	trace_syscall_entering.
   12958 
   12959 2016-12-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   12960 
   12961 	Update README.md.
   12962 	* README.md: Update homepage URL, mention command-line interface
   12963 	and tampering capabilities in the description.
   12964 
   12965 2016-12-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   12966 
   12967 	tests: robustify prctl-arg2-intptr.test.
   12968 	Robustify prctl-arg2-intptr.test against unrelated prctl invocations.
   12969 
   12970 	* tests/prctl-arg2-intptr.test: Filter out unrelated PR_GET_*
   12971 	and PR_SET_* prctl calls.
   12972 
   12973 2016-12-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   12974 
   12975 	signal: remove redundant checks around NSIG.
   12976 	* signal.c (struct old_sigaction, struct new_sigaction,
   12977 	struct new_sigaction32): Remove safety checks for NSIG >= sizeof(long).
   12978 
   12979 	Introduce NSIG_BYTES.
   12980 	* nsig.h (NSIG_BYTES): New macro.
   12981 	* desc.c: Use it in comments instead of NSIG.
   12982 	* epoll.c: Likewise.
   12983 	* poll.c: Likewise.
   12984 	* signalfd.c: Likewise.
   12985 	* signal.c: Likewise.
   12986 	(sprintsigmask_n, print_sigset_addr_len_limit): Use it instead of NSIG.
   12987 	* linux/alpha/arch_sigreturn.c (arch_sigreturn): Likewise.
   12988 	* linux/arm/arch_sigreturn.c (arch_sigreturn): Likewise.
   12989 	* linux/crisv10/arch_sigreturn.c (arch_sigreturn): Likewise.
   12990 	* linux/ia64/arch_sigreturn.c (arch_sigreturn): Likewise.
   12991 	* linux/m68k/arch_sigreturn.c (arch_sigreturn): Likewise.
   12992 	* linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise.
   12993 	* linux/mips/arch_sigreturn.c (arch_sigreturn): Likewise.
   12994 	* linux/powerpc/arch_sigreturn.c (arch_sigreturn): Likewise.
   12995 	* linux/s390/arch_sigreturn.c (arch_sigreturn): Likewise.
   12996 	* linux/sparc/arch_sigreturn.c (arch_sigreturn): Likewise.
   12997 	* linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise.
   12998 	* linux/x86_64/arch_sigreturn.c (arch_sigreturn): Likewise.
   12999 	* tests/pselect6.c (main): Likewise.
   13000 
   13001 	Move NSIG ifdefery to a separate header file.
   13002 	* nsig.h: New file.
   13003 	* Makefile.am (strace_SOURCES): Add it.
   13004 	* signal.c: Include "nsig.h" instead of <signal.h>, remove
   13005 	NSIG workarounds.
   13006 	* sigreturn.c: Likewise.
   13007 	* syscall.c: Likewise.
   13008 	* tests/pselect6.c: Likewise.
   13009 
   13010 	Introduce ANY_WORDSIZE_LESS_THAN_KERNEL_LONG macro.
   13011 	* defs.h (ANY_WORDSIZE_LESS_THAN_KERNEL_LONG): New macro.
   13012 	(truncate_klong_to_current_wordsize,
   13013 	truncate_kulong_to_current_wordsize): Use it.
   13014 	* mem.c (SYS_FUNC(old_mmap)): Likewise.
   13015 	* util.c (umoven, umovestr, dumpiov_upto): Likewise.
   13016 	* syscall.c (trace_syscall_exiting): Likewise.
   13017 
   13018 	Simplify personality checks in msghdr.c and signal.c.
   13019 	* msghdr.c: Check for [!current_wordsize] instead
   13020 	of [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4].
   13021 	* signal.c: Likewise.
   13022 
   13023 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13024 
   13025 	Replace widen_to_long with truncate_klong_to_current_wordsize.
   13026 	* defs.h (widen_to_long): Remove.
   13027 	(truncate_klong_to_current_wordsize): New static inline function.
   13028 	* aio.c (SYS_FUNC(io_submit), SYS_FUNC(io_getevents): Use it
   13029 	instead of widen_to_long.
   13030 	* linux/sparc64/get_syscall_args.c (get_syscall_args): Update comment.
   13031 	* linux/x86_64/get_syscall_args.c (get_syscall_args): Likewise.
   13032 
   13033 	Replace widen_to_ulong with truncate_kulong_to_current_wordsize.
   13034 	* defs.h (widen_to_ulong): Remove.
   13035 	(truncate_kulong_to_current_wordsize): New static inline function.
   13036 	* io.c (do_preadv, do_pwritev): Use it instead of widen_to_ulong.
   13037 
   13038 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13039 
   13040 	Simplify print_lld_from_low_high_val ifdefery.
   13041 	The demise of HAVE_STRUCT_TCB_EXT_ARG opens the way for a simpler
   13042 	implementation.
   13043 
   13044 	* io.c (print_lld_from_low_high_val): Merge [SIZEOF_LONG > 4
   13045 	&& SIZEOF_LONG == SIZEOF_LONG_LONG]
   13046 	and [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] cases
   13047 	into a single [SIZEOF_KERNEL_LONG_T > 4] case.
   13048 	[SIZEOF_KERNEL_LONG_T == 4]: Use direct casts to long long
   13049 	instead of zero_extend_signed_to_ull.
   13050 
   13051 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13052 
   13053 	Simplify getllval ifdefery.
   13054 	The demise of HAVE_STRUCT_TCB_EXT_ARG opens the way for a simpler
   13055 	implementation.
   13056 
   13057 	* util.c (getllval): Merge [SIZEOF_LONG > 4
   13058 	&& SIZEOF_LONG == SIZEOF_LONG_LONG]
   13059 	and [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] cases
   13060 	into a single [SIZEOF_KERNEL_LONG_T > 4] case.
   13061 
   13062 2016-12-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   13063 
   13064 	prctl: print pointer returned by PR_GET_TID_ADDRESS as kernel long.
   13065 	Since there is no compat handler for x32/n32, kernel returns kernel's
   13066 	long as a result of the call.
   13067 
   13068 	Interesting, does any callee out there actually care to have enough room
   13069 	allocated for kernel long?
   13070 
   13071 	* prctl.c (SYS_FUNC(prctl)): Use printnum_kptr instead of printnum_ptr
   13072 	to print the value stored at address pointed by addr2 argument
   13073 	of PR_GET_TID_ADDRESS operation.
   13074 
   13075 2016-12-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   13076 
   13077 	Add functions for printing pointers of kernel_ulong_t size.
   13078 	In cases where no compat for x32/n32 is implemented, pointer is of
   13079 	kernel's long size, so it should be printed appropriately.
   13080 
   13081 	* defs.h [!current_klongsize] (printnum_addr_klong_int): New prototype.
   13082 	(printnum_kptr): New macro.
   13083 	* util.c [!current_klongsize] (printnum_addr_klong_int): New function.
   13084 
   13085 2016-12-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   13086 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   13087 
   13088 	Print indirect pointers as pointers.
   13089 	Originally, printnum_long_int was used, but it prints NULL incorrectly.
   13090 
   13091 	* defs.h (DECL_PRINTNUM_ADDR): New macro.
   13092 	(DECL_PRINTNUM_ADDR(int), DECL_PRINTNUM_ADDR(int64)): New prototypes.
   13093 	[!current_wordsize] (printnum_addr_long_int): New prototype.
   13094 	[!current_wordsize] (printnum_ptr): Use it.
   13095 	[current_wordsize > 4] (printnum_ptr): Use printnum_addr_int64.
   13096 	[current_wordsize == 4] (printnum_ptr) Use printnum_addr_int.
   13097 	* util.c (DEF_PRINTNUM_ADDR): New macro.
   13098 	(DEF_PRINTNUM_ADDR(int, unsigned int),
   13099 	DEF_PRINTNUM_ADDR(int64, uint64_t)): New macro instantiations that
   13100 	provide printnum_addr_int and printnum_addr_int64, accordingly.
   13101 	[!current_wordsize] (printnum_addr_long_int): New function.
   13102 	* xet_robust_list.c (sprintaddr): New function.
   13103 	(main): Use it, update expected output.
   13104 	* tests/ipc_sem.c (main): Update expected output.
   13105 
   13106 2016-12-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   13107 
   13108 	ipc_sem: print 4th argument of semctl syscall as an address.
   13109 	* ipc_sem.c (SYS_FUNC(semctl)): Print 4th argument using printaddr.
   13110 	* tests/ipc_sem.c (cleanup): Update expected output.
   13111 
   13112 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13113 
   13114 	Do not define printnum_long_int on systems with constant current_wordsize
   13115 	* defs.h: Check [!current_wordsize] instead
   13116 	of [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] to select
   13117 	definitions of printnum_slong, printnum_ulong, and printnum_ptr.
   13118 	* util.c: Check [!current_wordsize] instead
   13119 	of [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] to decide
   13120 	whether to compile printnum_long_int.
   13121 
   13122 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13123 
   13124 	umoven: detect invalid addresses.
   13125 	Do not silently truncate tracee addresses to current_wordsize.
   13126 	After transition from long to kernel_ulong_t there should be no sign
   13127 	extension issues with tracee addresses, and invalid addresses should
   13128 	be printed properly.
   13129 
   13130 	* util.c (umoven): Check [SIZEOF_KERNEL_LONG_T > 4] instead
   13131 	of [SIZEOF_LONG > 4], reject addresses that do not fit into
   13132 	current_wordsize.
   13133 	* tests/umoven-illptr.c: New file.
   13134 	* tests/umoven-illptr.test: New test.
   13135 	* tests/.gitignore: Add umoven-illptr.
   13136 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   13137 	(DECODER_TESTS): Add umoven-illptr.test.
   13138 
   13139 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13140 
   13141 	umovestr: detect invalid addresses.
   13142 	Do not silently truncate tracee addresses to current_wordsize.
   13143 	After transition from long to kernel_ulong_t there should be no sign
   13144 	extension issues with tracee addresses, and invalid addresses should
   13145 	be printed properly.
   13146 
   13147 	* util.c (umovestr): Check [SIZEOF_KERNEL_LONG_T > 4] instead
   13148 	of [SIZEOF_LONG > 4], reject addresses that do not fit into
   13149 	current_wordsize.
   13150 	* tests/umovestr-illptr.c: New file.
   13151 	* tests/umovestr-illptr.test: New test.
   13152 	* tests/.gitignore: Add umovestr-illptr.
   13153 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   13154 	(DECODER_TESTS): Add umovestr-illptr.test.
   13155 
   13156 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13157 
   13158 	lseek: simplify _llseek syscall decoder.
   13159 	After transition from long to kernel_ulong_t the implementation
   13160 	could be made a bit simpler.
   13161 
   13162 	* lseek.c (SYS_FUNC(llseek)): Use direct cast to long long instead
   13163 	of zero_extend_signed_to_ull.
   13164 
   13165 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13166 
   13167 	lseek: merge two different implementations of lseek syscall decoder.
   13168 	After transition from long to kernel_ulong_t there are no mo
   13169 	complications that required to keep a separate implementation
   13170 	for x32 and mips n32.
   13171 
   13172 	* lseek.c (SYS_FUNC(lseek)): Merge two different implementations
   13173 	into a single one.
   13174 
   13175 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13176 
   13177 	Remove HAVE_STRUCT_TCB_EXT_ARG, ext_arg, and u_lrval.
   13178 	After transition from long to kernel_ulong_t these fields
   13179 	are no longer needed.
   13180 
   13181 	* defs.h (HAVE_STRUCT_TCB_EXT_ARG): Remove.
   13182 	(struct tcb) [HAVE_STRUCT_TCB_EXT_ARG]: Remove.
   13183 	[HAVE_STRUCT_TCB_EXT_ARG]: Remove.
   13184 	(RVAL_MASK): Update.
   13185 	* io.c (print_lld_from_low_high_val): Check
   13186 	[SIZEOF_KERNEL_LONG_T > SIZEOF_LONG]
   13187 	instead of [HAVE_STRUCT_TCB_EXT_ARG].
   13188 	Use u_arg instead of ext_arg.
   13189 	* linux/mips/get_error.c (get_error) [LINUX_MIPSN32]: Remove.
   13190 	* linux/mips/get_syscall_args.c (get_syscall_args) [LINUX_MIPSN32]:
   13191 	Remove.
   13192 	[LINUX_MIPSN64]: Extend to [LINUX_MIPSN32].
   13193 	* linux/x86_64/get_error.c (get_error) [X32]: Remove.
   13194 	* linux/x86_64/get_syscall_args.c (get_syscall_args) [X32]: Remove.
   13195 	* lseek.c: Check [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG]
   13196 	instead of [HAVE_STRUCT_TCB_EXT_ARG].
   13197 	[SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] (SYS_FUNC(lseek)): Use u_arg
   13198 	instead of ext_arg.  Use RVAL_UDECIMAL instead of RVAL_LUDECIMAL.
   13199 	* mem.c (SYS_FUNC(mmap)): Pass offset syscall argument directly
   13200 	to print_mmap.
   13201 	* syscall.c (trace_syscall_exiting) [HAVE_STRUCT_TCB_EXT_ARG]: Remove.
   13202 	* times.c (SYS_FUNC(times)): Use RVAL_UDECIMAL instead
   13203 	of RVAL_LUDECIMAL.
   13204 	* util.c (getllval): Check [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG]
   13205 	instead of [HAVE_STRUCT_TCB_EXT_ARG].  Use u_arg instead of ext_arg.
   13206 
   13207 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13208 
   13209 	Remove getarg_klu.
   13210 	After transition from long to kernel_ulong_t we no longer need
   13211 	tcp->ext_arg, and therefore a function to access it is also no longer
   13212 	needed.
   13213 
   13214 	* defs.h (getarg_klu): Remove prototype.
   13215 	* util.c (getarg_klu): Remove.
   13216 	(printargs): Access tcp->u_arg directly
   13217 	* bjm.c (SYS_FUNC(init_module)): Likewise.
   13218 	* clone.c (SYS_FUNC(unshare)): Likewise.
   13219 	* fadvise.c (SYS_FUNC(fadvise64)): Likewise.
   13220 	* kcmp.c (SYS_FUNC(kcmp)): Likewise.
   13221 	* kexec.c (SYS_FUNC(kexec_file_load)): Likewise.
   13222 	* keyctl.c (SYS_FUNC(keyctl)): Likewise.
   13223 	* lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Likewise.
   13224 	* mem.c (do_mprotect): Likewise.
   13225 	* mq.c (SYS_FUNC(mq_timedsend), SYS_FUNC(mq_timedreceive)): Likewise.
   13226 	* pkeys.c (SYS_FUNC(pkey_alloc)): Likewise.
   13227 	* prctl.c (print_prctl_args, SYS_FUNC(prctl), SYS_FUNC(arch_prctl)):
   13228 	Likewise.
   13229 
   13230 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13231 
   13232 	Remove printaddr_klu.
   13233 	After transition from long to kernel_ulong_t we no longer need
   13234 	two versions of printaddr function.
   13235 
   13236 	* defs.h (printaddr): Remove.
   13237 	(printaddr_klu): Rename to printaddr.
   13238 	* util.c (printaddr_klu): Likewise.
   13239 	* bjm.c (SYS_FUNC(init_module)): Replace printaddr_klu with printaddr.
   13240 	* mem.c (do_mprotect): Likewise.
   13241 
   13242 2016-12-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   13243 
   13244 	tests: check decoding of a subset of prctl operations.
   13245 	Check decoding of prctl operations that take the second syscall argument
   13246 	as a pointer to an integer.
   13247 
   13248 	* tests/prctl-arg2-intptr.c: New file.
   13249 	* tests/prctl-arg2-intptr.test: New test.
   13250 	* tests/.gitignore: Add prctl-arg2-intptr.
   13251 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   13252 	(DECODER_TESTS): Add prctl-arg2-intptr.test.
   13253 
   13254 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13255 
   13256 	Automatically replace PRI_kr[dux] with PRI_kl[dux]
   13257 	Remove temporary macros created for transition from long
   13258 	to kernel_ulong_t.
   13259 
   13260 	Automatically replace PRI_kr[dux] with PRI_kl[dux] using
   13261 	$ git grep -l 'PRI_kr[dux]' | xargs sed -ri 's/PRI_kr([dux])/PRI_kl\1/g'
   13262 
   13263 	* defs.h (PRI_krd, PRI_kru, PRI_krx): Remove.  All users updated.
   13264 
   13265 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13266 
   13267 	Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t.
   13268 	Remove temporary types created for transition from long
   13269 	to kernel_ulong_t.
   13270 
   13271 	Automatically replace kernel_scno_t and kernel_ureg_t with
   13272 	kernel_ulong_t using
   13273 	$ git grep -El 'kernel_(scno|ureg)_t' |
   13274 	  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'
   13275 
   13276 	* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
   13277 	All users updated.
   13278 
   13279 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13280 
   13281 	Redirect kernel_ureg_t and kernel_scno_t from unsigned long to kernel_ulong_t
   13282 	* defs.h (struct tcb): Change u_rval type from long to kernel_long_t.
   13283 	(PRI_krd, PRI_kru, PRI_krx): Redirect to PRI_kld, PRI_klu, and PRI_klx.
   13284 	* kernel_types.h (kernel_scno_t, kernel_ureg_t): Redirect
   13285 	to kernel_ulong_t.
   13286 
   13287 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13288 
   13289 	Print kernel_ureg_t and kernel_scno_t using dedicated format strings.
   13290 	Prepare for the change of kernel_ureg_t and kernel_scno_t from
   13291 	unsigned long to kernel_ulong_t.
   13292 
   13293 	* defs.h (PRI_krd, PRI_kru, PRI_krx): New temporary macros.
   13294 	All users updated.
   13295 
   13296 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13297 
   13298 	vm_read_mem: detect address truncation.
   13299 	When sizeof(kernel_ureg_t) > sizeof(long), the tracee address passed
   13300 	to vm_read_mem could be silently truncated.  Detect this situation
   13301 	and return EIO when the tracee address does not fit into unsigned long.
   13302 
   13303 	* util.c (vm_read_mem): Save raddr argument into a temporary variable
   13304 	truncated_raddr of type unsigned long.  Set errno to EIO and return -1
   13305 	when truncated_raddr does not equal to raddr.
   13306 
   13307 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13308 
   13309 	trace_syscall_exiting: prepare personality check for u_rval type change.
   13310 	* syscall.c (trace_syscall_exiting): Check for sizeof(tcp->u_rval)
   13311 	instead of sizeof(long) when deciding how to print tcp->u_rval.
   13312 
   13313 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13314 
   13315 	Use ptr_to_kulong instead of explicit casts of pointers to kernel_ureg_t
   13316 	Direct casts to kernel_ureg_t will not work after the change
   13317 	of kernel_ureg_t from unsigned long to kernel_ulong_t.
   13318 
   13319 	* defs.h (ptr_to_kulong): New macro.
   13320 	* block.c (print_blkpg_req): Use it instead of explicit casts
   13321 	to kernel_ureg_t.
   13322 	* btrfs.c (btrfs_ioctl): Likewise.
   13323 	* evdev.c (ff_effect_ioctl): Likewise.
   13324 	* mmsghdr.c (dumpiov_in_mmsghdr): Likewise.
   13325 	* msghdr.c (print_struct_msghdr, dumpiov_in_msghdr): Likewise.
   13326 	* mtd.c (decode_mtd_oob_buf): Likewise.
   13327 	* printsiginfo.c (printsigval, print_si_info): Likewise.
   13328 	* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res): Likewise.
   13329 	* sigaltstack.c (print_stack_t): Likewise.
   13330 	* sock.c (decode_ifconf): Likewise.
   13331 	* sysctl.c (SYS_FUNC(sysctl)): Likewise.
   13332 	* util.c (dumpiov_upto): Likewise.
   13333 	* v4l2.c (print_v4l2_framebuffer, print_v4l2_ext_control,
   13334 	print_v4l2_ext_controls): Likewise.
   13335 
   13336 2016-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   13337 
   13338 	umove*: remove redundant casts.
   13339 	* util.c (umoven, umovestr): Remove casts from unsigned long to pointer.
   13340 
   13341 	upoke: remove redundant casts.
   13342 	* upoke.c (upoke): Remove casts from unsigned long to pointer.
   13343 
   13344 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13345 
   13346 	signal: cleanup decoding of sa_handler and sa_restorer.
   13347 	Change type of sa_handler and sa_restorer fields from function pointers
   13348 	to unsigned long.  This saves the code from a lot of casts between
   13349 	pointers and integers.
   13350 
   13351 	Rename __sa_handler to sa_handler__ as names starting with underscore
   13352 	symbol are reserved and should not be used.
   13353 
   13354 	* signal.c (old_sigaction): Rename __sa_handler to sa_handler__,
   13355 	all users updated.  Change the type of sa_handler__ and sa_restorer
   13356 	from pointer to unsigned long.
   13357 	(old_sigaction32): Rename __sa_handler to sa_handler__, all users
   13358 	updated.
   13359 	(decode_old_sigaction): Remove now redundant casts from
   13360 	old_sigaction32.sa_handler__ to old_sigaction.sa_handler__,
   13361 	from old_sigaction32.sa_restorer to old_sigaction.sa_restorer,
   13362 	and from old_sigaction.sa_handler__ to unsigned long.  Print
   13363 	old_sigaction.sa_restorer using printaddr.
   13364 	* signal.c (new_sigaction): Rename __sa_handler to sa_handler__,
   13365 	all users updated.  Change the type of sa_handler__ and sa_restorer
   13366 	from pointer to unsigned long.
   13367 	(new_sigaction32): Rename __sa_handler to sa_handler__, all users
   13368 	updated.
   13369 	(decode_new_sigaction): Remove now redundant casts from
   13370 	new_sigaction32.sa_handler__ to new_sigaction.sa_handler__,
   13371 	from new_sigaction32.sa_restorer to new_sigaction.sa_restorer,
   13372 	and from new_sigaction.sa_handler__ to unsigned long.  Print
   13373 	new_sigaction.sa_restorer using printaddr.
   13374 
   13375 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13376 
   13377 	signal: change signal handler address type from unsigned long to kernel_ureg_t
   13378 	* signal.c (get_sa_handler_str, print_sa_handler): Change handler type
   13379 	from unsigned long to kernel_ureg_t.
   13380 
   13381 	quota: change address argument type from unsigned long to kernel_ureg_t.
   13382 	* quota.c (decode_cmd_data): Change the type of data argument
   13383 	from unsigned long to kernel_ureg_t.
   13384 
   13385 	execve: prepare for handling big pointers.
   13386 	* execve.c (printargv): Change cp.p64 type from unsigned long
   13387 	to kernel_ulong_t so it could handle wordsize > sizeof(long) properly.
   13388 
   13389 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13390 
   13391 	clone: print clone flags without truncation.
   13392 	The flags argument is defined in kernel as unsigned long,
   13393 	so change its decoding to avoid truncation.
   13394 
   13395 	* clone.c (SYS_FUNC(clone)): Change flags type from unsigned long
   13396 	to kernel_ureg_t, print it using printflags64 instead of printflags.
   13397 
   13398 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13399 
   13400 	Use printxval64 instead of printxval_long.
   13401 	After the change of tcb.u_arg type from long to kernel_ureg_t it is safe
   13402 	to stop using printxval_long proxy and pass syscall arguments directly
   13403 	to printxval64.
   13404 
   13405 	* defs.h (printxval_long): Remove.
   13406 	* fcntl.c (print_fcntl): Replace printxval_long with printxval64.
   13407 	* mtd.c (mtd_ioctl): Likewise.
   13408 	* numa.c (SYS_FUNC(mbind)): Likewise.
   13409 	* or1k_atomic.c [OR1K] (SYS_FUNC(or1k_atomic)): Likewise.
   13410 	* sysmips.c [MIPS] (SYS_FUNC(sysmips)): Likewise.
   13411 	* term.c (term_ioctl): Likewise.
   13412 
   13413 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13414 
   13415 	Use printflags64 instead of printflags_long.
   13416 	After the change of tcb.u_arg type from long to kernel_ureg_t it is safe
   13417 	to stop using printflags_long proxy and pass syscall arguments directly
   13418 	to printflags64.
   13419 
   13420 	* defs.h (printflags_long): Remove.
   13421 	* fcntl.c (print_fcntl): Replace printflags_long with printflags64.
   13422 	* numa.c (SYS_FUNC(get_mempolicy)): Likewise.
   13423 	* perf.c (SYS_FUNC(perf_event_open)): Likewise.
   13424 	* sram_alloc.c [BFIN] (SYS_FUNC(sram_alloc)): Likewise.
   13425 
   13426 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13427 
   13428 	upeek, upoke: change argument types from long to unsigned long.
   13429 	* defs.h (upeek, upoke): Change offset argument type from long
   13430 	to unsigned long.  Change res argument type from long to kernel_ureg_t.
   13431 	* upeek.c (upeek): Likewise.
   13432 	* upoke.c (upoke.c): Likewise.
   13433 	* syscall.c (print_pc) [ARCH_PC_PEEK_ADDR]: Change pc type from long
   13434 	to kernel_ureg_t.
   13435 	* linux/aarch64/arch_regs.c (arm_sp_ptr): Remove redundant cast.
   13436 	* linux/metag/get_syscall_args.c (get_syscall_args): Likewise.
   13437 	* linux/sh/get_syscall_result.c (get_syscall_result_regs): Likewise.
   13438 	* linux/sh64/get_syscall_result.c (get_syscall_result_regs): Likewise.
   13439 	* linux/powerpc/getregs_old.c (getregs_old): Remove redundant casts.
   13440 	* linux/alpha/arch_getrval2.c (getrval2): Change r20 type from long
   13441 	to unsigned long.
   13442 	* linux/alpha/arch_regs.c (alpha_r0, alpha_a3): Change type from long
   13443 	to unsigned long.
   13444 	* linux/bfin/arch_regs.c (bfin_r0): Likewise.
   13445 	* linux/crisv10/arch_regs.c (cris_r10): Likewise.
   13446 	* linux/hppa/arch_regs.c (hppa_r28): Likewise.
   13447 	* linux/ia64/arch_regs.c (IA64_PSR_IS): Likewise.
   13448 	* linux/microblaze/arch_regs.c (microblaze_r3): Likewise.
   13449 	* linux/sh/arch_regs.c (sh_r0): Likewise.
   13450 	* linux/sh64/arch_regs.c (sh64_r9): Likewise.
   13451 	* linux/xtensa/arch_regs.c (xtensa_a2): Likewise.
   13452 	* linux/alpha/arch_sigreturn.c (arch_sigreturn): Change addr type
   13453 	from long to unsigned long.
   13454 	* linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise.
   13455 	* linux/alpha/get_scno.c (arch_get_scno): Update for the change
   13456 	of signedness.
   13457 	* linux/arc/get_syscall_args.c (get_syscall_args): Change arc_args type
   13458 	from pointer to long to pointer to unsigned long.
   13459 	* linux/arm/arch_regs.c (arm_sp_ptr): Change type from pointer to long
   13460 	to pointer to unsigned long.
   13461 	* linux/arm/arch_regs.h (arm_sp_ptr): Likewise.
   13462 	* linux/i386/arch_regs.c (i386_esp_ptr): Likewise.
   13463 	* linux/i386/arch_regs.h (i386_esp_ptr): Likewise.
   13464 	* linux/m68k/arch_regs.c (m68k_usp_ptr): Likewise.
   13465 	* linux/m68k/arch_regs.h (m68k_usp_ptr): Likewise.
   13466 	* linux/ia64/get_syscall_args.c (get_syscall_args): Use umove
   13467 	instead of umoven.
   13468 	* linux/sh/arch_getrval2.c (getrval2): Change val type from long
   13469 	to unsigned long.
   13470 
   13471 	arch_sigreturn: change tracee address type from long to unsigned long.
   13472 	* linux/arm/arch_sigreturn.c (arch_sigreturn): Change addr variable
   13473 	type from long to unsigned long.
   13474 	* linux/ia64/arch_sigreturn.c (arch_sigreturn): Likewise.
   13475 	* linux/m68k/arch_sigreturn.c (arch_sigreturn): Likewise.
   13476 	* linux/powerpc/arch_sigreturn.c (arch_sigreturn): Likewise.
   13477 	* linux/s390/arch_sigreturn.c (arch_sigreturn): Likewise.
   13478 	* linux/sparc/arch_sigreturn.c (arch_sigreturn): Likewise.
   13479 	* linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise.
   13480 	* linux/crisv10/arch_sigreturn.c (arch_sigreturn): Change the type
   13481 	of addr and regs variables from long to unsigned long.
   13482 	* linux/mips/arch_sigreturn.c (arch_sigreturn): Change addr variable
   13483 	type from long to kernel_ureg_t.
   13484 	* linux/x86_64/arch_sigreturn.c (arch_sigreturn): Change the type
   13485 	of offset and addr variables from long to kernel_ureg_t.
   13486 
   13487 	kexec: change flags type from unsigned long to kernel_ureg_t.
   13488 	* kexec.c (SYS_FUNC(kexec_load)): Change n variable type
   13489 	from unsigned long to kernel_ureg_t.  Use printxval64 instead
   13490 	of printxval_long.  Use printflags64 instead of printflags_long.
   13491 
   13492 	kexec: change types of pointers and sizes to kernel_ureg_t.
   13493 	* kexec.c (print_seg): Change the type of *seg and seg_buf variables
   13494 	from unsigned long to kernel_ureg_t.
   13495 	(print_kexec_segments): Change len argument type from unsigned long
   13496 	to kernel_ureg_t.  Change seg variable type from unsigned long
   13497 	to kernel_ureg_t.
   13498 
   13499 	printsiginfo: change len argument type from unsigned long to kernel_ureg_t
   13500 	* printsiginfo.c (print_siginfo_array): Change len argument type
   13501 	from unsigned long to kernel_ureg_t.
   13502 
   13503 	signal: change address argument type from unsigned long to kernel_ureg_t
   13504 	* signal.c (print_sigqueueinfo): Change address argument type
   13505 	from unsigned long to kernel_ureg_t.
   13506 
   13507 	statfs64: change size argument type from unsigned long to kernel_ureg_t.
   13508 	* defs.h (print_struct_statfs64): Change size argument type
   13509 	from unsigned long to kernel_ureg_t.
   13510 	* print_statfs.c (print_struct_statfs64): Likewise.
   13511 	* fetch_struct_statfs.c (fetch_struct_statfs64): Likewise.
   13512 	* fstatfs64.c (SYS_FUNC(fstatfs64)): Pass size argument directly
   13513 	to print_struct_statfs64.
   13514 	* statfs64.c (SYS_FUNC(statfs64)): Likewise.
   13515 
   13516 	Cast tcp->u_rval to kernel_ureg_t instead of unsigned long.
   13517 	* fcntl.c (print_fcntl): Cast tcp->u_rval to kernel_ureg_t instead
   13518 	of unsigned long.
   13519 	* membarrier.c (SYS_FUNC(membarrier)): Likewise.
   13520 	* prctl.c (SYS_FUNC(prctl)): Likewise.
   13521 	* sched.c (SYS_FUNC(sched_getscheduler)): Likewise.
   13522 	* time.c (do_adjtimex): Likewise.
   13523 
   13524 	decode_sockbuf: change addrlen argument type from long to kernel_ureg_t.
   13525 	* net.c (decode_sockbuf): Change addrlen argument type from long
   13526 	to kernel_ureg_t.
   13527 
   13528 	netlink: change size types from unsigned long to kernel_ureg_t.
   13529 	* defs.h (decode_netlink): Change len argument type from unsigned long
   13530 	to kernel_ureg_t.
   13531 	* netlink.c (fetch_nlmsghdr): Likewise.
   13532 	(decode_nlmsghdr_with_payload): Likewise.  Change nlmsg_len variable
   13533 	type from unsigned long to unsigned int.
   13534 	(decode_netlink): Change the type of len argument and next_len variable
   13535 	from unsigned long to kernel_ureg_t.  Change nlmsg_len variable type
   13536 	from unsigned long to unsigned int.
   13537 
   13538 	ipc_msg: change size types from unsigned long to kernel_ureg_t.
   13539 	* ipc_msg.c (tprint_msgsnd): Change count argument type
   13540 	from unsigned long to kernel_ureg_t.  Change flags argument type
   13541 	from unsigned long to unsigned int.
   13542 	(tprint_msgrcv): Change the type of count and msgtyp arguments
   13543 	from unsigned long to kernel_ureg_t.
   13544 	(fetch_msgrcv_args): Change *pair type from unsigned long
   13545 	to kernel_ureg_t.
   13546 	(SYS_FUNC(msgrcv)): Change pair type from unsigned long
   13547 	to kernel_ureg_t.
   13548 	* print_msgbuf.c (tprint_msgbuf): Change count argument type
   13549 	from unsigned long to kernel_ureg_t.
   13550 
   13551 	dumpiov_upto: change size types from unsigned long to kernel_ureg_t.
   13552 	* defs.h (dumpiov_upto): Change data_size argument type
   13553 	from unsigned long to kernel_ureg_t.
   13554 	* util.c (dumpiov_upto): Change the type of data_size argument
   13555 	and iov_len variable from unsigned long to kernel_ureg_t.
   13556 
   13557 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13558 
   13559 	msghdr: change cmsghdr size types from size_t to unsigned int.
   13560 	As the kernel does not accept control messages longer than the value
   13561 	of int sysctl_optmem_max kernel variable exported as
   13562 	/proc/sys/net/core/optmem_max, we do not print them either.
   13563 
   13564 	Since unsigned int has enough room to contain any valid control message
   13565 	size, change all internal cmsghdr size types from size_t
   13566 	to unsigned int.
   13567 
   13568 	* msghdr.c (print_scm_rights, print_scm_creds, print_scm_security,
   13569 	print_cmsg_ip_pktinfo, print_cmsg_uint, print_cmsg_uint8_t,
   13570 	print_cmsg_ip_opts, print_cmsg_ip_recverr, print_cmsg_ip_origdstaddr,
   13571 	cmsg_printer, print_cmsg_type_data): Change data_len argument type
   13572 	from size_t to unsigned int.
   13573 	(cmsg_socket_printers): Change min_len type from size_t to unsigned int.
   13574 	(decode_msg_control): Change the type of in_control_len argument,
   13575 	cmsg_len, and len variables from size_t to kernel_ureg_t.
   13576 	Change the type of cmsg_size, control_len, and buf_len variables
   13577 	from size_t to unsigned int.
   13578 
   13579 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13580 
   13581 	msghdr: change register based size types from unsigned long to kernel_ureg_t
   13582 	* defs.h (dumpiov_in_msghdr): Change data_size argument type
   13583 	from unsigned long to kernel_ureg_t.
   13584 	* msghdr.h (print_struct_msghdr): Likewise.
   13585 	* msghdr.c (print_struct_msghdr): Likewise.  Cast msghdr.msg_iovlen
   13586 	and msghdr.msg_controllen to kernel_ureg_t instead of unsigned long.
   13587 	(decode_msghdr, dumpiov_in_msghdr): Change data_size argument type
   13588 	from unsigned long to kernel_ureg_t.
   13589 	(SYS_FUNC(sendmsg)): Pass -1 instead of -1UL as data_size argument
   13590 	to decode_msghdr.
   13591 	* mmsghdr.c (print_struct_mmsghdr): Pass (kernel_ureg_t) -1 instead
   13592 	of -1UL as data_size argument to print_struct_msghdr.
   13593 	(dumpiov_in_mmsghdr): Cast msghdr.msg_iovlen to kernel_ureg_t instead
   13594 	of unsigned long.
   13595 	* syscall.c (dumpio): Pass -1 instead of -1UL as data_size argument
   13596 	to dumpiov_in_msghdr
   13597 
   13598 	mq: remove redundant u_rval check.
   13599 	* mq.c (SYS_FUNC(mq_timedreceive)): Do not check for tcp->u_rval < 0,
   13600 	syserror(tcp) is enough, and printstrn can handle len < 0 anyway.
   13601 
   13602 	io: change size types from unsigned long to kernel_ureg_t.
   13603 	* defs.h (tprint_iov_upto): Change the type of len and data_size
   13604 	arguments from unsigned long to kernel_ureg_t.
   13605 	(tprint_iov): Change the type of len argument from unsigned long
   13606 	to kernel_ureg_t.
   13607 	* io.c (print_iovec_config): Change data_size type from unsigned long
   13608 	to kernel_ureg_t.
   13609 	(print_iovec): Change the type of *iov, iov_buf, and len variables
   13610 	from unsigned long to kernel_ureg_t.
   13611 	(tprint_iov_upto): Change the type of len and data_size arguments, and
   13612 	the type of iov variable from unsigned long to kernel_ureg_t.
   13613 
   13614 	mount: change flags type from unsigned long to kernel_ureg_t.
   13615 	* mount.c (SYS_FUNC(mount)): Change the type of flags from unsigned long
   13616 	to kernel_ureg_t, use printflags64 instead of printflags_long
   13617 	to print it.
   13618 
   13619 	mem: change mmap arguments type from unsigned long to kernel_ureg_t.
   13620 	* mem.c (print_mmap): Change the type of len, prot, and flags
   13621 	from unsigned long to kernel_ureg_t.  Use printflags64 instead
   13622 	of printflags_long.  Use printxval64 instead of printxval_long.
   13623 	(SYS_FUNC(old_mmap)): Check for current_klongsize instead
   13624 	of [AARCH64 || X86_64] to take X32 into account.
   13625 	(SYS_FUNC(mremap)): Use printflags64 instead of printflags_long.
   13626 	(SYS_FUNC(remap_file_pages)): Change the type of size, prot, pgoff, and
   13627 	flags from unsigned long to kernel_ureg_t.  Use printflags64 instead
   13628 	of printflags_long.  Use printxval64 instead of printxval_long.
   13629 	[POWERPC] (SYS_FUNC(subpage_prot)): Change the type of len and nmemb
   13630 	from unsigned long to kernel_ureg_t.
   13631 
   13632 	numa: change size arguments type from unsigned long to kernel_ureg_t.
   13633 	* numa.c (print_node, print_addr): Add kernel_ureg_t support.
   13634 	(print_nodemask): Change type of maxnodes argument from unsigned long
   13635 	to kernel_ureg_t.
   13636 	(SYS_FUNC(move_pages)): Change npages type from unsigned long
   13637 	to kernel_ureg_t.  Change buf type from long to kernel_ureg_t.
   13638 
   13639 	print_sigset_addr_len: change len argument type from long to kernel_ureg_t
   13640 	* defs.h (print_sigset_addr_len): Change len argument type from long
   13641 	to kernel_ureg_t.
   13642 	* signal.c (print_sigset_addr_len_limit, print_sigset_addr_len): Likewise.
   13643 
   13644 	process_vm: change size arguments type from unsigned long to kernel_ureg_t
   13645 	* process_vm.c (SYS_FUNC(process_vm_readv),
   13646 	SYS_FUNC(process_vm_writev)): Change the type of local_iovcnt,
   13647 	remote_iovcnt, and flags from unsigned long to kernel_ureg_t.
   13648 
   13649 	printstr*: change len argument type from long to kernel_ureg_t.
   13650 	* defs.h (printstr_ex, printstrn): Change len argument type from long
   13651 	to kernel_ureg_t.
   13652 	* util.c (printstr_ex): Likewise.
   13653 
   13654 	xattr: change size arguments type from unsigned long to kernel_ureg_t.
   13655 	* xattr.c (print_xattr_val): Change type of insize and size arguments
   13656 	from unsigned long to kernel_ureg_t.
   13657 	(print_xattr_list): Change type of size argument from unsigned long
   13658 	to kernel_ureg_t.
   13659 
   13660 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13661 
   13662 	printstr_ex: fix decoding of non-NUL-terminated strings when len == -1.
   13663 	Do not treat len == -1 in any special way.  All users who need the
   13664 	string to be handled as a NUL-terminated string set QUOTE_0_TERMINATED
   13665 	bit in user_style flags already.
   13666 
   13667 	* util.c (printstr_ex): Remove (len == -1) check.
   13668 	* tests/printstr.c: New file.
   13669 	* tests/printstr.test: New test.
   13670 	* tests/.gitignore: Add printstr.
   13671 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   13672 	(DECODER_TESTS): Add printstr.test.
   13673 
   13674 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13675 
   13676 	Fix decoding of sethostname syscall.
   13677 	The second argument of sethostname syscall is not an unsigned long but
   13678 	unsigned int.  The kernel does not look at the string argument when
   13679 	the length argument is too long.
   13680 
   13681 	* hostname.c [HAVE_LINUX_UTSNAME_H]: Include <linux/utsname.h>.
   13682 	[!__NEW_UTS_LEN] (__NEW_UTS_LEN): Define.
   13683 	(SYS_FUNC(sethostname)): Treat the second argument as unsigned int.
   13684 	Print the first argument as a pointer when the second argument exceeds
   13685 	__NEW_UTS_LEN.
   13686 	* tests/sethostname.c [HAVE_LINUX_UTSNAME_H]: Include <linux/utsname.h>.
   13687 	[!__NEW_UTS_LEN] (__NEW_UTS_LEN): Define.
   13688 	(main): Use it.  Check that the second argument of sethostname
   13689 	is handled as unsigned int.  Check that the first argument is printed
   13690 	as a pointer when the second argument exceeds __NEW_UTS_LEN.
   13691 
   13692 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13693 
   13694 	tests: add F8ILL_KULONG_* and f8ill_ptr_to_kulong to tests.h.
   13695 	* tests/tests.h (F8ILL_KULONG_SUPPORTED, F8ILL_KULONG_MASK): New macros.
   13696 	(f8ill_ptr_to_kulong): New static inline function.
   13697 
   13698 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13699 
   13700 	printstr: rename to printstrn, add printstr as a thin wrapper.
   13701 	As about half of all printstr uses cases are invocations with the last
   13702 	argument set to -1, create a dedicated function for this use case.
   13703 
   13704 	* defs.h (printstr): Rename to printstrn.  All callers updated.
   13705 	(printstr): New static inline function.  All callers updated.
   13706 
   13707 2016-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   13708 
   13709 	process: change ptrace arguments type from unsigned long to kernel_ureg_t
   13710 	(SYS_FUNC(ptrace)): Change type of request and data arguments
   13711 	from unsigned long to kernel_ureg_t.
   13712 
   13713 	process: change tracee address type from unsigned long to kernel_ureg_t.
   13714 	* process.c (print_user_offset_addr): Change address argument type
   13715 	from unsigned long to kernel_ureg_t.
   13716 	(SYS_FUNC(ptrace)): Change addr variable type from unsigned long
   13717 	to kernel_ureg_t.
   13718 
   13719 	net: change address argument type from long to kernel_ureg_t.
   13720 	* net.c (decode_sockbuf, decode_pair_fd, print_linger, print_ucred,
   13721 	print_tpacket_stats, print_icmp_filter, print_getsockopt, print_mreq,
   13722 	print_mreq6, print_group_req, print_tpacket_req, print_packet_mreq,
   13723 	print_setsockopt): Change address argument type from long
   13724 	to kernel_ureg_t.
   13725 
   13726 	print_mq_attr: change address argument type from long to kernel_ureg_t.
   13727 	* print_mq_attr.c (printmqattr): Change address argument type from long
   13728 	to kernel_ureg_t.
   13729 
   13730 	ipc_*: change address argument type from long to kernel_ureg_t.
   13731 	* ipc_msg.c (tprint_msgsnd, tprint_msgrcv, fetch_msgrcv_args): Change
   13732 	address argument type from long to kernel_ureg_t.
   13733 	* ipc_msgctl.c (print_msqid_ds): Likewise.
   13734 	* ipc_sem.c (tprint_sembuf_array): Likewise.
   13735 	* ipc_shmctl.c (print_shmid_ds): Likewise.
   13736 
   13737 	print_msgbuf: change address argument type from long to kernel_ureg_t.
   13738 	* print_msgbuf.c (tprint_msgbuf): Change address argument type
   13739 	from long to kernel_ureg_t.
   13740 
   13741 	desc: change tracee address type from long to kernel_ureg_t.
   13742 	* desc.c (decode_select): Rename arg to addr, change its type
   13743 	from long to kernel_ureg_t.
   13744 
   13745 	uid: change address argument type from long to kernel_ureg_t.
   13746 	* uid.c (get_print_uid): Change address argument type
   13747 	from long to kernel_ureg_t.
   13748 
   13749 	time: change address argument type from long to kernel_ureg_t.
   13750 	* time.c (print_timezone, do_adjtimex): Change address argument type
   13751 	from long to kernel_ureg_t.
   13752 
   13753 	sched: change address argument type from long to kernel_ureg_t.
   13754 	* sched.c (print_sched_attr): Change address argument type
   13755 	from long to kernel_ureg_t.
   13756 
   13757 	printsiginfo: change address argument type from long to kernel_ureg_t.
   13758 	* printsiginfo.c (printsiginfo_at): Change address argument type
   13759 	from long to kernel_ureg_t.
   13760 
   13761 	print_timex: change address argument type from long to kernel_ureg_t.
   13762 	* print_timex.c (print_timex): Change address argument type
   13763 	from long to kernel_ureg_t.
   13764 
   13765 	print_sigevent: change address argument type from long to kernel_ureg_t.
   13766 	* print_sigevent.c (print_sigevent): Change address argument type
   13767 	from long to kernel_ureg_t.
   13768 
   13769 	poll: change address argument type from long to kernel_ureg_t.
   13770 	* poll.c (decode_poll_exiting): Change tracee address argument type
   13771 	from long to kernel_ureg_t.
   13772 
   13773 	printrusage*: change tracee address argument type from long to kernel_ureg_t
   13774 	* defs.h [ALPHA] (printrusage32): Change address argument type
   13775 	from long to kernel_ureg_t.
   13776 	* printrusage.c (printrusage): Likewise.
   13777 	[ALPHA] (printrusage32): Likewise.
   13778 	* wait.c (printwaitn): Change the type of tracee address argument
   13779 	of print_rusage from long to kernel_ureg_t.
   13780 
   13781 	print_time*: change tracee address argument type from long to kernel_ureg_t
   13782 	* defs.h [ALPHA] (sprint_timeval32, print_timeval32,
   13783 	print_timeval32_pair, print_itimerval32): Change address argument type
   13784 	from long to kernel_ureg_t.
   13785 	* desc.c (decode_select): Change the type of tracee address argument
   13786 	of print_tv_ts and sprint_tv_ts from long to kernel_ureg_t.
   13787 	* print_timespec.c (print_timespec, sprint_timespec,
   13788 	print_timespec_utime_pair, print_itimerspec): Change address argument
   13789 	type from long to kernel_ureg_t.
   13790 	* print_timeval.c (print_timeval, print_timeval_pair, sprint_timeval,
   13791 	print_itimerval, print_timeval32, print_timeval32_pair,
   13792 	print_itimerval32, sprint_timeval32): Likewise.
   13793 
   13794 	rtc: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13795 	* rtc.c (decode_rtc_time, decode_rtc_wkalrm, decode_rtc_pll_info):
   13796 	Change addr type from long to kernel_ureg_t.
   13797 	(rtc_ioctl): Change arg type from long to kernel_ureg_t.
   13798 
   13799 	mtd: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13800 	* mtd.c (decode_erase_info_user, decode_erase_info_user64,
   13801 	decode_mtd_oob_buf, decode_mtd_oob_buf64, decode_otp_info,
   13802 	decode_otp_select, decode_mtd_write_req, decode_mtd_info_user,
   13803 	decode_nand_oobinfo, decode_nand_ecclayout_user, decode_mtd_ecc_stats):
   13804 	Change addr type from long to kernel_ureg_t.
   13805 	(mtd_ioctl): Change arg type from long to kernel_ureg_t.
   13806 
   13807 	hdio: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13808 	* hdio.c (hdio_ioctl): Change arg type from long to kernel_ureg_t.
   13809 
   13810 	v4l2: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13811 	* v4l2.c (print_v4l2_capability, print_v4l2_fmtdesc, print_v4l2_format,
   13812 	print_v4l2_requestbuffers, print_v4l2_buffer, print_v4l2_framebuffer,
   13813 	print_v4l2_buf_type, print_v4l2_streamparm, print_v4l2_standard,
   13814 	print_v4l2_input, print_v4l2_control, print_v4l2_queryctrl,
   13815 	print_v4l2_cropcap, print_v4l2_crop, print_v4l2_ext_controls,
   13816 	print_v4l2_frmsizeenum, print_v4l2_frmivalenum,
   13817 	print_v4l2_create_buffers, v4l2_ioctl): Change arg type from long
   13818 	to kernel_ureg_t.
   13819 
   13820 	evdev: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13821 	* evdev.c (ff_effect_ioctl, abs_ioctl, keycode_ioctl, keycode_V2_ioctl,
   13822 	getid_ioctl, decode_bitset, mtslots_ioctl, repeat_ioctl, bit_ioctl,
   13823 	evdev_read_ioctl, evdev_write_ioctl, evdev_ioctl): Change arg type
   13824 	from long to kernel_ureg_t.
   13825 
   13826 	btrfs: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13827 	* btrfs.c (btrfs_print_balance, btrfs_ioctl): Change arg type from long
   13828 	to kernel_ureg_t.
   13829 
   13830 	block: change type of ioctl 3rd argument from long to kernel_ureg_t.
   13831 	* block.c (block_ioctl): Change arg type from long to kernel_ureg_t.
   13832 
   13833 	Change type of ioctl 3rd argument from long to kernel_ureg_t.
   13834 	* defs.h (DECL_IOCTL): Change arg type from long to kernel_ureg_t.
   13835 	* dm.c (dm_known_ioctl, dm_ioctl): Likewise.
   13836 	* file_ioctl.c (file_ioctl): Likewise.
   13837 	* fs_x_ioctl.c (fs_x_ioctl): Likewise.
   13838 	* ioctl.c (ioctl_decode): Likewise.
   13839 	* loop.c (decode_loop_info, decode_loop_info64): Change addr type
   13840 	from long to kernel_ureg_t.
   13841 	(loop_ioctl): Change arg type from long to kernel_ureg_t.
   13842 	* ptp.c (ptp_ioctl): Likewise.
   13843 	* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
   13844 	print_sg_io_v4_res, scsi_ioctl): Likewise.
   13845 	* sock.c (print_ifreq, sock_ioctl): Likewise.
   13846 	(decode_ifconf): Change addr type from long to kernel_ureg_t.
   13847 	* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
   13848 	decode_modem_flags): Likewise.
   13849 	(term_ioctl): Change arg type from long to kernel_ureg_t.
   13850 	* ubi.c (ubi_ioctl): Likewise.
   13851 	* userfaultfd.c (uffdio_ioctl): Likewise.
   13852 
   13853 	ldt: change address argument type from long to kernel_ureg_t.
   13854 	* defs.h [HAVE_STRUCT_USER_DESC] (print_user_desc): Change address
   13855 	argument type from long to kernel_ureg_t.
   13856 	* ldt.c [HAVE_STRUCT_USER_DESC] (print_user_desc): Likewise.
   13857 
   13858 	fcntl: change address argument type from long to kernel_ureg_t.
   13859 	* fcntl.c (printflock64, printflock, print_f_owner_ex): Change
   13860 	address argument type from long to kernel_ureg_t.
   13861 
   13862 	execve: change address argument type from long to kernel_ureg_t.
   13863 	* execve.c (printargv, printargc): Change address argument type
   13864 	from long to kernel_ureg_t.
   13865 
   13866 	dirent: change address argument type from long to kernel_ureg_t.
   13867 	* dirent.c (print_old_dirent): Change address argument type from long
   13868 	to kernel_ureg_t.
   13869 
   13870 	bpf: change address argument type from long to kernel_ureg_t.
   13871 	* bpf.c (bpf_map_create, bpf_map_update_elem, bpf_map_delete_elem,
   13872 	bpf_map_io, bpf_prog_load, SYS_FUNC(bpf)): Change address argument
   13873 	type from long to kernel_ureg_t.
   13874 
   13875 	dump*: change address argument type from long to kernel_ureg_t.
   13876 	* defs.h (dumpiov_in_msghdr, dumpiov_in_mmsghdr, dumpiov_upto, dumpstr):
   13877 	Change address argument type from long to kernel_ureg_t.
   13878 	* mmsghdr.c (dumpiov_in_mmsghdr): Likewise.
   13879 	* msghdr.c (fetch_msghdr_namelen, decode_msghdr, dumpiov_in_msghdr):
   13880 	Likewise.
   13881 	* util.c (dumpiov_upto, dumpstr): Likewise.
   13882 
   13883 	print_sigset_addr_len: change address argument type from long to kernel_ureg_t
   13884 	* defs.h (print_sigset_addr_len) Change address argument type from long
   13885 	to kernel_ureg_t.
   13886 	* signal.c (print_sigset_addr_len_limit, print_sigset_addr_len,
   13887 	decode_old_sigaction, decode_new_sigaction): Likewise.
   13888 
   13889 	decode_sockaddr: change address argument type from long to kernel_ureg_t
   13890 	* defs.h (decode_sockaddr) Change tracee address argument type from long
   13891 	to kernel_ureg_t.
   13892 	* sockaddr.c (decode_sockaddr): Likewise.
   13893 
   13894 	print_struct_statfs*: change address argument type from long to kernel_ureg_t
   13895 	* defs.h (print_struct_statfs, print_struct_statfs64): Change address
   13896 	argument type from long to kernel_ureg_t.
   13897 	* print_statfs.c (print_struct_statfs, print_struct_statfs64): Likewise.
   13898 	* fetch_struct_statfs.c (fetch_struct_statfs, fetch_struct_statfs64):
   13899 	Likewise.
   13900 
   13901 	fetch_struct_flock: change address argument type from long to kernel_ureg_t
   13902 	* fetch_struct_flock.c (fetch_struct_flock, fetch_struct_flock64):
   13903 	Change address argument type from long to kernel_ureg_t.
   13904 
   13905 	fetch_seccomp_fprog: change address argument type from long to kernel_ureg_t
   13906 	* fetch_seccomp_fprog.c (fetch_seccomp_fprog): Change address argument
   13907 	type from long to kernel_ureg_t.
   13908 
   13909 	printnum_*, printpair_*: change address argument type from long to kernel_ureg_t
   13910 	* defs.h (DECL_PRINTNUM, DECL_PRINTPAIR, printnum_long_int): Change
   13911 	address argument type from long to kernel_ureg_t.
   13912 	* util.c (DEF_PRINTNUM, DEF_PRINTPAIR, printnum_long_int): Likewise.
   13913 
   13914 	printpath*: change address argument type from long to kernel_ureg_t.
   13915 	* defs.h (printpath, printpathn): Change address argument type
   13916 	from long to kernel_ureg_t.
   13917 	* util.c (printpath, printpathn): Likewise.
   13918 
   13919 	printstr*: change address argument type from long to kernel_ureg_t.
   13920 	* defs.h (printstr_ex, printstr_ex): Change address argument type
   13921 	from long to kernel_ureg_t.
   13922 	* util.c (printstr_ex): Likewise.
   13923 
   13924 	umove*: change tracee address argument type from long to kernel_ureg_t.
   13925 	* defs.h (umovestr, umoven, umoven_or_printaddr,
   13926 	umoven_or_printaddr_ignore_syserror): Change tracee address argument
   13927 	type from long to kernel_ureg_t.
   13928 	(print_array): Change the type of tracee address argument of umoven_func
   13929 	from long to kernel_ureg_t.
   13930 	* util.c (vm_read_mem, umovestr, umoven, umoven_or_printaddr,
   13931 	umoven_or_printaddr_ignore_syserror): Change tracee address argument
   13932 	type from long to kernel_ureg_t.
   13933 	(print_array): Change the type of tracee address argument of umoven_func
   13934 	from long to kernel_ureg_t.
   13935 	* desc.c (umove_kulong_array_or_printaddr): Change tracee address
   13936 	argument type from long to kernel_ureg_t.
   13937 	* mmsghdr.c (fetch_struct_mmsghdr_or_printaddr): Likewise.
   13938 
   13939 	futex: change address type from long to kernel_ureg_t.
   13940 	* futex.c (SYS_FUNC(futex)): Change address type from long
   13941 	to kernel_ureg_t.
   13942 
   13943 	file_handle: change address type from long to kernel_ureg_t.
   13944 	* file_handle.c (SYS_FUNC(name_to_handle_at),
   13945 	SYS_FUNC(open_by_handle_at)): Change address type from long
   13946 	to kernel_ureg_t.
   13947 
   13948 	printsiginfo: cast pointers to kernel_ureg_t instead of unsigned long.
   13949 	* printsiginfo.c (printsigval): Cast siginfo.si_ptr pointer
   13950 	to kernel_ureg_t instead of unsigned long.
   13951 	(print_si_info): Cast siginfo.si_addr and siginfo.si_call_addr pointers
   13952 	to kernel_ureg_t instead of unsigned long.
   13953 
   13954 	sigaltstack: cast pointers and sizes to kernel_ureg_t instead of unsigned long
   13955 	* sigaltstack.c (print_stack_t): Cast sigaltstack.ss_sp pointer
   13956 	and sigaltstack.ss_size to kernel_ureg_t instead of unsigned long.
   13957 
   13958 	v4l2: cast pointers to kernel_ureg_t instead of long.
   13959 	* v4l2.c (print_v4l2_ext_control): Cast v4l2_ext_control.string pointer
   13960 	to kernel_ureg_t instead of long.
   13961 
   13962 	v4l2: cast pointers to kernel_ureg_t instead of unsigned long.
   13963 	* v4l2.c (print_v4l2_buffer): Remove redundant cast.
   13964 	(print_v4l2_framebuffer): Cast v4l2_framebuffer.base pointer
   13965 	to kernel_ureg_t instead of unsigned long.
   13966 	(print_v4l2_ext_controls): Cast v4l2_ext_controls.controls pointer
   13967 	to kernel_ureg_t instead of unsigned long.
   13968 
   13969 2016-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   13970 
   13971 	sysctl: cast pointers to kernel_ureg_t instead of size_t.
   13972 	* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldval and
   13973 	__sysctl_args.newval pointers to kernel_ureg_t instead of size_t.
   13974 
   13975 	sysctl: cast pointers to kernel_ureg_t instead of long.
   13976 	* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldlenp pointer
   13977 	to kernel_ureg_t instead of long.
   13978 
   13979 	block: cast pointers to kernel_ureg_t instead of long.
   13980 	* block.c (print_blkpg_req): Cast blkpg_ioctl_arg.data pointer
   13981 	to kernel_ureg_t instead of long.
   13982 
   13983 	dumpiov_upto: cast pointers to kernel_ureg_t instead of long.
   13984 	* util.c  (dumpiov_upto): Cast iovec.iov_base pointer to kernel_ureg_t
   13985 	instead of long.
   13986 
   13987 	msghdr: cast pointers to kernel_ureg_t instead of long.
   13988 	* msghdr.c (print_struct_msghdr): Cast msghdr.msg_name pointer
   13989 	to kernel_ureg_t instead of long.
   13990 	(dumpiov_in_msghdr): Cast msghdr.msg_iov pointer to kernel_ureg_t
   13991 	instead of long.
   13992 
   13993 	mmsghdr: cast pointers to kernel_ureg_t instead of long.
   13994 	* mmsghdr.c (dumpiov_in_mmsghdr): Cast msghdr.msg_iov pointer
   13995 	to kernel_ureg_t instead of long.
   13996 
   13997 	Remove redundant casts of ptrace arguments.
   13998 	* strace.c (maybe_switch_tcbs, trace): Do not cast ptrace 4th argument
   13999 	from pointer to long type.
   14000 
   14001 	ptrace_restart: cleanup.
   14002 	* strace.c (ptrace_restart): Replace the sequence of "if" statements
   14003 	with a "switch" statement.
   14004 
   14005 	ptrace_restart: change types of integer arguments to unsigned.
   14006 	* strace.c (ptrace_restart): Change types of "op" and "sig"
   14007 	from int to unsigned int.
   14008 
   14009 	process: remove redundant syserror checks.
   14010 	* process.c (SYS_FUNC(ptrace)): Remove syserror checks as both
   14011 	print_siginfo_array and print_seccomp_fprog do the right thing
   14012 	by using umoven_or_printaddr.
   14013 
   14014 	sparc64: remove redundant casts.
   14015 	* linux/sparc64/get_syscall_args.c (get_syscall_args): Remove
   14016 	redundant casts from uint32_t to long.
   14017 
   14018 2016-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   14019 
   14020 	numa: change address argument type from unsigned long to kernel_ureg_t.
   14021 	* numa.c (print_nodemask): Change address argument type from
   14022 	unsigned long to kernel_ureg_t.
   14023 
   14024 	net: change address argument type from unsigned long to kernel_ureg_t.
   14025 	* net.c (fetch_socklen): Change address argument type from
   14026 	unsigned long to kernel_ureg_t.
   14027 
   14028 	mem: change tracee address type from unsigned long to kernel_ureg_t.
   14029 	* mem.c (print_mmap, SYS_FUNC(remap_file_pages),
   14030 	SYS_FUNC(subpage_prot)): Change the type of variables containing tracee
   14031 	addresses from unsigned long to kernel_ureg_t.
   14032 
   14033 	kexec: change address argument type from unsigned long to kernel_ureg_t.
   14034 	* kexec.c (print_kexec_segments): Change address argument type
   14035 	from unsigned long to kernel_ureg_t.
   14036 
   14037 	poll: change counter type from unsigned long to unsigned int.
   14038 	* poll.c (decode_poll_exiting): Change the type of printed and
   14039 	max_printed counters from unsigned long to unsigned int.
   14040 
   14041 	xattr: change address argument type from unsigned long to kernel_ureg_t.
   14042 	* xattr.c (print_xattr_val, print_xattr_list): Change address
   14043 	argument type from unsigned long to kernel_ureg_t.
   14044 
   14045 	uid: change address argument type from unsigned long to kernel_ureg_t.
   14046 	* uid.c (print_groups): Change address argument type
   14047 	from unsigned long to kernel_ureg_t.
   14048 
   14049 	stat64: change address argument type from unsigned long to kernel_ureg_t
   14050 	* stat64.c (decode_struct_stat64): Change address argument type
   14051 	from unsigned long to kernel_ureg_t.
   14052 
   14053 	stat: change address argument type from unsigned long to kernel_ureg_t.
   14054 	* stat.c (decode_struct_stat): Change address argument type
   14055 	from unsigned long to kernel_ureg_t.
   14056 
   14057 	sigaltstack: change address argument type from unsigned long to kernel_ureg_t
   14058 	* sigaltstack.c (print_stack_t): Change address argument type
   14059 	from unsigned long to kernel_ureg_t.
   14060 
   14061 	resource: change address argument type from unsigned long to kernel_ureg_t
   14062 	* resource.c (print_rlimit64, print_rlimit32, decode_rlimit): Change
   14063 	address argument type from unsigned long to kernel_ureg_t.
   14064 
   14065 	printsiginfo: change address argument type from unsigned long to kernel_ureg_t
   14066 	* printsiginfo.c (print_siginfo_array): Change address argument type
   14067 	from unsigned long to kernel_ureg_t.
   14068 
   14069 	poll: change tracee address type from unsigned long to kernel_ureg_t.
   14070 	* poll.c (decode_poll_entering, decode_poll_exiting): Change the type
   14071 	all tracee address variables from unsigned long to kernel_ureg_t.
   14072 
   14073 	perf: change address argument type from unsigned long to kernel_ureg_t.
   14074 	* perf.c (fetch_perf_event_attr, print_perf_event_attr): Change
   14075 	address argument type from unsigned long to kernel_ureg_t.
   14076 
   14077 	pathtrace: change tracee address type from unsigned long to kernel_ureg_t
   14078 	* pathtrace.c (upathmatch): Change address argument type
   14079 	from unsigned long to kernel_ureg_t.
   14080 	(pathtrace_match): Change the type of all tracee address variables
   14081 	from unsigned long to kernel_ureg_t.
   14082 
   14083 	scsi: change address argument type from unsigned long to kernel_ureg_t.
   14084 	* scsi.c (print_sg_io_buffer): Change address argument type
   14085 	from unsigned long to kernel_ureg_t.
   14086 
   14087 	dm: change address argument type from unsigned long to kernel_ureg_t.
   14088 	* dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps,
   14089 	dm_decode_dm_name_list, dm_decode_dm_target_versions,
   14090 	dm_decode_dm_target_msg, dm_decode_string): Change address argument type
   14091 	from unsigned long to kernel_ureg_t.
   14092 
   14093 	oldstat: change address argument type from unsigned long to kernel_ureg_t
   14094 	* oldstat.c (print_old_kernel_stat): Change address argument type
   14095 	from unsigned long to kernel_ureg_t.
   14096 
   14097 	capability: change address argument type from unsigned long to kernel_ureg_t
   14098 	* capability.c (get_cap_header, print_cap_header, print_cap_data):
   14099 	Change address argument type from unsigned long to kernel_ureg_t.
   14100 
   14101 	btrfs: change address argument type from unsigned long to kernel_ureg_t.
   14102 	* btrfs.c (btrfs_print_qgroup_inherit): Change address argument type
   14103 	from unsigned long to kernel_ureg_t.
   14104 
   14105 	affinity: change address argument type from unsigned long to kernel_ureg_t
   14106 	* affinity.c (print_affinitylist): Change address argument type from
   14107 	unsigned long to kernel_ureg_t.
   14108 
   14109 	aio: change address type from unsigned long to kernel_ureg_t.
   14110 	* aio.c (print_iocb): Remove casts to unsigned long.
   14111 	(print_iocbp,  SYS_FUNC(io_submit)): Change address type
   14112 	from unsigned long to kernel_ureg_t.
   14113 
   14114 	mmsghdr: change address argument type from unsigned long to kernel_ureg_t
   14115 	* mmsghdr.c (save_mmsgvec_namelen, decode_mmsgvec): Change
   14116 	address argument type from unsigned long to kernel_ureg_t.
   14117 
   14118 	msghdr: change address argument type from unsigned long to kernel_ureg_t
   14119 	* msghdr.c (decode_msg_control): Change address argument type
   14120 	from unsigned long to kernel_ureg_t.
   14121 
   14122 	fetch_struct_stat64: change address argument type from unsigned long to kernel_ureg_t
   14123 	* fetch_struct_stat64.c (fetch_struct_stat64): Change address argument
   14124 	type from unsigned long to kernel_ureg_t.
   14125 
   14126 	fetch_struct_stat: change address argument type from unsigned long to kernel_ureg_t
   14127 	* fetch_struct_stat.c (fetch_struct_stat): Change address argument
   14128 	type from unsigned long to kernel_ureg_t.
   14129 
   14130 	fetch_struct_msghdr: change address argument type from unsigned long to kernel_ureg_t
   14131 	* fetch_struct_msghdr.c (fetch_struct_msghdr): Change
   14132 	address argument type from unsigned long to kernel_ureg_t.
   14133 
   14134 	fetch_struct_mmsghdr: change address argument type from unsigned long to kernel_ureg_t
   14135 	* fetch_struct_mmsghdr.c (fetch_struct_mmsghdr): Change
   14136 	address argument type from unsigned long to kernel_ureg_t.
   14137 
   14138 	decode_netlink: change address argument type from unsigned long to kernel_ureg_t
   14139 	* defs.h (decode_netlink) Change address argument type
   14140 	from unsigned long to kernel_ureg_t.
   14141 	* netlink.c (fetch_nlmsghdr, decode_nlmsghdr_with_payload,
   14142 	decode_netlink): Likewise.
   14143 
   14144 	print_seccomp_*: change address argument type from unsigned long to kernel_ureg_t
   14145 	* defs.h (print_seccomp_filter, print_seccomp_fprog): Change
   14146 	address argument type from unsigned long to kernel_ureg_t.
   14147 	* seccomp.c (print_seccomp_filter, print_seccomp_fprog,
   14148 	decode_seccomp_set_mode_strict): Likewise.
   14149 
   14150 	tprint_iov*: change address argument type from unsigned long to kernel_ureg_t
   14151 	* defs.h (tprint_iov, tprint_iov_upto): Change address argument type
   14152 	from unsigned long to kernel_ureg_t.
   14153 	* io.c (tprint_iov, tprint_iov_upto): Likewise.
   14154 
   14155 	print_array: change tracee address type from unsigned long to kernel_ureg_t
   14156 	* defs.h (print_array): Change start_addr type from unsigned long
   14157 	to kernel_ureg_t.
   14158 	* util.c (print_array): Likewise.  Change the type of all tracee
   14159 	address variables from unsigned long to kernel_ureg_t.
   14160 
   14161 2016-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   14162 
   14163 	Rename LONG_LONG to ULONG_LONG and change it to return unsigned long long
   14164 	In all places where LONG_LONG is used the destination already has type
   14165 	unsigned long long, so it is quite natural to change LONG_LONG as well.
   14166 
   14167 	* defs.h (LONG_LONG): Rename to ULONG_LONG, change return type
   14168 	from long long to unsigned long long.  All callers updated.
   14169 
   14170 2016-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   14171 
   14172 	mem: remove redundant casts.
   14173 	* mem.c (SYS_FUNC(old_mmap)): Remove redundant cast
   14174 	from kernel_ureg_t to unsigned long.
   14175 	[S390] (SYS_FUNC(old_mmap_pgoff)): Remove redundant cast
   14176 	from unsigned int to unsigned long.
   14177 
   14178 	desc: remove redundant casts.
   14179 	* desc.c (umove_kulong_array_or_printaddr): Remove redundant cast
   14180 	from uint32_t to kernel_ulong_t.
   14181 	(SYS_FUNC(pselect6)): Remove redundant casts from kernel_ulong_t
   14182 	to unsigned long.
   14183 
   14184 2016-12-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   14185 
   14186 	print_sigevent: remove redundant cast.
   14187 	* print_sigevent.c (print_sigevent): Remove redundant cast from
   14188 	struct_sigevent.sigev_value.sival_ptr to unsigned long as the former
   14189 	is not a pointer but an unsigned integer.
   14190 
   14191 	tests: fix xattr.test for the case when listxattr returns a long list.
   14192 	* tests/xattr.c (DEFAULT_STRLEN): New macro.
   14193 	(main): Use it to limit the length passed to print_quoted_memory.
   14194 	Print ellipsis when the list returned by listxattr is too long.
   14195 
   14196 2016-12-22  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   14197 
   14198 	tests: test for correct ellipsis with -s in xattr.
   14199 	* tests/xattr-strings.c: New file.
   14200 	* tests/xattr-strings.test: New test.
   14201 	* tests/.gitignore: Add xattr-string.
   14202 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   14203 	(DECODER_TESTS): Add xattr-string.test.
   14204 
   14205 2016-12-22  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   14206 
   14207 	xattr: use printstr_ex instead of print_quoted_string.
   14208 	This fixes the display when using `-s` to limit the string size
   14209 	of the values displayed by {get,set}xattr.
   14210 
   14211 	* xattr.c (print_xattr_val): Remove static buffer.  Use printstr_ex
   14212 	instead of print_quoted_string.
   14213 
   14214 	Reported-by:   <socketpair (a] gmail.com>
   14215 
   14216 2016-12-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14217 
   14218 	tests: use scno.h in finit_module, kcmp, renameat2 tests.
   14219 	* tests/finit_module.c: Include "scno.h".
   14220 	* tests/kcmp.c: Likewise.
   14221 	* tests/renameat2.c: Likewise.
   14222 
   14223 2016-12-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   14224 
   14225 	sock: cast pointers to kernel_ureg_t instead of unsigned long.
   14226 	* sock.c (decode_ifconf): Cast ifconf.ifc_buf pointer to kernel_ureg_t
   14227 	instead of unsigned long.
   14228 
   14229 	scsi: cast pointers to kernel_ureg_t instead of unsigned long.
   14230 	* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res): Cast sg_io_hdr.cmdp,
   14231 	sg_io_hdr.dxferp, and sg_io_hdr.sbp pointers to kernel_ureg_t instead
   14232 	of unsigned long.
   14233 
   14234 	mtd: cast pointers to kernel_ureg_t instead of unsigned long.
   14235 	* mtd.c (decode_mtd_oob_buf): Cast mtd_oob_buf.ptr pointer
   14236 	to kernel_ureg_t instead of unsigned long.
   14237 
   14238 	msghdr: cast pointers to kernel_ureg_t instead of unsigned long.
   14239 	* msghdr.c (print_struct_msghdr): Cast msghdr.msg_iov and
   14240 	msghdr.msg_control pointers to kernel_ureg_t instead of unsigned long.
   14241 
   14242 	evdev: cast tcp->u_rval to kernel_ureg_t instead of unsigned long.
   14243 	* evdev.c (decode_bitset): Cast tcp->u_rval to kernel_ureg_t
   14244 	instead of unsigned long.
   14245 
   14246 	evdev: cast pointers to kernel_ureg_t instead of unsigned long.
   14247 	* evdev.c (ff_effect_ioctl): Cast ff_periodic_effect.custom_data
   14248 	pointer to kernel_ureg_t instead of unsigned long.
   14249 
   14250 	btrfs: cast pointers to kernel_ureg_t instead of unsigned long.
   14251 	* btrfs.c (btrfs_ioctl): Cast btrfs_ioctl_send_args.clone_sources
   14252 	and btrfs_ioctl_vol_args_v2.qgroup_inherit pointers to kernel_ureg_t
   14253 	instead of unsigned long.
   14254 
   14255 	Rework ifdefery around print_user_desc.
   14256 	* configure.ac (AC_CHECK_TYPES): Check for struct user_desc
   14257 	in <asm/ldt.h>.
   14258 	* clone.c (print_tls_arg): New function.
   14259 	(SYS_FUNC(clone)): Use it.
   14260 	(print_user_desc): Move prototype ...
   14261 	* defs.h [HAVE_STRUCT_USER_DESC]: ... here.
   14262 	* ldt.c: Check for HAVE_STRUCT_USER_DESC instead of architectures.
   14263 	* linux/dummy.h: Likewise.
   14264 
   14265 	Introduce DECL_IOCTL macro to declare *_ioctl functions.
   14266 	* defs.h (DECL_IOCTL): New macro.
   14267 	(dm_ioctl, file_ioctl, fs_x_ioctl, loop_ioctl, ptp_ioctl, scsi_ioctl,
   14268 	sock_ioctl, term_ioctl, ubi_ioctl, uffdio_ioctl): Rewrite prototypes
   14269 	using DECL_IOCTL.
   14270 
   14271 	Introduce DECL_PRINT* macros to declare printnum_* and printpair_*
   14272 	* defs.h (DECL_PRINTNUM, DECL_PRINTPAIR): New macros.
   14273 	(printnum_short, printnum_int, printnum_int64): Rewrite prototypes
   14274 	using DECL_PRINTNUM.
   14275 	(printpair_int, printpair_int64): Rewrite prototypes
   14276 	using DECL_PRINTPAIR.
   14277 
   14278 	ioctl: use uintptr_t for casts between 32-bit integers and pointers.
   14279 	* ioctl.c (compare): Cast pointer to uintptr_t before assigning
   14280 	it to an integer.
   14281 	(ioctl_lookup): Cast integer to uintptr_t before passing it
   14282 	as a pointer.
   14283 
   14284 	scsi: use umove_or_printaddr.
   14285 	* scsi.c (scsi_ioctl): Use umove_or_printaddr.
   14286 
   14287 	Remove dumpiov wrapper.
   14288 	* defs.h (dumpiov): Remove.
   14289 	* syscall.c (dumpio): Use dumpiov_upto instead of dumpiov.
   14290 
   14291 	travis: fix enabling of gcc -Werror builds.
   14292 	* travis-build.sh: Use DISTCHECK_CONFIGURE_FLAGS instead
   14293 	of CHECK_CONFIGURE_FLAGS and ENABLE_GCC_WERROR.
   14294 	[$CC == gcc]: Add --enable-gcc-Werror to DISTCHECK_CONFIGURE_FLAGS
   14295 	instead of ENABLE_GCC_WERROR.
   14296 	[$CHECK == coverage]: Add --enable-code-coverage
   14297 	to DISTCHECK_CONFIGURE_FLAGS instead of CHECK_CONFIGURE_FLAGS.
   14298 
   14299 	printaddr: change argument type to kernel_ureg_t.
   14300 	* defs.h (printaddr): Change argument type from unsigned long
   14301 	to kernel_ureg_t.
   14302 
   14303 	tests: check decoding of unreadable ip_mreq and ipv6_mreq structures.
   14304 	* tests/ip_mreq.c (main): Check short read.
   14305 
   14306 	tests: rewrite ip_mreq.c using arrays and iterators.
   14307 	* tests/ip_mreq.c (main): Create arrays of setsockopt arguments to test.
   14308 	Iterate over these arrays invoking setsockopt and printing expected
   14309 	output.
   14310 
   14311 	tests: rewrite ip_mreq.c using tail_alloc.
   14312 	* tests/ip_mreq.c (main): Allocate objects of struct ip_mreq
   14313 	and struct ipv6_mreq using tail_alloc instead of using stack.
   14314 
   14315 	tests: rewrite ip_mreq.c without asserts.
   14316 	* tests/ip_mreq.c: Do not include <assert.h>.
   14317 	(main): Do not use assert.  Use sprintrc instead of errno2name.
   14318 
   14319 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14320 
   14321 	Remove NEED_PTRACE_PROTOTYPE_WORKAROUND.
   14322 	Remove the workaround for broken ptrace prototypes
   14323 	that seems to be unneeded for quite a long time.
   14324 
   14325 	* defs.h [NEED_PTRACE_PROTOTYPE_WORKAROUND]: Remove.
   14326 
   14327 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14328 
   14329 	tests: use scno.h in tests of relatively new syscalls.
   14330 	* tests/add_key.c: Include "scno.h" after <asm/unistd.h>.
   14331 	* tests/copy_file_range.c: Likewise.
   14332 	* tests/execveat.c: Likewise.
   14333 	* tests/kexec_file_load.c: Likewise.
   14334 	* tests/membarrier.c: Likewise.
   14335 	* tests/memfd_create.c: Likewise.
   14336 	* tests/mlock2.c: Likewise.
   14337 	* tests/pkey_alloc.c: Likewise.
   14338 	* tests/pkey_free.c: Likewise.
   14339 	* tests/pkey_mprotect.c: Likewise.
   14340 	* tests/preadv2-pwritev2.c: Likewise.
   14341 	* tests/userfaultfd.c: Likewise.
   14342 
   14343 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14344 
   14345 	tests: generate scno.h from syscallent.h for use by other tests.
   14346 	Provide scno.h with fallback definitions of all __NR_* constants known
   14347 	to strace for the personbality being tested.
   14348 
   14349 	Some tests need just __NR_* constants without any kernel support.
   14350 	Such tests can include "scno.h" after <asm/unistd.h> to get definitions
   14351 	of these constants when system headers are too old.
   14352 
   14353 	* tests/generate_scno.c: New file.
   14354 	* tests/.gitignore: Add generate_scno.
   14355 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   14356 	(scno.h): New rule.
   14357 	(BUILT_SOURCES, CLEANFILES): Add scno.h.
   14358 
   14359 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14360 
   14361 	tests: fix potential errno clobbering in membarrier test.
   14362 	* tests/membarrier.c (main): Save errno.
   14363 
   14364 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14365 
   14366 	Do not use widen_to_ulong in kexec.c and process_vm.c.
   14367 	Automatic argument truncation makes use of this function redundant.
   14368 
   14369 	* kexec.c (SYS_FUNC(kexec_load)): Do not invoke widen_to_ulong.
   14370 	* process_vm.c (SYS_FUNC(process_vm_readv),
   14371 	SYS_FUNC(process_vm_writev)): Likewise.
   14372 
   14373 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14374 
   14375 	x32: implement automatic argument truncation for compat syscalls.
   14376 	x32 syscalls starting with number 512 are compat syscalls that operate
   14377 	on compat types.  Set COMPAT_SYSCALL_TYPES flag to these syscall entries
   14378 	and make get_syscall_args truncate arguments of syscalls that have this
   14379 	flag set, to avoid unpleasant alternative of adding multiple
   14380 	widen_to_ulong invocations to individual syscall parsers.
   14381 
   14382 	preadv, pwritev, preadv2, and pwritev2 are exceptions: while these
   14383 	syscalls operate on compat types, the offset argument has a regular
   14384 	64-bit type, so the automatic argument truncation cannot be applied.
   14385 
   14386 	* defs.h (COMPAT_SYSCALL_TYPES): New macro.
   14387 	* syscall.c (CST): New macro, defined to COMPAT_SYSCALL_TYPES.
   14388 	* linux/ia64/syscallent.h: Do not include "../i386/syscallent.h"
   14389 	unless [CST > 0].
   14390 	* linux/x32/syscallent.h [512..533, 536..545]: Add CST flag.
   14391 	* linux/x86_64/get_syscall_args.c (get_syscall_args): Truncate arguments
   14392 	of compat syscalls to 32-bit values.
   14393 	* tests/ksysent.c (CST): New macro, defined to 0.
   14394 	* tests/nsyscalls.c (CST): Likewise.
   14395 
   14396 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14397 
   14398 	x32: fix decoding of mprotect and pkey_mprotect syscall arguments.
   14399 	As there are no compat versions of mprotect or pkey_mprotect syscalls
   14400 	in x32 personality, "addr", "len", and "prot" syscall arguments have
   14401 	kernel_ulong_t type and should be printed accordingly.
   14402 
   14403 	* mem.c (do_mprotect): Retrieve 1st, 2nd and 3rd arguments using
   14404 	getarg_klu, print them using printaddr_klu, PRI_klu format,
   14405 	and printflags64, correspondingly.
   14406 
   14407 2016-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   14408 
   14409 	Make tprint_iov function a static inline wrapper.
   14410 	* io.c (tprint_iov): Move ...
   14411 	* defs.h: ... here, add static inline keywords.
   14412 
   14413 2016-12-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14414 
   14415 	x32: fix decoding of 3rd argument of preadv* and pwritev* syscalls.
   14416 	In x32 personality these syscalls use compat type for the 3rd argument,
   14417 	therefore it has to be truncated there.
   14418 
   14419 	* io.c (do_preadv, do_pwritev): Truncate tcp->u_arg[2] using
   14420 	widen_to_ulong.
   14421 
   14422 2016-12-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14423 
   14424 	tests: fix preadv2-pwritev2 test on x32.
   14425 	On x32 p(read|write)v(|2) syscalls are implemented via compat, which
   14426 	truncates len argument to unsigned int.
   14427 
   14428 	* tests/preadv2-pwritev2.c (main): Print vlen argument as unsigned long.
   14429 
   14430 2016-12-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14431 
   14432 	kexec: fix for the x32 ABI.
   14433 	There is no compat (and no 32-bit version, ever) for x32 ABI, so
   14434 	kernel's long type should be used for arguments' values.
   14435 
   14436 	The only remaining thing is a pointer to cmdline string, but it is
   14437 	currently broken on x32 anyway.
   14438 
   14439 	* kexec.c (SYS_FUNC(kexec_file_load)): Print the cmdline_len argument
   14440 	as kernel long, retrieve it via getarg_klu; use printflags64 for
   14441 	printing the flags argument, retrieve it via getarg_klu.
   14442 
   14443 2016-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   14444 
   14445 	Check for current_klongsize instead of current_personality where appropriate
   14446 	current_klongsize checks are more universal, therefore they are usually
   14447 	shorter and easier to comprehend.
   14448 
   14449 	* desc.c (umove_kulong_array_or_printaddr): Check for current_klongsize
   14450 	instead of current_personality and current_wordsize.
   14451 	* io.c (print_lld_from_low_high_val): Likewise.
   14452 	* lseek.c (SYS_FUNC(lseek)): Likewise.
   14453 	* resource.c (decode_rlimit): Likewise.
   14454 	* syscall.c (is_negated_errno): Likewise.
   14455 	* util.c (getllval, getarg_klu): Likewise.
   14456 
   14457 2016-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   14458 
   14459 	Use kernel_ulong_t instead of unsigned long long where appropriate.
   14460 	* defs.h (printaddr_ull): Rename to printaddr_klu, change argument
   14461 	type from unsigned long long to kernel_ulong_t.  All callers updated.
   14462 	(getarg_ull): Rename to getarg_klu, change return value type
   14463 	from unsigned long long to kernel_ulong_t.  All callers updated.
   14464 	(PRI_kl, PRI_kld, PRI_klu, PRI_klx): New macros.
   14465 	* bjm.c (SYS_FUNC(init_module)): Print kernel_ulong_t type using
   14466 	PRI_klu format.
   14467 	* desc.c (SYS_FUNC(pselect6)): Likewise.
   14468 	* fadvise.c (SYS_FUNC(fadvise64)): Likewise.
   14469 	* lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Likewise.
   14470 	* mq.c (SYS_FUNC(mq_timedsend), SYS_FUNC(mq_timedreceive)): Likewise.
   14471 	* kcmp.c (SYS_FUNC(kcmp)): Print kernel_ulong_t type using
   14472 	PRI_klx format.
   14473 	* keyctl.c (SYS_FUNC(keyctl)): Likewise.
   14474 	* pkeys.c (SYS_FUNC(pkey_alloc)): Likewise.
   14475 	* prctl.c (print_prctl_args, SYS_FUNC(prctl), SYS_FUNC(arch_prctl)):
   14476 	Print kernel_ulong_t type using PRI_kld, PRI_klu, or PRI_klx format.
   14477 	* util.c (printaddr_ull): Rename to printaddr_klu, change argument
   14478 	type from unsigned long long to kernel_ulong_t, print it using
   14479 	PRI_klx format.
   14480 	(getarg_ull): Rename to getarg_klu, change return value type
   14481 	from unsigned long long to kernel_ulong_t, print it using
   14482 	PRI_klx format.
   14483 
   14484 	fcntl.c: print 64-bit fields of struct_kernel_flock64 using PRId64 format
   14485 	* fcntl.c (print_struct_flock64): Print l_start and l_len fields
   14486 	of struct_kernel_flock64 using PRId64 format.
   14487 
   14488 	v4l2.c: print v4l2_ext_control.value64 using PRId64 format.
   14489 	* v4l2.c (print_v4l2_ext_control): Print value64 field
   14490 	of struct_v4l2_ext_control using PRId64 format.
   14491 
   14492 	perf.c: print perf_event_attr.__reserved_1 using PRIx64 format.
   14493 	* perf.c (print_perf_event_attr): Print __reserved_1 field
   14494 	of perf_event_attr using PRIx64 format.
   14495 
   14496 	btrfs.c: print 64-bit fields of btrfs_ioctl_vol_args_v2 using PRIu64 format
   14497 	* block.c (btrfs_ioctl): Print size and transid fields
   14498 	of struct_btrfs_ioctl_vol_args_v2 using PRIu64 format.
   14499 
   14500 	block.c: change type of long long fileds to int64_t.
   14501 	* block.c (struct_blkpg_partition): Change type of start and length
   14502 	fields from long long to int64_t.
   14503 	(print_blkpg_req): Print them using PRId64 format.
   14504 
   14505 2016-12-19  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14506 
   14507 	Introduce current_klongsize in addition to current_wordsize.
   14508 	Subsequent commits are going to use current_klongsize
   14509 	as the tracee's size of kernel_ulong_t type.
   14510 
   14511 	* defs.h (PERSONALITY0_KLONGSIZE): New macro.
   14512 	[X86_64] (PERSONALITY2_KLONGSIZE): Likewise.
   14513 	[SUPPORTED_PERSONALITIES > 1] (PERSONALITY1_KLONGSIZE): Likewise.
   14514 	[SUPPORTED_PERSONALITIES == 1] (current_klongsize): Likewise.
   14515 	[SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE ==
   14516 	PERSONALITY1_KLONGSIZE] (current_klongsize): Likewise.
   14517 	[SUPPORTED_PERSONALITIES != 1 && (SUPPORTED_PERSONALITIES != 2 ||
   14518 	PERSONALITY0_KLONGSIZE != PERSONALITY1_KLONGSIZE)] (current_klongsize):
   14519 	New variable prototype.
   14520 	* syscall.c [!current_klongsize] (current_klongsize): New variable.
   14521 	[!current_klongsize] (personality_klongsize): New array.
   14522 	(set_personality) [!current_klongsize]: Update current_klongsize
   14523 	with the appropriate value from personality_klongsize.
   14524 
   14525 2016-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   14526 
   14527 	configure: define SIZEOF_KERNEL_LONG_T macro.
   14528 	Provide SIZEOF_KERNEL_LONG_T macro in addition to SIZEOF_LONG and
   14529 	SIZEOF_LONG_LONG for checking of kernel_long_t and kernel_ulong_t
   14530 	types at the time of preprocessing.
   14531 
   14532 	* configure.ac (AC_CHECK_SIZEOF): Add kernel_long_t.
   14533 
   14534 2016-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   14535 
   14536 	Remove getarg_ll.
   14537 	This function has never been used in the code, and in perspective
   14538 	the whole ext_arg thing will go away.
   14539 
   14540 	* defs.h (getarg_ll): Remove prototype.
   14541 	* util.c (getarg_ll): Remove.
   14542 
   14543 2016-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   14544 
   14545 	struct tcb: make types of syscall arguments unsigned.
   14546 	This is the first step in the direction of revisiting current practice
   14547 	of indiscriminate use of signed types for syscall arguments and memory
   14548 	addresses.
   14549 
   14550 	* kernel_types.h (kernel_ureg_t): New type, typedef to unsigned long.
   14551 	* defs.h (struct tcb): Change type of u_arg from long to kernel_ureg_t.
   14552 	[HAVE_STRUCT_TCB_EXT_ARG]: Change type of ext_arg from long long
   14553 	to unsigned long long.
   14554 	* desc.c (decode_select): Change type of syscall arguments from long
   14555 	to kernel_ureg_t.
   14556 	(SYS_FUNC(oldselect)): Change type of select_args from long
   14557 	to kernel_ureg_t.
   14558 	* io.c (print_lld_from_low_high_val): Remove no longer needed cast
   14559 	of syscall arguments to unsigned long.
   14560 	* lseek.c (SYS_FUNC(lseek)): Cast syscall argument from unsigned long
   14561 	to long.
   14562 	* mem.c (print_mmap): Change type of syscall arguments from long
   14563 	to kernel_ureg_t.
   14564 	(SYS_FUNC(old_mmap), SYS_FUNC(old_mmap_pgoff)): Change type of u_arg
   14565 	from long to kernel_ureg_t.
   14566 	(SYS_FUNC(mmap), SYS_FUNC(mmap_pgoff), SYS_FUNC(mmap_pgoff)): Remove
   14567 	no longer needed cast of syscall arguments to unsigned long.
   14568 	* pathtrace.c (pathtrace_match): Change type of args and select_args
   14569 	from long to kernel_ureg_t.
   14570 	* util.c (getarg_ull): Remove no longer needed casts of syscall
   14571 	arguments to unsigned types.
   14572 
   14573 2016-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   14574 
   14575 	s390: fix decoding of mmap2 syscall when arguments are not available.
   14576 	* mem.c [S390] (SYS_FUNC(old_mmap_pgoff)): Use umove_or_printaddr
   14577 	instead of umoven to fetch mmap arguments, fix return value when this
   14578 	fetch fails.
   14579 
   14580 	Fix pathmatch of oldselect syscall on 64-bit architectures.
   14581 	* pathtrace.c (pathtrace_match): Fix fetching of 32-bit oldselect
   14582 	arguments on 64-bit architectures.
   14583 
   14584 	Cleanup oldselect.
   14585 	* desc.c (SYS_FUNC(oldselect)): Rewrite without use of macros.
   14586 
   14587 2016-12-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   14588 
   14589 	Change scno type from long to unsigned long.
   14590 	Use an unsigned type for syscall numbers as they are not intended
   14591 	for signed arithmetics.  Introduce kernel_scno_t as a typedef
   14592 	to unsigned long, that could be changed later to kernel_ulong_t.
   14593 
   14594 	* kernel_types.h (kernel_scno_t): New type, typedef to unsigned long.
   14595 	* defs.h (struct tcb): Change type of scno field from long
   14596 	to kernel_scno_t.
   14597 	(syscall_name): Change argument type from long to kernel_scno_t.
   14598 	(scno_in_range, scno_is_valid): Change argument type from unsigned long
   14599 	to kernel_scno_t.
   14600 	* linux/aarch64/set_scno.c (arch_set_scno): Change scno argument type
   14601 	from long to kernel_scno_t.
   14602 	* linux/alpha/set_scno.c (arch_set_scno): Likewise.
   14603 	* linux/arc/set_scno.c (arch_set_scno): Likewise.
   14604 	* linux/arm/set_scno.c (arch_set_scno): Likewise.
   14605 	* linux/avr32/set_scno.c (arch_set_scno): Likewise.
   14606 	* linux/bfin/set_scno.c (arch_set_scno): Likewise.
   14607 	* linux/crisv10/set_scno.c (arch_set_scno): Likewise.
   14608 	* linux/hppa/set_scno.c (arch_set_scno): Likewise.
   14609 	* linux/i386/set_scno.c (arch_set_scno): Likewise.
   14610 	* linux/ia64/set_scno.c (arch_set_scno): Likewise.
   14611 	* linux/m68k/set_scno.c (arch_set_scno): Likewise.
   14612 	* linux/metag/set_scno.c (arch_set_scno): Likewise.
   14613 	* linux/microblaze/set_scno.c (arch_set_scno): Likewise.
   14614 	* linux/mips/set_scno.c (arch_set_scno): Likewise.
   14615 	* linux/nios2/set_scno.c (arch_set_scno): Likewise.
   14616 	* linux/or1k/set_scno.c (arch_set_scno): Likewise.
   14617 	* linux/powerpc/set_scno.c (arch_set_scno): Likewise.
   14618 	* linux/riscv/set_scno.c (arch_set_scno): Likewise.
   14619 	* linux/s390/set_scno.c (arch_set_scno): Likewise.
   14620 	* linux/sh/set_scno.c (arch_set_scno): Likewise.
   14621 	* linux/sh64/set_scno.c (arch_set_scno): Likewise.
   14622 	* linux/sparc/set_scno.c (arch_set_scno): Likewise.
   14623 	* linux/tile/set_scno.c (arch_set_scno): Likewise.
   14624 	* linux/x86_64/set_scno.c (arch_set_scno): Likewise.
   14625 	* linux/xtensa/set_scno.c (arch_set_scno): Likewise.
   14626 	* linux/aarch64/get_scno.c (arch_get_scno): Change scno variable type
   14627 	from long to kernel_scno_t.
   14628 	* linux/alpha/get_scno.c (arch_get_scno): Likewise.
   14629 	* linux/arm/get_scno.c (arch_get_scno): Likewise.
   14630 	* linux/sh/get_scno.c (arch_get_scno): Likewise.
   14631 	* linux/x86_64/get_scno.c (arch_get_scno): Likewise.
   14632 	* syscall.c (arch_set_scno): Likewise.
   14633 	(shuffle_scno): Change return type from long to kernel_scno_t.
   14634 	(syscall_name): Change argument type from long to kernel_scno_t.
   14635 
   14636 2016-12-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   14637 
   14638 	Lowercase SCNO_IN_RANGE and SCNO_IS_VALID.
   14639 	* defs.h (SCNO_IN_RANGE): Rename to scno_in_range.  All callers updated.
   14640 	(SCNO_IS_VALID): Rename to scno_is_valid.  All callers updated.
   14641 
   14642 	Turn SCNO_IN_RANGE and SCNO_IS_VALID into static inline functions.
   14643 	* defs.h (SCNO_IN_RANGE, SCNO_IS_VALID): Transform into static inline
   14644 	functions.
   14645 
   14646 	count.c: use syserror instead of direct u_error access.
   14647 	* count.c (count_syscall): Use syserror instead of u_error.
   14648 
   14649 	Replace "(unsigned long) -1L" with -1UL.
   14650 	* defs.h (dumpiov): Replace "(unsigned long) -1L" with -1UL.
   14651 	* io.c (print_iovec, tprint_iov): Likewise.
   14652 	* msghdr.c (SYS_FUNC(sendmsg)): Likewise.
   14653 	* syscall.c (dumpio): Likewise.
   14654 	* poll.c (decode_poll_exiting): Replace "(unsigned int) -1" with -1U.
   14655 
   14656 	Add toplevel recursive check-valgrind rule.
   14657 	* Makefile.am (.PHONY): Add check-valgrind-local.
   14658 	(check-valgrind): New rule.
   14659 	* configure.ac (AM_EXTRA_RECURSIVE_TARGETS): Add it.
   14660 
   14661 	m4: fix check-valgrind-* rules generated by AX_VALGRIND_CHECK.
   14662 	* m4/ax_valgrind_check.m4 (check-valgrind-$(1)): Depend
   14663 	on $(BUILT_SOURCES), honor $(AM_MAKEFLAGS), build check-am
   14664 	instead of check-TESTS.
   14665 
   14666 	travis: do coverage using a dedicated build.
   14667 	* .travis.yml (after_success): Remove.
   14668 	(matrix): Create an entry for the regular x86_64 target.
   14669 	* travis-success.sh: Merge into ...
   14670 	* travis-build.sh: ... this file.  Disable optimization
   14671 	for coverage builds.
   14672 	* travis-install.sh: Rename COVERAGE=true to CHECK=coverage.
   14673 
   14674 2016-12-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   14675 
   14676 	mips n32: provide fallback definitions of kernel_long_t/kernel_ulong_t.
   14677 	* kernel_types.h [!(HAVE___KERNEL_LONG_T && HAVE___KERNEL_ULONG_T) &&
   14678 	LINUX_MIPSN32] (kernel_long_t, kernel_ulong_t): Define to long long types.
   14679 
   14680 2016-12-17  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14681 
   14682 	util: simplify definitions of bit mask constants in umovestr.
   14683 	* util.c (umovestr): Do not check for SIZEOF_LONG in definitions
   14684 	of bit mask constants.
   14685 
   14686 	tests: check decoding of prctl operations without arguments.
   14687 	* tests/prctl-no-args.c: New file.
   14688 	* tests/prctl-no-args.test: New test.
   14689 	* tests/.gitignore: Add prctl-no-args.
   14690 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   14691 	(DECODER_TESTS): Add prctl-no-args.test.
   14692 
   14693 	tests: check decoding of prctl PR_[GS]ET_SECUREBITS operations.
   14694 	* tests/prctl-securebits.c: New file.
   14695 	* tests/prctl-securebits.test: New test.
   14696 	* tests/.gitignore: Add prctl-securebits.
   14697 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   14698 	(DECODER_TESTS): Add prctl-securebits.test.
   14699 
   14700 	tests: check decoding of prctl PR_[GS]ET_DUMPABLE operations.
   14701 	* tests/prctl-dumpable.c: New file.
   14702 	* tests/prctl-dumpable.test: New test.
   14703 	* tests/.gitignore: Add prctl-dumpable.
   14704 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   14705 	(DECODER_TESTS): Add prctl-dumpable.test.
   14706 
   14707 	prctl: implement decoding of SUID_DUMP_* constants in PR_[GS]ET_DUMPABLE
   14708 	* xlat/pr_dumpable.in: New file.
   14709 	* prctl.c: Include "xlat/pr_dumpable.h".
   14710 	(SYS_FUNC(prctl)): Decode returned value of PR_GET_DUMPABLE operation
   14711 	and the second syscall argument of PR_SET_DUMPABLE operation
   14712 	as SUID_DUMP_* constants.
   14713 
   14714 2016-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   14715 
   14716 	Include "kernel_types.h" in defs.h and tests/tests.h.
   14717 	As kernel_ulong_t type is going to be used in the definition
   14718 	of struct tcb and in many function prototypes, make it readily
   14719 	available for every source file by including "kernel_types.h"
   14720 	in defs.h and tests/tests.h files.
   14721 
   14722 	* defs.h: Include "kernel_types.h".
   14723 	* tests/tests.h: Likewise.
   14724 	* desc.c: Do not include "kernel_types.h".
   14725 	* dirent.c: Likewise.
   14726 	* keyctl.c: Likewise.
   14727 	* syscall.c: Likewise.
   14728 	* linux/asm_stat.h: Likewise.
   14729 	* tests/answer.c: Likewise.
   14730 	* tests/epoll_pwait.c: Likewise.
   14731 	* tests/fanotify_init.c: Likewise.
   14732 	* tests/fanotify_mark.c: Likewise.
   14733 	* tests/file_handle.c: Likewise.
   14734 	* tests/ftruncate.c: Likewise.
   14735 	* tests/getdents.c: Likewise.
   14736 	* tests/init_delete_module.h: Likewise.
   14737 	* tests/inotify.c: Likewise.
   14738 	* tests/inotify_init1.c: Likewise.
   14739 	* tests/ioprio.c: Likewise.
   14740 	* tests/ipc_msgbuf.c: Likewise.
   14741 	* tests/kcmp.c: Likewise.
   14742 	* tests/kexec_file_load.c: Likewise.
   14743 	* tests/kexec_load.c: Likewise.
   14744 	* tests/keyctl.c: Likewise.
   14745 	* tests/lookup_dcookie.c: Likewise.
   14746 	* tests/lseek.c: Likewise.
   14747 	* tests/mq_sendrecv.c: Likewise.
   14748 	* tests/nsyscalls.c: Likewise.
   14749 	* tests/pkey_alloc.c: Likewise.
   14750 	* tests/pkey_free.c: Likewise.
   14751 	* tests/pkey_mprotect.c: Likewise.
   14752 	* tests/prctl-pdeathsig.c: Likewise.
   14753 	* tests/prctl-tsc.c: Likewise.
   14754 	* tests/preadv2-pwritev2.c: Likewise.
   14755 	* tests/process_vm_readv_writev.c: Likewise.
   14756 	* tests/read-write.c: Likewise.
   14757 	* tests/setfsugid.c: Likewise.
   14758 	* tests/setns.c: Likewise.
   14759 	* tests/truncate.c: Likewise.
   14760 	* tests/unshare.c: Likewise.
   14761 	* tests/xgetrlimit.c: Likewise.
   14762 
   14763 2016-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   14764 
   14765 	Post-release administrivia.
   14766 	* NEWS: Add a header line for the next release.
   14767 	* debian/changelog.in: Add a changelog entry for 4.15-1.
   14768 	* strace.spec.in: Likewise.
   14769 
   14770 2016-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   14771 
   14772 	xlat: provide fallback definitions for NETLINK_* constants.
   14773 	As new constants have been added gradually over kernel releases, define
   14774 	all constant values to make newer constants decoded properly when strace
   14775 	is built with older kernel headers.
   14776 
   14777 	* xlat/netlink_protocols.in: Add default values for constants.
   14778 	* net.c [!NETLINK_SOCK_DIAG && NETLINK_INET_DIAG]: Remove.
   14779 	* socketutils.c: Likewise.
   14780 
   14781 2016-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   14782 
   14783 	tests: relax getaffinity return value check in tests/sched_xetaffinity.c
   14784 	* tests/sched_xetaffinity.c (errstr): New variable.
   14785 	(getaffinity, setaffinity): Initialize it.
   14786 	(main): Use it.  Allow getaffinity return value to be less than
   14787 	its cpusetsize argument.
   14788 
   14789 	tests: fix threads-execve.test for large pids.
   14790 	* tests/threads-execve.c (main): Fix expected output for large pids.
   14791 
   14792 2016-12-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   14793 
   14794 	Prepare for 4.15 release.
   14795 	* NEWS: Update for 4.15 release.
   14796 
   14797 	.mailmap: add addresses of Thomas De Schampheleire.
   14798 	* .mailmap: Add both addresses of Thomas De Schampheleire here to avoid
   14799 	duplications in CREDITS file.
   14800 
   14801 	Sync strace.spec and debian/ with packages.
   14802 	* debian/control: Add Vcs-* metadata from 4.13-0.1.
   14803 	* debian/watch: Sync with 4.13-0.1.
   14804 	* strace.spec.in: Sync with 4.14.0.100.622a-1.
   14805 
   14806 2016-12-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   14807 
   14808 	tests: workaround a bug in GNU grep.
   14809 	Workaround a bug introduced in GNU grep 2.27, for details see
   14810 	https://lists.gnu.org/archive/html/bug-grep/2016-12/msg00011.html
   14811 
   14812 	* tests/init.sh (grep_pid_status): New function.
   14813 	* tests/detach-running.test: Use it instead of grep to search
   14814 	in /proc/$pid/status.
   14815 	* tests/detach-sleeping.test: Likewise.
   14816 	* tests/detach-stopped.test: Likewise.
   14817 
   14818 2016-12-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14819 
   14820 	tests: fix typo in comment inside prctl-tsc.c.
   14821 
   14822 2016-12-13  Sean Stangl  <sstangl (a] mozilla.com>
   14823 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   14824 
   14825 	Fix libunwind segfault when -p is passed before -k.
   14826 	* strace.c (init) [USE_LIBUNWIND]: Call unwind_tcb_init after
   14827 	unwind_init for all allocated tcb structures if stack trace is enabled.
   14828 	* unwind.c (unwind_tcb_init): Skip if tcb is already initialized.
   14829 
   14830 2016-12-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14831 	    Dmitry V. Levin  <ldv (a] altlinux.org>
   14832 
   14833 	Update NEWS.
   14834 
   14835 2016-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   14836 
   14837 	tests: skip fault injection tests on unsupported platforms.
   14838 	* tests/fault_injection.sh: New file.
   14839 	* tests/Makefile.am (EXTRA_DIST): Add it.
   14840 	* tests/fault_injection-exit_group.test: Use it.
   14841 	* tests/fault_injection.test: Likewise.
   14842 
   14843 	tests: introduce require_min_kernel_version_or_skip function.
   14844 	* tests/init.sh (kernel_version_code,
   14845 	require_min_kernel_version_or_skip): New functions.
   14846 	* tests/threads-execve.test: Use require_min_kernel_version_or_skip.
   14847 
   14848 2016-12-07  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   14849 
   14850 	tests: add descriptions to prctl-pdeathsig and prctl-tsc tests.
   14851 
   14852 2016-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   14853 
   14854 	tests: robustify prctl-pdeathsig.test and prctl-tsc.test.
   14855 	Rrobustify remaining prctl tests against unrelated prctl invocations
   14856 
   14857 	* tests/prctl-pdeathsig.test: Filter out unrelated PR_GET_* and PR_SET_*
   14858 	prctl calls.
   14859 	* tests/prctl-tsc.test: Likewise.
   14860 
   14861 2016-12-07  Thomas De Schampheleire  <thomas.de_schampheleire (a] nokia.com>
   14862 
   14863 	Makefile.am: don't confuse CFLAGS and CFLAGS_FOR_BUILD.
   14864 	Commit dc427d50d96b15c9a64d7e78d97ce4d194622a63 enabled a number of extra
   14865 	warning flags through configure.ac.  The configure script will determine
   14866 	dynamically if CC supports these flags before adding them to WARN_CFLAGS.
   14867 
   14868 	ioctlsort is compiled with CC_FOR_BUILD, rather than CC.  Nevertheless,
   14869 	the flags passed to this compilation also include WARN_CFLAGS (through
   14870 	AM_CFLAGS).  This is incorrect: in a cross-compilation use case, CC
   14871 	and CC_FOR_BUILD are not the same.  The former is the cross-compiler,
   14872 	the latter is the host compiler.  Both may be of different versions
   14873 	and support different warning flags.
   14874 
   14875 	In particular, this posed a problem when cross-compiling with a host
   14876 	compiler gcc 4.1, which does not support all the new flags:
   14877 
   14878 	    /usr/bin/gcc -DHAVE_CONFIG_H   -I./linux/arm -I./linux/arm -I./linux
   14879 	    -I./linux -I. -I. -I/host-sysroot/usr/include -Wall -Wempty-body
   14880 	    -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op
   14881 	    -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration
   14882 	    -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings -O2
   14883 	    -I/host-sysroot/usr/include -DIOCTLSORT_INC=\"ioctls_all0.h\" -c -o
   14884 	    ioctlsort0.o ./ioctlsort.c
   14885 	    cc1: error: unrecognized command line option "-Wempty-body"
   14886 	    cc1: error: unrecognized command line option "-Wignored-qualifiers"
   14887 	    cc1: error: unrecognized command line option "-Wlogical-op"
   14888 	    cc1: error: unrecognized command line option "-Wmissing-parameter-type"
   14889 	    cc1: error: unrecognized command line option "-Wold-style-declaration"
   14890 	    cc1: error: unrecognized command line option "-Wtype-limits"
   14891 	    make[2]: *** [ioctlsort0.o] Error 1
   14892 
   14893 	* Makefile.am (AM_CFLAGS_FOR_BUILD, AM_CPPFLAGS_FOR_BUILD): New
   14894 	variables.
   14895 	(ioctlsort_CPPFLAGS): Use AM_CPPFLAGS_FOR_BUILD instead of AM_CPPFLAGS.
   14896 	(ioctlsort_CFLAGS): Use AM_CFLAGS_FOR_BUILD instead of AM_CFLAGS.
   14897 	(ioctlsort_LDFLAGS): Use AM_LDFLAGS_FOR_BUILD instead of AM_LDFLAGS.
   14898 	* m4/ax_prog_cc_for_build.m4 (AX_PROG_CC_FOR_BUILD): Redirect
   14899 	WARN_CFLAGS and gl_unknown_warnings_are_errors, call st_WARN_CFLAGS,
   14900 	substitute WARN_CFLAGS_FOR_BUILD.
   14901 
   14902 2016-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   14903 
   14904 	m4: prepare gl_WARN_ADD for simultaneous use of multiple compilers.
   14905 	* m4/warnings.m4 (gl_COMPILER_OPTION_IF): Change gl_Flags to use
   14906 	_AC_LANG_PREFIX[]FLAGS in unquoted form.  Change gl_Warn to use gl_Flags
   14907 	instead of _AC_LANG_ABBREV.  Change notification message to mention
   14908 	the variable name of the compiler.
   14909 	(gl_UNKNOWN_WARNINGS_ARE_ERRORS): Do nothing if
   14910 	gl_unknown_warnings_are_errors is set.
   14911 	(gl_WARN_ADD): Change the use of gl_UNKNOWN_WARNINGS_ARE_ERRORS from
   14912 	AC_REQUIRE to a regular call.
   14913 
   14914 2016-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   14915 
   14916 	AX_PROG_CC_FOR_BUILD: redirect more variables related to C compiler.
   14917 	Some of these variables cannot be redirected using traditional
   14918 	pushdef/popdef mechanism because of complex constructions like
   14919 	[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu] employed by autoconf macros.
   14920 	Use st_SAVE_VAR/st_RESTORE_VAR to workaround this issue.
   14921 
   14922 	* m4/ax_prog_cc_for_build.m4: Redirect ac_cv_prog_cc_stdc,
   14923 	ac_cv_prog_cc_c11, ac_cv_prog_cc_c99, ac_cv_prog_cc_c89,
   14924 	am_cv_prog_cc_c_o, and am_cv_CC_dependencies_compiler_type using
   14925 	pushdef/popdef.
   14926 	Redirect ac_c_decl_warn_flag, ac_c_preproc_warn_flag, ac_c_werror_flag,
   14927 	ac_compile, ac_compiler_gnu, ac_cpp, ac_cv_c_compiler_gnu,
   14928 	ac_cv_c_decl_report, and ac_link using st_SAVE_VAR/st_RESTORE_VAR.
   14929 
   14930 2016-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   14931 
   14932 	Move all gl_WARN_ADD calls to a separate m4 macro.
   14933 	This is going to be needed for the upcoming AX_PROG_CC_FOR_BUILD
   14934 	change.
   14935 
   14936 	* configure.ac: Call st_WARN_CFLAGS before AX_PROG_CC_FOR_BUILD.
   14937 	Move all gl_WARN_ADD calls ...
   14938 	* m4/st_warn_cflags.m4: ... here.
   14939 
   14940 2016-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   14941 
   14942 	m4: introduce st_SAVE_VAR and st_RESTORE_VAR macros.
   14943 	These new macros are going to be needed for the upcoming
   14944 	AX_PROG_CC_FOR_BUILD change.
   14945 
   14946 	* m4/st_save_restore_var.m4: New file.
   14947 
   14948 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   14949 
   14950 	tests: add valgrind support to "make check"
   14951 	* m4/ax_valgrind_check.m4: Import from the autoconf-archive package.
   14952 	* configure.ac: Invoke AX_VALGRIND_CHECK.
   14953 	* valgrind.supp: Move to tests/strace.supp.
   14954 	* Makefile.am (EXTRA_DIST): Remove valgrind.supp.
   14955 	* tests/Makefile.am: Add @VALGRIND_CHECK_RULES@.
   14956 	(VALGRIND_FLAGS, VALGRIND_SUPPRESSIONS_FILES): New variables.
   14957 	(EXTRA_DIST): Add strace.supp.
   14958 	* tests/init.sh: Add valgrind command prefix to $STRACE when appropriate.
   14959 
   14960 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   14961 
   14962 	tests: robustify threads-execve.test against race conditions.
   14963 	Due to probabilistic nature of the test, try it several times.
   14964 
   14965 	* tests/threads-execve.c (NUMBER_OF_ITERATIONS): Change to 1.
   14966 	* tests/threads-execve.test: Iterate up to 10 times.
   14967 
   14968 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   14969 
   14970 	tests: fix expected output in strace-ttt.test.
   14971 	If strace -ttt is running too long, it might happen that time stamps
   14972 	before and after its invocation differ for more than a second.
   14973 	Adjust expected output to handle this rare but possible case.
   14974 
   14975 	* tests/strace-ttt.test: Allow any time stamp between start and finish
   14976 	of strace invocation.
   14977 
   14978 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   14979 
   14980 	tests: fix expected output in strace-tt.test.
   14981 	If strace -tt is running too long, it might happen that time stamps
   14982 	before and after its invocation differ for more than a second.
   14983 	Adjust expected output to handle this rare but possible case.
   14984 
   14985 	* tests/strace-tt.test: Allow any time stamp between start and finish
   14986 	of strace invocation.
   14987 
   14988 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   14989 
   14990 	tests: robustify redirect.test against race conditions.
   14991 	Introduce a synchronization mechanism between the tracee and its peer.
   14992 
   14993 	* tests/redirect.test: Change timeout file to $OUT.  Let the tracee
   14994 	remove $LOG, wait for $LOG removal in its peer.
   14995 
   14996 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   14997 
   14998 	tests: robustify attach-f-p.test against race conditions.
   14999 	Introduce a synchronization mechanism between attach-f-p and strace.
   15000 
   15001 	* tests/attach-f-p-cmd.c: New file.
   15002 	* tests/Makefile.am (check_PROGRAMS): Add attach-f-p-cmd.
   15003 	* tests/attach-f-p.c: Include <sys/stat.h>.
   15004 	(main): Write to stdout instead of descriptor 3.  Wait for the peer
   15005 	writing to stdout.
   15006 	* tests/attach-f-p.test: Assume that ./attach-f-p-cmd works.
   15007 	Use $OUT for expected output.  Use attach-f-p-cmd for unlocking $OUT.
   15008 
   15009 2016-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   15010 
   15011 	tests: robustify attach-p-cmd.test against race conditions.
   15012 	Introduce a synchronization mechanism between attach-p-cmd-p
   15013 	and attach-p-cmd-cmd processes.
   15014 
   15015 	* tests/attach-p-cmd-cmd.c: Include <errno.h> and <sys/stat.h>.
   15016 	(main): Wait for the lock directory creation by attach-p-cmd-p.
   15017 	* tests/attach-p-cmd-p.c: Include <errno.h> and <sys/stat.h>.
   15018 	(main): Create a lock directory and wait for its removal
   15019 	by attach-p-cmd-cmd.
   15020 	* tests/attach-p-cmd.test: Assume that test programs work.
   15021 
   15022 2016-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   15023 
   15024 	Rewrite remaining qual_* parsers using bit sets.
   15025 	* defs.h (struct fault_opts): Replace forward declaration
   15026 	with a definition.
   15027 	(qualbits_t, qualify_read, qualify_write, qualify_signals): Remove.
   15028 	(qual_flags): New function prototype.
   15029 	(nsyscall_vec, sysent_vec, fault_vec): New variable prototypes.
   15030 	* qualify.c (abbrev_set, fault_set, raw_set, trace_set, verbose_set):
   15031 	New variables.
   15032 	(qualify_read, qualify_write, qualify_signals): Add static qualifier.
   15033 	(find_errno_by_name, lookup_class, parse_fault_expression,
   15034 	parse_fault_token, qual_flags, qualify, qualify_abbrev, qualify_fault,
   15035 	qualify_raw, qualify_syscall, qualify_syscall_class,
   15036 	qualify_syscall_name, qualify_syscall_number, qualify_syscall_tokens,
   15037 	qualify_trace, qualify_verbose, strip_prefix): New functions.
   15038 	* syscall.c (nsyscall_vec, nsysent_vec): Remove static qualifier.
   15039 	(MAX_NSYSCALLS1, MAX_NSYSCALLS2, MAX_NSYSCALLS, qual_vec, qual_flags,
   15040 	qual_fault, qual_syscall, qual_options, fault_opts, qualify_one,
   15041 	qualify_scno, lookup_class, qualify_syscall_class, qualify_syscall_name,
   15042 	qual_syscall_ex, qual_syscall, strip_prefix, find_errno_by_name,
   15043 	parse_fault_token, parse_fault_expression, qual_fault, qualify): Remove.
   15044 	(decode_socket_subcall, decode_ipc_subcall, decode_mips_subcall,
   15045 	get_scno): Update use of qual_flags.
   15046 	(inject_syscall_fault_entering): Update per-personality allocation
   15047 	of tcp->fault_vec.
   15048 	* tests/fault_injection-exit_group.test: Check parsing of inversed
   15049 	fault sets.
   15050 	* tests/fault_injection.test: Check parsing of -efault=none.
   15051 	* tests/options-syntax.test: Check parsing of invalid syscall numbers.
   15052 
   15053 	Change qual_vec/qual_fault into static fixed size arrays.
   15054 	* defs.h (qual_vec, num_quals): Remove.
   15055 	(qual_flags): Move ...
   15056 	* syscall.c: ... here.
   15057 	(num_quals, num_faults, MIN_QUALS, reallocate_vec, reallocate_qual,
   15058 	reallocate_fault): Remove.
   15059 	(qual_vec, qual_fault): Change into static fixed size arrays.
   15060 	(qualify_one): Remove reallocate_qual and reallocate_fault calls.
   15061 	(qualify): Likewise.  Replace num_quals and num_faults with
   15062 	MAX_NSYSCALLS.
   15063 
   15064 	Rewrite qual_signal using bit sets.
   15065 	* defs.h (signal_set): New variable prototypes.
   15066 	(qualify_signals): New function prototypes.
   15067 	(QUAL_SIGNAL): Change to a value greater than 0xff.
   15068 	(QUAL_FAULT): Change to a lower value.
   15069 	* qualify.c (signal_set): New variable.
   15070 	(sigstr_to_uint, qualify_signals): New functions.
   15071 	* syscall.c (qual_signal): Remove.
   15072 	(qual_options): Replace qual_signal with NULL.
   15073 	(qualify): Use qualify_signals.
   15074 	* strace.c (print_signalled, print_stopped): Use is_number_in_set
   15075 	with signal_set argument.
   15076 
   15077 2016-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   15078 
   15079 	Rewrite qual_desc using bit sets.
   15080 	As a side effect, this also fixes support of negated sets
   15081 	of descriptors.
   15082 
   15083 	* defs.h (struct number_set): New forward declaration.
   15084 	(read_set, write_set): New variable prototypes.
   15085 	(is_number_in_set, qualify_read, qualify_write): New function
   15086 	prototypes.
   15087 	(QUAL_READ, QUAL_WRITE): Change to values greater than 0xff.
   15088 	* qualify.c: New file.
   15089 	* Makefile.am (strace_SOURCES): Add it.
   15090 	* syscall.c (qual_desc): Remove.
   15091 	(qual_options): Replace qual_desc with NULL.
   15092 	(qualify): Use qualify_read and qualify_write.
   15093 	(dumpio): Use is_number_in_set.
   15094 	* tests/options-syntax.test: Check invalid sets of descriptors.
   15095 	* tests/readv.test: Check dumping of negated sets of descriptors.
   15096 
   15097 2016-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   15098 
   15099 	tests: skip redirect-fds.test when strace is wrapped with valgrind.
   15100 	valgrind is not as transparent as strace wrt standard descriptors,
   15101 	so if strace is wrapped with valgrind, the test would check valgrind
   15102 	transparency properties and fail imminently.
   15103 
   15104 	* tests/redirect-fds.test: Skip the test when $STRACE shows a presence
   15105 	of valgrind.
   15106 
   15107 2016-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   15108 
   15109 	Add valgrind.supp.
   15110 	As valgrind is not quite happy about the way how get_cpuset_size uses
   15111 	sched_getaffinity, add a suppression file for this case.
   15112 
   15113 	* valgrind.supp: New file.
   15114 	* Makefile.am (EXTRA_DIST): Add it.
   15115 
   15116 2016-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   15117 
   15118 	affinity: pass 0 as a pid to sched_getaffinity.
   15119 	* affinity.c (get_cpuset_size): Pass 0 instead of getpid()
   15120 	to sched_getaffinity.
   15121 
   15122 	affinity: document the method of finding out the cpuset size.
   15123 	* affinity.c (get_cpuset_size): Add a comment about sched_getaffinity.
   15124 
   15125 2016-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   15126 
   15127 	tests: make options-syntax.test tolerant of strace wrappers.
   15128 	Change the test to allow wrappers like STRACE="valgrind ./strace".
   15129 
   15130 	* tests/options-syntax.test: Strip all words but last from $STRACE
   15131 	variable in all contexts where the name of strace executable is expected
   15132 	in its output.
   15133 
   15134 2016-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   15135 
   15136 	Do not allocate memory for line buffered output.
   15137 	libc is perfectly capable of allocating memory for its buffers,
   15138 	so let it do its job.
   15139 
   15140 	* strace.c (init): Do not allocate memory for setvbuf invocation.
   15141 
   15142 2016-12-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15143 
   15144 	Update NEWS.
   15145 
   15146 	tests: use kernel_ulong_t as argument type in setfsuid/setfsgid tests.
   15147 	* setfsugid.c: Include "kernel_types.h".
   15148 	(main): Change type of entries of the "tests" array from long to
   15149 	kernel_ulong_t.
   15150 
   15151 2016-12-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15152 	    Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15153 
   15154 	uid: print size as signed in setgroups/getgroups.
   15155 	As this is the type used in kernel.
   15156 
   15157 	* uid.c (SYS_FUNC(setgroups), SYS_FUNC(getgroups)): Print size parameter
   15158 	as "%d".
   15159 	* tests/getgroups.c: Update expected output.
   15160 	* tests/setgroups.c: Likewise.
   15161 
   15162 2016-12-04  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15163 	    Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15164 
   15165 	uid: use printuid for printing UID/GID value.
   15166 	* uid.c (setfsuid, get_print_uid, print_gid): Use printuid.
   15167 	* tests/setfsugid.c (printuid): New function.
   15168 	(main): Use it to print UID/GID values.
   15169 	* tests/setgroups.c: Likewise.
   15170 	* tests/setugid.c (ugid2int): Remove.
   15171 	(printuid): New function.
   15172 	(main): Use it to print UID/GID values.
   15173 
   15174 2016-12-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15175 
   15176 	tests: additional check for PTRACE_SETSIGINFO ptrace command.
   15177 	* tests/ptrace.c (main): Add an additional PTRACE_SETSIGINFO check.
   15178 
   15179 2016-12-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   15180 
   15181 	syscall_name: clear __X32_SYSCALL_BIT from syscall number on x32.
   15182 	* linux/x86_64/get_scno.c (X32_PERSONALITY_NUMBER): New macro.
   15183 	* syscall.c (syscall_name) [X32_PERSONALITY_NUMBER && __X32_SYSCALL_BIT]:
   15184 	Clear __X32_SYSCALL_BIT from scno on x32 personality.
   15185 
   15186 2016-12-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15187 
   15188 	Print syscall names only for defined syscalls.
   15189 	The string literal "__NR_syscall_4294967295" is semantically incorrect
   15190 	as there is no such constant defined.
   15191 
   15192 	* syscall.c (syscall_name): Return NULL if there is no syscall
   15193 	corresponding to the given number.
   15194 	* defs.h (syscall_name): Document this behaviour.
   15195 	* printsiginfo.c (print_si_info): Print syscall name with "__NR_" prefix
   15196 	only if there is a syscall corresponding to si_syscall number; print
   15197 	a plain syscall number otherwise.
   15198 	* tests/ptrace.c (main): Update expected output.
   15199 
   15200 2016-12-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15201 
   15202 	affinity: print cpu set as an array.
   15203 	* affinity.c: Add comma between elements of cpu set.
   15204 	* tests/sched_xetaffinity.c (main): Update expected output.
   15205 
   15206 	statfs: fix printing format of f_fsid field.
   15207 	* print_statfs.c: Print f_fsid as a structure containing field "val"
   15208 	which, in turn, is an array of two elements that used to be printed
   15209 	as members of f_fsid structure.
   15210 	* tests/statfs.expected: Update expected output.
   15211 	* tests/xstatfsx.c (print_statfs): Likewise.
   15212 
   15213 	swap: always print priority value.
   15214 	* swapon.c (SYS_FUNC(swapon)): Do not check for non-zero the value
   15215 	of the prio variable in order to print it.
   15216 	* tests/swap.c (main): Update expected output.
   15217 
   15218 2016-12-01  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15219 
   15220 	tests: show pattern line number in match_grep.
   15221 	This makes debugging of failing test  a bit easier.
   15222 
   15223 	* tests/init.sh (match_grep): Add the cnt variable, increment it on every
   15224 	pattern line read, print it as a prefix for non-matched pattern.
   15225 
   15226 2016-11-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15227 	    Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15228 
   15229 	futex: make output of the val3 argument of the FUTEX_WAKE_OP command more structured
   15230 	It is a number which consists of several xlat values, not a structure.
   15231 
   15232 	* futex.c (SYS_FUNC(futex)): Modify output of the val3 argument
   15233 	of the FUTEX_WAKE_OP futex syscall command.
   15234 	* tests/futex.c (main): Update expected output.
   15235 
   15236 2016-11-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15237 
   15238 	tests: additional checks for prctl-* tests.
   15239 	* tests/prctl-pdeathsig.c (main): Additional checks.
   15240 	* tests/prctl-tsc.c (main): Likewise.
   15241 	* tests/prctl-pdeathsig.test: Update value of -a argument.
   15242 	* tests/prctl-tsc.test: Likewise.
   15243 
   15244 2016-11-30  JingPiao Chen  <chenjingpiao (a] foxmail.com>
   15245 
   15246 	tests: add prctl-pdeathsig.test and prctl-tsc.test.
   15247 	* tests/prctl-pdeathsig.c: New file.
   15248 	* tests/prctl-tsc.c: Likewise.
   15249 	* tests/prctl-pdeathsig.test: New test.
   15250 	* tests/prctl-tsc.test: Likewise.
   15251 	* tests/.gitignore: Add prctl-pdeathsig and prctl-tsc.
   15252 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15253 	(DECODER_TESTS): Add prctl-pdeathsig.test and prctl-tsc.test.
   15254 
   15255 2016-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   15256 
   15257 	syscall: Simplify strip_prefix.
   15258 	* syscall.c (strip_prefix): Use strncmp instead of strlen+memcmp.
   15259 
   15260 	util: fix integer overflow check in string_to_uint_ex.
   15261 	* util.c (string_to_uint_ex): Fix the check for integer overflow
   15262 	on systems where LONG_MAX == INT_MAX.
   15263 
   15264 	Check dumping of io syscalls when descriptor arguments are sensibly large
   15265 	* tests/tests.h (pipe_maxfd): New prototype.
   15266 	* tests/pipe_maxfd.c: New file.
   15267 	* tests/print_maxfd.c: Likewise.
   15268 	* tests/.gitignore: Add print_maxfd.
   15269 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15270 	(libtests_a_SOURCES): Add pipe_maxfd.c.
   15271 	* tests/readv.c (main): Use pipe_maxfd() instead of pipe(),
   15272 	fds[0] instead of 0, fds[1] instead of 1.
   15273 	* tests/readv.test: Use print_maxfd to specify dump descriptor numbers.
   15274 
   15275 	dumpio: remove useless check.
   15276 	* syscall.c (dumpio): Remove SEN_printargs check.  Use tcp->s_ent->sen
   15277 	directly.
   15278 
   15279 2016-11-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   15280 
   15281 	Fix dumping of io syscalls when descriptor argument has unused bits set.
   15282 	* syscall.c (dumpio): Explicitly cast the first argument of syscall
   15283 	to "int", the same way as the kernel does.
   15284 	* tests/read-write.c: Include <asm/unistd.h> and "kernel_types.h".
   15285 	(k_read, k_write): New functions.
   15286 	(test_dump, main): Use them.
   15287 
   15288 	x32: fix preadv2-pwritev2.test.
   15289 	* tests/preadv2-pwritev2.c: Include "kernel_types.h".
   15290 	(main): Use kernel_ulong_t instead of unsigned long as types
   15291 	of arguments of preadv2 and pwritev2 syscalls.
   15292 
   15293 	x32: wire up preadv2 and pwritev2 syscalls.
   15294 	* linux/x32/syscallent.h [546]: Add preadv2 entry.
   15295 	[547]: Add pwritev2 entry.
   15296 
   15297 2016-11-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15298 	    Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15299 
   15300 	signal: fix omission of field names in sigaction printers.
   15301 	* signal.c (decode_old_sigaction, decode_new_sigaction): Add printing
   15302 	of the field names.
   15303 	* tests/sigaction.awk: Update expected output.
   15304 
   15305 2016-11-29  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15306 
   15307 	Make date output format conform to ISO 8601.
   15308 	* util.c (sprinttime): Make date output conform to ISO 8601.
   15309 	* tests/utime.c (print_tm): Update expected output.
   15310 	* tests/xstatx.c (print_time): Likewise.
   15311 
   15312 2016-11-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   15313 
   15314 	tests: rewrite utime.test without relying on libc utime wrapper.
   15315 	* tests/utime.c (k_utime): New function, a thin wrapper around
   15316 	syscall(__NR_utime).
   15317 	(main): Use it instead of utime.
   15318 	* tests/utime.test: Update.
   15319 
   15320 2016-11-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   15321 
   15322 	Fix meaning of negated sets in fault expressions.
   15323 	Change the parser of fault expression to follow the POLA:
   15324 	-e fault=!SET
   15325 	means that all syscalls except those from SET are subject to fault
   15326 	injection;
   15327 	-e fault=!SET1:error=ERRNO1, -e fault=!SET2:error=ERRNO2
   15328 	means that all syscalls except those from SET2 are subject to fault
   15329 	injection with error code ERRNO2, and all syscalls from SET2 that are
   15330 	not in SET1 are subject to fault injection with error code ERRNO1.
   15331 
   15332 	* syscall.c (qualify_scno, qualify_syscall_class, qualify_syscall_name):
   15333 	Handle negated QUAL_FAULT case differently.
   15334 	* tests/fault_syntax.test: Add checks of negated sets.
   15335 
   15336 2016-11-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15337 
   15338 	print_sigevent: fix field names of sigev_value structure.
   15339 	* print_sigevent.c (print_sigevent): Change "int" to "sival_int", "ptr"
   15340 	to "sival_ptr".
   15341 	* tests/mq_sendrecv.c (main): Update expected output in accordance with
   15342 	fixed field names.
   15343 	* tests/timer_create.c (main): Likewise.
   15344 
   15345 	tests: add more utime checks.
   15346 	* tests/utime.c: Include <unistd.h> and <asm/unistd.h>.
   15347 	(main): Add checks for invalid pointers.
   15348 
   15349 	utime: fix omission of field names in utimbuf structure printing.
   15350 	* utime.c (SYS_FUNC(utime)): Print struct utimbuf as a structure,
   15351 	not as an array (use curly brackets instead of square ones).
   15352 	Add field names to the output.
   15353 	* tests/utime.c (main): Update expected output.
   15354 
   15355 	mem: print mincore output as an array.
   15356 	* mem.c (SYS_FUNC(minore)): Print commas between elements.
   15357 	* tests/mincore.c (print_mincore): Update expected output in accordance
   15358 	with syscall decoder formatting change.
   15359 
   15360 2016-11-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15361 
   15362 	util: provide information whether xlat value has been found.
   15363 	This is necessary for the upcoming change in the output format
   15364 	of the val3 argument of the FUTEX_WAKE_OP futex command.
   15365 
   15366 	* defs.h (printxvals, printxval_searchn): Change return type to int.
   15367 	(printxval64, printxval, printxval_long): Likewise.  Forward the value
   15368 	returned by printxvals call.
   15369 	* util.c (printxvals, printxval_searchn): Change return type to int,
   15370 	return 1 if xlat value has been found, 0 otherwise.
   15371 
   15372 2016-11-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15373 
   15374 	util: check dflt argument for NULL in printxvals.
   15375 	This is necessary for the upcoming change in the output format
   15376 	of the val3 argument of the FUTEX_WAKE_OP futex command.
   15377 
   15378 	* util.c (printxvals): Do not print dflt if it is NULL.
   15379 
   15380 2016-11-29  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15381 
   15382 	capability: fix omission of capability structure field names.
   15383 	* capability.c (print_cap_header, print_cap_data): Add field names
   15384 	to the output.
   15385 	* tests/caps.awk: Update test output.
   15386 
   15387 2016-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   15388 
   15389 	tests: fix "comparison between signed and unsigned" compilation warnings
   15390 	* tests/readv.c (main): Cast r_len to int.
   15391 	* tests/preadv2-pwritev2.c (dumpio): Likewise.
   15392 
   15393 	aarch64, arm, sparc: add comments on fault injection support in kernel.
   15394 	* linux/aarch64/set_scno.c: Note the kernel commit that introduced
   15395 	NT_ARM_SYSTEM_CALL support.
   15396 	* linux/arm/set_scno.c: Note the kernel commit that introduced
   15397 	PTRACE_SET_SYSCALL support.
   15398 	* linux/sparc/set_scno.c: Note the kernel commit that introduced
   15399 	reloading from the syscall number register.
   15400 
   15401 	tests: check -C option.
   15402 	* tests/strace-C.expected: New file.
   15403 	* tests/strace-C.test: New test.
   15404 	* tests/Makefile.am (MISC_TESTS): Add strace-C.test.
   15405 	(EXTRA_DIST): Add strace-C.expected.
   15406 
   15407 	tests: check basic options syntax.
   15408 	* tests/options-syntax.test: New file.
   15409 	* tests/Makefile.am (MISC_TESTS): Add it.
   15410 
   15411 2016-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   15412 
   15413 	Fix -r option syntax.
   15414 	While -r option implies -t, it should not literally have the effect
   15415 	of -t option, e.g. -rr should not increment tflag twice.
   15416 
   15417 	* strace.c (init): In the getopt loop, do not increment tflag for each
   15418 	occurrence of -r option.  After the getopt loop, if rflag is set, set
   15419 	tflag to 1.  Issue a warning that -tt has no effect with -r.
   15420 
   15421 2016-11-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15422 
   15423 	Print timeval pair as an array of timeval entries.
   15424 	* print_timeval.c (print_timeval_item): New function.
   15425 	(print_timeval_pair): Use it as a print_function in print_array call.
   15426 	* tests/futimesat.c (main): Update to test new behaviour.
   15427 	* tests/utimes.c (main): Likewise.
   15428 
   15429 	tests: treat tv_sec/tv_usec as signed types in futimesat and utimes tests
   15430 	* tests/futimesat.c: Print tv_sec and tv_usec fields as signed types.
   15431 	* tests/utimes.c: Likewise.
   15432 
   15433 2016-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   15434 
   15435 	alpha: print struct timeval32 consistently.
   15436 	* defs.h [ALPHA] (timeval32_t): New type.
   15437 	[ALPHA] (print_timeval32_t): New prototype.
   15438 	* print_timeval.c [ALPHA] (timeval32_t): Remove.
   15439 	[ALPHA] (print_timeval32_t): Remove static keyword.
   15440 	* printrusage.c [ALPHA] (printrusage32): Use timeval32_t instead
   15441 	of local definition of struct timeval32.  Use print_timeval32_t.
   15442 
   15443 2016-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   15444 
   15445 	Print struct timeval consistently.
   15446 	Use print_struct_timeval interface to print struct timeval.
   15447 
   15448 	* print_timeval.c (print_struct_timeval): New mpers printer.
   15449 	* print_timex.c (print_timex): Use it.
   15450 	* printrusage.c (printrusage): Likewise.
   15451 	* v4l2.c (print_v4l2_buffer): Likewise.
   15452 	* tests/getrusage.c (main): Print tv_sec and tv_usec fields as signed.
   15453 	* tests/waitid.c (sprint_rusage): Likewise.
   15454 
   15455 	Suggested-by: Eugene Syromyatnikov <evgsyr (a] gmail.com>
   15456 
   15457 2016-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   15458 
   15459 	Split print_time.c.
   15460 	After commit v4.14-136-g151d1d1 that removed the last object common
   15461 	for timespec and timeval parsers there is no need to keep them all
   15462 	in a single file.
   15463 
   15464 	* print_timespec.c: New file.
   15465 	* print_timeval.c: Likewise.
   15466 	* Makefile.am (strace_SOURCES): Add them.
   15467 	* print_time.c: Move all timespec related code to print_timespec.c.
   15468 	Move all timeval related code to print_timeval.c.
   15469 
   15470 2016-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   15471 
   15472 	tests: check decoding of threads when a non-leader thread invokes execve
   15473 	* tests/threads-execve.c: New file.
   15474 	* tests/threads-execve.test: New test.
   15475 	* tests/.gitignore: Add threads-execve.
   15476 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15477 	(threads_execve_LDADD): New variable.
   15478 	(MISC_TESTS): Add threads-execve.test.
   15479 
   15480 2016-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   15481 
   15482 	tests: check decoding of fault injected exit_group syscall.
   15483 	* tests/answer.c: New file.
   15484 	* tests/fault_injection-exit_group.expected: Likewise.
   15485 	* tests/fault_injection-exit_group.test: New test.
   15486 	* tests/.gitignore: Add answer.
   15487 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15488 	(DECODER_TESTS): Add fault_injection-exit_group.test.
   15489 	(EXTRA_DIST): Add fault_injection-exit_group.expected.
   15490 
   15491 2016-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   15492 
   15493 	Set PTRACE_O_TRACEEXIT option and handle PTRACE_EVENT_EXIT events.
   15494 	Do not assume that some syscalls do not generate syscall-exit-stops.
   15495 	When syscalls fail for any reason they may generate syscall-exit-stops.
   15496 
   15497 	The solution is to wait for an actual exit reported by PTRACE_EVENT_EXIT
   15498 	and print the end of unfinished exiting syscall properly.
   15499 
   15500 	* exit.c: Remove.
   15501 	* Makefile.am (strace_SOURCES): Remove exit.c.
   15502 	* linux/dummy.h (sys_exit): Alias to printargs_d.
   15503 	* strace.c (ptrace_setoptions): Add PTRACE_O_TRACEEXIT bit.
   15504 	(print_event_exit): New function.
   15505 	(trace): Use it in case of PTRACE_EVENT_EXIT.
   15506 	* syscall.c (trace_syscall_entering): Remove special handling
   15507 	of SEN_exit.
   15508 
   15509 2016-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   15510 
   15511 	Change printargs to return RVAL_DECODED.
   15512 	As printargs is invoked as a generic syscall decoder only and
   15513 	it is not supposed to print anything on exiting, change printargs
   15514 	to return RVAL_DECODED so it would not be called on exiting at all.
   15515 
   15516 	* util.c (printargs): Print args unconditionally, return RVAL_DECODED.
   15517 
   15518 2016-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   15519 
   15520 	Enhance error diagnostics of exit/exit_group decoder.
   15521 	* exit.c (SYS_FUNC(exit)): Print the name of syscall that has returned.
   15522 
   15523 2016-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   15524 
   15525 	Restrain from fault injection while the trace executes strace code.
   15526 	There is little use in injections of faults into syscalls made by strace.
   15527 
   15528 	* syscall.c (trace_syscall_entering): Clear QUAL_FAULT bit from
   15529 	tcp->qual_flg when tcp->flags has TCB_HIDE_LOG bit set.
   15530 
   15531 2016-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   15532 
   15533 	Move two global flags to tracee scope.
   15534 	A simultaneous use of -p option and tracing of a command available
   15535 	since commit v4.11-183-gfa8c286 introduces a race condition because
   15536 	the flags whether the first exec has happened are global.
   15537 
   15538 	Fix the race by moving hide_log_until_execve and hide_log_until_execve
   15539 	global variables to TCB_HIDE_LOG and TCB_SKIP_DETACH_ON_FIRST_EXEC bits
   15540 	in struct tcb.flags, correspondingly.
   15541 
   15542 	* defs.h (TCB_HIDE_LOG, TCB_SKIP_DETACH_ON_FIRST_EXEC, hide_log):
   15543 	New macros.
   15544 	(hide_log_until_execve): Remove prototype.
   15545 	* strace.c (skip_one_b_execve, hide_log_until_execve): Remove.
   15546 	(startup_child): Set TCB_HIDE_LOG and TCB_SKIP_DETACH_ON_FIRST_EXEC bits
   15547 	in the allocated tcb structure.
   15548 	(init): Remove initialization of hide_log_until_execve and
   15549 	skip_one_b_execve.
   15550 	(print_stopped): Use hide_log() instead of hide_log_until_execve.
   15551 	(trace): Check and clear TCB_SKIP_DETACH_ON_FIRST_EXEC flag instead
   15552 	of skip_one_b_execve.
   15553 	* syscall.c (trace_syscall_entering): Clear TCB_HIDE_LOG flag instead of
   15554 	hide_log_until_execve.
   15555 	(trace_syscall_entering, trace_syscall_exiting): Check hide_log()
   15556 	instead of hide_log_until_execve.
   15557 
   15558 2016-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   15559 
   15560 	Treat execveat as an execve family syscall.
   15561 	* syscall.c (trace_syscall_entering): Clear hide_log_until_execve flag
   15562 	also when SEN_execveat is encountered.
   15563 
   15564 2016-11-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   15565 
   15566 	Change parser of fault expressions to conform the documentation.
   15567 	Make expressions like fault=SYSCALL1,SYSCALL2:error=EPERM work
   15568 	as documented, i.e. fail both SYSCALL1 and SYSCALL2 with EPERM.
   15569 
   15570 	* syscall.c (parse_fault_expression): Remove const qualifier from
   15571 	"name" and "token: variables, as well as from the return value.
   15572 	(qual_fault): Remove const qualifier from "name" variables.
   15573 	Split "name" into comma delimited tokens and pass each token
   15574 	to individual qual_syscall_ex call.
   15575 	(qualify): For QUAL_FAULT options, pass the whole option value
   15576 	to their qualify methods without prior splitting into comma
   15577 	delimited tokens.
   15578 	* tests/fault_injection.test: Check it.
   15579 	* tests/fault_syntax.test: Check empty syscall sets.
   15580 
   15581 2016-11-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   15582 
   15583 	Simplify parse_fault_expression.
   15584 	* syscall.c (parse_fault_expression): Rewrite iterator over strtok_r
   15585 	in a more concise way.
   15586 
   15587 2016-11-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15588 
   15589 	Fix omission of field names in printers of timeval structure.
   15590 	* print_time.c (time_fmt): Remove.
   15591 	(timeval_fmt): New constant.
   15592 	(print_timeval_t, sprint_timeval, print_timeval32_t, sprint_timeval32):
   15593 	Use it instead of time_fmt.
   15594 	* print_timex.c (print_timex): Print field names of the time field.
   15595 	* printrusage.c (printrusage, printrusage32): Print field names
   15596 	of ru_utime and ru_stime fields.
   15597 	* tests/adjtimex.c (main): Add field names to expected output.
   15598 	* tests/clock_nanosleep.c (main): Likewise.
   15599 	* tests/futimesat.c (main): Likewise.
   15600 	* tests/getrusage.c (main): Likewise.
   15601 	* tests/nanosleep.c (main): Likewise.
   15602 	* tests/oldselect.expected: Likewise.
   15603 	* tests/utimes.c (main): Likewise.
   15604 	* tests/wait4.c (sprint_rusage): Likewise.
   15605 	* tests/waitid.c (sprint_rusage): Likewise.
   15606 	* tests/xetitimer.c (main): Likewise.
   15607 	* tests/xettimeofday.c (main): Likewise.
   15608 	* tests/xselect.c (main): Likewise.
   15609 
   15610 	Fix omission of field names in printers of timespec structure.
   15611 	* print_time.c (timespec_fmt): New constant.
   15612 	(print_timespec_t, sprint_timespec): Use it instead of time_fmt.
   15613 	* tests/aio.c: Add field names to expected output.
   15614 	* tests/clock_nanosleep.c (main): Likewise.
   15615 	* tests/clock_xettime.c (main): Likewise.
   15616 	* tests/futex.c (main): Likewise.
   15617 	* tests/mq_sendrecv.c (do_send, do_recv): Likewise.
   15618 	* tests/nanosleep.c (main): Likewise.
   15619 	* tests/ppoll-v.expected: Likewise.
   15620 	* tests/ppoll.expected: Likewise.
   15621 	* tests/pselect6.c (main): Likewise.
   15622 	* tests/recvmmsg-timeout.c (main): Likewise.
   15623 	* tests/restart_syscall.c (main): Likewise.
   15624 	* tests/rt_sigtimedwait.c (iterate, main): Likewise.
   15625 	* tests/sched_rr_get_interval.c (main): Likewise.
   15626 	* tests/semop.c (main): Likewise.
   15627 	* tests/strace-T.expected: Likewise.
   15628 	* tests/timer_xettime.c (main): Likewise.
   15629 	* tests/timerfd_xettime.c (main): Likewise.
   15630 	* tests/utimensat.c (print_ts): Likewise.
   15631 
   15632 2016-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   15633 
   15634 	tests: robustify prctl-name.test against unrelated prctl invocations.
   15635 	* tests/prctl-name.test: Filter out unrelated PR_GET_* prctl calls.
   15636 
   15637 2016-11-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   15638 
   15639 	tests: cleanup prctl-name.c.
   15640 	* tests/prctl-name.c (main): Remove "len" variable, rename "len1"
   15641 	to "len".  Remove "name1" variable, use "name" instead.
   15642 
   15643 	Move KVM_* ioctl entries from ioctls_inc*.h to ioctls_arch*.h.
   15644 	* linux/32/ioctls_inc_align32.h: Regenerate.
   15645 	* linux/32/ioctls_inc_align64.h: Likewise.
   15646 	* linux/64/ioctls_inc.h: Likewise.
   15647 	* linux/arm/ioctls_arch0.h: Likewise.
   15648 	* linux/i386/ioctls_arch0.h: Likewise.
   15649 	* linux/powerpc/ioctls_arch0.h: Likewise.
   15650 	* linux/s390/ioctls_arch0.h: Likewise.
   15651 	* linux/s390x/ioctls_arch0.h: Likewise.
   15652 	* linux/x32/ioctls_inc0.h: Likewise.
   15653 	* linux/x86_64/ioctls_arch0.h: Likewise.
   15654 
   15655 	maint: add more workarounds for alpha and powerpc.
   15656 	* maint/ioctls_sym.sh: Skip asm/core_*.h.  Filter out from
   15657 	asm-generic/ioctls.h those macros that are defined using unavailable
   15658 	struct termios2 on alpha and powerpc.
   15659 
   15660 2016-11-22  Andreas Schwab  <schwab (a] linux-m68k.org>
   15661 
   15662 	Add ioctl definitions for 16-bit alignment.
   15663 	* Makefile.am (EXTRA_DIST): Add linux/32/ioctls_inc_align16.h.
   15664 	* linux/32/ioctls_inc_align16.h: New file.
   15665 	* linux/32/ioctls_inc.h [M68K]: Include it.
   15666 
   15667 2016-11-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   15668 
   15669 	maint: move KVM_* constants from ioctls_inc.h to ioctls_arch.h.
   15670 	* maint/ioctls_gen.sh: Place constants defined in linux/kvm.h
   15671 	into ioctls_arch.h instead of ioctls_inc.h.
   15672 
   15673 2016-11-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   15674 
   15675 	maint: harmonize use of ioctls_sym.sh.
   15676 	* maint/ioctls_gen.sh: Consistently specify INCLUDES for all
   15677 	ioctls_sym.sh invocations.  Use $mydir to specify ioctls_sym.sh
   15678 	location.
   15679 
   15680 	maint: rework workarounds for linux/kvm.h.
   15681 	* maint/ioctls_sym.sh: Remove pre-include linux/kvm.h workarounds.
   15682 	Skip linux/kvm.h on those architectures that have no asm/kvm.h file.
   15683 	Introduce post-process workarounds, add post-process workarounds
   15684 	for linux/kvm.h.
   15685 
   15686 2016-11-20  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   15687 
   15688 	Restructure strace.1.
   15689 	* strace.1 (OPTIONS): Add subsections.
   15690 	(PROBLEMS): Rename to REPORTING BUGS.
   15691 	(SEE ALSO): Move to the bottom.
   15692 
   15693 2016-11-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15694 
   15695 	prctl: implement decoding of PR_SET_FP_MODE and PR_GET_FP_MODE options.
   15696 	* xlat/pr_fp_mode.in: New file.
   15697 	* prctl.c: Include "xlat/pr_fp_mode.h".
   15698 	(SYS_FUNC(prctl)): Add handling for PR_SET_FP_MODE and PR_GET_FP_MODE
   15699 	options.
   15700 
   15701 	prctl: add braces for conditional blocks with else/else-if blocks having braces
   15702 
   15703 2016-11-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15704 
   15705 	prctl: cast arg2 to int in PR_SET_PTRACER handler.
   15706 	Kernel code does this when compares it with -1 (apart from comparing it with
   15707 	PR_SET_PTRACER_ANY, which is also -1) in security/yama/yama_lsm.c.
   15708 
   15709 	* prctl.c (SYS_FUNC(prctl)) <PR_SET_PTRACER>: Cast arg2 to int before
   15710 	comparing it with -1.
   15711 
   15712 2016-11-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15713 
   15714 	prctl: use getarg_ull for option value retrieval.
   15715 	The prctl syscall does not use compat on x32/n32, so argument types
   15716 	are in fact kernel_ulong_t.
   15717 
   15718 	* prctl.c (print_prctl_args): Use getarg_ull, print as "%#llx" instead
   15719 	of "%#lx".
   15720 	(SYS_FUNC(prctl)): Use getarg_ull to store call arguments in arg2, arg3,
   15721 	arg4, arg5 variables of type unsigned long long.  Use them in printing
   15722 	routines.
   15723 	(SYS_FUNC(arch_prctl)): Use getarg_ull to store call argument in addr
   15724 	variable of type unsigned long long.  Print it as "%#llx" instead of
   15725 	"%#lx".
   15726 
   15727 2016-11-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15728 
   15729 	block: add some definitions from <linux/blkpg.h>
   15730 	This is done in order to fix build error on old distributions where
   15731 	struct blkpg_ioctl_arg declaration is broken:
   15732 
   15733 	In file included from block.c:35:
   15734 	/usr/include/linux/blkpg.h:36: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
   15735 	block.c: In function 'print_blkpg_req':
   15736 	block.c:113: error: 'struct_blkpg_ioctl_arg' has no member named 'data'
   15737 
   15738 	(from SLE10)
   15739 
   15740 	* block.c: Include <linux/ioctl.h> instead of <linux/blkpg.h>.
   15741 	(BLKPG, BLKPG_DEVNAMELTH, BLKPG_VOLNAMELTH): New macros.
   15742 	(struct_blkpg_ioctl_arg, struct_blkpg_partition): New definitions,
   15743 	copied from blkpg_ioctl_arg and blkpg_partition structures defined
   15744 	in <linux/blkpg.h>.
   15745 
   15746 2016-11-20  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15747 
   15748 	xlat: add values to new ARCH_* constants.
   15749 	Since UAPI header declares them under CONFIG_CHECKPOINT_RESTORE
   15750 	and they would never be defined in user space.
   15751 
   15752 	* xlat/archvals.in: Add numeric values to ARCH_MAP_VDSO_* constants.
   15753 
   15754 2016-11-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   15755 
   15756 	prctl: include <linux/prctl.h> instead of <sys/prctl.h>
   15757 	There are no users of prctl function in prctl.c, and all the rest
   15758 	is provided by <linux/prctl.h> anyway.
   15759 
   15760 	* prctl.c: Include <linux/prctl.h> instead of <sys/prctl.h>.
   15761 
   15762 2016-11-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   15763 
   15764 	tests: check decoding of prctl PR_GET_NAME/PR_SET_NAME operations.
   15765 	* tests/prctl-name.c: New file.
   15766 	* tests/prctl-name.test: New test.
   15767 	* tests/.gitignore: Add prctl-name.
   15768 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15769 	(DECODER_TESTS): Add prctl-name.test.
   15770 
   15771 	prctl: fix printing of PR_SET_NAME's argument.
   15772 	* prctl.c (SYS_FUNC(prctl)): Use printstr_ex with QUOTE_0_TERMINATED
   15773 	instead of printstr to print the argument of PR_SET_NAME and PR_GET_NAME
   15774 	operations.
   15775 
   15776 	printstr_ex: fix handling of last byte when QUOTE_0_TERMINATED bit set.
   15777 	* util.c (printstr_ex): Simplify handling of size == 0 case.
   15778 	Do not artificially decrement size when QUOTE_0_TERMINATED bit is set.
   15779 	Ensure that str[size] byte is non-zero if it hasn't been fetched.
   15780 
   15781 2016-11-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   15782 
   15783 	printstr_ex: handle QUOTE_0_TERMINATED bit consistently.
   15784 	When user_style has QUOTE_0_TERMINATED bit set, printstr_ex prints
   15785 	the fetched string as a NUL-terminated.
   15786 	After this change, the string is being fetched as a NUL-terminated, too.
   15787 
   15788 	* util.c (printstr_ex): Use umovestr instead of umoven
   15789 	if QUOTE_0_TERMINATED bit is set.
   15790 
   15791 2016-11-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   15792 
   15793 	Cleanup fetch part of printstr_ex.
   15794 	* util.c (printstr_ex): Initialize "style" early, unify error handling.
   15795 
   15796 2016-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   15797 
   15798 	Update prctl ARCH_* constants.
   15799 	* xlat/archvals.in: Add ARCH_MAP_VDSO_X32, ARCH_MAP_VDSO_32, and
   15800 	ARCH_MAP_VDSO_64 introduced by linux kernel commit v4.9-rc1~155^2~6.
   15801 
   15802 	Update V4L2_* constants.
   15803 	* xlat/v4l2_device_capabilities_flags.in: Add V4L2_CAP_TOUCH introduced
   15804 	by linux kernel commit v4.9-rc4~7^2~422.
   15805 	* xlat/v4l2_input_types.in: Add V4L2_CAP_TOUCH introduced
   15806 	by linux kernel commit v4.9-rc4~7^2~422.
   15807 
   15808 	Update fs *_MAGIC constants.
   15809 	* xlat/fsmagic.in: Add DAXFS_MAGIC introduced by linux kernel commit
   15810 	v4.9-rc1~45^2^2~5.
   15811 
   15812 	Update MS_* constants.
   15813 	* xlat/mount_flags.in: Add MS_NOREMOTELOCK introduced
   15814 	by linux kernel commit v4.9-rc1~57^2~1^2~7.
   15815 
   15816 	Update FALLOC_* constants.
   15817 	* xlat/falloc_flags.in: Add FALLOC_FL_UNSHARE_RANGE introduced
   15818 	by linux kernel commit v4.9-rc1~31^2~69.
   15819 
   15820 	Update BTRFS_* constants.
   15821 	* xlat/btrfs_features_compat_ro.in: Add
   15822 	BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID introduced
   15823 	by linux kernel commit v4.9-rc1~7^2^2~4.
   15824 
   15825 	Update BPF_* constants.
   15826 	* xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_PERF_EVENT introduced
   15827 	by linux kernel commit v4.9-rc1~127^2~302^2~4.
   15828 
   15829 2016-11-18  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   15830 
   15831 	make-dist: use HEAD for making distribution package.
   15832 	* make-dist: Use HEAD commit instead of master branch by default.
   15833 
   15834 2016-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   15835 
   15836 	tests: fix btrfs build error on some old systems.
   15837 	Fix the following build error on SLE 11 SP4:
   15838 
   15839 	btrfs.c: In function 'btrfs_test_dev_replace_ioctl':
   15840 	btrfs.c:1570: error: unknown field 'start' specified in initializer
   15841 
   15842 	* tests/btrfs.c (btrfs_test_dev_replace_ioctl): Move initialization
   15843 	of struct btrfs_ioctl_dev_replace_args.start.srcdevid out of the
   15844 	designated initializer.
   15845 
   15846 2016-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   15847 
   15848 	tests: check decoding of ERESTARTSYS error code.
   15849 	* tests/erestartsys.c: New file.
   15850 	* tests/erestartsys.test: New test.
   15851 	* tests/.gitignore: Add erestartsys.
   15852 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15853 	(DECODER_TESTS): Add erestartsys.test.
   15854 
   15855 2016-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   15856 
   15857 	Fix signame usage in qual_signal.
   15858 	Do not assume that the string returned by signame starts with "SIG"
   15859 	prefix, this is not always the case.
   15860 
   15861 	* syscall.c (qual_signal): Skip signame return value
   15862 	when it does not have "SIG" prefix.
   15863 
   15864 2016-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   15865 
   15866 	tests: check -e signal=set syntax.
   15867 	* tests/qual_signal.c: New file.
   15868 	* tests/qual_signal.test: New test.
   15869 	* tests/.gitignore: Add qual_signal.
   15870 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15871 	(MISC_TESTS): Add qual_signal.test.
   15872 
   15873 2016-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   15874 
   15875 	Make -e fault= expressions cumulative.
   15876 	Change the way how subsequent -e fault= expressions are interpreted
   15877 	to implement a cumulative behavior.  For example,
   15878 	-e fault=file:when=3+ -e fault=chdir
   15879 	now specifies that all chdir syscalls and 3+ file related syscalls
   15880 	except chdir are subject for fault injection.
   15881 
   15882 	* syscall.c (qualify): Do not reset qual_vec for QUAL_FAULT.
   15883 	* tests/fault_injection.test: Check it.
   15884 
   15885 2016-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   15886 
   15887 	tests: check syscall fault injection.
   15888 	* tests/fault_injection.c: New file.
   15889 	* tests/fault_injection.test: New test.
   15890 	* tests/fault_syntax.test: Likewise.
   15891 	* tests/.gitignore: Add fault_injection.
   15892 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   15893 	(MISC_TESTS): Add fault_injection.test and fault_syntax.test.
   15894 
   15895 2016-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   15896 
   15897 	Implement syscall fault injection.
   15898 	Introduce new -e fault=EXPR syntax that can be used to specify a subset
   15899 	of syscalls that are subject of syscall fault injection, an error code
   15900 	that has to be injected, and a frequency of injection.
   15901 
   15902 	The expression specifying syscall fault injection has the following
   15903 	format: SET[:error=ERRNO][:when=FIRST[+[STEP]]]
   15904 	where only SET is a required part and all the rest is optional.
   15905 
   15906 	The method used to implement syscall fault injection is the following:
   15907 	on entering syscall the syscall number is substituted by an invalid
   15908 	syscall number -1, and on exiting syscall the error code returned by
   15909 	the kernel is substituted with the error code specified in the fault
   15910 	expression.
   15911 
   15912 	This implementaion is based on the prototype developed
   15913 	by Nahim El Atmani as a part of his GSoC 2016 strace project.
   15914 
   15915 	* defs.h (struct fault_opts): New forward declaration.
   15916 	(struct tcb): Add fault_vec field.
   15917 	(TCB_FAULT_INJ, QUAL_FAULT): New macros.
   15918 	* strace.1: Document -e fault expression syntax.
   15919 	* strace.c (usage): Mention -e fault expression.
   15920 	(droptcb): Deallocate fault_vec member.
   15921 	* syscall.c (qual_fault, arch_set_scno, arch_set_error): New prototypes.
   15922 	(qual_options): Add "fault" option.
   15923 	(struct fault_opts): New structure.
   15924 	(num_faults): New variable.
   15925 	(fault_vec): New array.
   15926 	(syscall_fault_injected, tcb_fault_opts, reallocate_fault,
   15927 	find_errno_by_name, qual_syscall_ex, strip_prefix, parse_fault_token,
   15928 	parse_fault_expression, qual_fault, inject_syscall_fault_entering,
   15929 	update_syscall_fault_exiting): New functions.
   15930 	(qual_syscall): Use qual_syscall_ex.
   15931 	(qualify_one): Add argument: a pointer to struct fault_opts, all callers
   15932 	changed.  Copy struct fault_opts from the pointer to fault_vec.
   15933 	Use reallocate_fault.
   15934 	(qualify_scno, qualify_syscall_class, qualify_syscall_name): Add
   15935 	argument: a pointer to struct fault_opts.
   15936 	(qualify): Use reallocate_fault.  Do not check "all" class for
   15937 	QUAL_FAULT qualifier.
   15938 	(lookup_class): Check for "all" class.
   15939 	(trace_syscall_entering): Use inject_syscall_fault_entering.
   15940 	(trace_syscall_exiting): Use update_syscall_fault_exiting.  Clear
   15941 	TCB_FAULT_INJ flag along with TCB_INSYSCALL.  Print " (INJECTED)" suffix
   15942 	when the syscall has been injected successfully.
   15943 	[ARCH_REGS_FOR_GETREGSET && !HAVE_GETREGS_OLD]
   15944 	(ptrace_setregset): New function.
   15945 	(ptrace_setregset_or_setregs): Define to ptrace_setregset.
   15946 	[ARCH_REGS_FOR_GETREGS && !HAVE_GETREGS_OLD]
   15947 	(ptrace_setregs): New function.
   15948 	(ptrace_setregset_or_setregs): Define to ptrace_setregs.
   15949 	[ptrace_setregset_or_setregs] (set_regs): New function.
   15950 	Include "set_scno.c" and "set_error.c"
   15951 	* NEWS: Mention this enhancement.
   15952 
   15953 2016-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   15954 
   15955 	Implement arch specific methods of changing syscall number and error code
   15956 	This introduces arch_set_error and arch_set_scno functions for each
   15957 	supported architecture, needed to implement syscall fault injection.
   15958 
   15959 	* linux/aarch64/set_error.c: New file.
   15960 	* linux/aarch64/set_scno.c: Likewise.
   15961 	* linux/alpha/set_error.c: Likewise.
   15962 	* linux/alpha/set_scno.c: Likewise.
   15963 	* linux/arc/set_error.c: Likewise.
   15964 	* linux/arc/set_scno.c: Likewise.
   15965 	* linux/arm/set_error.c: Likewise.
   15966 	* linux/arm/set_scno.c: Likewise.
   15967 	* linux/avr32/set_error.c: Likewise.
   15968 	* linux/avr32/set_scno.c: Likewise.
   15969 	* linux/bfin/set_error.c: Likewise.
   15970 	* linux/bfin/set_scno.c: Likewise.
   15971 	* linux/crisv10/set_error.c: Likewise.
   15972 	* linux/crisv10/set_scno.c: Likewise.
   15973 	* linux/crisv32/set_error.c: Likewise.
   15974 	* linux/crisv32/set_scno.c: Likewise.
   15975 	* linux/hppa/set_error.c: Likewise.
   15976 	* linux/hppa/set_scno.c: Likewise.
   15977 	* linux/i386/set_error.c: Likewise.
   15978 	* linux/i386/set_scno.c: Likewise.
   15979 	* linux/ia64/set_error.c: Likewise.
   15980 	* linux/ia64/set_scno.c: Likewise.
   15981 	* linux/m68k/set_error.c: Likewise.
   15982 	* linux/m68k/set_scno.c: Likewise.
   15983 	* linux/metag/set_error.c: Likewise.
   15984 	* linux/metag/set_scno.c: Likewise.
   15985 	* linux/microblaze/set_error.c: Likewise.
   15986 	* linux/microblaze/set_scno.c: Likewise.
   15987 	* linux/mips/set_error.c: Likewise.
   15988 	* linux/mips/set_scno.c: Likewise.
   15989 	* linux/nios2/set_error.c: Likewise.
   15990 	* linux/nios2/set_scno.c: Likewise.
   15991 	* linux/or1k/set_error.c: Likewise.
   15992 	* linux/or1k/set_scno.c: Likewise.
   15993 	* linux/powerpc/set_error.c: Likewise.
   15994 	* linux/powerpc/set_scno.c: Likewise.
   15995 	* linux/powerpc64/set_error.c: Likewise.
   15996 	* linux/powerpc64/set_scno.c: Likewise.
   15997 	* linux/riscv/set_error.c: Likewise.
   15998 	* linux/riscv/set_scno.c: Likewise.
   15999 	* linux/s390/set_error.c: Likewise.
   16000 	* linux/s390/set_scno.c: Likewise.
   16001 	* linux/s390x/set_error.c: Likewise.
   16002 	* linux/s390x/set_scno.c: Likewise.
   16003 	* linux/sh/set_error.c: Likewise.
   16004 	* linux/sh/set_scno.c: Likewise.
   16005 	* linux/sh64/set_error.c: Likewise.
   16006 	* linux/sh64/set_scno.c: Likewise.
   16007 	* linux/sparc/set_error.c: Likewise.
   16008 	* linux/sparc/set_scno.c: Likewise.
   16009 	* linux/sparc64/set_error.c: Likewise.
   16010 	* linux/sparc64/set_scno.c: Likewise.
   16011 	* linux/tile/set_error.c: Likewise.
   16012 	* linux/tile/set_scno.c: Likewise.
   16013 	* linux/x32/set_error.c: Likewise.
   16014 	* linux/x32/set_scno.c: Likewise.
   16015 	* linux/x86_64/set_error.c: Likewise.
   16016 	* linux/x86_64/set_scno.c: Likewise.
   16017 	* linux/xtensa/set_error.c: Likewise.
   16018 	* linux/xtensa/set_scno.c: Likewise.
   16019 	* Makefile.am (EXTRA_DIST): Add them.
   16020 
   16021 2016-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   16022 
   16023 	cris: add syscall tables.
   16024 	The incomplete CRIS support introduced by commit v4.5.18-77-gea0e6e8
   16025 	should not have been merged because it lacks essential parts, e.g.
   16026 	syscall tables.
   16027 
   16028 	This change adds missing syscall tables for crisv10 and crisv32.
   16029 
   16030 	* linux/crisv10/syscallent.h: New file.
   16031 	* linux/crisv32/syscallent.h: Likewise.
   16032 	* Makefile.am (EXTRA_DIST): Add them.
   16033 
   16034 2016-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   16035 
   16036 	Introduce string_to_uint_ex and string_to_uint_upto functions.
   16037 	* defs.h (string_to_uint_ex): New prototype.
   16038 	(string_to_uint_upto): New function, a thin wrapper around
   16039 	string_to_uint_ex.
   16040 	* util.c (string_to_uint_ex): New function.
   16041 	(string_to_uint): Change into a thin wrapper around string_to_uint_upto.
   16042 	* strace.c (init): Use string_to_uint_upto.
   16043 	* syscall.c (qualify_scno, qual_signal, qual_desc): Use
   16044 	string_to_uint_upto instead of string_to_uint.
   16045 
   16046 2016-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   16047 
   16048 	Split qual_syscall into separate functions.
   16049 	Split qual_syscall into qualify_scno, qualify_syscall_class,
   16050 	and qualify_syscall_name.
   16051 	This might be needed later to implement syscall fault injection.
   16052 
   16053 	* syscall.c (qualify_scno, qualify_syscall_class, qualify_syscall_name):
   16054 	New functions.
   16055 	(qual_syscall): Use them.
   16056 
   16057 2016-11-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   16058 
   16059 	xtensa: wire up new syscalls.
   16060 	* linux/xtensa/syscallent.h [342..347]: New entries.
   16061 
   16062 2016-11-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   16063 
   16064 	arc: wire up new syscalls.
   16065 	* linux/arc/syscallent.h [247, 248]: New entries.
   16066 
   16067 2016-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   16068 
   16069 	tests: fix potential compilation warning in ioctl_block.c.
   16070 	ioctl_block.c:48: warning: 'init_magic' defined but not used
   16071 
   16072 	* tests/ioctl_block.c (init_magic): Define only for
   16073 	[BLKTRACESETUP && HAVE_STRUCT_BLK_USER_TRACE_SETUP].
   16074 
   16075 2016-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16076 
   16077 	Add support for pkey_mprotect, pkey_alloc, pkey_free syscalls.
   16078 	* linux/32/syscallent.h: Add syscall entries for pkey_* calls.
   16079 	* linux/64/syscallent.h: Likewise.
   16080 	* linux/arm/syscallent.h: Likewise.
   16081 	* linux/i386/syscallent.h: Likewise.
   16082 	* linux/mips/syscallent-n32.h: Likewise.
   16083 	* linux/mips/syscallent-n64.h: Likewise.
   16084 	* linux/mips/syscallent-o32.h: Likewise.
   16085 	* linux/x32/syscallent.h: Likewise.
   16086 	* linux/x86_64/syscallent.h: Likewise.
   16087 	* mem.c (do_mprotect): New function, common handler for mprotect and
   16088 	pkey_mprotect.
   16089 	(SYS_FUNC(mprotect)): Convert to wrapper around do_mprotect.
   16090 	(SYS_FUNC(pkey_mprotect)): New function.
   16091 	* xlat/pkey_access.in: New file.
   16092 	* pkeys.c: New file containing implementation of pkey_alloc and
   16093 	pkey_free.
   16094 	* Makefile.am: Add it.
   16095 	* NEWS: Mention this enhancement.
   16096 	* tests/.gitignore: Add pkey_alloc, pkey_free, and pkey_mprotect.
   16097 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16098 	(DECODER_TESTS): Add pkey_alloc.test, pkey_free.test, and
   16099 	pkey_mprotect.test.
   16100 	* tests/pkey_alloc.c: New file.
   16101 	* tests/pkey_free.c: Likewise.
   16102 	* tests/pkey_mprotect.c: Likewise.
   16103 	* tests/pkey_alloc.test: New test.
   16104 	* tests/pkey_free.test: Likewise.
   16105 	* tests/pkey_mprotect.test: Likewise.
   16106 
   16107 2016-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16108 
   16109 	tests: fix "constant is too large" compilation warnings.
   16110 	alarm.c: In function 'main':
   16111 	alarm.c:41: warning: integer constant is too large for 'long' type
   16112 	aio.c: In function 'main':
   16113 	aio.c:162: warning: integer constant is too large for 'long' type
   16114 	btrfs.c: In function 'btrfs_test_sync_ioctls':
   16115 	btrfs.c:202: warning: integer constant is too large for 'long' type
   16116 	btrfs.c: In function 'btrfs_test_subvol_ioctls':
   16117 	btrfs.c:289: warning: integer constant is too large for 'long' type
   16118 	btrfs.c:290: warning: integer constant is too large for 'long' type
   16119 	dup2.c: In function 'main':
   16120 	dup2.c:12: warning: integer constant is too large for 'long' type
   16121 	dup2.c:13: warning: integer constant is too large for 'long' type
   16122 	dup3.c: In function 'main':
   16123 	dup3.c:13: warning: integer constant is too large for 'long' type
   16124 	dup3.c:14: warning: integer constant is too large for 'long' type
   16125 	epoll_create.c: In function 'main':
   16126 	epoll_create.c:12: warning: integer constant is too large for 'long' type
   16127 	epoll_ctl.c: In function 'invoke_syscall':
   16128 	epoll_ctl.c:14: warning: integer constant is too large for 'long' type
   16129 	faccessat.c: In function 'main':
   16130 	faccessat.c:13: warning: integer constant is too large for 'long' type
   16131 	fchdir.c: In function 'main':
   16132 	fchdir.c:12: warning: integer constant is too large for 'long' type
   16133 	struct_flock.c: In function 'invoke_test_syscall':
   16134 	struct_flock.c:48: warning: integer constant is too large for 'long' type
   16135 	struct_flock.c: In function 'test_flock_einval':
   16136 	struct_flock.c:58: warning: integer constant is too large for 'long' type
   16137 	struct_flock.c:59: warning: integer constant is too large for 'long' type
   16138 	fcntl64.c: In function 'test_flock64_einval':
   16139 	fcntl64.c:44: warning: integer constant is too large for 'long' type
   16140 	fcntl64.c:45: warning: integer constant is too large for 'long' type
   16141 	fcntl.c: In function 'test_flock64_einval':
   16142 	fcntl.c:44: warning: integer constant is too large for 'long' type
   16143 	fcntl.c:45: warning: integer constant is too large for 'long' type
   16144 	fdatasync.c: In function 'main':
   16145 	fdatasync.c:12: warning: integer constant is too large for 'long' type
   16146 	flock.c: In function 'main':
   16147 	flock.c:13: warning: integer constant is too large for 'long' type
   16148 	xstatx.c: In function 'main':
   16149 	xstatx.c:255: warning: integer constant is too large for 'long' type
   16150 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16151 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16152 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16153 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16154 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16155 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16156 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16157 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16158 	xstatx.c:290: warning: integer constant is too large for 'long' type
   16159 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16160 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16161 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16162 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16163 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16164 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16165 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16166 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16167 	xstatx.c:294: warning: integer constant is too large for 'long' type
   16168 	xstatfsx.c: In function 'main':
   16169 	xstatfsx.c:113: warning: integer constant is too large for 'long' type
   16170 	fsync.c: In function 'main':
   16171 	fsync.c:12: warning: integer constant is too large for 'long' type
   16172 	ftruncate64.c: In function 'main':
   16173 	ftruncate64.c:39: warning: integer constant is too large for 'long' type
   16174 	futimesat.c: In function 'main':
   16175 	futimesat.c:52: warning: integer constant is too large for 'long' type
   16176 	futimesat.c:59: warning: integer constant is too large for 'long' type
   16177 	get_mempolicy.c: In function 'main':
   16178 	get_mempolicy.c:83: warning: integer constant is too large for 'long' type
   16179 	get_mempolicy.c:84: warning: integer constant is too large for 'long' type
   16180 	get_mempolicy.c:85: warning: integer constant is too large for 'long' type
   16181 	get_mempolicy.c:86: warning: integer constant is too large for 'long' type
   16182 	getdents.c: In function 'main':
   16183 	getdents.c:109: warning: integer constant is too large for 'long' type
   16184 	getdents.c:110: warning: integer constant is too large for 'long' type
   16185 	getdents.c:114: warning: integer constant is too large for 'long' type
   16186 	getdents64.c: In function 'main':
   16187 	getdents64.c:114: warning: integer constant is too large for 'long' type
   16188 	getdents64.c:115: warning: integer constant is too large for 'long' type
   16189 	getdents64.c:119: warning: integer constant is too large for 'long' type
   16190 	xgetrlimit.c: In function 'main':
   16191 	xgetrlimit.c:71: warning: integer constant is too large for 'long' type
   16192 	ioctl_block.c:44: warning: integer constant is too large for 'long' type
   16193 	ioctl_block.c: In function 'main':
   16194 	ioctl_block.c:136: warning: integer constant is too large for 'long' type
   16195 	ioctl_block.c:137: warning: integer constant is too large for 'long' type
   16196 	ioctl_block.c:161: warning: integer constant is too large for 'long' type
   16197 	ioctl_block.c:170: warning: integer constant is too large for 'long' type
   16198 	ioctl_block.c:171: warning: integer constant is too large for 'long' type
   16199 	ioctl_evdev.c:42: warning: integer constant is too large for 'long' type
   16200 	ioctl_mtd.c:46: warning: integer constant is too large for 'long' type
   16201 	ioctl_rtc.c:40: warning: integer constant is too large for 'long' type
   16202 	ioperm.c: In function 'main':
   16203 	ioperm.c:12: warning: integer constant is too large for 'long' type
   16204 	ioctl_v4l2.c: In function 'main':
   16205 	ioctl_v4l2.c:409: warning: integer constant is too large for 'long' type
   16206 	ipc.c: In function 'ipc_call':
   16207 	ipc.c:52: warning: integer constant is too large for 'long' type
   16208 	kill.c: In function 'main':
   16209 	kill.c:59: warning: integer constant is too large for 'long' type
   16210 	kill.c:62: warning: integer constant is too large for 'long' type
   16211 	kill.c:63: warning: integer constant is too large for 'long' type
   16212 	kill.c:68: warning: integer constant is too large for 'long' type
   16213 	linkat.c: In function 'main':
   16214 	linkat.c:14: warning: integer constant is too large for 'long' type
   16215 	linkat.c:15: warning: integer constant is too large for 'long' type
   16216 	mbind.c: In function 'main':
   16217 	mbind.c:41: warning: integer constant is too large for 'long' type
   16218 	mbind.c:43: warning: integer constant is too large for 'long' type
   16219 	mbind.c:44: warning: integer constant is too large for 'long' type
   16220 	migrate_pages.c: In function 'main':
   16221 	migrate_pages.c:41: warning: integer constant is too large for 'long' type
   16222 	In file included from mkdirat.c:10:
   16223 	umode_t.c: In function 'test_syscall':
   16224 	umode_t.c:47: warning: integer constant is too large for 'long' type
   16225 	mknod.c: In function 'call_mknod':
   16226 	mknod.c:16: warning: integer constant is too large for 'long' type
   16227 	mknod.c: In function 'main':
   16228 	mknod.c:23: warning: integer constant is too large for 'long' type
   16229 	mknod.c:49: warning: integer constant is too large for 'long' type
   16230 	mknod.c:56: warning: integer constant is too large for 'long' type
   16231 	mknodat.c:12: warning: integer constant is too large for 'long' type
   16232 	mknodat.c: In function 'call_mknodat':
   16233 	mknodat.c:17: warning: integer constant is too large for 'long' type
   16234 	mknodat.c: In function 'main':
   16235 	mknodat.c:24: warning: integer constant is too large for 'long' type
   16236 	mknodat.c:50: warning: integer constant is too large for 'long' type
   16237 	mknodat.c:57: warning: integer constant is too large for 'long' type
   16238 	mmap.c: In function 'main':
   16239 	mmap.c:51: warning: integer constant is too large for 'long' type
   16240 	move_pages.c: In function 'print_stat_pages':
   16241 	move_pages.c:139: warning: integer constant is too large for 'long' type
   16242 	move_pages.c: In function 'print_move_pages':
   16243 	move_pages.c:166: warning: integer constant is too large for 'long' type
   16244 	move_pages.c: In function 'main':
   16245 	move_pages.c:188: warning: integer constant is too large for 'long' type
   16246 	mq_sendrecv.c: In function 'main':
   16247 	mq_sendrecv.c:238: warning: integer constant is too large for 'long' type
   16248 	mq_sendrecv.c:401: warning: integer constant is too large for 'long' type
   16249 	mq_sendrecv.c:403: warning: integer constant is too large for 'long' type
   16250 	nsyscalls.c: In function 'test_syscall':
   16251 	nsyscalls.c:64: warning: integer constant is too large for 'long' type
   16252 	nsyscalls.c:65: warning: integer constant is too large for 'long' type
   16253 	nsyscalls.c:66: warning: integer constant is too large for 'long' type
   16254 	nsyscalls.c:67: warning: integer constant is too large for 'long' type
   16255 	nsyscalls.c:68: warning: integer constant is too large for 'long' type
   16256 	nsyscalls.c:69: warning: integer constant is too large for 'long' type
   16257 	preadv-pwritev.c: In function 'main':
   16258 	preadv-pwritev.c:162: warning: comparison between signed and unsigned
   16259 	prlimit64.c: In function 'main':
   16260 	prlimit64.c:65: warning: integer constant is too large for 'long' type
   16261 	prlimit64.c:70: warning: integer constant is too large for 'long' type
   16262 	remap_file_pages.c: In function 'main':
   16263 	remap_file_pages.c:42: warning: integer constant is too large for 'long' type
   16264 	remap_file_pages.c:43: warning: integer constant is too large for 'long' type
   16265 	remap_file_pages.c:45: warning: integer constant is too large for 'long' type
   16266 	renameat.c: In function 'main':
   16267 	renameat.c:15: warning: integer constant is too large for 'long' type
   16268 	renameat.c:16: warning: integer constant is too large for 'long' type
   16269 	rt_sigqueueinfo.c: In function 'main':
   16270 	rt_sigqueueinfo.c:41: warning: integer constant is too large for 'long' type
   16271 	rt_tgsigqueueinfo.c: In function 'k_tgsigqueueinfo':
   16272 	rt_tgsigqueueinfo.c:45: warning: integer constant is too large for 'long' type
   16273 	rt_tgsigqueueinfo.c:46: warning: integer constant is too large for 'long' type
   16274 	rt_tgsigqueueinfo.c:47: warning: integer constant is too large for 'long' type
   16275 	rt_tgsigqueueinfo.c: In function 'main':
   16276 	rt_tgsigqueueinfo.c:67: warning: integer constant is too large for 'long' type
   16277 	sendfile.c: In function 'main':
   16278 	sendfile.c:110: warning: integer constant is too large for 'long' type
   16279 	sendfile64.c: In function 'main':
   16280 	sendfile64.c:100: warning: integer constant is too large for 'long' type
   16281 	set_mempolicy.c: In function 'main':
   16282 	set_mempolicy.c:129: warning: integer constant is too large for 'long' type
   16283 	set_mempolicy.c:130: warning: integer constant is too large for 'long' type
   16284 	setrlimit.c: In function 'main':
   16285 	setrlimit.c:44: warning: integer constant is too large for 'long' type
   16286 	socketcall.c: In function 'test_socketcall':
   16287 	socketcall.c:58: warning: integer constant is too large for 'long' type
   16288 	splice.c: In function 'main':
   16289 	splice.c:41: warning: integer constant is too large for 'long' type
   16290 	splice.c:42: warning: integer constant is too large for 'long' type
   16291 	splice.c:45: warning: integer constant is too large for 'long' type
   16292 	splice.c:46: warning: integer constant is too large for 'long' type
   16293 	symlinkat.c: In function 'main':
   16294 	symlinkat.c:12: warning: integer constant is too large for 'long' type
   16295 	sync_file_range.c: In function 'main':
   16296 	sync_file_range.c:42: warning: integer constant is too large for 'long' type
   16297 	sync_file_range.c:43: warning: integer constant is too large for 'long' type
   16298 	syslog.c: In function 'main':
   16299 	syslog.c:14: warning: integer constant is too large for 'long' type
   16300 	tee.c: In function 'main':
   16301 	tee.c:41: warning: integer constant is too large for 'long' type
   16302 	tee.c:42: warning: integer constant is too large for 'long' type
   16303 	timer_create.c: In function 'main':
   16304 	timer_create.c:52: warning: integer constant is too large for 'long' type
   16305 	timer_create.c:84: warning: integer constant is too large for 'long' type
   16306 	timer_create.c:85: warning: integer constant is too large for 'long' type
   16307 	truncate64.c: In function 'main':
   16308 	truncate64.c:41: warning: integer constant is too large for 'long' type
   16309 	xgetrlimit.c: In function 'main':
   16310 	xgetrlimit.c:71: warning: integer constant is too large for 'long' type
   16311 	umode_t.c: In function 'test_syscall':
   16312 	umode_t.c:46: warning: integer constant is too large for 'long' type
   16313 	unlinkat.c: In function 'main':
   16314 	unlinkat.c:13: warning: integer constant is too large for 'long' type
   16315 	waitpid.c: In function 'main':
   16316 	waitpid.c:43: warning: integer constant is too large for 'long' type
   16317 	waitid.c: In function 'poison':
   16318 	waitid.c:141: warning: integer constant is too large for 'long' type
   16319 	xetpriority.c: In function 'main':
   16320 	xetpriority.c:15: warning: integer constant is too large for 'long' type
   16321 	xetpriority.c:19: warning: integer constant is too large for 'long' type
   16322 	xetpriority.c:20: warning: integer constant is too large for 'long' type
   16323 	xetpgid.c: In function 'main':
   16324 	xetpgid.c:43: warning: integer constant is too large for 'long' type
   16325 	xetpgid.c:47: warning: integer constant is too large for 'long' type
   16326 	xetpgid.c:48: warning: integer constant is too large for 'long' type
   16327 
   16328 	(SLES 11SP4, i386)
   16329 
   16330 	* tests/alarm.c (main): Add proper suffix to integer constant.
   16331 	* tests/aio.c (main): Likewise.
   16332 	* tests/btrfs.c (btrfs_test_sync_ioctls, btrfs_test_subvol_ioctls): Likewise.
   16333 	* tests/dup2.c (main): Likewise.
   16334 	* tests/dup3.c (main): Likewise.
   16335 	* tests/epoll_create.c (main): Likewise.
   16336 	* tests/epoll_ctl.c (invoke_syscall): Likewise.
   16337 	* tests/faccessat.c (main): Likewise.
   16338 	* tests/fchdir.c (main): Likewise.
   16339 	* tests/fcntl.c (test_flock64_einval): Likewise.
   16340 	* tests/fcntl64.c (test_flock64_einval): Likewise.
   16341 	* tests/fdatasync.c (main): Likewise.
   16342 	* tests/flock.c (main): Likewise.
   16343 	* tests/fstat64.c (SAMPLE_SIZE): Likewise.
   16344 	* tests/fstat.c (SAMPLE_SIZE): Likewise.
   16345 	* tests/fsync.c (main): Likewise.
   16346 	* tests/ftruncate64.c (main): Likewise.
   16347 	* tests/futimesat.c (main): Likewise.
   16348 	* tests/get_mempolicy.c (main): Likewise.
   16349 	* tests/getdents.c (main): Likewise.
   16350 	* tests/getdents64.c (main): Likewise.
   16351 	* tests/ioctl_block.c (lmagic, main): Likewise.
   16352 	* tests/ioctl_evdev.c (lmagic): Likewise.
   16353 	* tests/ioctl_mtd.c (lmagic): Likewise.
   16354 	* tests/ioctl_rtc.c (lmagic): Likewise.
   16355 	* tests/ioctl_v4l2.c (main): Likewise.
   16356 	* tests/ioperm.c (main): Likewise.
   16357 	* tests/ipc.c (ipc_call): Likewise.
   16358 	* tests/kill.c (main): Likewise.
   16359 	* tests/linkat.c (main): Likewise.
   16360 	* tests/lstat64.c (SAMPLE_SIZE): Likewise.
   16361 	* tests/lstat.c (SAMPLE_SIZE): Likewise.
   16362 	* tests/mbind.c (main): Likewise.
   16363 	* tests/migrate_pages.c (main): Likewise.
   16364 	* tests/mkdirat.c (TEST_SYSCALL_PREFIX_ARGS): Likewise.
   16365 	* tests/mknod.c (call_mknod, main): Likewise.
   16366 	* tests/mknodat.c (fd, call_mknodat, main): Likewise.
   16367 	* tests/mmap.c (main): Likewise.
   16368 	* tests/move_pages.c (print_stat_pages, print_move_pages): Likewise.
   16369 	* tests/mq_sendrecv.c (main): Likewise.
   16370 	* tests/nsyscalls.c (test_syscall): Likewise.
   16371 	* tests/prlimit64.c (main): Likewise.
   16372 	* tests/remap_file_pages.c (main): Likewise.
   16373 	* tests/renameat.c (main): Likewise.
   16374 	* tests/rt_sigqueueinfo.c (main): Likewise.
   16375 	* tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo, main): Likewise.
   16376 	* tests/sendfile.c (main): Likewise.
   16377 	* tests/sendfile64.c (main): Likewise.
   16378 	* tests/set_mempolicy.c (main): Likewise.
   16379 	* tests/setrlimit.c (main): Likewise.
   16380 	* tests/socketcall.c (test_socketcall): Likewise.
   16381 	* tests/splice.c (main): Likewise.
   16382 	* tests/stat64.c (SAMPLE_SIZE): Likewise.
   16383 	* tests/stat.c (SAMPLE_SIZE): Likewise.
   16384 	* tests/struct_flock.c (invoke_test_syscall, test_flock_einval): Likewise.
   16385 	* tests/symlinkat.c (main): Likewise.
   16386 	* tests/sync_file_range.c (main): Likewise.
   16387 	* tests/syslog.c (main): Likewise.
   16388 	* tests/tee.c (main): Likewise.
   16389 	* tests/timer_create.c (main): Likewise.
   16390 	* tests/truncate64.c (main): Likewise.
   16391 	* tests/umode_t.c (test_syscall): Likewise.
   16392 	* tests/unlinkat.c (main): Likewise.
   16393 	* tests/waitid.c (main): Likewise.
   16394 	* tests/waitpid.c (main): Likewise.
   16395 	* tests/xetpgid.c (main): Likewise.
   16396 	* tests/xetpriority.c (main): Likewise.
   16397 	* tests/xgetrlimit.c (main): Likewise.
   16398 	* tests/xstatfsx.c (main) [CHECK_ODD_SIZE]: Likewise.
   16399 	* tests/xstatx.c (main): Likewise.
   16400 
   16401 2016-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16402 
   16403 	tests: fix "comparison between signed and unsigned" compilation warnings
   16404 	preadv-pwritev.c: In function 'main':
   16405 	preadv-pwritev.c:162: warning: comparison between signed and unsigned
   16406 	readv.c: In function 'main':
   16407 	readv.c:148: warning: comparison between signed and unsigned
   16408 	recvmsg.c: In function 'main':
   16409 	recvmsg.c:148: warning: comparison between signed and unsigned
   16410 
   16411 	* tests/preadv-pwritev.c (main): Cast r_len to int.
   16412 	* tests/readv.c (main): Likewise.
   16413 	* tests/recvmsg.c (main): Likewise.
   16414 
   16415 2016-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   16416 
   16417 	syscall.c: refactor getregs_old fallback in get_regs.
   16418 	This change moves remaining arch specific getregs_old code into
   16419 	appropriate arch subdirectories and removes unnecessary code
   16420 	duplication.
   16421 
   16422 	* linux/getregs_old.h: New file.
   16423 	* linux/powerpc/getregs_old.h: Likewise.
   16424 	* linux/powerpc64/getregs_old.h: Likewise.
   16425 	* linux/x86_64/getregs_old.h: Likewise.
   16426 	* Makefile.am (EXTRA_DIST): Add them.
   16427 	* syscall.c: Include "getregs_old.h".
   16428 	[X86_64 || POWERPC]: Remove.
   16429 	[ARCH_REGS_FOR_GETREGSET] (ptrace_getregset_or_getregs): Define
   16430 	to ptrace_getregset.
   16431 	[ARCH_REGS_FOR_GETREGS] (ptrace_getregset_or_getregs): Define
   16432 	to ptrace_getregs.
   16433 	(get_regs): Check for ptrace_getregset_or_getregs instead
   16434 	of ARCH_REGS_FOR_GETREGSET and ARCH_REGS_FOR_GETREGS.  Use
   16435 	ptrace_getregset_or_getregs instead of ptrace_getregset and
   16436 	ptrace_getregs.  Check for HAVE_GETREGS_OLD instead of X86_64
   16437 	and POWERPC.  Use use_getregs_old instead of getregset_support
   16438 	and old_kernel.
   16439 
   16440 2016-11-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16441 
   16442 	Rename BUILD_BUG_ON_ZERO macro.
   16443 	In order to avoid name clash on distributions which decide to include
   16444 	kernel headers instead of UAPI ones.  For example, on SLES 11SP4:
   16445 
   16446 	gcc -DHAVE_CONFIG_H -I./linux/x86_64 -I./linux -I. -Wall -O2 -c net.c
   16447 	In file included from /usr/include/linux/sysctl.h:25:0,
   16448 	                 from /usr/include/linux/netfilter.h:6,
   16449 	                 from /usr/include/linux/netfilter_arp.h:8,
   16450 	                 from /usr/include/linux/netfilter_arp/arp_tables.h:14,
   16451 	                 from net.c:60:
   16452 	net.c: In function 'print_packet_mreq':
   16453 	gcc_compat.h:59:27: error: negative width in bit-field '<anonymous>'
   16454 	 # define MUST_BE_ARRAY(a) BUILD_BUG_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
   16455 	                           ^
   16456 	defs.h:76:53: note: in expansion of macro 'MUST_BE_ARRAY'
   16457 	 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]) + MUST_BE_ARRAY(a))
   16458 	                                                     ^
   16459 	net.c:747:22: note: in expansion of macro 'ARRAY_SIZE'
   16460 	   if (mreq.mr_alen > ARRAY_SIZE(mreq.mr_address))
   16461 	                      ^
   16462 	due to the fact BUILD_BUG_ON_ZERO is already defined in <linux/kernel.h>.
   16463 
   16464 	* gcc_compat.h (BUILD_BUG_ON_ZERO): Rename to FAIL_BUILD_ON_ZERO.
   16465 	(MUST_BE_ARRAY): Update usage.
   16466 
   16467 2016-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   16468 
   16469 	syscall.c: factor out ptrace_getregs from get_regs.
   16470 	Move the code that calls ptrace(PTRACE_GETREGS) to a separate function.
   16471 
   16472 	* syscall.c (ptrace_getregs): New function.
   16473 	(get_regs): Use it.
   16474 
   16475 2016-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   16476 
   16477 	syscall.c: rename get_regset to ptrace_getregset.
   16478 	* syscall.c (get_regset): Rename to ptrace_getregset.
   16479 	(get_regs): Rename get_regset to ptrace_getregset.
   16480 
   16481 2016-11-12  Andreas Schwab  <schwab (a] linux-m68k.org>
   16482 
   16483 	m68k: switch to PTRACE_GETREGS.
   16484 	* Makefile.am (EXTRA_DIST): Add linux/m68k/arch_regs.h, remove
   16485 	linux/m68k/get_syscall_result.c.
   16486 	* linux/m68k/arch_regs.c (m68k_d0, ARCH_PC_PEEK_ADDR): Don't
   16487 	define.
   16488 	(m68k_regs, m68k_usp_ptr, ARCH_PC_REG, ARCH_REGS_FOR_GETREGS):
   16489 	Define.
   16490 	* linux/m68k/arch_regs.h: New file.
   16491 	* linux/m68k/arch_sigreturn.c (arch_sigreturn): Use m68k_usp_ptr.
   16492 	* linux/m68k/get_error.c (get_error): Use m68k_regs.d0.
   16493 	* linux/m68k/get_scno.c (arch_get_scno): Use m68k_regs.orig_d0.
   16494 	* linux/m68k/get_syscall_args.c (get_syscall_args): Use m68k_regs.
   16495 	* linux/m68k/get_syscall_result.c: Remove.
   16496 
   16497 	tests: do not run old_mmap test on m68k.
   16498 	* tests/old_mmap.c: Skip test on m68k.
   16499 
   16500 2016-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   16501 
   16502 	syscall.c: introduce reallocate_vec function.
   16503 	This might be needed later to implement syscall fault injection.
   16504 
   16505 	* syscall.c (reallocate_vec): New function.
   16506 	(reallocate_qual): Use it.
   16507 
   16508 2016-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   16509 
   16510 	Fix prototypes of qual_desc, qual_signal, and qual_syscall functions.
   16511 	* syscall.c (qual_desc, qual_signal, qual_syscall): Fix prototypes.
   16512 	(struct qual_options): Fix type of "qualify" member.
   16513 
   16514 2016-11-12  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16515 
   16516 	linux/x32/syscallent.h: fix syscallent array initialisation on x32.
   16517 	Why gcc didn't complain about it? It is definitely an index clash.
   16518 
   16519 	* linux/x32/syscallent.h: Change initializer indices for empty records from
   16520 	[327 ... 511] to [329 ... 511].
   16521 
   16522 2016-11-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   16523 
   16524 	Introduce upoke function.
   16525 	This will be needed to implement fault injection on those architectures
   16526 	that lack PTRACE_SETREGSET/PTRACE_SETREGS support.
   16527 
   16528 	* defs.h (upoke): New prototype.
   16529 	* upoke.c: New file.
   16530 	* Makefile.am (libstrace_a_SOURCES): Add it.
   16531 
   16532 2016-11-11  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   16533 
   16534 	Update ioctl entries from linux 4.9.
   16535 	* linux/32/ioctls_inc_align32.h: Update from linux v4.9 using ioctls_gen.sh.
   16536 	* linux/32/ioctls_inc_align64.h: Likewise.
   16537 	* linux/64/ioctls_inc.h: Likewise.
   16538 	* linux/x32/ioctls_inc0.h: Likewise.
   16539 	* NEWS: Mention this.
   16540 
   16541 2016-11-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16542 
   16543 	Update NEWS.
   16544 
   16545 2016-11-10  Mikulas Patocka  <mpatocka (a] redhat.com>
   16546 	    Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16547 
   16548 	Add support for decoding of DM_* ioctl commands.
   16549 	* dm.c: New file.
   16550 	* xlat/dm_flags.in: Likewise.
   16551 	* Makefile.am (strace_SOURCES): Add dm.c.
   16552 	* configure.ac (AC_CHECK_HEADERS): Add linux/dm-ioctl.h.
   16553 	* defs.h (dm_ioctl): New prototype.
   16554 	* ioctl.c (ioctl_decode) [HAVE_LINUX_DM_IOCTL_H]: Call dm_ioctl
   16555 	for 0xfd ioctl type.
   16556 	* tests/ioctl_dm.c: New file.
   16557 	* tests/ioctl_dm-v.c: Likewise.
   16558 	* tests/ioctl_dm.test: New test.
   16559 	* tests/ioctl_dm-v.test: Likewise.
   16560 	* tests/.gitignore: Add ioctl_dm and ioctl_dm-v.
   16561 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16562 	(DECODER_TESTS): Add ioctl_dm.test and ioctl_dm-v.test.
   16563 
   16564 2016-11-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   16565 
   16566 	Introduce ALIGNOF macro.
   16567 	* gcc_compat.h (ALIGNOF): New macro.
   16568 
   16569 2016-11-10  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16570 
   16571 	util: add support for QUOTE_0_TERMINATED in user_style to ptrintstr_ex.
   16572 	This enables printing size-limited (expectedly) ASCIZ strings.
   16573 
   16574 	This is done by increasing umoven size limit for sized strings by one
   16575 	byte above max_strlen (enabling copying possible NUL byte in case len is
   16576 	greater than max_strlen) and decreasing size after copying by one byte
   16577 	in case QUOTE_0_TERMINATED is set (due to user_style or usage of len of
   16578 	-1).  As a result, there is one excess byte for string_quote in case
   16579 	QUOTE_0_TERMINATED is set so string_quote can check for NUL termination
   16580 	of strings up to size bytes in size (which is len or max_strlen, whatever
   16581 	is greater).
   16582 
   16583 	The catch here is that when string is not properly NUL-terminated and
   16584 	QUOTE_0_TERMINATED is provided in user_style and len is less than
   16585 	max_strlen then last non-NUL byte is not printed.  But ellipsis is
   16586 	printed instead, being indication that string is not terminated
   16587 	properly.  QUOTE_OMIT_TRAILING_0 should be used instead in case this
   16588 	behaviour is not intended.
   16589 
   16590 	* util.c (printstr_ex): Copy one excess byte in case of non-negative len
   16591 	provided and it is more than max_strlen; handle case of max_strlen of 0
   16592 	in case QUOTE_0_TERMINATED is set separately; check for need of printing
   16593 	ellipsis by checking resulting style against QUOTE_0_TERMINATED.
   16594 
   16595 2016-11-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16596 
   16597 	tests: check decoding of mq_{notify,open,timedreceive,timedsend,unlink}
   16598 	* tests/mq_sendrecv.c: New file.
   16599 	* tests/mq_sendrecv-read.c: Likewise.
   16600 	* tests/mq_sendrecv-write.c: Likewise.
   16601 	* tests/mq_sendrecv.test: New test.
   16602 	* tests/mq_sendrecv-read.test: Likewise.
   16603 	* tests/mq_sendrecv-write.test: Likewise.
   16604 	* tests/.gitignore: Add mq_sendrecv, mq_sendrecv-read,
   16605 	and mq_sendrecv-write.
   16606 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16607 	(mq_sendrecv_LDADD, mq_sendrecv_read_LDADD, mq_sendrecv_write_LDADD):
   16608 	New variables.
   16609 	(DECODER_TESTS): Add mq_sendrecv.test, mq_sendrecv-read.test,
   16610 	and mq_sendrecv-write.test.
   16611 
   16612 2016-11-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   16613 
   16614 	tests: skip times.test if CLOCK_PROCESS_CPUTIME_ID does not work.
   16615 	* tests/times.c (main): Skip if clock_gettime consistenly returns zero
   16616 	for CLOCK_PROCESS_CPUTIME_ID timer.
   16617 
   16618 2016-10-31  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16619 
   16620 	tests: add tests for perf_event_attr structure decoding in perf_event_open
   16621 	* configure.ac: Add checks for presence of various fields of struct
   16622 	perf_event_attr defined in kernel headers.
   16623 	* tests/perf_event_open.c: New file.
   16624 	* tests/perf_event_open_unabbrev.c: Likewise.
   16625 	* tests/perf_event_open.test: New test.
   16626 	* tests/perf_event_open_unabbrev.test: Likewise.
   16627 	* tests/.gitignore: Add perf_event_open, perf_event_open_unabbrev.
   16628 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16629 	(DECODER_TESTS): Add perf_event_open.test, perf_event_open_unabbrev.test.
   16630 
   16631 	Implement decoding of perf_event_attr structure in perf_event_open syscall
   16632 	* linux/perf_event_struct.h: New file, definition of struct perf_event_attr
   16633 	from Linux 4.8
   16634 	* Makefile.am (strace_SOURCES): Add it.
   16635 	* xlat/hw_breakpoint_len.in: New file.
   16636 	* xlat/hw_breakpoint_type.in: Likewise.
   16637 	* xlat/perf_attr_size.in: Likewise.
   16638 	* xlat/perf_branch_sample_type.in: Likewise.
   16639 	* xlat/perf_event_read_format.in: Likewise.
   16640 	* xlat/perf_event_sample_format.in: Likewise.
   16641 	* xlat/perf_hw_cache_id.in: Likewise.
   16642 	* xlat/perf_hw_cache_op_id.in: Likewise.
   16643 	* xlat/perf_hw_cache_op_result_id.in: Likewise.
   16644 	* xlat/perf_hw_id.in: Likewise.
   16645 	* xlat/perf_sw_ids.in: Likewise.
   16646 	* xlat/perf_type_id.in: Likewise.
   16647 	* perf.c [HAVE_LINUX_PERF_EVENT_H]: Remove inclusion of
   16648 	<linux/perf_event.h>.
   16649 	(PRINT_XLAT): New macro for simplifying printing values from
   16650 	sorted xlat.
   16651 	(printxlat_search): New function, wrapper for xlat_search with behaviour
   16652 	similar to printval.
   16653 	(print_perf_event_attr): New print_event_attr structure fetching and
   16654 	printing function.
   16655 	(SYS_FUNC(perf_event_open)): Use print_perf_event_attr for displaying
   16656 	attr argument contents.
   16657 	* tests/perf_event_open.c: Renamed to
   16658 	tests/perf_event_open_nonverbose.c.
   16659 	* tests/perf_event_open.test: add -e verbose=none in order to preserve
   16660 	output format being checked (in case verbose output is enabled,
   16661 	contents of attr arguments are shown now); rename to
   16662 	tests/perf_event_open_nonverbose.test; add -e trace=perf_event_open.
   16663 
   16664 	tests: fix name spelling.
   16665 
   16666 2016-10-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16667 
   16668 	tests: fix name spelling.
   16669 
   16670 	Update NEWS.
   16671 
   16672 	Fix typo in comment in tests/quotactl.h.
   16673 
   16674 	tests: fix invalid pointer checks in quotactl test.
   16675 	* tests/quotactl.h (bogus_special, bogus_addr): Move it...
   16676 	* tests/quotactl.c (main): ... here; remove static and const qualifiers,
   16677 	use memory after tail_alloc instead of magic numbers.
   16678 	* tests/quotactl-xfs.c (main): Likewise.
   16679 
   16680 	tests: fix invalid pointer checks in getcpu test.
   16681 	* test/getcpu.c (main): Replace magic numbers deemed invalid pointers
   16682 	with addresses after memory returned by tail_alloc.
   16683 
   16684 	tests: fix invalid pointer checks in request_key test.
   16685 	* test/request_key.c (main): Replace magic numbers deemed invalid pointers
   16686 	with addresses after memory returned by tail_alloc.
   16687 
   16688 	tests: fix invalid pointer checks in add_key test.
   16689 	* test/add_key.c (main): Replace magic numbers deemed invalid pointers
   16690 	with addresses after memory returned by tail_alloc.
   16691 
   16692 	statfs: use printxval_search.
   16693 	* print_statfs.c (print_statfs_type): Use printxval_search for printing
   16694 	FS magic xlat value.
   16695 
   16696 	util: add printing helper for sorted xlat arrays.
   16697 	* util.c (printxval_searchn): New function.
   16698 	* defs.h (printxval_searchn): New prototype.
   16699 	(printxval_search): New helper macro useful in conjunction with static
   16700 	xlat arrays.
   16701 
   16702 	defs: add check for argument being array to ARRAY_SIZE macro.
   16703 	* gcc_compat.h [GNUC_PREREQ(3, 0)] (BUILD_BUG_ON_ZERO): New macro.
   16704 	(SAME_TYPE, MUST_BE_ARRAY): Likewise.
   16705 	* defs.h (ARRAY_SIZE): Add MUST_BE_ARRAY for build-time type check.
   16706 
   16707 	tests: check decoding of oldfstat, oldlstat, and oldstat syscalls.
   16708 	* tests/oldfstat.c: New file.
   16709 	* tests/oldlstat.c: Likewise.
   16710 	* tests/oldstat.c: Likewise.
   16711 	* tests/oldfstat.test: New test.
   16712 	* tests/oldlstat.test: Likewise.
   16713 	* tests/oldstat.test: Likewise.
   16714 	* tests/xstatx.c [!OLD_STAT]: define OLD_STAT to 0.
   16715 	(print_stat) [OLD_STAT]: Print predefined values for
   16716 	st_blksize/st_blocks.
   16717 	(print_stat): Check for !OLD_STAT in nanosecond precision checks.
   16718 	(main) [OLD_STAT]: Ignore EOVERFLOW.
   16719 	(main): Test for successful rc in returned size value check;
   16720 	print address only on non-successful rc.
   16721 	* tests/.gitignore: Add oldfstat, oldlstat, and oldstat.
   16722 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16723 	(DECODER_TESTS): Add oldfstat.test, oldlstat.test, and oldstat.test.
   16724 
   16725 	tests: additional tests of stat decoders.
   16726 	* tests/fstatx.c (IS_FSTAT): Define to 1.
   16727 	* tests/fstatat64.c [__GLIBC__ && __sparc64__] (TEST_BOGUS_STRUCT_STAT):
   16728 	Define to 0.
   16729 	* tests/xstatx.c [!IS_STAT] (IS_STAT): Define to 0.
   16730 	[!TEST_BOGUS_STRUCT_STAT] (TEST_BOGUS_STRUCT_STAT): Define to 1.
   16731 	(main): Add a check for non-available pointer and a check
   16732 	for block device file.
   16733 	* tests/statx.sh: Add tracing of /dev/full file, specify alignment.
   16734 	* tests/fstat.test: Specify alignment.
   16735 
   16736 2016-10-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16737 
   16738 	tests: prepare for additional tests of stat decoders.
   16739 	PRINT_SYSCALL_HEADER/PRINT_SYSCALL_FOOTER now contain open/close brace
   16740 	pair in order to save errno.  PRINT_SYSCALL_FOOTER now uses sprintrc for
   16741 	printing rc/errno.
   16742 
   16743 	* tests/xstatx.c: Include <errno.h>.
   16744 	(main): Update PRINT_SYSCALL_FOOTER call convention.
   16745 	* tests/fstatat.c (PRINT_SYSCALL_HEADER): Add errno saving.
   16746 	(PRINT_SYSCALL_FOOTER): Restore errno.
   16747 	* tests/fstatx.c: Likewise.
   16748 	* tests/lstatx.c: Likewise.
   16749 
   16750 2016-10-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   16751 
   16752 	Provide a safe definition of O_ACCMODE.
   16753 	Some libcs e.g. musl are guilty of messing up with O_ACCMODE.
   16754 
   16755 	* open.c (O_ACCMODE): Redefine to 03.
   16756 
   16757 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16758 
   16759 	Implement dumping of mq_timedsend and mq_timedreceive syscalls.
   16760 	* syscall.c (dumpio): Add SEN_mq_timedreceive and SEN_mq_timedsend.
   16761 
   16762 	mq: print msg_prio as a pointer, not as an immediate value.
   16763 	* mq.c (SYS_FUNC(mq_timedreceive)): Use printnum_int for printing
   16764 	msg_prio argument.
   16765 
   16766 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16767 
   16768 	mq: print msg payload only in case of successful mq_timedreceive call.
   16769 	Also, use u_rval for determining message size.
   16770 
   16771 	* mq.c (SYS_FUNC(mq_timedreceive)): Check for syserror and non-negative
   16772 	u_rval before calling printstr on msg_ptr argument, or use printaddr otherwise;
   16773 	provide u_rval as string size.
   16774 
   16775 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16776 
   16777 	mq: Print msg_prio parameter as unsigned int in mq_timedsend.
   16778 	* mq.c (SYS_FUNC(mq_timedsend)): Change conversion specifier from "%ld"
   16779 	to "%u", cast argument value to unsigned int.
   16780 
   16781 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16782 
   16783 	mq: Properly print mq_flags field.
   16784 	mq_flags field of struct mq_attr can contain only O_NONBLOCK flag (other
   16785 	flags are treated as invalid by mq_getsetattr). Moreover, this field is
   16786 	ignored by mq_open at all (O_NONBLOCK is set via oflag, not via attr
   16787 	attribute).
   16788 
   16789 	* xlat/mq_attr_flags.in: New file.
   16790 	* print_mq_attr.c: Include xlat/mq_attr_flags.h.
   16791 	(printmqattr): New parameter, bool decode_flags; cast members of struct
   16792 	mq_attr to long long type; use mq_attr_flags xlat for printing mq_flags;
   16793 	print mq_flags as flags only in case decode_flags parameter is set
   16794 	to true.
   16795 	* mq.c (SYS_FUNC(mq_open)): Specify value of false for decode_flags
   16796 	parameter of printmqattr call.
   16797 	(SYS_FUNC(mq_getsetattr)): Specify value of true for decode_flags
   16798 	parameter of printmqattr call.
   16799 	* tests/mq.expected: Update expected output.
   16800 
   16801 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16802 
   16803 	mq: Print msg_len parameter as kernel_ulong_t.
   16804 	* mq.c (SYS_FUNC(mq_timedsend)): Change conversion specifier from "%lu"
   16805 	to "%llu", use getarg_ull for obtaining msg_len parameter.
   16806 	(SYS_FUNC(mq_timedreceive)): Likewise.
   16807 
   16808 	print_mq_attr: fix typo.
   16809 	* print_mq_attr.c (printmqattr): Print field name "mq_curmsgs"
   16810 	instead of "mq_curmsg".
   16811 	* tests/mq.expected: Update expected output.
   16812 
   16813 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16814 
   16815 	mq: print mqdes parameter as int.
   16816 	It is defined as int in <linux/posix_types.h>.
   16817 
   16818 	* mq.c (SYS_FUNC(mq_timedsend)): Use "%d" conversion specifier instead
   16819 	of "%ld" for printing mqdes (0th parameter), cast parameter value to
   16820 	int.
   16821 	(SYS_FUNC(mq_timedreceive)): Likewise.
   16822 	(SYS_FUNC(mq_notify)): Likewise.
   16823 	(SYS_FUNC(mq_getsetattr)): Likewise.
   16824 
   16825 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16826 
   16827 	mq: curly brackets usage fix.
   16828 	Use curly brackets for denoting blocks in both of if branches if they
   16829 	are already used in at least one branch.
   16830 
   16831 	tests: additional name_to_handle_at/open_by_handle_at checks.
   16832 	* tests/file_handle.c: Additional name_to_handle_at/open_by_handle_at
   16833 	checks.
   16834 
   16835 	tests: require only presence of __NR_* macros for file_handle test.
   16836 	* tests/file_handle.c: replace fcntl.h include with asm/unistd.h.
   16837 	[MAX_HANDLE_SZ]: change to defined __NR_name_to_handle_at
   16838 	&& defined __NR_open_by_handle_at, add fcntl.h include
   16839 	[!MAX_HANDLE_SZ]: Add definition of MAX_HANDLE_SZ and struct
   16840 	file_handle.
   16841 	(main): Change name_to_handle_at and open_by_handle_at calls to syscall.
   16842 
   16843 	tests: proper type conversion in keyctl test.
   16844 	* tests/keyctl.c (printarg): Add intermediate conversion of arg to uintptr_t
   16845 	since kernel_ulong_t may be of different size.
   16846 
   16847 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16848 
   16849 	file_handle: use separate xlat for name_ta_handle_at flags.
   16850 	Since the only two flags supported are AT_SYMLINK_FOLLOW and
   16851 	AT_EMPTY_PATH.
   16852 
   16853 	* xlat/name_to_handle_at_flags.in: New file.
   16854 	* file_handle.c (SYS_FUNC(name_to_handle_at)): Use name_to_handle_at_flags
   16855 	for printing flags parameter.
   16856 
   16857 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16858 
   16859 	tests: check decoding of kexec_file_load and kexec_load syscalls.
   16860 	* tests/kexec_file_load.c: New file.
   16861 	* tests/kexec_load.c: Likewise.
   16862 	* tests/kexec_file_load.test: New test.
   16863 	* tests/kexec_load.test: Likewise.
   16864 	* tests/.gitignore: Add kexec_file_load and kexec_load.
   16865 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16866 	(DECODER_TESTS): Add kexec_file_load.test and kexec_load.test.
   16867 
   16868 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16869 
   16870 	kexec: use widen_to_ulong since kexec_load has compat on x32/n32.
   16871 	Curiously, kexec_load uses compat on x32/n32, so its parameters should
   16872 	be 4 bytes in size on these ABIs.
   16873 
   16874 	* kexec.c (SYS_FUNC(kexec_load)): Use widen_to_ulong for casting
   16875 	parameters to proper size on x32/n32.
   16876 
   16877 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16878 
   16879 	kexec: fix zeroing of higher bits of flags parameter in kexec_load.
   16880 	* kexec.c (SYS_FUNC(kexec_load)): Perform type conversion before
   16881 	negation in order to properly negate higher bits of KEXEC_ARCH_MASK.
   16882 
   16883 	kexec: add printing of struct kexec_segment field names.
   16884 	* kexec.c (print_seg): Print field names of the kexec_segment structure.
   16885 
   16886 	tests: check decoding of unshare syscall.
   16887 	* tests/unshare.c: New file.
   16888 	* tests/unshare.test: New test.
   16889 	* tests/.gitignore: Add unshare.
   16890 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16891 	(DECODER_TESTS): Add unshare.test.
   16892 
   16893 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16894 
   16895 	clone: use kernel_ulong_t as type of flags parameter of unshare call.
   16896 	Kernel declares flags parameter as long and looks like x32 and n32
   16897 	implement no compat for this call.
   16898 
   16899 	* clone.c (SYS_FUNC(unshare)): Use getarg_ull and printflags64 for
   16900 	obtaining and parsing flags parameter.
   16901 
   16902 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16903 
   16904 	clone: use separate flag list for unshare.
   16905 	Not all clone flags could be passed to unshare (see check_unshare_flags
   16906 	function in kernel/fork.c).
   16907 
   16908 	* xlat/unshare_flags.in: New file.
   16909 	* clone.c (SYS_FUNC(unshare)): Use unshare_flags for printing flags
   16910 	parameter.
   16911 
   16912 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16913 
   16914 	tests: check decoding of setns syscall.
   16915 	* tests/setns.c: New file.
   16916 	* tests/setns.test: New test.
   16917 	* tests/.gitignore: Add setns.
   16918 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16919 	(DECODER_TESTS): Add setns.test.
   16920 
   16921 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16922 
   16923 	clone: use separate xlat for nstype parameter of setns syscall.
   16924 	nstype is not flag set but specific type value against which it is
   16925 	compared in kernel (see kernel/nsproxy.c, SYSCALL_DEFINE2(setns, ...)).
   16926 
   16927 	* xlat/setns_types.in: New file.
   16928 	* clone.c: Use printxval and setns_types for nstype parameter.
   16929 
   16930 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16931 
   16932 	tests: check non-verbose capget/capset output.
   16933 	* tests/caps-abbrev.awk: New file.
   16934 	* tests/caps-abbrev.c: Likewise.
   16935 	* tests/caps-abbrev.test: New test.
   16936 	* tests/.gitignore: Add caps-abbrev.
   16937 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16938 	(DECODER_TESTS): Add caps-abbrev.test.
   16939 	(EXTRA_DIST): Add caps-abbrev.awk.
   16940 
   16941 	tests: additional capset decoder checks.
   16942 	* tests/caps.awk: Add patterns for additional checks.
   16943 	* tests/caps.c: Implement additional checks.
   16944 
   16945 	tests: check decoding of fanotify_init syscall.
   16946 	* tests/fanotify_init.c: New file.
   16947 	* tests/fanotify_init.test: New test.
   16948 	* tests/.gitignore: Add fanotify_init.
   16949 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16950 	(DECODER_TESTS): Add fanotify_init.test.
   16951 
   16952 	tests: some additional checks for fanotify_mark.
   16953 	* tests/fanotify_mark.c (do_call): New function.
   16954 	(main): Use it.
   16955 
   16956 	tests: use sprintrc in tests/fanotify_mark.c.
   16957 	* tests/fanotify.c (main): Use sprintrc.
   16958 
   16959 	tests: check decoding of {init,finit,delete}_module syscalls.
   16960 	* tests/delete_module.c: New file.
   16961 	* tests/finit_module.c: Likewise.
   16962 	* tests/init_delete_module.h: Likewise.
   16963 	* tests/init_module.c: Likewise.
   16964 	* tests/delete_module.test: New test.
   16965 	* tests/finit_module.test: Likewise.
   16966 	* tests/init_module.test: Likewise.
   16967 	* tests/.gitignore: Add delete_nodule, finit_module, and init_module.
   16968 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   16969 	(DECODER_TESTS): Add delete_module.test, finit_module.test,
   16970 	and init_module.test.
   16971 	(EXTRA_DIST): Add init_delete_module.h.
   16972 
   16973 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16974 
   16975 	bjm: use getarg_ull for retrieving first two parameters of init_module syscall
   16976 	As init_module has no compat wrapper, its first parameter is a pointer
   16977 	and the second is length, they both have the same size as kernel_ulong_t
   16978 	type.
   16979 
   16980 	* bjm.c (SYS_FUNC(init_module)): Obtain first two parameters using
   16981 	getarg_ull, print address argument using printaddr_ull, print length
   16982 	argument using "%llu" conversion specifier.
   16983 
   16984 2016-10-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   16985 
   16986 	Add printaddr_ull, change printaddr into a thin wrapper around it.
   16987 	* defs.h (printaddr_ull): New prototype.
   16988 	(printaddr): Change to a static inline wrapper around printaddr_ull.
   16989 	* util.c (printaddr): Rename to printaddr_ull, change argument type
   16990 	to unsigned long long, change print format to %#llx.
   16991 
   16992 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   16993 
   16994 	xlat: add values for MODULE_INIT_* constants.
   16995 	* bjm.c (MODULE_INIT_IGNORE_MODVERSIONS, MODULE_INIT_IGNORE_VERMAGIC):
   16996 	Remove.
   16997 	* xlat/module_init_flags.in: Add values for
   16998 	MODULE_INIT_IGNORE_MODVERSIONS and MODULE_INIT_IGNORE_VERMAGIC records.
   16999 
   17000 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17001 
   17002 	Remove parser of create_module syscall.
   17003 	Since create_module syscall is present only in kernels before Linux 2.6
   17004 	and strace does not support those kernels, there is no use to keep this
   17005 	parser any longer.
   17006 
   17007 	* bjm.c (SYS_FUNC(create_module)): Remove.
   17008 	* linux/dummy.h (sys_create_module): Add stub alias.
   17009 
   17010 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17011 
   17012 	tests: check decoding of process_vm_readv and process_vm_writev syscalls
   17013 	* tests/process_vm_readv.c: New file.
   17014 	* tests/process_vm_readv_writev.c: Likewise.
   17015 	* tests/process_vm_writev.c: Likewise.
   17016 	* tests/process_vm_readv.test: New test.
   17017 	* tests/process_vm_writev.test: Likewise.
   17018 	* tests/.gitignore: Add process_vm_readv and process_vm_writev.
   17019 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17020 	(DECODER_TESTS): Add process_vm_readv.test and process_vm_writev.test.
   17021 	(EXTRA_DIST): Add process_vm_readv_writev.c.
   17022 
   17023 	process_vm: use widen_to_ulong for local_iovcnt, renote_iovcnt, and flags
   17024 	* process_vm.c (SYS_FUNC(process_vm_readv),
   17025 	SYS_FUNC(process_vm_writev)): Use widen_to_ulong for local_iovcnt,
   17026 	renote_iovcnt, and flags parameters.
   17027 
   17028 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17029 
   17030 	defs: add widen_to_ulong macro.
   17031 	This is similar to widen_to_long, but for unsigned values.
   17032 
   17033 	* defs.h (widen_to_ulong): New macro.
   17034 
   17035 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17036 
   17037 	process_vm: print pid argument as int.
   17038 	* process_vm.c (SYS_FUNC(process_vm_readv),
   17039 	SYS_FUNC(process_vm_writev)): Change conversion specifier for pid
   17040 	argument from "%ld" to "%d".
   17041 
   17042 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17043 
   17044 	process_vm: remove syserror check for iovec printing.
   17045 	This check had been done by print_array inside tprint_iov anyway.
   17046 
   17047 	* process_vm.c (SYS_FUNC(process_vm_readv)): Use tprint_iov_upto for
   17048 	printing local_iov; do not check for syserror, provide decode_iov
   17049 	parameter to tprint_iov{,_upto} based on its value instead.
   17050 
   17051 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17052 
   17053 	io: use umoven_or_printaddr_ignore_syserror as umove function in tprint_iov_upto
   17054 	This enables printing of iovec arrays even in case of failed syscall
   17055 	(failed syscall doesn't mean that iovec itself is inaccessible and
   17056 	useless).  One caveat here is that we should explicitly provide proper
   17057 	IOV_DECODE_* value based on syserror value in case printing is performed
   17058 	on exiting; we can't simply override it to IOV_DECODE_ADDR on exiting
   17059 	when syserror is up, since this may be called by code which tries to
   17060 	print iovec containing local data, which should be perfectly accessible
   17061 	(on the other hand, there are no cases of such behaviour at the moment).
   17062 
   17063 	Since iovecs themselves are printed even if syscall has failed now,
   17064 	preadv test is updated to reflect this.  It is notable, though, that this
   17065 	is the only place where this case is checked.
   17066 
   17067 	* io.c (tprint_iov_upto): Specify umoven_or_printaddr_ignore_syserror
   17068 	instead of umoven_or_printaddr as umoven_func parameter.
   17069 	(SYS_FUNC(readv), do_preadv): Specify decode_iov parameter value
   17070 	based on syserror(tcp) value.
   17071 	* scsi.c: (print_sg_io_v3_res, print_sg_io_v4_res): Likewise.
   17072 	* tests/preadv.c: Update expected output for the case when preadv
   17073 	with singe-item iovec failed.
   17074 
   17075 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17076 
   17077 	Move umoven_or_printaddr_ignore_syserror to util.c.
   17078 	* defs.h (umoven_or_printaddr_ignore_syserror): New prototype.
   17079 	* v4l2.c (umoven_or_printaddr_ignore_syserror): Move ...
   17080 	* util.c: ... here.
   17081 
   17082 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17083 
   17084 	v4l2: check for verbose flag in umoven_or_printaddr_ignore_syserror.
   17085 	This change makes behaviour of umoven_or_printaddr_ignore_syserror in
   17086 	line with umoven_or_printaddr when verbose flag is disabled.
   17087 
   17088 	* v4l2.c (umoven_or_printaddr_ignore_syserror): Simply call printaddr
   17089 	when verbose flag is unset.
   17090 
   17091 2016-10-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17092 
   17093 	tests: check decoding of kcmp syscall.
   17094 	* tests/kcmp.c: New file.
   17095 	* tests/kcmp.test: New test.
   17096 	* tests/.gitignore: Add kcmp.
   17097 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17098 	(DECODER_TESTS): Add kcmp.test.
   17099 
   17100 2016-10-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   17101 
   17102 	kcmp: print index parameters of unknown commands as kernel_ulong_t.
   17103 	* lookup_dcookie.c (SYS_FUNC(kcmp)): Use getarg_ull to retrieve idx1
   17104 	and idx2, print them using %#llx format in case of unknown command.
   17105 
   17106 2016-10-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17107 
   17108 	tests: check decoding of inotify family syscalls.
   17109 	* tests/inotify.c: New file.
   17110 	* tests/inotify_init1.c: Likewise.
   17111 	* tests/inotify.test: New test.
   17112 	* tests/inotify_init1.test: Likewise.
   17113 	* tests/.gitignore: Add inotify and inotify_init1.
   17114 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17115 	(DECODER_TESTS): Add inotify.test and inotify_init1.test.
   17116 
   17117 	xlat: use IN_* prefix for inotify_init1 flag constants.
   17118 	* xlat/inotify_init_flags.in: Replace O_* prefix with IN_* prefix for
   17119 	O_NONBLOCK and O_CLOEXEC constants, provide fallback definitions.
   17120 
   17121 	tests: check decoding of lookup_dcookie syscall.
   17122 	* tests/lookup_dcookie.c: New file.
   17123 	* tests/lookup_dcookie.test: New test.
   17124 	* tests/.gitignore: Add lookup_dcookie.
   17125 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17126 	(DECODER_TESTS): Add lookup_dcookie.test.
   17127 
   17128 2016-10-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17129 
   17130 	lookup_dcookie: print len parameter as kernel_ulong_t.
   17131 	It is size_t and without compat on x32/n32.
   17132 
   17133 	* lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Change conversion
   17134 	specifier from "%lu" to "%llu", use getarg_ull for len argument
   17135 	retrieval.
   17136 
   17137 2016-10-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17138 
   17139 	defs.h: add offsetofend macro.
   17140 	Analogous to offsetof but returns structure offset after the specified
   17141 	field.  Useful for checking whether specific field is present in obtained
   17142 	data or specifying amount of data to copy based on the (last) field needed.
   17143 
   17144 	* defs.h (offsetofend): New macro.
   17145 
   17146 2016-10-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17147 
   17148 	tests: move ARG_STR and similar macros to tests.h.
   17149 	* tests/add_key.c (_STR, ARG_STR): Move ...
   17150 	* tests/tests.h: ... here.
   17151 	(ARG_ULL_STR): New macro.
   17152 	* tests/keyctl.c (ARG_STR): Remove.
   17153 	* tests/quotactl.h (ARG_STR): Likewise.
   17154 	* tests/request_key.c (ARG_STR): Likewise.
   17155 
   17156 	tests: move LL_PAIR and LL_VAL_TO_PAIR macros to tests.h.
   17157 	* tests/fadvise.h (LL_PAIR, LL_VAL_TO_PAIR): Move ...
   17158 	* tests/tests.h: ... here.
   17159 
   17160 	tests: check decoding of ioprio_get and ioprio_set syscalls.
   17161 	* tests/ioprio.c: New file.
   17162 	* tests/ioprio.test: New test.
   17163 	* tests/.gitignore: Add ioprio.
   17164 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17165 	(DECODER_TESTS): Add ioprio.test.
   17166 
   17167 2016-10-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17168 
   17169 	xlat: provide fallback definitions for CLOCK_* constants.
   17170 	Since new values have been added gradually over various kernel versions,
   17171 	it's better to define them explicitly in order to avoid situations when
   17172 	strace built with older kernel headers cannot decode some recently
   17173 	defined values.
   17174 
   17175 	* xlat/clocknames.in: Add values for constants.
   17176 
   17177 2016-10-26  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17178 
   17179 	tests: move fill_memory and fill_memory_ex into a separate file.
   17180 	* tests/fill_memory.c: New file.
   17181 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   17182 	* tests/quotactl.h (fill_memory, fill_memory_ex): Move to fill_memory.c.
   17183 	* tests/tests.h (fill_memory, fill_memory_ex): New prototypes.
   17184 
   17185 	tests: add period parameter to fill_memory_ex.
   17186 	* tests/quotactl.h (fill_memory_ex): Add period parameter,
   17187 	use it as a divisor in non-constant part of value.
   17188 	(fill_memory): Specify period of 0x80 to fill_memory_ex call.
   17189 	* tests/quotactl-xfs.c (main): Likewise.
   17190 
   17191 2016-10-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   17192 
   17193 	Post-release administrivia.
   17194 	* NEWS: Add a header line for the next release.
   17195 	* debian/changelog.in: Add a changelog entry for 4.14-1.
   17196 	* strace.spec.in: Likewise.
   17197 
   17198 2016-10-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   17199 
   17200 	Prepare for 4.14 release.
   17201 	* NEWS: Update for 4.14 release.
   17202 
   17203 	Generate SEN numbers in a locale independent order.
   17204 	* generate_sen.sh: Sort SEN numbers using C collation rules.
   17205 
   17206 2016-10-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   17207 
   17208 	Assume that offsetof is provided by stddef.h.
   17209 	According to C89, <stddef.h> shall define offsetof macro.
   17210 
   17211 	* defs.h: Include <stddef.h> unconditionally.
   17212 	[!offsetof]: Remove.
   17213 
   17214 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17215 
   17216 	tests: check decoding of add_key, keyctl, and request_key syscalls.
   17217 	* tests/add_key.c: New file.
   17218 	* tests/keyctl.c: Likewise.
   17219 	* tests/request_key.c: Likewise.
   17220 	* tests/add_key.test: New test.
   17221 	* tests/keyctl.test: Likewise.
   17222 	* tests/request_key.test: Likewise.
   17223 	* tests/.gitignore: Add add_key, keyctl, and request_key.
   17224 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17225 	(DECODER_TESTS): Add add_key.test, keyctl.test, and request_key.test.
   17226 
   17227 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17228 
   17229 	keyctl: use kernel_ulong_t and getarg_ull instead of long.
   17230 	This potentially fixes keyctl decoder for x32 personality.
   17231 
   17232 	* keyctl.c (keyctl_update_key, keyctl_read_key, keyctl_instantiate_key,
   17233 	keyctl_instantiate_key_iov, keyctl_dh_compute): Change addr and len
   17234 	arguments to kernel_ulong_t.  Print len using %llu format.
   17235 	(keyctl_keyring_search): Change addr1 and addr2 arguments
   17236 	to kernel_ulong_t.
   17237 	(print_dh_params): Change addr argument to kernel_ulong_t.
   17238 	(SYS_FUNC(keyctl)): Retrieve arguments via getarg_ull, pass them
   17239 	to the appropriate handlers.
   17240 
   17241 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17242 
   17243 	keyctl: fix parameter signedness.
   17244 	* keyctl.c (keyctl_update_key): Change addr and len arguments
   17245 	to unsigned.
   17246 	(keyctl_read_key): Likewise.
   17247 	(keyctl_instantiate_key): Likewise.
   17248 	(keyctl_instantiate_key_iov): Likewise.
   17249 	(keyctl_dh_compute): Likewise.
   17250 	(keyctl_keyring_search): Change addr1 and addr2 arguments to unsigned.
   17251 	(keyctl_chown_key): Change user and group arguments to unsigned.
   17252 	(keyctl_get_persistent): Change uid argument to unsigned.
   17253 
   17254 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17255 
   17256 	keyctl: use printstr_ex for printing out buffer.
   17257 	keyctl_read_key had subtle bug by treating out buffer in KEYCTL_READ
   17258 	as NUL-terminated, which is not true.  We fix it by adding parameter to
   17259 	keyctl_read_key signalising whether buffer is NUL-terminated and using
   17260 	printstr_ex for printing (expectedly) NUL-terminated strings.
   17261 
   17262 	* keyctl.c (keyctl_read_key): Add has_nul parameter.  Do not use -1 as
   17263 	string len.  Use printstr_ex for buffer output with user style depending
   17264 	on has_nul value.
   17265 	(SYS_FUNC(keyctl)): Specify has_nul parameter to keyctl_read_key
   17266 	by comparing cmd value with KEYCTL_READ.
   17267 
   17268 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17269 
   17270 	Add printstr_ex which allows for providing user quotation style.
   17271 	This is useful for providing QUOTE_OMIT_TRAILING_0 and maybe other
   17272 	flags.
   17273 
   17274 	* defs.h (printstr_ex): New prototype.
   17275 	(printstr): Change to a wrapper around printstr_ex with zero user style.
   17276 	* util.c (printstr): Rename to ...
   17277 	(printstr_ex) ... new function, add user_style argument which is or'ed
   17278 	with computed style.
   17279 
   17280 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17281 
   17282 	util: add quote_string flag signalising that string is NUL-terminated.
   17283 	It is useful in cases strings with size provided are expected to be
   17284 	NUL-terminated but are not trustworthy enough to call just plain
   17285 	printstr(str, -1).
   17286 
   17287 	* defs.h (QUOTE_OMIT_TRAILING_0): New constant definition.
   17288 	* util.c (string_quote): Swallow terminating NUL if
   17289 	QUOTE_OMIT_TRAILING_0 is set.
   17290 
   17291 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17292 
   17293 	keyctl: add support for KEYCTL_DH_COMPUTE.
   17294 	* keyctl.c (struct keyctl_dh_params): New structure.
   17295 	(print_dh_params, keyctl_dh_compute): New functions.
   17296 	(SYS_FUNC(keyctl)): Add support for KEYCTL_DH_COMPUTE cmd value.
   17297 
   17298 2016-10-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   17299 
   17300 	x86_64: fix is_negated_errno for x32 personality.
   17301 	* syscall.c (is_negated_errno) [X86_64]: Do not truncate kernel_ulong_t
   17302 	to uint32_t for x32 personality.
   17303 
   17304 	tests: fix another regression in qual_syscall.test.
   17305 	* tests/qual_syscall.test: Fix pattern_nonabbrev_verbose pattern.
   17306 	(check_output_mismatch): Print the pattern that triggered match failure.
   17307 
   17308 	Use err_name, print unrecognized errno values as numbers.
   17309 	* syscall.c (trace_syscall_exiting): Use err_name() instead
   17310 	of open-coding it.  Print unrecognized errno values using %lu format
   17311 	instead of ERRNO_%lu as the latter prodices an invalid constant.
   17312 
   17313 2016-10-03  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17314 
   17315 	keyctl: print errno name in KEYCTL_REJECT in case it is available.
   17316 	* keyctl.c (keyctl_reject_key): Get errno string via err_name
   17317 	and print it if it is not NULL.
   17318 
   17319 	Add function for getting errno string.
   17320 	* defs.h (err_name): New prototype.
   17321 	* syscall.c (err_name): New function.
   17322 
   17323 2016-10-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   17324 
   17325 	struct tcb: change the type of u_error field from int to unsigned long.
   17326 	This is the type actually used for the error code on architectures
   17327 	that use a dedicated register.
   17328 
   17329 	* defs.h (struct tcb): Change the type of u_error to unsigned long.
   17330 	* syscall.c (trace_syscall_exiting): Change the type of u_error variable
   17331 	to unsigned long, print it using %lu format, drop no longer needed
   17332 	explicit cast to unsigned long.
   17333 	(saved_u_error): Change type to unsigned long.
   17334 
   17335 2016-10-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   17336 
   17337 	Use tprints instead of tprintf in a few more places.
   17338 	* btrfs.c (btrfs_print_qgroup_inherit, btrfs_print_tree_search,
   17339 	btrfs_ioctl): Replace tprintf with tprints for printing strings without
   17340 	format specifiers.
   17341 	* net.c (print_group_req): Likewise.
   17342 	* scsi.c (scsi_ioctl): Likewise.
   17343 	* term.c (decode_termios, decode_termio): Likewise.
   17344 	* userfaultfd.c (uffdio_ioctl): Likewise.
   17345 
   17346 2016-10-02  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17347 
   17348 	keyctl: do not print comma for KEYCTL_SESSION_TO_PARENT command.
   17349 	Since this command doesn't have any additional arguments, the comma does
   17350 	not needed.  Since this is the only command which lacks additional
   17351 	arguments, it's better to add special case for it rather than add
   17352 	printing of comma to all other commands.
   17353 
   17354 	* keyctl.c (SYS_FUNC(keyctl)): Add check for command not being
   17355 	KEYCTL_SESSION_TO_PARENT when printing comma dividing cmd argument
   17356 	from the rest.
   17357 
   17358 2016-10-02  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17359 
   17360 	keyctl: use getarg_ull for printing generic arguments.
   17361 	Otherwise it is erroneous on x32, for example.
   17362 
   17363 	* keyctl.c (SYS_FUNC(keyctl)): Use "%#llx" conversion specifier
   17364 	and getarg_ull for fallback argument printing.
   17365 
   17366 2016-10-02  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17367 
   17368 	keyctl: use printuid for printing UID/GID.
   17369 	UID/GID are unsigned except special -1 value (which is also special in
   17370 	context of specific keyctl commands), so special printing function
   17371 	should be used.
   17372 
   17373 	* keyctl.c (keyctl_chown_key, keyctl_get_persistent): Use printuid
   17374 	instead of printf with "%d" conversion for printing UID/GID.
   17375 
   17376 2016-10-02  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17377 
   17378 	io: handle data_size of -1 as unlimited data in print_iovec.
   17379 	Otherwise it can be depleted and print_iovec starts printing empty
   17380 	strings.
   17381 
   17382 	* io.c (print_iovec): Interpret c->data_size of -1 as unlimited data
   17383 	and do not decrease it in this case.
   17384 
   17385 2016-10-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   17386 
   17387 	tests: fix typo in qual_syscall.test.
   17388 	Fix test regression introduced by commit v4.13-225-g55334ef.
   17389 
   17390 	* tests/qual_syscall.test: Fix typo.
   17391 
   17392 2016-09-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   17393 
   17394 	Enhance -e abbrev=set, -e raw=set, and -e verbose=set.
   17395 	Enhance abbrev=, raw=, and verbose= to accept the same syntax as trace=.
   17396 	For example, this allows such syntax as -e verbose=file.
   17397 
   17398 	* syscall.c (lookup_class): Define before qual_syscall.
   17399 	(qualify): Move the loop based on lookup_class ...
   17400 	(qual_syscall): ... here.
   17401 	* tests/qual_syscall.test: Check it.
   17402 
   17403 2016-09-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   17404 
   17405 	tests/qual_syscall.test: rewrite without ls.
   17406 	* tests/qual_syscall.test: Invoke ./umovestr instead of ls.
   17407 	Update expected output.
   17408 
   17409 2016-09-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17410 
   17411 	tests: check decoding of fadvise64 and fadvise64_64 syscalls.
   17412 	* tests/fadvise.h: New file.
   17413 	* tests/fadvise64.c: Likewise.
   17414 	* tests/fadvise64_64.c: Likewise.
   17415 	* tests/fadvise64.test: New test.
   17416 	* tests/fadvise64_64.test: Likewise.
   17417 	* tests/.gitignore: Add fadvise64 and fadvise64_64.
   17418 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17419 	(DECODER_TESTS): Add fadvise64.test, fadvise64_64.test.
   17420 	(EXTRA_DIST): Add fadvise.h.
   17421 
   17422 2016-09-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   17423 
   17424 	mips o32: implement fetching the 7th subcall argument.
   17425 	* syscall.c [LINUX_MIPSO32] (decode_mips_subcall): Fetch the last
   17426 	argument of 7-arg syscalls.
   17427 
   17428 2016-09-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17429 
   17430 	x32: use proper decoder for fadvise64 syscall.
   17431 	fadvise_64_64 decoder used before this change prints different sign
   17432 	of the "len" argument (loff_t vs size_t).
   17433 
   17434 	* linux/x32/syscallent.h (fadvise64): Replace SEN(fadvise64_64)
   17435 	with SEN(fadvise64).
   17436 
   17437 2016-09-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17438 
   17439 	fadvise: use getarg_ull for obtaining len argument of fadvise64 syscall.
   17440 	Since its type is size_t, it is 64-bit wide on x32 and special care
   17441 	should be taken in order to obtain it.
   17442 
   17443 	* fadvise.c (SYS_FUNC(fadvise64)): Use getarg_ull for obtaining value
   17444 	of "len" syscall argument.
   17445 
   17446 2016-09-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17447 
   17448 	util: add getarg_ll and getarg_ull functions.
   17449 	These allow retrieving specific argument in full taking into account
   17450 	peculiarities of runtimes which employ tcp->ext_arg (e.g. x32).
   17451 
   17452 	* defs.h (getarg_ll, getarg_ull): New prototypes.
   17453 	* util.c (getarg_ll, getarg_ull): New functions.
   17454 	(printargs): Use getarg_ull.
   17455 
   17456 2016-09-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17457 
   17458 	fadvise: change printing of len argument to unsigned in fadvise64 syscall
   17459 	The kernel declares fadvise64 as
   17460 	long sys_fadvise64(int fd, loff_t offset, size_t len, int advice);
   17461 
   17462 	* fadvise.c (SYS_FUNC(fadvise64)): Change conversion specifier from
   17463 	"%ld" to "%lu" for printing len argument since kernel expects argument
   17464 	of type size_t.
   17465 
   17466 2016-09-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   17467 
   17468 	sh64, sparc64: use proper decoder for fadvise64_64 syscall.
   17469 	This change is no-op yet, but things will change when decoder
   17470 	of fadvise64 syscall get fixed.
   17471 
   17472 	* linux/sh64/syscallent.h (fadvise64_64): Replace SEN(fadvise64)
   17473 	with SEN(fadvise64_64).
   17474 	* linux/sparc64/syscallent.h (fadvise64_64): Likewise.
   17475 
   17476 2016-09-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17477 
   17478 	tests: check decoding of fallocate syscall.
   17479 	* configure.ac (AC_CHECK_FUNCS): Add fallocate.
   17480 	* tests/fallocate.c: New file.
   17481 	* tests/fallocate.test: New test.
   17482 	* tests/.gitignore: Add fallocate.
   17483 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17484 	(DECODER_TESTS): Add fallocate.test.
   17485 
   17486 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17487 
   17488 	fallocate: change print format of offset and len arguments to signed.
   17489 	Since types of these arguments are off_t and kernel actually expects
   17490 	signed values in order to fail when negative values are provided,
   17491 	lets display these values as signed.
   17492 
   17493 	* fallocate.c (SYS_FUNC(fallocate)): Change conversion specifier for
   17494 	printing "offset" and "len" syscall arguments from %llu to %lld.
   17495 
   17496 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17497 
   17498 	xlat: add default values for falloc_flags constants.
   17499 	In order to avoid dependence of declared constants to headers available
   17500 	on build system.
   17501 
   17502 	* xlat/falloc_flags.in: Add default values for constants.
   17503 
   17504 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17505 
   17506 	tests: check decoding of getcpu syscall.
   17507 	* tests/getcpu.c: New file.
   17508 	* tests/getcpu.test: New test.
   17509 	* tests/.gitignore: Add getcpu.
   17510 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17511 	(DECODER_TESTS): Add getcpu.test.
   17512 
   17513 	tests: make magic values in ioctl_block test distinctive.
   17514 	* tests/ioctl.block (init_magic): Add iterator value to magic value
   17515 	in order to enable detection of potential 4-byte aligned shifts.
   17516 
   17517 	tests: additional getcwd decoding checks.
   17518 	* tests/getcwd.c (main): Add more checks for getcwd arguments decoding.
   17519 
   17520 	tests: check decoding of quotactl syscall.
   17521 	* configure.ac (AC_CHECK_HEADERS): Add linux/dqblk_xfs.h, linux/quota.h,
   17522 	and sys/quota.h.
   17523 	* tests/.gitignore: Add quotactl, quotactl-v, quotactl-xfs,
   17524 	and quotactl-xfs-v.
   17525 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   17526 	(DECODER_TESTS): Add quotactl.test, quotactl-v.test,
   17527 	quotactl-xfs.test, and quotactl-xfs-v.test.
   17528 	(EXTRA_DIST): Add quotactl.h
   17529 	* quotactl.h: New file.
   17530 	* quotactl.c: Likewise.
   17531 	* quotactl-v.c: Likewise.
   17532 	* quotactl-xfs.c: Likewise.
   17533 	* quotactl-xfs-v.c: Likewise.
   17534 	* quotactl.test: New test.
   17535 	* quotactl-v.test: Likewise.
   17536 	* quotactl-xfs.test: Likewise.
   17537 	* quotactl-xfs-v.test: Likewise.
   17538 
   17539 2016-09-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   17540 
   17541 	quota: ensure that names of structure fields are printed properly.
   17542 	* quota.c (PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): New macros.
   17543 	(decode_cmd_data): Use them to print structure fields.
   17544 
   17545 	Enhance zero_extend_signed_to_ull and sign_extend_unsigned_to_ll macros.
   17546 	* defs.h (zero_extend_signed_to_ull, sign_extend_unsigned_to_ll):
   17547 	Add support of char types.
   17548 	* tests/tests.h (zero_extend_signed_to_ull, sign_extend_unsigned_to_ll):
   17549 	Likewise.
   17550 
   17551 	quota: move Q_QUOTAON handling to subcommand switch statement.
   17552 	* quota.c (SYS_FUNC(quotactl)): Move handling of Q_QUOTAON subcommand ...
   17553 	(decode_cmd_data): ... here.
   17554 
   17555 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17556 
   17557 	quota: remove legacy subcommand decoding support code.
   17558 	Support for these quota subcommands by linux kernels has been dropped
   17559 	long time ago (between 2.5.16 and 2.5.17), so lets drop it in order
   17560 	to minimize amount of code which should be subjected to testing and
   17561 	structured conversion.
   17562 
   17563 	* quota.c (struct v1_dqblk, struct v2_dqblk, struct v2_dqinfo,
   17564 	struct v1_dqstats, struct v2_dqstats): Remove.
   17565 	(decode_cmd_data): Remove handling of Q_V1_GETQUOTA, Q_V1_SETQUOTA,
   17566 	Q_V2_GETQUOTA, Q_V2_SETQUOTA, Q_V2_GETINFO, Q_V2_SETINFO, Q_V1_GETSTATS,
   17567 	and Q_V2_GETSTATS subcommands.
   17568 	(SYS_FUNC(quotactl)): Remove handling of Q_V1_QUOTAON subcommand.
   17569 
   17570 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17571 
   17572 	quota: add realtime block limits fields to XFS disk quota printing code.
   17573 	* quota.c (decode_cmd_data): Add printing of d_rtb_hardlimit
   17574 	and d_rtb_softlimit fields to struct xfs_dqblk printing code.
   17575 
   17576 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17577 
   17578 	quota: add packed attribute to struct if_dqblk definition.
   17579 	Since the only difference between 32-bit and 64-bit environments
   17580 	regarding this structure is its padding, lets just add packed attribute
   17581 	to its definition instead of going full mpers.
   17582 
   17583 	* quota.c (struct if_dqblk): Add ATTRIBUTE_PACKED.
   17584 
   17585 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17586 
   17587 	quota: Add decoding for Q_XQUOTARM subcommand.
   17588 	* quota.c (decode_cmd_data): Add Q_XQUOTARM handling to subcommand
   17589 	  switch.
   17590 
   17591 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17592 
   17593 	quota: add dispatch of SYNC subcommands.
   17594 	Q_XQUOTASYNC is no-op, but it does not require id/addr arguments anyway.
   17595 
   17596 	* quota.c (decode_cmd_data): Add Q_SYNC and Q_XQUOTASYNC to subcommand
   17597 	dispatch switch since id/addr arguments for these subcommands are known
   17598 	to be ignored.
   17599 
   17600 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17601 
   17602 	quota: add missing prefixes to struct field names.
   17603 	* quota.c (decode_cmd_data): Print field names in accordance with
   17604 	their definition.
   17605 
   17606 	quota: fix indentation inside subcommand dispatching switch statement.
   17607 
   17608 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17609 
   17610 	quota: avoid printing id argument for those commands that ignore it.
   17611 	As id argument is not used for Q_QUOTAOFF, Q_GETFMT, Q_V2_GETINFO,
   17612 	Q_GETINFO, Q_V2_SEETINFO, Q_SETINFO, Q_SYNC, Q_XQUOTAON, Q_XQUOTAOFF,
   17613 	Q_XQUOTARM, Q_XGETQSTAT, Q_XGETQSTATV, Q_XQUOTASYNC, Q_V1_GETSTATS, and
   17614 	Q_V2_GETSTATS subcommands, do not print it for these subcommands.
   17615 
   17616 	* quota.c (decode_cmd_data): Add id argument parameter, add printing
   17617 	of id argument for Q_GETQUOTA, Q_SETQUOTA, Q_GETNEXTQUOTA,
   17618 	Q_V1_GETQUOTA, Q_V1_SETQUOTA, Q_V2_GETQUOTA, Q_V2_SETQUOTA,
   17619 	Q_XGETQUOTA, Q_XGETNEXTQUOTA, Q_XSETQLIM, and unknown subcommands.
   17620 	(SYS_FUNC(quotactl)): Remove printing of id argument, pass it
   17621 	to decode_cmd_data.
   17622 
   17623 2016-09-27  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17624 
   17625 	quota: use printuid for id parameter printing.
   17626 	* quota.c (SYS_FUNC(quotactl)): Since id call argument is used for
   17627 	user/group/project ID which all have special semantics for -1,
   17628 	print it the same way as UIDs are printed.
   17629 
   17630 	quota: display quota subcommand as a macro.
   17631 	* quota.c (SYS_FUNC(quotactl)): Replace disjunction of two xlat values
   17632 	(which also lacks shift of the left part) with QCMD macro call.
   17633 
   17634 2016-09-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   17635 
   17636 	tests: use VERBOSE macro in waitid and waitid-v tests.
   17637 	* tests/waitid-v.c (VERBOSE_RUSAGE): Remove.
   17638 	(VERBOSE): Define to 1.
   17639 	* tests/waitid.c (sprint_rusage): Check VERBOSE instead
   17640 	of VERBOSE_RUSAGE.
   17641 
   17642 	tests: use VERBOSE macro in wait4 and wait4-v tests.
   17643 	* tests/wait4-v.c (VERBOSE_RUSAGE): Remove.
   17644 	(VERBOSE): Define to 1.
   17645 	* tests/wait4.c (sprint_rusage): Check VERBOSE instead
   17646 	of VERBOSE_RUSAGE.
   17647 
   17648 	tests: use VERBOSE macro in msg_control and msg_control-v tests.
   17649 	* tests/msg_control-v.c (VERBOSE_MSGHDR): Remove.
   17650 	(VERBOSE): Define to 1.
   17651 	* tests/msg_control.c (print_fds, print_ip_opts): Check VERBOSE instead
   17652 	of VERBOSE_MSGHDR.
   17653 
   17654 	tests: use VERBOSE macro in mmsg_name and mmsg_name-v tests.
   17655 	* tests/mmsg_name-v.c (VERBOSE_MMSGHDR): Remove.
   17656 	(VERBOSE): Define to 1.
   17657 	* tests/mmsg_name.c (test_mmsg_name): Check VERBOSE instead
   17658 	of VERBOSE_MMSGHDR.
   17659 
   17660 	tests: use VERBOSE macro in ioctl_rtc and ioctl_rtc-v tests.
   17661 	* tests/ioctl_rtc-v.c (VERBOSE_IOCTL): Remove.
   17662 	(VERBOSE): Define to 1.
   17663 	* tests/ioctl_rtc.c (print_rtc_time): Check VERBOSE instead
   17664 	of VERBOSE_IOCTL.
   17665 
   17666 	tests: use VERBOSE macro in ioctl_evdev and ioctl_evdev-v tests.
   17667 	* tests/ioctl_evdev-v.c (VERBOSE_IOCTL): Remove.
   17668 	(VERBOSE): Define to 1.
   17669 	* tests/ioctl_evdev.c: Check VERBOSE instead of VERBOSE_IOCTL.
   17670 
   17671 	tests: use VERBOSE macro in execveat and execveat-v tests.
   17672 	* tests/execveat-v.c (VERBOSE_EXECVEAT): Remove.
   17673 	(VERBOSE): Define to 1.
   17674 	* tests/execveat.c (main): Check VERBOSE instead of VERBOSE_EXECVEAT.
   17675 
   17676 	tests: use VERBOSE macro in execve and execve-v tests.
   17677 	* tests/execve-v.c (VERBOSE_EXECVE): Remove.
   17678 	(VERBOSE): Define to 1.
   17679 	* tests/execve.c (main): Check VERBOSE instead of VERBOSE_EXECVE.
   17680 
   17681 2016-09-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   17682 
   17683 	tests: add VERBOSE macro.
   17684 	Introduce VERBOSE macro (defaults to 0) that is expected to be defined
   17685 	to 1 by code testing "strace -v" output.
   17686 
   17687 	* tests/tests.h [!VERBOSE] (VERBOSE): New macro.
   17688 
   17689 2016-09-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   17690 
   17691 	decode_open: print the mode argument when O_TMPFILE flag is set.
   17692 	O_TMPFILE reqires the mode argument (just like O_CREAT), so print it.
   17693 
   17694 	* open.c (STRACE_O_TMPFILE): New macro.
   17695 	(decode_open): Print the mode argument when O_TMPFILE flag is set.
   17696 	* tests/open.c (main): Check it.
   17697 	Fixes RH#1377846.
   17698 
   17699 2016-09-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   17700 
   17701 	tests: use sprintrc in tests/ptrace.c.
   17702 	* tests/ptrace.c (errstr): New static variable.
   17703 	(do_ptrace): Initialize it using sprintrc.
   17704 	(test_peeksiginfo, main): Use errstr.
   17705 
   17706 	tests: use sprintrc in tests/netlink_protocol.c.
   17707 	* tests/netlink_protocol.c (main): Use sprintrc.
   17708 
   17709 	tests: use sprintrc in tests/fchownat.c.
   17710 	* tests/fchownat.c (main): Use sprintrc.
   17711 
   17712 	tests: use sprintrc in tests/fchmodat.c.
   17713 	* tests/fchmodat.c (main): Use sprintrc.  Add more fchmodat decoding tests.
   17714 
   17715 	tests: use sprintrc in tests/fchmod.c.
   17716 	* tests/fchmod.c (main): Use sprintrc.  Add more fchmod decoding tests.
   17717 	* tests/fchmod.test: Update the value specified for strace -a parameter.
   17718 
   17719 	tests: use sprintrc in tests/getgroups.c.
   17720 	* tests/getgroups.c (main): Use sprintrc.
   17721 
   17722 	tests: use sprintrc in tests/setgroups.c.
   17723 	* tests/setgroups.c (main): Use sprintrc.
   17724 
   17725 2016-09-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   17726 
   17727 	tests/utime.c: rewrite without assert.
   17728 	* tests/utime.c: Do not include <assert.h>.
   17729 	(main): Use sprintrc instead of assert.
   17730 
   17731 	tests/xattr.c: rewrite without assert.
   17732 	* tests/xattr.c: Do not include <assert.h>.
   17733 	(main): Use sprintrc instead of assert.
   17734 
   17735 	tests: use sprintrc in tests/xchownx.c.
   17736 	* tests/xchownx.c (main): Do not include <errno.h>.  Use sprintrc.
   17737 
   17738 	tests/xstatfsx.c: fix potential errno clobbering.
   17739 	* tests/xstatfsx.c (main): Use sprintrc.
   17740 
   17741 2016-09-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   17742 
   17743 	Add more fs magic constants.
   17744 	Add *_MAGIC constants defined for some relatively widespread
   17745 	non-mainline filesystems.
   17746 
   17747 	* xlat/fsmagic.in: Add AUFS_SUPER_MAGIC, GPFS_SUPER_MAGIC,
   17748 	VZFS_SUPER_MAGIC, and ZFS_SUPER_MAGIC constants.
   17749 
   17750 2016-09-15  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17751 
   17752 	tests: fix whitespace for explicit type casts in futex test.
   17753 
   17754 2016-09-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   17755 
   17756 	Add more fs magic constants.
   17757 	Add *_MAGIC constants defined inside linux fs but not explicitly
   17758 	exported via linux uapi.
   17759 
   17760 	* xlat/fsmagic.in: Add HFS_SUPER_MAGIC, HFSPLUS_SUPER_MAGIC,
   17761 	EXOFS_SUPER_MAGIC, CEPH_SUPER_MAGIC, UBIFS_SUPER_MAGIC, JFS_SUPER_MAGIC,
   17762 	BEFS_SUPER_MAGIC, NTFS_SB_MAGIC, XFS_SB_MAGIC, CONFIGFS_MAGIC,
   17763 	FUSE_CTL_SUPER_MAGIC, FUSE_SUPER_MAGIC, AFS_FS_MAGIC, OCFS2_SUPER_MAGIC,
   17764 	VXFS_SUPER_MAGIC, LOGFS_MAGIC, SMB2_MAGIC_NUMBER, and CIFS_MAGIC_NUMBER
   17765 	constants.
   17766 
   17767 2016-09-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   17768 
   17769 	Update fs *_MAGIC constants.
   17770 	Add fs *_MAGIC constants exported by linux uapi.
   17771 
   17772 	* xlat/fsmagic.in: Add BFS_MAGIC, GFS2_MAGIC, and ROMFS_MAGIC constants
   17773 	defined in linux/bfs_fs.h, linux/gfs2_ondisk.h, and linux/romfs_fs.h,
   17774 	respectively.
   17775 
   17776 2016-09-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   17777 
   17778 	tests: workaround limited semctl implementation in musl.
   17779 	musl libc forwards semctl command argument for 8 known commands only,
   17780 	for all the rest it passes 0 instead.
   17781 
   17782 	* tests/ipc_sem.c (main): Update semctl expected output.
   17783 
   17784 2016-09-13  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17785 
   17786 	tests: add more IPC decoding checks.
   17787 	* tests/ipc_msg.c: Additional msgget (parameter format) and msgctl
   17788 	(parameter format, decoding of struct msqid_ds in IPC_SET/IPC_STAT
   17789 	commands) checks.
   17790 	* tests/ipc_sem.c: Additional semget and semctl checks.
   17791 	* tests/ipc_shm.c: Additional shmget and shmctl checks.
   17792 	* tests/semop.c: Additional semop checks.  Add checks for semtimedop.
   17793 	* tests/semop.test: Add explicit -e parameter in order to trace both
   17794 	semop and semtimedop.
   17795 	* tests/shmxt.c: Additional shmat and shmdt checks.
   17796 
   17797 2016-09-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   17798 
   17799 	.mailmap: add addresses of Dr. David Alan Gilbert.
   17800 	* .mailmap: Add both addresses of Dr. David Alan Gilbert here to avoid
   17801 	duplications in CREDITS file.
   17802 
   17803 2016-09-12  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17804 
   17805 	.mailmap: add canonical name for Eugene Syromyatnikov.
   17806 	This is needed due to apparent deviation in spelling of commit author
   17807 	name in several commits.
   17808 
   17809 	* .mailmap: Add canonical name for Eugene Syromyatnikov.
   17810 
   17811 2016-09-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   17812 
   17813 	Update generic ioctl entries from linux 4.8.
   17814 	* linux/64/ioctls_inc.h: Update from linux v4.8 using ioctls_gen.sh.
   17815 	* linux/32/ioctls_inc_align32.h: Likewise.
   17816 	* linux/32/ioctls_inc_align64.h: Likewise.
   17817 
   17818 2016-09-12  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   17819 
   17820 	x32: update ioctl entries from linux 4.8.
   17821 	* linux/x32/ioctls_inc0.h: Update from linux v4.8 using ioctls_gen.sh.
   17822 
   17823 	maint: update for linux 4.8.
   17824 	* maint/ioctls_sym.sh: Add workarounds for linux/atm_zatm.h and
   17825 	xen/evtchn.h files.
   17826 
   17827 2016-09-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   17828 
   17829 	tests: use sprintrc_grep in tests/ipc_shm.c.
   17830 	* tests/ipc_shm.c (main): Use sprintrc_grep.
   17831 
   17832 	tests: use sprintrc_grep in tests/ipc_sem.c.
   17833 	* tests/ipc_sem.c (main): Use sprintrc_grep.
   17834 
   17835 2016-09-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   17836 
   17837 	tests: use sprintrc_grep in tests/ipc_msg.c.
   17838 	* tests/ipc_msg.c (main): Use sprintrc_grep.
   17839 
   17840 2016-09-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   17841 
   17842 	tests: use sprintrc in tests/chmod.c.
   17843 	* tests/chmod.c (main): Use sprintrc.  Add more chmod decoding tests.
   17844 
   17845 2016-09-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   17846 
   17847 	ipc: fix printing of nsops argument of semop and semtimedop syscalls.
   17848 	According to POSIX, nsops argument of semop syscall has type size_t,
   17849 	but the kernel treats nsops argument of semop and semtimedop syscalls
   17850 	as unsigned int.
   17851 
   17852 	* ipc_sem.c (tprint_sembuf_array): Change type of "count" argument
   17853 	from unsigned long to unsigned int, print it using %u format.
   17854 
   17855 2016-09-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17856 
   17857 	tests/aio.c: bring indentation in conformance with the rest of the file.
   17858 
   17859 2016-09-09  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17860 
   17861 	tests: use predefined constant in aio_context_t checks in aio test.
   17862 	Also fix io_cancel and io_destroy checks which did not check correct
   17863 	printing of context argument properly.
   17864 
   17865 	* tests/aio.c (main): Update syscall checks in order to use newly
   17866 	defined bogus_ctx constant.
   17867 
   17868 2016-09-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   17869 
   17870 	Mark io_setup and io_destroy as memory mapping related syscalls.
   17871 	As io_setup syscall allocates some memory using do_mmap_pgoff, and
   17872 	io_destroy deallocates this memory using vm_munmap, set TRACE_MEMORY
   17873 	flag for all sysentries of io_setup and io_destroy using the following
   17874 	oneliner:
   17875 	sed -ri '/io_setup|io_destroy/ s/0,/TM,/' linux/*/syscallent*.h
   17876 
   17877 	* linux/*/syscallent*.h (io_setup, io_destroy): Change sys_flags to TM.
   17878 
   17879 2016-09-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   17880 
   17881 	travis: add x86 musl.
   17882 	* .travis.yml (matric): Add musl-gcc/x86.
   17883 	* travis-build.sh [TARGET == x86]: Specify --target along with --build
   17884 	to configure.
   17885 	* travis-install.sh [CC == musl-gcc && TARGET == x32]: Add -mx32 to $CC.
   17886 	[CC == musl-gcc && TARGET == x86]: Add -m32 to $CC.  Specify --build
   17887 	and --target to musl configure invocation.
   17888 
   17889 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17890 
   17891 	tests: use PRI__*64 macros in aio test.
   17892 	It was incorrectly assumed that __*64 types are long long on all
   17893 	platforms, despite strace having specially crafted macros in order
   17894 	to handle precisely this architecture discrepancy.
   17895 	The commit fixes this oversight.
   17896 
   17897 	* tests/aio.c (main): Use PRI__*64 macros for correct format conversion
   17898 	specifiers for __*64-typed values.
   17899 
   17900 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17901 
   17902 	ipc: fix printing of integer arguments.
   17903 	* ipc_msgctl.c (SYS_FUNC(msgctl)): As msqid argument is treated as int
   17904 	by the kernel, cast it to int and print it using %d format.
   17905 	* ipc_sem.c (SYS_FUNC(semop), SYS_FUNC(semtimedop)): Likewise,
   17906 	for semid argument.
   17907 	(SYS_FUNC(semget)): Likewise, for nsems argument.
   17908 	(SYS_FUNC(semctl)): Likewise, for semid and semnum arguments.
   17909 	* ipc_shm.c (SYS_FUNC(shmat)): Likewise, for shmid argument.
   17910 	* ipc_shmctl.c (SYS_FUNC(shmctl)): Likewise.
   17911 
   17912 2016-09-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   17913 
   17914 	ipc: fix printing key_t arguments of msgget, semget, and shmget syscalls
   17915 	* ipc_msg.c (SYS_FUNC(msgget)): As key_t type in the kernel
   17916 	is __kernel_key_t (i.e. int), cast key_t argument to int
   17917 	and print it using %#x format.
   17918 	* ipc_sem.c (SYS_FUNC(semget)): Likewise.
   17919 	* ipc_shm.c (SYS_FUNC(shmget)): Likewise.
   17920 	* tests/ipc_msg.c (main): Test it.
   17921 	* tests/ipc_sem.c (main): Likewise.
   17922 	* tests/ipc_shm.c (main): Likewise.
   17923 
   17924 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17925 
   17926 	tests: add more sched_getattr and sched_setattr decoding checks.
   17927 	* tests/sched_xetattr.c (main): Add more sched_getattr and sched_setattr
   17928 	decoding checks.
   17929 
   17930 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17931 
   17932 	tests: change type of sched_nice field to signed in sched_xetattr test.
   17933 	Kernel headers declare this field as s32, and strace prints it with %d
   17934 	specifier.
   17935 
   17936 	* tests/sched_xetattr.c (main): Change type of sched_nice field of struct
   17937 	sched_attr to int32_t, update format specifiers accordingly.
   17938 
   17939 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17940 
   17941 	tests: add sprintrc_grep function to libtests.
   17942 	New sprintrc_grep function is sprintrc function equivalent suitable for
   17943 	tests where grep-base pattern matching is employed.
   17944 
   17945 	* tests/tests.h (sprintrc_grep): New prototype.
   17946 	* tests/sprintrc.c (enum sprintrc_fmt): New sprintrc format enumeration.
   17947 	(sprintrc_ex): New function, renamed from sprintrc and updated to
   17948 	support different formats.
   17949 	(sprintrc): Change to use sprintrc_ex with SPRINTRC_FMT_RAW.
   17950 	(sprintrc_grep): New function, calls sprintrc_ex with SPRINTRC_FMT_GREP.
   17951 
   17952 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17953 
   17954 	tests: perform more strict structure allocation in sched_xetattr test.
   17955 	Use tail_alloc with precise size of the structure.
   17956 
   17957 	* tests/sched_xetattr.c (main): Eliminate usage of anonymous union type.
   17958 	Rename sched to sched_attr.  Change type of sched_attr to struct
   17959 	pointer.  Use tail_alloc for sched_attr allocation, update printf
   17960 	statements accrodingly.
   17961 
   17962 2016-09-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17963 
   17964 	tests: split long lines in sched_xetattr test.
   17965 	* tests/sched_xetattr.c (main): Split long lines.
   17966 
   17967 2016-09-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   17968 
   17969 	tests/aio.c: fix for x32 personality.
   17970 	* tests/aio.c (main): Do not pass 64-bit aio_context_t to io_submit
   17971 	and io_getevents until strace learns how to print 64-bit pointers on x32
   17972 	and on x86_64 for x32 personality.
   17973 
   17974 2016-09-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   17975 
   17976 	aio: print aio_context_t as a pointer type.
   17977 	As aio_context_t is treated by the kernel as a pointer,
   17978 	print it using printaddr.
   17979 
   17980 	* aio.c (SYS_FUNC(io_setup)): Print the pointer to aio_context_t
   17981 	argument using printnum_ptr.
   17982 	(SYS_FUNC(io_destroy), SYS_FUNC(io_submit), SYS_FUNC(io_cancel),
   17983 	SYS_FUNC(io_getevents)): Print aio_context_t argument using printaddr.
   17984 	* tests/aio.c (sprint_aio_context_t): Remove.
   17985 	(main): Update expected output.
   17986 
   17987 2016-09-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   17988 
   17989 	tests/aio.c: rewrite without assert.
   17990 	* tests/aio.c: Do not include <assert.h>.
   17991 	(main): Use sprintrc instead of assert.
   17992 
   17993 2016-09-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   17994 
   17995 	tests: add more aio decoding checks.
   17996 	* tests/aio.c (sprint_aio_context_t): New function.
   17997 	(main): Use it; add more checks.
   17998 
   17999 2016-09-06  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18000 
   18001 	tests: add suffix and cast to 64-bit constants in aio test.
   18002 	This helps to avoid warnings like
   18003 	"integer constant is too large for long type"
   18004 	reported by some versions of gcc on 32-bit platforms.
   18005 
   18006 	* tests/aio.c (main): Add ULL suffix to 64-bit constants
   18007 	and cast them to unsigned long.
   18008 
   18009 2016-09-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18010 
   18011 	tests: check decoding of perf_event_open syscall.
   18012 	* tests/perf_event_open.c: New file.
   18013 	* tests/perf_event_open.test: New test.
   18014 	* tests/.gitignore: Add perf_event_open.
   18015 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   18016 	(DECODER_TESTS): Add perf_event_open.test.
   18017 
   18018 	Makefile.am: use pwd instead of realpath.
   18019 	* Makefile.am (CODE_COVERAGE_GENHTML_OPTIONS): Use standard pwd(1)
   18020 	instead of less widespread realpath(1) utility from GNU coreutils.
   18021 
   18022 2016-09-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   18023 
   18024 	tests: use sprintrc in tests/xetpriority.c.
   18025 	* tests/xetpriority.c (main): Use sprintrc.
   18026 
   18027 	tests: use sprintrc in vhangup.test.
   18028 	* tests/vhangup.c (main): Use sprintrc.
   18029 
   18030 	tests: use sprintrc in tests/sockname.c.
   18031 	* tests/sockname.c (test_sockname_syscall): Use sprintrc.
   18032 
   18033 	tests: use sprintrc in signalfd4.test.
   18034 	* tests/signalfd4.c (main): Use sprintrc.
   18035 
   18036 	tests: use sprintrc in setrlimit.test.
   18037 	* tests/setrlimit.c (main): Use sprintrc.
   18038 
   18039 	tests: use sprintrc in set_mempolicy.test.
   18040 	* tests/set_mempolicy.c (main, print_nodes): Use sprintrc.
   18041 
   18042 	tests: use sprintrc in openat.test.
   18043 	* tests/openat.c (main): Use sprintrc.
   18044 
   18045 	tests: use sprintrc in open.test.
   18046 	* tests/open.c (main): Use sprintrc.
   18047 
   18048 	tests: use sprintrc in move_pages.test.
   18049 	* tests/move_pages.c (print_stat_pages, print_move_pages): Use sprintrc.
   18050 
   18051 	tests: use sprintrc in mlockall.test.
   18052 	* tests/mlockall.c (main): Use sprintrc.
   18053 
   18054 	tests: use sprintrc in mlock.test.
   18055 	* tests/mlock.c (main): Use sprintrc.
   18056 
   18057 	tests: use sprintrc in epoll_create1.test.
   18058 	* tests/epoll_create1.c (main): Use sprintrc.
   18059 
   18060 2016-09-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18061 
   18062 	tests: fix printing of min_nr and nr arguments of io_getevents syscall.
   18063 	* tests/aio.c (main): Change output format for min_nr and nr arguments
   18064 	in io_getevents check to %ld, cast these arguments to long.
   18065 
   18066 	tests: use sprintrc for return code output in aio test.
   18067 	* tests/aio.c (main): Use sprintrc for return code output.
   18068 
   18069 	tests: add more tests for ched_rr_get_interval decoding.
   18070 	* tests/sched_rr_get_interval.c (main): Check decoding of invalid
   18071 	timespec pointer and successful syscall invocation.
   18072 
   18073 	tests: use sprintrc for return code output in sched_rr_get_interval test
   18074 	* tests/sched_rr_get_interval.c (main): Use sprintrc for return code
   18075 	output.
   18076 
   18077 	tests: add more tests for sched_getscheduler and sched_xetscheduler.
   18078 	* tests/sched_xetscheduler.c (main): Check for decoding of invalid PID
   18079 	in sched_getscheduler and sched_setscheduler, invalid address
   18080 	of sched_param structure, and invalid policy value.
   18081 
   18082 	tests: use sprintrc for return code output in sched_xetscheduler test.
   18083 	* tests/sched_xetscheduler.c (main): Use sprintrc for return code output.
   18084 
   18085 2016-09-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18086 
   18087 	aio: use printfd for fd printing.
   18088 	struct iocb contains two fields with fd semantics: aio_fildes and
   18089 	aio_resfd.  It is quite reasonable to use the appropriate function for
   18090 	printing them (apart from just "%d").
   18091 
   18092 	* aio.c (print_common_flags): Add struct tcb pointer to parameter list;
   18093 	use printfd for printing aio_resfd field.
   18094 	(print_iocb_header): Add struct tcb pointer to parameter list;
   18095 	use printfd for printing aio_fildes field.
   18096 	(print_iocb): Provide tcp argument to print_iocb_header
   18097 	and print_common_flags.
   18098 	(SYS_FUNC(io_cancel)): Likewise.
   18099 
   18100 2016-09-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   18101 
   18102 	sh64: wire up new syscalls.
   18103 	* linux/sh64/syscallent.h [380..393]: New entries.
   18104 
   18105 2016-09-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   18106 
   18107 	sh: wire up new syscalls.
   18108 	* linux/sh/syscallent.h [369..382]: New entries.
   18109 
   18110 2016-09-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   18111 
   18112 	avr32: wire up preadv2 and pwritev2 syscalls.
   18113 	* linux/avr32/syscallent.h [326]: Add preadv2 entry.
   18114 	[327]: Add pwritev2 entry.
   18115 
   18116 2016-09-05  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18117 
   18118 	tests: check decoding of readahead syscall.
   18119 	* configure.ac (AC_CHECK_FUNCS): Add readahead.
   18120 	* tests/readahead.c: New file.
   18121 	* tests/readahead.test: New test.
   18122 	* tests/.gitignore: Add readahead.
   18123 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   18124 	(DECODER_TESTS): Add readahead.test.
   18125 
   18126 2016-09-02  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18127 
   18128 	tests: move sprintrc function to libtests.
   18129 	* tests/tests.h (sprintrc): New prototype.
   18130 	* tests/futex.c (sprintrc): Move to ...
   18131 	* tests/sprintrc.c: ... new file.
   18132 	* tests/Makefile.am (libtests_a_SOURCES): Add sprintrc.c.
   18133 
   18134 	tests/futex: add support to sprintrc for return codes other than 0 and -1
   18135 	* tests/futex.c (sprintrc): Print the actual return code provided,
   18136 	not just "0".  Check snprintf return code.
   18137 
   18138 	tests/futex: increase sprintrc static buffer size.
   18139 	* tests/futex.c (sprintrc): Increase buffer size from 256 to 4096.
   18140 
   18141 	tests/futex: rename retstr to sprintrc.
   18142 	* tests/futex.c (retstr): Rename to sprintrc.
   18143 	(main): Convert all retstr calls to sprintrc.
   18144 
   18145 2016-09-01  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18146 
   18147 	readahead: fix print format for the "count" argument.
   18148 	According to documentation and kernel's syscalls.h, its type is size_t,
   18149 	so "%lu" format should be used instead of "%ld".
   18150 
   18151 	* readahead.c (SYS_FUNC(readahead)): Fix conversion specifier
   18152 	for the "count" argument.
   18153 
   18154 2016-08-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   18155 
   18156 	tests/xstatx.c: use zero_extend_signed_to_ull/sign_extend_unsigned_to_ll
   18157 	Use zero_extend_signed_to_ull and sign_extend_unsigned_to_ll macros
   18158 	instead of explicit casts with unpredictable sign extension semantics.
   18159 
   18160 	* tests/xstatx.c (print_time, main): Use zero_extend_signed_to_ull
   18161 	instead of explicit cast.
   18162 	(print_stat): Use zero_extend_signed_to_ull and
   18163 	sign_extend_unsigned_to_ll instead of explicit casts.
   18164 
   18165 2016-08-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   18166 
   18167 	tests: add sign_extend_unsigned_to_ll macro.
   18168 	* tests/tests.h (sign_extend_unsigned_to_ll): New macro from defs.h.
   18169 
   18170 2016-08-31  Eugene Syromiatnikov  <evgsyr (a] gmail.com>
   18171 
   18172 	Refactor common sa_handler printing code.
   18173 	* xlat/sa_handler_values.in: New file.
   18174 	* signal.c: Include "xlat/sa_handler_values.h".
   18175 	(get_sa_handler_str, print_sa_handler): New functions.
   18176 	(SYS_FUNC(sigsetmask), SYS_FUNC(signal), decode_new_sigaction): Use them.
   18177 
   18178 2016-08-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   18179 
   18180 	Update TCP* constants.
   18181 	* xlat/socktcpoptions.in: Add TCP_REPAIR_WINDOW introduced by linux
   18182 	kernel commit v4.8-rc1~140^2~226.
   18183 
   18184 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18185 
   18186 	Update SCTP_* constants.
   18187 	* xlat/socksctpoptions.in: Add SCTP_PR_SUPPORTED, SCTP_DEFAULT_PRINFO,
   18188 	and SCTP_PR_ASSOC_STATUS introduced by linux kernel commits
   18189 	v4.8-rc1~140^2~148^2~5, v4.8-rc1~140^2~148^2~4, and
   18190 	v4.8-rc1~140^2~148^2~3, respectively.
   18191 
   18192 	Update fs *_MAGIC constants.
   18193 	* xlat/fsmagic.in: Add BALLOON_KVM_MAGIC and ZSMALLOC_MAGIC introduced
   18194 	by linux kernel commits v4.8-rc1~147^2~82 and v4.8-rc1~147^2~74,
   18195 	respectively.
   18196 
   18197 	Update KEXEC_ARCH_* constants.
   18198 	* xlat/kexec_arch_values.in: Add KEXEC_ARCH_AARCH64 introduced by linux
   18199 	kernel commit v4.8-rc1~16^2~41.
   18200 
   18201 	Update ETH_P_* constants.
   18202 	* xlat/ethernet_protocols.in: Add ETH_P_NCSI introduced by linux kernel
   18203 	commit v4.8-rc1~140^2~65^2~8.
   18204 
   18205 	Update BPF_* constants.
   18206 	* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_CGROUP_ARRAY introduced
   18207 	by linux kernel commit v4.8-rc1~140^2~212^2~2.
   18208 	* xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_XDP introduced
   18209 	by linux kernel commit v4.8-rc1~140^2~64^2~10.
   18210 
   18211 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18212 
   18213 	Remove HAVE_SIGACTION checks.
   18214 	The syscall parsers guarded by HAVE_SIGACTION check have to be compiled
   18215 	regardless of libc sigaction function availability.
   18216 
   18217 	* configure.ac (AC_CHECK_FUNCS): Remove sigaction.
   18218 	* signal.c: Remove HAVE_SIGACTION checks.
   18219 
   18220 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18221 
   18222 	Remove obsolescent autoconf macro AC_TYPE_SIGNAL.
   18223 	All supported systems are expected to have C89 conforming sematics.
   18224 
   18225 	* configure.ac (AC_TYPE_SIGNAL): Remove.
   18226 
   18227 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18228 
   18229 	Remove obsolescent autoconf macro AC_C_CONST.
   18230 	All supported systems are expected to have the 'const' keyword.
   18231 
   18232 	* configure.ac (AC_C_CONST): Remove.
   18233 
   18234 2016-08-30  Eugene Syromiatnikov  <evgsyr (a] gmail.com>
   18235 
   18236 	tests: check decoding of futex syscall.
   18237 	* tests/futex.c: New file.
   18238 	* tests/futex.test: New test.
   18239 	* tests/.gitignore: Add futex.
   18240 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   18241 	(DECODER_TESTS): Add futex.test.
   18242 
   18243 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18244 
   18245 	futex: do not pretend <linux/futex.h> is included.
   18246 	As configure.ac does not check for linux/futex.h, HAVE_LINUX_FUTEX_H is
   18247 	never defined and therefore the inclusion of <linux/futex.h> guarded by
   18248 	HAVE_LINUX_FUTEX_H makes no sense.
   18249 
   18250 	Moreover, <linux/futex.h> used to have an incorrect definition
   18251 	of FUTEX_WAIT_BITSET_PRIVATE and FUTEX_WAKE_BITSET_PRIVATE:
   18252 	since kernel commit v2.6.24-6320-gcd68998 where these definitions
   18253 	were initially introduced and up to v2.6.31-7082-gf8d1e54 where they
   18254 	were finally fixed these macros had been incorrectly defined via
   18255 	FUTEX_WAIT_BITS and FUTEX_WAKE_BITS instead of FUTEX_WAIT_BITSET
   18256 	and FUTEX_WAKE_BITSET, and these incorrect definitions made their way
   18257 	into some distributions still in use.
   18258 
   18259 	* futex.c [HAVE_LINUX_FUTEX_H]: Remove.
   18260 
   18261 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18262 
   18263 	futex: avoid printing val when it is not used by the futex command.
   18264 	This is analogous to timeout argument omitting in FUTEX_WAKE_BITSET
   18265 	command.
   18266 
   18267 	* futex.c (SYS_FUNC(futex)): Remove common printing of val argument.
   18268 	Add printing of val argument for all futex commands except
   18269 	FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
   18270 
   18271 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18272 
   18273 	xlat: add FUTEX_WAIT* commands with FUTEX_CLOCK_REALTIME bit set.
   18274 	* xlat/futexops.in: Add FUTEX_WAIT|FUTEX_CLOCK_REALTIME and
   18275 	FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME values supported by linux kernel
   18276 	since commit v4.5-rc1~172^2.
   18277 
   18278 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18279 
   18280 	futex: fix formatting of unknown command argument.
   18281 	Use alternate form for printing hexadecimal numbers to avoid confusion.
   18282 	Use printaddr to print uaddr as the latter is interpreted as a pointer
   18283 	in all currently supported futex operations.
   18284 
   18285 	* futex.c (SYS_FUNC(futex)): Fix formatting of unknown command
   18286 	argument.
   18287 
   18288 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18289 
   18290 	futex: add handling of FUTEX_FD command.
   18291 	Since obsolete FUTEX_FD command is known and used to have some expected
   18292 	argument format, print FUTEX_FD using that format.
   18293 
   18294 	* futex.c (SYS_FUNC(futex)): Handle FUTEX_FD command.
   18295 
   18296 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18297 
   18298 	futex: fix formatting of val3 hexadecimal argument.
   18299 	* futex.c (SYS_FUNC(futex)): In FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET,
   18300 	print hexadecimal val3 argument in alternate form to avoid confusion.
   18301 
   18302 2016-08-30  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18303 
   18304 	futex: fix FUTEX_WAKE_OP compare function mask.
   18305 	According to the initial and current (v4.7) kernel implementations,
   18306 	in FUTEX_WAKE_OP case the compare function does not have
   18307 	FUTEX_OP_OPARG_SHIFT flag and occupies 4 bits starting with bit 24.
   18308 
   18309 	* futex.c (SYS_FUNC(futex)): Do not print FUTEX_OP_OPARG_SHIFT
   18310 	for 27th bit of val3 in FUTEX_WAKE_OP case.
   18311 
   18312 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18313 
   18314 	tests: use correct m32/mx32 st_mtime_nsec checks in tests/xstatx.c.
   18315 	* bootstrap: Add -DMPERS_IS_$(MPERS_NAME) to ARCH_MFLAGS.
   18316 	* tests/xstatx.c [USE_ASM_STAT && STRUCT_STAT_IS_STAT64 && MPERS_IS_m32]:
   18317 	Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC
   18318 	to HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC.
   18319 	[USE_ASM_STAT && STRUCT_STAT_IS_STAT64 && MPERS_IS_mx32]:
   18320 	Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC
   18321 	to HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC.
   18322 	[USE_ASM_STAT && !STRUCT_STAT_IS_STAT64 && MPERS_IS_m32]:
   18323 	Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC
   18324 	to HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC.
   18325 	[USE_ASM_STAT && !STRUCT_STAT_IS_STAT64 && MPERS_IS_mx32]:
   18326 	Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC
   18327 	to HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC.
   18328 
   18329 	Based on patch by James Clarke <jrtc27 (a] jrtc27.com>.
   18330 
   18331 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18332 
   18333 	Remove redundant check for PTRACE_LISTEN availability.
   18334 	As ptrace.h already ensures that PTRACE_LISTEN is defined,
   18335 	there is no need to check this fact in other places.
   18336 
   18337 	* strace.c (ptrace_restart): Do not check that PTRACE_LISTEN is defined.
   18338 
   18339 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18340 
   18341 	Remove unused autoconf macro AC_TYPE_GETGROUPS.
   18342 	strace code does not use GETGROUPS_T.
   18343 
   18344 	* configure.ac (AC_TYPE_GETGROUPS): Remove.
   18345 
   18346 2016-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   18347 
   18348 	Remove unused autoconf macro AC_TYPE_MODE_T.
   18349 	strace code already redefines mode_t.
   18350 
   18351 	* configure.ac (AC_TYPE_MODE_T): Remove.
   18352 
   18353 2016-08-30  James Clarke  <jrtc27 (a] jrtc27.com>
   18354 
   18355 	Use PTRACE_SUNDETACH everywhere on SPARC and SPARC64.
   18356 	SPARC has a different PTRACE_DETACH value correctly defined in
   18357 	sys/ptrace.h, but linux/ptrace.h clobbers it with the standard one.
   18358 	PTRACE_SUNDETACH is also defined to the correct value by sys/ptrace.h,
   18359 	so use that instead.
   18360 
   18361 	* strace.c (detach) [SPARC]: Move redefinition of PTRACE_DETACH
   18362 	to PTRACE_SUNDETACH ...
   18363 	* ptrace.h [SPARC || SPARC64]: ... here.
   18364 
   18365 2016-08-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   18366 
   18367 	Remove obsolescent autoconf macro AC_HEADER_STDC.
   18368 	All systems supported by strace are expected to have C89 conforming
   18369 	header files.
   18370 
   18371 	* configure.ac (AC_HEADER_STDC): Remove.
   18372 
   18373 2016-08-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   18374 
   18375 	Remove unneeded autoconf macro AC_HEADER_DIRENT.
   18376 	strace code already includes <dirent.h> unconditionally.
   18377 
   18378 	* configure.ac (AC_HEADER_DIRENT): Remove.
   18379 
   18380 2016-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   18381 
   18382 	Remove unneeded autoconf macro AC_HEADER_STDBOOL.
   18383 	strace code assumes C99.
   18384 
   18385 	* configure.ac (AC_HEADER_STDBOOL): Remove.
   18386 	* defs.h: Include <stdbool.h> unconditionally.
   18387 
   18388 2016-08-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   18389 
   18390 	Remove obsolescent autoconf macro AC_HEADER_STAT.
   18391 	No systems supported by strace are expected to have the bug workarounded
   18392 	by AC_HEADER_STAT macro.
   18393 
   18394 	* configure.ac (AC_HEADER_STAT): Remove.
   18395 
   18396 2016-08-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   18397 
   18398 	Do not use AC_HEADER_MAJOR, include <sys/sysmacros.h> unconditionally.
   18399 	glibc, starting with commit glibc-2.24-28-gdbab657, has deprecated
   18400 	inclusion of <sys/sysmacros.h> by <sys/types.h>.  The method used
   18401 	for deprecation breaks AC_HEADER_MAJOR: this autoconf macro no longer
   18402 	defines MAJOR_IN_SYSMACROS, which consequently breaks build.
   18403 
   18404 	Let's assume that all systems supported by strace provide major, minor,
   18405 	and makedev macros via <sys/sysmacros.h>.
   18406 
   18407 	* configure.ac (AC_HEADER_MAJOR): Remove.
   18408 	* mknod.c [MAJOR_IN_SYSMACROS, MAJOR_IN_MKDEV]: Remove.
   18409 	Include <sys/sysmacros.h> unconditionally.
   18410 	* print_struct_stat.c: Likewise.
   18411 	* tests/mknod.c: Likewise.
   18412 	* tests/mknodat.c: Likewise.
   18413 	* tests/xstatx.c: Likewise.
   18414 
   18415 2016-08-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   18416 
   18417 	btrfs: mpersify struct btrfs_ioctl_vol_args_v2.
   18418 	This complements commit v4.11-719-gfb0c609.
   18419 
   18420 	* btrfs.c (struct_btrfs_ioctl_vol_args_v2): New type.  Mpersify it.
   18421 	(btrfs_print_qgroup_inherit): Change qgi_addr type to unsigned long.
   18422 	(btrfs_ioctl): Replace struct btrfs_ioctl_vol_args_v2 with
   18423 	struct_btrfs_ioctl_vol_args_v2.
   18424 
   18425 2016-08-29  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   18426 
   18427 	mpers.awk: relax union member name absence check.
   18428 	This fixes mpersing of unions containing nameless members,
   18429 	e.g. struct btrfs_ioctl_vol_args_v2.
   18430 
   18431 	* mpers.awk (what_is): Print names of union_type members as is.
   18432 
   18433 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18434 
   18435 	Revert "tests/xstatx.c: fix stat syscall tests on mips64"
   18436 	Previous commit effectively changed types of st_atime, st_ctime, and
   18437 	st_mtime members of struct stat and struct stat64 to signed integers,
   18438 	making the mips64 workaround obsolete.
   18439 
   18440 	This reverts commit 3fb84bfc79949c145197c61fbf04ce18464e9112.
   18441 
   18442 	* tests/xstatx.c (create_sample) [__mips64]: Remove.
   18443 
   18444 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18445 
   18446 	Mpersify parsers of struct stat and struct stat64.
   18447 	On many architectures that support multiple personalities,
   18448 	struct stat differ between personalities.  While old code could handle
   18449 	these differences, there are some architectures, e.g. sparc64, that also
   18450 	have different struct stat64.  Rewrite parsers using mpers functionality
   18451 	to fix these issues.
   18452 
   18453 	* fetch_struct_stat.c: New file.
   18454 	* fetch_struct_stat64.c: Likewise.
   18455 	* print_struct_stat.c: Likewise.
   18456 	* oldstat.c: Likewise.
   18457 	* stat.c: Likewise.
   18458 	* stat.h: Likewise.
   18459 	* stat64.c: Likewise.
   18460 	* file.c: Remove.
   18461 	* printstat.h: Likewise.
   18462 	* linux/aarch64/stat32.h: Likewise.
   18463 	* linux/powerpc64/stat32.h: Likewise.
   18464 	* linux/riscv/stat32.h: Likewise.
   18465 	* linux/sparc64/stat32.h: Likewise.
   18466 	* linux/tile/stat32.h: Likewise.
   18467 	* linux/x32/stat32.h: Likewise.
   18468 	* linux/x86_64/stat32.h: Likewise.
   18469 	* Makefile.am (strace_SOURCES): Add fetch_struct_stat.c,
   18470 	fetch_struct_stat64.c, print_struct_stat.c, oldstat.c, stat.c, stat.h,
   18471 	and stat64.c.  Remove file.c, printstat.h, linux/aarch64/stat32.h,
   18472 	linux/powerpc64/stat32.h, linux/riscv/stat32.h, linux/sparc64/stat32.h,
   18473 	linux/tile/stat32.h, linux/x32/stat32.h, and linux/x86_64/stat32.h.
   18474 	* configure.ac (AC_CHECK_MEMBERS): Add struct stat64.st_mtime_nsec.
   18475 	* defs.h (struct strace_stat): New declaration.
   18476 	(print_struct_stat): New prototype.
   18477 	* linux/dummy.h (sys_fstatat64): Remove.
   18478 
   18479 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18480 
   18481 	mpers.m4: check for struct stat64, struct stat, and their members.
   18482 	* m4/mpers.m4 (st_MPERS_STRUCT_STAT): New macro.
   18483 	(st_MPERS): Use it.
   18484 
   18485 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18486 
   18487 	mpers: add MPERS_IS_* to CFLAGS passed to mpers.sh.
   18488 	This allows testing of MPERS_IS_* macros in pre-MPERS_DEFS parts
   18489 	of source code.
   18490 
   18491 	* Makefile.am (mpers-m%.stamp): Add -DMPERS_IS_$(mpers_NAME) to CFLAGS
   18492 	passed to mpers.sh.
   18493 	* mpers_test.sh: Likewise.
   18494 
   18495 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18496 
   18497 	Move redefinition of stat types to asm_stat.h.
   18498 	* file.c: Move redefinition of types that might be used
   18499 	to define struct stat ...
   18500 	* linux/asm_stat.h: ... here.
   18501 	* tests/xstatx.c: Remove redefinition of stat types.
   18502 
   18503 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18504 
   18505 	x86_64: provide a replacement of <asm/stat.h> for x32 personality.
   18506 	For the reason described in commit v4.10-517-gcfde1e3, a correct
   18507 	definition of struct stat for x32 personality is necessary to enable
   18508 	"asm_stat.h" with -mx32 on x86_64.
   18509 
   18510 	* linux/x32/asm_stat.h: Rename to ...
   18511 	* linux/x86_64/asm_stat.h: ... new file.
   18512 	* Makefile.am (strace_SOURCES): Add it.
   18513 	* linux/x32/asm_stat.h: New file, include "x86_64/asm_stat.h".
   18514 
   18515 2016-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   18516 
   18517 	x32/asm_stat.h: provide definitions for i386 personality.
   18518 	This enables x32/asm_stat.h with -m32.
   18519 
   18520 	* linux/x32/asm_stat.h [__x86_64__ && __ILP32__]: Redirect stat.
   18521 	Include "linux/asm_stat.h".
   18522 	(struct stat): Define for [__x86_64__ && __ILP32__] only.
   18523 	(struct __old_kernel_stat): Remove.
   18524 
   18525 2016-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   18526 
   18527 	Introduce a separate SEN entry for fstatat64 syscall.
   18528 	* linux/dummy.h (sys_fstatat64): Redirect to sys_newfstatat.
   18529 	* linux/32/syscallent.h: Replace SEN(newfstatat) with SEN(fstatat64).
   18530 	* linux/alpha/syscallent.h: Likewise.
   18531 	* linux/arm/syscallent.h: Likewise.
   18532 	* linux/avr32/syscallent.h: Likewise.
   18533 	* linux/bfin/syscallent.h: Likewise.
   18534 	* linux/hppa/syscallent.h: Likewise.
   18535 	* linux/i386/syscallent.h: Likewise.
   18536 	* linux/m68k/syscallent.h: Likewise.
   18537 	* linux/microblaze/syscallent.h: Likewise.
   18538 	* linux/mips/syscallent-o32.h: Likewise.
   18539 	* linux/powerpc/syscallent.h: Likewise.
   18540 	* linux/s390/syscallent.h: Likewise.
   18541 	* linux/sh/syscallent.h: Likewise.
   18542 	* linux/sh64/syscallent.h: Likewise.
   18543 	* linux/sparc/syscallent.h: Likewise.
   18544 	* linux/sparc64/syscallent.h: Likewise.
   18545 	* linux/xtensa/syscallent.h: Likewise.
   18546 	* pathtrace.c (pathtrace_match): Handle SEN_fstatat64.
   18547 
   18548 2016-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   18549 
   18550 	Do not check for struct stat.st_{a,c}time_nsec.
   18551 	Assume that the check for struct stat.st_mtime_nsec is enough.
   18552 	Likewise, do not check for struct stat.st_{a,c}tim.tv_nsec.
   18553 
   18554 	* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_atime_nsec,
   18555 	struct stat.st_ctime_nsec, struct stat.st_atim.tv_nsec,
   18556 	and struct stat.st_ctim.tv_nsec.
   18557 	* file.c (HAVE_STRUCT_STAT_ST_ATIME_NSEC,
   18558 	HAVE_STRUCT_STAT_ST_CTIME_NSEC): Remove.
   18559 	* printstat.h (HAVE_STRUCT_STAT_ST_ATIME_NSEC,
   18560 	HAVE_STRUCT_STAT_ST_CTIME_NSEC): Replace with
   18561 	HAVE_STRUCT_STAT_ST_MTIME_NSEC.
   18562 	* tests/xstatx.c: Likewise.
   18563 
   18564 2016-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   18565 
   18566 	Add sign_extend_unsigned_to_ll macro.
   18567 	* defs.h (sign_extend_unsigned_to_ll): New macro, mirrors
   18568 	zero_extend_signed_to_ull.
   18569 
   18570 	zero_extend_signed_to_ull: add short int support.
   18571 	* defs.h (zero_extend_signed_to_ull): Add short int support.
   18572 	* tests/tests.h: Likewise.
   18573 
   18574 	Rename widen_to_ull to zero_extend_signed_to_ull.
   18575 	* defs.h (widen_to_ull): Rename to zero_extend_signed_to_ull.
   18576 	All callers changed.
   18577 	* tests/tests.h: Likewise.
   18578 
   18579 2016-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   18580 
   18581 	sparc, sparc64: remove obsolete code.
   18582 	Remove remains of solaris personality support.
   18583 	This complements commit v4.10-45-gdf4dd8b.
   18584 
   18585 	* file.c [SPARC || SPARC64] (SYS_FUNC(xstat), SYS_FUNC(fxstat)): Remove.
   18586 
   18587 2016-08-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   18588 
   18589 	sparc64: fix decoding of struct stat64 related syscalls.
   18590 	For some reason, struct stat and struct stat64 are different on sparc64.
   18591 	This change fixes decoding of struct stat64 related syscalls for sparc64
   18592 	personality, sparc32 personality on sparc64 needs more work.
   18593 
   18594 	* file.c (printstat64) [SPARC64]: Do not use printstat.
   18595 	(SYS_FUNC(newfstatat)): Likewise.
   18596 
   18597 2016-08-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18598 
   18599 	tests: fill old_value argument in timer{,fd}_xettime tests.
   18600 	This is needed in order to differentiate it from the value returned
   18601 	by the call.  As a consequence, it enables revealing possible bugs
   18602 	in syscall parsers, for example, when the value read on syscall
   18603 	entering and not on syscall exiting, as it was the case with
   18604 	timerfd_settime parser.
   18605 
   18606 	* tests/timer_xettime.c (main): Fill old.its field with value different
   18607 	from the expected one upon call return.
   18608 	* tests/timerfd_xettime.c: Likewise.
   18609 
   18610 2016-08-22  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18611 
   18612 	Fix old_value argument retrieval in timerfd_settime parser.
   18613 	This is done similar to timer_settime syscall parser.
   18614 
   18615 	* time.c (SYS_FUNC(timerfd_settime)): Retrieve old_value argument
   18616 	on exiting and not on entering.  Return 0 instead of RVAL_DECODED
   18617 	since the call hasn't been decoded in full on entering.
   18618 
   18619 2016-08-21  Richard W.M. Jones  <rjones (a] redhat.com>
   18620 
   18621 	Add RISC-V architecture support.
   18622 	The original port of strace was done by Palmer Dabbelt
   18623 	(eecs.berkeley.edu), based on strace 4.9.
   18624 
   18625 	* configure.ac: Define RISCV for riscv*.
   18626 	* clone.c [RISCV]: Define ARG_* macros as for OR1K.
   18627 	* defs.h [RISCV] (SUPPORTED_PERSONALITIES): Define to 2.
   18628 	[RISCV] (NEED_UID16_PARSERS): Define to 1.
   18629 	* linux/riscv/arch_regs.c: New file.
   18630 	* linux/riscv/errnoent1.h: Likewise.
   18631 	* linux/riscv/get_error.c: Likewise.
   18632 	* linux/riscv/get_scno.c: Likewise.
   18633 	* linux/riscv/get_syscall_args.c: Likewise.
   18634 	* linux/riscv/ioctls_arch0.h: Likewise.
   18635 	* linux/riscv/ioctls_arch1.h: Likewise.
   18636 	* linux/riscv/ioctls_inc0.h: Likewise.
   18637 	* linux/riscv/ioctls_inc1.h: Likewise.
   18638 	* linux/riscv/signalent1.h: Likewise.
   18639 	* linux/riscv/stat32.h: Likewise.
   18640 	* linux/riscv/syscallent.h: Likewise.
   18641 	* linux/riscv/syscallent1.h: Likewise.
   18642 	* Makefile.am (EXTRA_DIST): Add them.
   18643 
   18644 2016-08-21  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   18645 
   18646 	Move SH-specific argument number calculation to getllval.
   18647 	This change prevents scattering of ll-related hacks and simplifies
   18648 	pread/pwrite syscalls parsers' logic a bit.
   18649 
   18650 	* util.c (getllval): Add fixup for arg_no for SuperH when argument
   18651 	number is equal to 3.
   18652 	* io.c (PREAD_OFFSET_ARG): Remove.
   18653 	(SYS_FUNC(pread)): Always use argument number 3 for "count" argument
   18654 	printing.
   18655 	(SYS_FUNC(pwrite)): Likewise.
   18656 
   18657 2016-08-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   18658 
   18659 	sparc64: fix sigreturn decoding for sparc personality.
   18660 	* linux/sparc/arch_sigreturn.c (arch_sigreturn): Parametrize
   18661 	member types of struct signal_frame.
   18662 	* linux/sparc64/arch_sigreturn.c (sparc64_arch_sigreturn,
   18663 	sparc32_arch_sigreturn): New functions.
   18664 	(arch_sigreturn): Use them.
   18665 
   18666 2016-08-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   18667 
   18668 	Fix compat decoding of struct sigaction.sa_mask on big endian architectures
   18669 	* signal.c (decode_new_sigaction) [SUPPORTED_PERSONALITIES > 1 &&
   18670 	SIZEOF_LONG > 4]: Use LONG_LONG to convert sa_mask from 32-bit
   18671 	struct sigaction to 64-bit struct sigaction.
   18672 
   18673 2016-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   18674 
   18675 	Fix decoding of indirect shmat's return code for non-native personalities
   18676 	* ipc_shm.c (SYS_FUNC(shmat)): Fetch current_wordsize bytes of data
   18677 	to obtain return code of indirect shmat subcall.
   18678 
   18679 2016-08-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   18680 
   18681 	sparc64: fix sparc personality decoding of mmap64's offset argument.
   18682 	* linux/sparc64/syscallent1.h: Remove redirection of sys_mmap_4koff.
   18683 
   18684 2016-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   18685 
   18686 	sparc64: fix decoding of the forth argument of semctl syscall.
   18687 	On sparc64, unlike all other architectures where semctl is an indirect
   18688 	ipc subcall, the forth argument is passed directly.
   18689 
   18690 	* ipc_sem.c (SYS_FUNC(semctl)) [SPARC64]: Print 4th argument without
   18691 	indirection in case of native personality.
   18692 
   18693 2016-08-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   18694 
   18695 	Add sparc64 specific ptrace constants.
   18696 	* xlat/ptrace_cmds.in: Add PTRACE_GETREGS64, PTRACE_SETREGS64,
   18697 	PTRACE_GETFPREGS64, and PTRACE_SETFPREGS64.
   18698 
   18699 	sparc64: fix sign extension bug of syscall args for sparc personality.
   18700 	* linux/sparc64/get_syscall_args.c (get_syscall_args): Zero-extend
   18701 	syscall args from 32 bit for sparc personality.
   18702 
   18703 2016-08-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   18704 
   18705 	sparc64: fix tty ioctl numbers.
   18706 	The structures defined in asm/termbits.h have the same size
   18707 	on sparc and sparc64.
   18708 
   18709 	* linux/sparc64/ioctls_arch0.h (TCGETS, TCGETS2, TCSETS, TCSETS2,
   18710 	TCSETSF, TCSETSF2, TCSETSW, TCSETSW2): Sync with
   18711 	linux/sparc/ioctls_arch0.h
   18712 
   18713 2016-08-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   18714 
   18715 	evdev.c: fix typo in comment.
   18716 
   18717 2016-08-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   18718 
   18719 	Drop support of dummy members of struct stat.
   18720 	As st_flags, st_fstype, and st_gen members of struct stat are not filled
   18721 	by the kernel, there is no use supporting them.
   18722 
   18723 	* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_flags,
   18724 	struct stat.st_fstype, and struct stat.st_gen.
   18725 	* file.c [STAT32_PERSONALITY, HAVE_STRUCT_STAT64]: Do not undefine
   18726 	HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE,
   18727 	and HAVE_STRUCT_STAT_ST_GEN.
   18728 	* printstat.h (DO_PRINTSTAT): Do not check for
   18729 	HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE,
   18730 	and HAVE_STRUCT_STAT_ST_GEN.
   18731 
   18732 2016-08-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   18733 
   18734 	Assume that struct stat contains st_blksize, st_blocks, and st_rdev.
   18735 	Our test suite already assumes that struct stat contains st_blksize,
   18736 	st_blocks, and st_rdev members, and there haven't been any complaints.
   18737 
   18738 	* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_blksize,
   18739 	struct stat.st_blocks, and struct stat.st_rdev.
   18740 	* printstat.h (DO_PRINTSTAT): Do not check for
   18741 	HAVE_STRUCT_STAT_ST_BLKSIZE, HAVE_STRUCT_STAT_ST_BLOCKS,
   18742 	and HAVE_STRUCT_STAT_ST_RDEV.
   18743 
   18744 2016-08-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   18745 
   18746 	tests: fix pause.test when pause syscall is not available.
   18747 	* tests/pause.c (main): Fix expected output when pause syscall
   18748 	is not available.
   18749 
   18750 2016-08-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   18751 
   18752 	powerpc64, sparc64: fix redefinitions of ARCH_PC_REG.
   18753 	This fixes compilation warning that ARCH_PC_REG is redefined.
   18754 
   18755 	* linux/powerpc64/arch_regs.c (ARCH_PC_REG): Undefine before
   18756 	the new definition.
   18757 	* linux/sparc64/arch_regs.c (ARCH_PC_REG): Likewise.
   18758 
   18759 2016-08-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   18760 
   18761 	s390x, x32: remove redundant definitions of ARCH_PC_REG.
   18762 	* linux/s390x/arch_regs.c (ARCH_PC_REG): Remove, it is already defined
   18763 	in just included linux/s390/arch_regs.c.
   18764 	* linux/x32/arch_regs.c (ARCH_PC_REG): Remove, it is already defined
   18765 	in just included linux/x86_64/arch_regs.c.
   18766 
   18767 2016-08-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   18768 
   18769 	tests: check for leaks of placeholder descriptors.
   18770 	* tests/redirect-fds.c: New file.
   18771 	* tests/redirect-fds.test: New test.
   18772 	* tests/.gitignore: Add redirect-fds.
   18773 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   18774 	(MISC_TESTS): Add redirect-fds.test.
   18775 
   18776 	tests/init.sh: print exit code of failed commands.
   18777 	* init.sh (run_prog, run_prog_skip_if_failed): When the program fails,
   18778 	add its exit code to the diagnostic message.
   18779 	(run_strace): When strace fails, add its exit code to the diagnostic
   18780 	message.
   18781 	(run_strace_merge): When strace-log-merge fails, add its exit code
   18782 	to the diagnostic message.
   18783 
   18784 2016-08-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   18785 
   18786 	Fix leakage of placeholder descriptors to tracees.
   18787 	As a side effect of commit v4.11-211-g0736d4e, strace used to leak
   18788 	placeholders for standard descriptors to tracees thus affecting their
   18789 	behaviour.  Fix this by setting close-on-exec flag on placeholder
   18790 	descriptors.
   18791 
   18792 	* strace.c (open_dummy_desc): Set close-on-exec flag on the descriptor
   18793 	that is going to be returned to the caller.
   18794 	(fd_is_placeholder): New array.
   18795 	(ensure_standard_fds_opened, redirect_standard_fds): New functions.
   18796 	(startup_child): Use redirect_standard_fds.
   18797 	(init): Use ensure_standard_fds_opened.
   18798 
   18799 2016-08-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   18800 
   18801 	sparc64: fix decoding of uid and gid-related syscalls.
   18802 	sparc64 has no native 16-bit uid/gid syscalls.
   18803 
   18804 	* linux/sparc64/syscallent.h (chown, lchown, setuid, getuid, setgid,
   18805 	getgid, geteuid, getegid, getgroups, setgroups, fchown, setreuid,
   18806 	setregid, setfsuid, setfsgid): Change handlers from 16-bit to 32-bit.
   18807 
   18808 2016-08-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   18809 
   18810 	tests: fix *stat64 tests on alpha.
   18811 	On some architectures including alpha, <asm/stat.h> provides a
   18812 	definition of struct stat that has no st_atime_nsec, st_mtime_nsec, and
   18813 	st_ctime_nsec fields.  At the same time, struct stat64 always has these
   18814 	fields.  Fix tests to take this difference into account.
   18815 
   18816 	* tests/fstat64.c (STRUCT_STAT_IS_STAT64): New macro, defined to 1.
   18817 	* tests/lstat64.c (STRUCT_STAT_IS_STAT64): Likewise.
   18818 	* tests/stat64.c (STRUCT_STAT_IS_STAT64): Likewise.
   18819 	* tests/xstatx.c [!STRUCT_STAT] (STRUCT_STAT_IS_STAT64): New macro,
   18820 	defined to 0.
   18821 	[USE_ASM_STAT && STRUCT_STAT_IS_STAT64]:
   18822 	(HAVE_STRUCT_STAT_ST_ATIME_NSEC, HAVE_STRUCT_STAT_ST_CTIME_NSEC,
   18823 	HAVE_STRUCT_STAT_ST_MTIME_NSEC): Redefine to 1.
   18824 
   18825 2016-08-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   18826 
   18827 	tests: skip rt_tgsigqueueinfo.test when the syscall is not available.
   18828 	* tests/rt_tgsigqueueinfo.c (main): Skip the test when the syscall
   18829 	is not available.
   18830 
   18831 2016-08-11  James Cowgill  <james410 (a] cowgill.org.uk>
   18832 
   18833 	tests/fcntl.c: fix fcntl test on mips64.
   18834 	On mips64 the F_GETLK and F_SETLKW64 constants have identical values which
   18835 	causes the "wrong" constant to be printed by strace.
   18836 
   18837 	tests/fcntl.c (test_flock64): Do not test F_SETLKW64 on mips64.
   18838 
   18839 2016-08-11  James Cowgill  <james410 (a] cowgill.org.uk>
   18840 
   18841 	tests/nsyscalls.test: only trace the "syscall" syscall on mips o32.
   18842 	The "syscall" syscall only exists on o32 and causes strace to error out on
   18843 	64-bit mips ABIs. Pass MIPS_ABI from the configure script through to
   18844 	nsyscalls.test so the MIPS ABI can be checked.
   18845 
   18846 	* configure.ac (MIPS_ABI): Substitute into output files.
   18847 	* tests/Makefile.am (MIPS_ABI): Export via AM_TEST_LOG_FLAGS.
   18848 	* tests/nsyscalls.test: Restrict special mips handling to mips o32.
   18849 
   18850 2016-08-11  James Cowgill  <james410 (a] cowgill.org.uk>
   18851 
   18852 	tests/xstatx.c: fix stat syscall tests on mips64.
   18853 	For historical reasons the kernel struct stat represents times as unsigned
   18854 	32-bit integers on mips64. Therefore, while it's possible to give a file a
   18855 	timestamp before 1970 with futimens, reading the same timestamp through
   18856 	struct stat will give a positive time (around 2106).
   18857 	Workaround by using positive timestamps for testing on mips64.
   18858 
   18859 	* tests/xstatx.c (create_sample): Use positive timestamps on mips64.
   18860 
   18861 2016-08-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   18862 
   18863 	tests/mlock2.c: fix test failure on mips64.
   18864 	* tests/mlock2.c (main): Pass unsigned long arguments to mlock2 syscall
   18865 	explicitly, to avoid unwanted sign extension issues.
   18866 
   18867 	Based on patch by James Cowgill <james410 (a] cowgill.org.uk>
   18868 
   18869 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   18870 
   18871 	Use <asm/unistd.h> instead of <sys/syscall.h>
   18872 	There are no users of SYS_* macros provided by <sys/syscall.h>,
   18873 	and definitions of __NR_* macros could be obtained directly
   18874 	from <asm/unistd.h>.
   18875 
   18876 	* defs.h: Include <asm/unistd.h> instead of <sys/syscall.h>.
   18877 	* test/seccomp.c: Likewise.
   18878 	* test/threaded_execve.c: Likewise.
   18879 	* test/x32_lseek.c: Likewise.
   18880 	* test/x32_mmap.c: Likewise.
   18881 	* tests/_newselect.c: Likewise.
   18882 	* tests/access.c: Likewise.
   18883 	* tests/acct.c: Likewise.
   18884 	* tests/aio.c: Likewise.
   18885 	* tests/alarm.c: Likewise.
   18886 	* tests/attach-f-p.c: Likewise.
   18887 	* tests/bpf.c: Likewise.
   18888 	* tests/brk.c: Likewise.
   18889 	* tests/chmod.c: Likewise.
   18890 	* tests/chown.c: Likewise.
   18891 	* tests/chown32.c: Likewise.
   18892 	* tests/chroot.c: Likewise.
   18893 	* tests/clock_adjtime.c: Likewise.
   18894 	* tests/clock_nanosleep.c: Likewise.
   18895 	* tests/clock_xettime.c: Likewise.
   18896 	* tests/copy_file_range.c: Likewise.
   18897 	* tests/creat.c: Likewise.
   18898 	* tests/dup2.c: Likewise.
   18899 	* tests/dup3.c: Likewise.
   18900 	* tests/epoll_create.c: Likewise.
   18901 	* tests/epoll_create1.c: Likewise.
   18902 	* tests/epoll_ctl.c: Likewise.
   18903 	* tests/epoll_pwait.c: Likewise.
   18904 	* tests/epoll_wait.c: Likewise.
   18905 	* tests/eventfd.c: Likewise.
   18906 	* tests/execveat.c: Likewise.
   18907 	* tests/faccessat.c: Likewise.
   18908 	* tests/fchdir.c: Likewise.
   18909 	* tests/fchmod.c: Likewise.
   18910 	* tests/fchmodat.c: Likewise.
   18911 	* tests/fchown.c: Likewise.
   18912 	* tests/fchown32.c: Likewise.
   18913 	* tests/fchownat.c: Likewise.
   18914 	* tests/fcntl.c: Likewise.
   18915 	* tests/fcntl64.c: Likewise.
   18916 	* tests/fdatasync.c: Likewise.
   18917 	* tests/flock.c: Likewise.
   18918 	* tests/fstat.c: Likewise.
   18919 	* tests/fstat64.c: Likewise.
   18920 	* tests/fstatat64.c: Likewise.
   18921 	* tests/fstatfs.c: Likewise.
   18922 	* tests/fstatfs64.c: Likewise.
   18923 	* tests/fsync.c: Likewise.
   18924 	* tests/ftruncate.c: Likewise.
   18925 	* tests/ftruncate64.c: Likewise.
   18926 	* tests/futimesat.c: Likewise.
   18927 	* tests/get_mempolicy.c: Likewise.
   18928 	* tests/getcwd.c: Likewise.
   18929 	* tests/getdents.c: Likewise.
   18930 	* tests/getdents64.c: Likewise.
   18931 	* tests/getegid.c: Likewise.
   18932 	* tests/getegid32.c: Likewise.
   18933 	* tests/geteuid.c: Likewise.
   18934 	* tests/geteuid32.c: Likewise.
   18935 	* tests/getgid.c: Likewise.
   18936 	* tests/getgid32.c: Likewise.
   18937 	* tests/getgroups.c: Likewise.
   18938 	* tests/getgroups32.c: Likewise.
   18939 	* tests/getpgrp.c: Likewise.
   18940 	* tests/getrandom.c: Likewise.
   18941 	* tests/getresgid.c: Likewise.
   18942 	* tests/getresgid32.c: Likewise.
   18943 	* tests/getresuid.c: Likewise.
   18944 	* tests/getresuid32.c: Likewise.
   18945 	* tests/getrlimit.c: Likewise.
   18946 	* tests/getrusage.c: Likewise.
   18947 	* tests/getuid.c: Likewise.
   18948 	* tests/getuid32.c: Likewise.
   18949 	* tests/getxxid.c: Likewise.
   18950 	* tests/ioctl_uffdio.c: Likewise.
   18951 	* tests/ioperm.c: Likewise.
   18952 	* tests/iopl.c: Likewise.
   18953 	* tests/ipc.c: Likewise.
   18954 	* tests/kill.c: Likewise.
   18955 	* tests/lchown.c: Likewise.
   18956 	* tests/lchown32.c: Likewise.
   18957 	* tests/libmmsg.c: Likewise.
   18958 	* tests/libsocketcall.c: Likewise.
   18959 	* tests/link.c: Likewise.
   18960 	* tests/linkat.c: Likewise.
   18961 	* tests/llseek.c: Likewise.
   18962 	* tests/lseek.c: Likewise.
   18963 	* tests/lstat.c: Likewise.
   18964 	* tests/lstat64.c: Likewise.
   18965 	* tests/mbind.c: Likewise.
   18966 	* tests/membarrier.c: Likewise.
   18967 	* tests/memfd_create.c: Likewise.
   18968 	* tests/migrate_pages.c: Likewise.
   18969 	* tests/mkdir.c: Likewise.
   18970 	* tests/mkdirat.c: Likewise.
   18971 	* tests/mknod.c: Likewise.
   18972 	* tests/mknodat.c: Likewise.
   18973 	* tests/mlock.c: Likewise.
   18974 	* tests/mlock2.c: Likewise.
   18975 	* tests/move_pages.c: Likewise.
   18976 	* tests/newfstatat.c: Likewise.
   18977 	* tests/nsyscalls.c: Likewise.
   18978 	* tests/old_mmap.c: Likewise.
   18979 	* tests/oldselect.c: Likewise.
   18980 	* tests/open.c: Likewise.
   18981 	* tests/openat.c: Likewise.
   18982 	* tests/pause.c: Likewise.
   18983 	* tests/poll.c: Likewise.
   18984 	* tests/prctl-seccomp-filter-v.c: Likewise.
   18985 	* tests/prctl-seccomp-strict.c: Likewise.
   18986 	* tests/preadv2-pwritev2.c: Likewise.
   18987 	* tests/prlimit64.c: Likewise.
   18988 	* tests/pselect6.c: Likewise.
   18989 	* tests/ptrace.c: Likewise.
   18990 	* tests/readdir.c: Likewise.
   18991 	* tests/readlink.c: Likewise.
   18992 	* tests/readlinkat.c: Likewise.
   18993 	* tests/reboot.c: Likewise.
   18994 	* tests/remap_file_pages.c: Likewise.
   18995 	* tests/rename.c: Likewise.
   18996 	* tests/renameat.c: Likewise.
   18997 	* tests/renameat2.c: Likewise.
   18998 	* tests/rmdir.c: Likewise.
   18999 	* tests/rt_sigpending.c: Likewise.
   19000 	* tests/rt_sigprocmask.c: Likewise.
   19001 	* tests/rt_sigsuspend.c: Likewise.
   19002 	* tests/rt_sigtimedwait.c: Likewise.
   19003 	* tests/rt_tgsigqueueinfo.c: Likewise.
   19004 	* tests/sched_get_priority_mxx.c: Likewise.
   19005 	* tests/sched_rr_get_interval.c: Likewise.
   19006 	* tests/sched_xetaffinity.c: Likewise.
   19007 	* tests/sched_xetattr.c: Likewise.
   19008 	* tests/sched_xetparam.c: Likewise.
   19009 	* tests/sched_xetscheduler.c: Likewise.
   19010 	* tests/sched_yield.c: Likewise.
   19011 	* tests/seccomp-filter-v.c: Likewise.
   19012 	* tests/seccomp-filter.c: Likewise.
   19013 	* tests/seccomp-strict.c: Likewise.
   19014 	* tests/select.c: Likewise.
   19015 	* tests/sendfile.c: Likewise.
   19016 	* tests/sendfile64.c: Likewise.
   19017 	* tests/set_mempolicy.c: Likewise.
   19018 	* tests/setdomainname.c: Likewise.
   19019 	* tests/setfsgid.c: Likewise.
   19020 	* tests/setfsgid32.c: Likewise.
   19021 	* tests/setfsuid.c: Likewise.
   19022 	* tests/setfsuid32.c: Likewise.
   19023 	* tests/setgid.c: Likewise.
   19024 	* tests/setgid32.c: Likewise.
   19025 	* tests/setgroups.c: Likewise.
   19026 	* tests/setgroups32.c: Likewise.
   19027 	* tests/sethostname.c: Likewise.
   19028 	* tests/setregid.c: Likewise.
   19029 	* tests/setregid32.c: Likewise.
   19030 	* tests/setresgid.c: Likewise.
   19031 	* tests/setresgid32.c: Likewise.
   19032 	* tests/setresuid.c: Likewise.
   19033 	* tests/setresuid32.c: Likewise.
   19034 	* tests/setreuid.c: Likewise.
   19035 	* tests/setreuid32.c: Likewise.
   19036 	* tests/setrlimit.c: Likewise.
   19037 	* tests/setuid.c: Likewise.
   19038 	* tests/setuid32.c: Likewise.
   19039 	* tests/signalfd4.c: Likewise.
   19040 	* tests/socketcall.c: Likewise.
   19041 	* tests/splice.c: Likewise.
   19042 	* tests/stat.c: Likewise.
   19043 	* tests/stat64.c: Likewise.
   19044 	* tests/statfs.c: Likewise.
   19045 	* tests/statfs64.c: Likewise.
   19046 	* tests/swap.c: Likewise.
   19047 	* tests/symlink.c: Likewise.
   19048 	* tests/symlinkat.c: Likewise.
   19049 	* tests/sync.c: Likewise.
   19050 	* tests/sync_file_range.c: Likewise.
   19051 	* tests/sync_file_range2.c: Likewise.
   19052 	* tests/syslog.c: Likewise.
   19053 	* tests/tee.c: Likewise.
   19054 	* tests/time.c: Likewise.
   19055 	* tests/timer_create.c: Likewise.
   19056 	* tests/timer_xettime.c: Likewise.
   19057 	* tests/timerfd_xettime.c: Likewise.
   19058 	* tests/times-fail.c: Likewise.
   19059 	* tests/times.c: Likewise.
   19060 	* tests/truncate.c: Likewise.
   19061 	* tests/truncate64.c: Likewise.
   19062 	* tests/ugetrlimit.c: Likewise.
   19063 	* tests/umount.c: Likewise.
   19064 	* tests/umount2.c: Likewise.
   19065 	* tests/uname.c: Likewise.
   19066 	* tests/unix-pair-send-recv.c: Likewise.
   19067 	* tests/unlink.c: Likewise.
   19068 	* tests/unlinkat.c: Likewise.
   19069 	* tests/userfaultfd.c: Likewise.
   19070 	* tests/utimes.c: Likewise.
   19071 	* tests/vhangup.c: Likewise.
   19072 	* tests/vmsplice.c: Likewise.
   19073 	* tests/waitid.c: Likewise.
   19074 	* tests/waitpid.c: Likewise.
   19075 	* tests/xet_robust_list.c: Likewise.
   19076 	* tests/xetpgid.c: Likewise.
   19077 	* tests/xetpriority.c: Likewise.
   19078 	* tests/xettimeofday.c: Likewise.
   19079 
   19080 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   19081 
   19082 	ia64: replace SYS_clone2 with __NR_clone2.
   19083 	Migrate to __NR_* the last user of SYS_* macros provided
   19084 	by <sys/syscall.h>.
   19085 
   19086 	* clone.c [IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Replace
   19087 	SYS_clone2 with __NR_clone2.
   19088 
   19089 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   19090 
   19091 	Make sure that tcp->s_ent and tcp->s_prev_ent do not point to freed memory
   19092 	This complements commit v4.13-33-g60d7ec8.
   19093 
   19094 	* syscall.c (sysent_buf): New structure.
   19095 	(free_sysent_buf): New function.
   19096 	(get_scno): Use them.
   19097 
   19098 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   19099 
   19100 	file.c: move definitions of struct stat32 to separate files.
   19101 	* linux/aarch64/stat32.h: New file.
   19102 	* linux/powerpc64/stat32.h: Likewise.
   19103 	* linux/sparc64/stat32.h: Likewise.
   19104 	* linux/tile/stat32.h: Likewise.
   19105 	* linux/x32/stat32.h: Likewise.
   19106 	* linux/x86_64/stat32.h: Likewise.
   19107 	* Makefile.am (EXTRA_DIST): Add them.
   19108 	* file.c [SUPPORTED_PERSONALITIES > 1]: Remove arch specific definitions
   19109 	of struct stat32, include "stat32.h" instead.
   19110 
   19111 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   19112 
   19113 	sparc, sparc64: remove obsolete code.
   19114 	Remove remains of solaris personality support.
   19115 	This complements commit v4.10-45-gdf4dd8b.
   19116 
   19117 	* file.c [SPARC || SPARC64]: Remove the code related to struct solstat.
   19118 	(printstat, printoldstat) [SPARC || SPARC64]: Remove.
   19119 
   19120 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   19121 
   19122 	sparc64: fix decoding of stat family syscalls.
   19123 	This complements commit v4.13-28-gaebfe83.
   19124 
   19125 	* file.c [SPARC64]: Change STAT32_PERSONALITY to 1.
   19126 
   19127 2016-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   19128 
   19129 	Fix decoding of invalid syscalls mapped to indirect subcalls.
   19130 	When the syscall number returned by arch_get_scno is a mapped indirect
   19131 	subcall (i.e. mapped subcall of socketcall or ipc syscall), do not
   19132 	mistakenly treat it as a valid indirect subcall.
   19133 
   19134 	* defs.h (SCNO_IS_VALID): Treat scno with TRACE_INDIRECT_SUBCALL flag
   19135 	as invalid.
   19136 	* syscall.c (syscall_name): Do no shuffle scno.
   19137 	(trace_syscall_entering, trace_syscall_exiting): Use
   19138 	tcp->s_ent->sys_name instead of syscall_name.
   19139 	(get_scno): In case of invalid syscall, allocate a dynamic struct sysent
   19140 	containing an appropriate .sys_name.
   19141 	* tests/nsyscalls.c (main) [SYS_socket_subcall]: Check decoding
   19142 	of direct syscall number SYS_socket_subcall+1.
   19143 	(main) [SYS_ipc_subcall]: Check decoding of direct syscall number
   19144 	SYS_ipc_subcall+1.
   19145 
   19146 2016-08-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   19147 
   19148 	linux/subcall.h: remove redundant definitions.
   19149 	* linux/subcall.h: Remove definitions of non-existent socket
   19150 	and ipc subcalls.
   19151 
   19152 	defs.h: simplify SUPPORTED_PERSONALITIES definition.
   19153 	* defs.h: Group definition of SUPPORTED_PERSONALITIES by value.
   19154 
   19155 2016-08-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   19156 
   19157 	defs.h: simplify PERSONALITY1_WORDSIZE definition.
   19158 	Move definition of PERSONALITY1_WORDSIZE macro outside arch specific
   19159 	ifdefs.
   19160 
   19161 	* defs.h [SPARC64 || X86_64 || X32 || AARCH64 || POWERPC64 || TILE]
   19162 	(PERSONALITY1_WORDSIZE): Remove.
   19163 	[SUPPORTED_PERSONALITIES > 1] (PERSONALITY1_WORDSIZE): Define to 4
   19164 	unconditionally.
   19165 
   19166 2016-08-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   19167 
   19168 	defs.h: simplify PERSONALITY0_WORDSIZE definition.
   19169 	Move definition of PERSONALITY0_WORDSIZE macro outside arch specific
   19170 	ifdefs.
   19171 
   19172 	* defs.h (PERSONALITY0_WORDSIZE): Define to SIZEOF_LONG unconditionally.
   19173 
   19174 2016-08-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   19175 
   19176 	sparc64: swap personality numbers.
   19177 	Fix inconsistency between syscall and ioctl entries on sparc64.
   19178 	Make layout of personalities on sparc64 the same as on other
   19179 	architectures that support two personalities.
   19180 
   19181 	* defs.h [SPARC64] (PERSONALITY0_WORDSIZE): Change to 8.
   19182 	[SPARC64] (PERSONALITY1_WORDSIZE): Change to 4.
   19183 	* linux/sparc64/get_scno.c (arch_get_scno): Swap personality numbers.
   19184 	* linux/sparc64/ioctls_arch1.h: Rename to ioctls_arch0.h.
   19185 	* linux/sparc64/ioctls_arch0.h: Rename to ioctls_arch1.h.
   19186 	* linux/sparc64/ioctls_inc0.h: Rename to ioctls_inc1.h.
   19187 	* linux/sparc64/ioctls_inc1.h: Rename to ioctls_inc0.h.
   19188 
   19189 2016-08-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   19190 
   19191 	defs.h: cleanup personality specific macro definitions.
   19192 	Move the code that defines PERSONALITY[12]_INCLUDE_FUNCS,
   19193 	PERSONALITY[12]_INCLUDE_PRINTERS_DECLS,
   19194 	PERSONALITY[12]_INCLUDE_PRINTERS_DEFS, and MPERS_{m,mx}32_IOCTL_MACROS
   19195 	macros outside arch specific ifdefs.
   19196 
   19197 	* defs.h [SPARC] (PERSONALITY0_WORDSIZE): Remove.
   19198 	[SPARC64 && HAVE_M32_MPERS]: Remove.
   19199 	[X86_64 && HAVE_M32_MPERS]: Remove.
   19200 	[X86_64 && HAVE_MX32_MPERS]: Remove.
   19201 	[X32 && HAVE_M32_MPERS]: Remove.
   19202 	[AARCH64 && HAVE_M32_MPERS]: Remove.
   19203 	[POWERPC64 && HAVE_M32_MPERS]: Remove.
   19204 	[TILE && HAVE_M32_MPERS]: Remove.
   19205 	(PERSONALITY0_INCLUDE_PRINTERS_DECLS,
   19206 	PERSONALITY0_INCLUDE_PRINTERS_DEFS): Define unconditionally.
   19207 	[SUPPORTED_PERSONALITIES > 1 && HAVE_M32_MPERS]
   19208 	(PERSONALITY1_INCLUDE_PRINTERS_DECLS,
   19209 	PERSONALITY1_INCLUDE_PRINTERS_DEFS, PERSONALITY1_INCLUDE_FUNCS,
   19210 	MPERS_m32_IOCTL_MACROS): Define for
   19211 	[SUPPORTED_PERSONALITIES > 1 && HAVE_M32_MPERS] case.
   19212 	(PERSONALITY2_INCLUDE_PRINTERS_DECLS,
   19213 	PERSONALITY2_INCLUDE_PRINTERS_DEFS, PERSONALITY2_INCLUDE_FUNCS,
   19214 	MPERS_mx32_IOCTL_MACROS): Define for
   19215 	[SUPPORTED_PERSONALITIES > 2 && HAVE_MX32_MPERS] case.
   19216 
   19217 2016-08-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   19218 
   19219 	Change #include guard trailing part comments.
   19220 	* defs.h: Change comment of the trailing part of #include guard.
   19221 	* flock.h: Likewise.
   19222 	* gcc_compat.h: Likewise.
   19223 	* ipc_defs.h: Likewise.
   19224 	* kernel_types.h: Likewise.
   19225 	* mpers_type.h: Likewise.
   19226 	* msghdr.h: Likewise.
   19227 	* printsiginfo.h: Likewise.
   19228 	* ptrace.h: Likewise.
   19229 	* regs.h: Likewise.
   19230 	* seccomp_fprog.h: Likewise.
   19231 	* sigevent.h: Likewise.
   19232 	* statfs.h: Likewise.
   19233 	* xlat.h: Likewise.
   19234 
   19235 2016-08-08  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   19236 
   19237 	Unify usage of #include guards.
   19238 	This commit is an attempt to unify usage of include guards (in top-level
   19239 	headers, at least).  As a side note, different files with *.h extension
   19240 	have different semantics: for example, printargs.h is included multiple
   19241 	times in order to generate slightly varying code depending on values of
   19242 	macro definitions - maybe it's better to change extension of such files
   19243 	to something like *.inc.
   19244 
   19245 	* defs.h: Add #include guard.
   19246 	* flock.h: Likewise.
   19247 	* ipc_defs.h: Likewise.
   19248 	* mpers_type.h: Likewise.
   19249 	* printsiginfo.h: Likewise.
   19250 	* ptrace.h: Likewise.
   19251 	* regs.h: Likewise.
   19252 	* seccomp_fprog.h: Likewise.
   19253 	* gcc_compat.h: Rename the macro used for #include guard.
   19254 	* msghdr.h: Likewise.
   19255 	* sigevent.h: Likewise.
   19256 	* kernel_types.h: Comment the trailing part of #include guard.
   19257 	* xlat.h: Add missing macro definition for #include guard.
   19258 
   19259 2016-08-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   19260 
   19261 	tests: add #include guards.
   19262 	* tests/tests.h: Add #include guard.
   19263 
   19264 2016-08-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   19265 
   19266 	linux: add #include guards.
   19267 	* linux/dummy.h: Add #include guard.
   19268 	* linux/inet_diag.h: Likewise.
   19269 	* linux/netlink_diag.h: Likewise.
   19270 	* linux/sock_diag.h: Likewise.
   19271 	* linux/syscall.h: Likewise.
   19272 	* linux/unix_diag.h: Likewise.
   19273 
   19274 2016-08-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   19275 
   19276 	tests/umode_t.c: guard against libc printf format errors.
   19277 	* tests/umode_t.c (test_syscall): Use different printf format specifiers
   19278 	to detect libc printf format errors.
   19279 
   19280 2016-08-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   19281 
   19282 	travis: use a suitable musl revision.
   19283 	There seems to be no readily available binary packages of musl that are
   19284 	sufficiently up to date to be used to build and test strace, so prepare
   19285 	a suitable musl from source.
   19286 
   19287 	* travis-install.sh (musl-gcc): Do not add an extra repository,
   19288 	do not install musl-tools and linux-musl-dev packages.
   19289 	Download, build, and install a suitable musl revision instead.
   19290 
   19291 2016-08-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   19292 
   19293 	Fix printing of mode_t, umode_t, and umask types.
   19294 	Print numeric umode_t type using %#03ho format.
   19295 	Print return value of umask syscall using %#03lo format.
   19296 	When printing symbolic mode_t type, always print lower 9 bits,
   19297 	and print the numeric part using %#03o format.
   19298 
   19299 	* defs.h (sprintmode): Remove.
   19300 	(print_symbolic_mode_t, print_numeric_umode_t,
   19301 	print_numeric_long_umask): New prototypes.
   19302 	* printmode.c (sprintmode): Remove.
   19303 	(print_symbolic_mode_t, print_numeric_umode_t,
   19304 	print_numeric_long_umask): New functions.
   19305 	* chmod.c (decode_chmod): Use print_numeric_umode_t.
   19306 	* ipc_msg.c (SYS_FUNC(msgget)): Likewise.
   19307 	* ipc_msgctl.c (print_msqid_ds): Likewise.
   19308 	* ipc_sem.c (SYS_FUNC(semget)): Likewise.
   19309 	* ipc_shm.c (SYS_FUNC(shmget)): Likewise.
   19310 	* ipc_shmctl.c (print_shmid_ds): Likewise.
   19311 	* mq.c (SYS_FUNC(mq_open)): Likewise.
   19312 	* open.c (decode_open, SYS_FUNC(creat)): Likewise.
   19313 	* umask.c (SYS_FUNC(umask)): Likewise.
   19314 	* mknod.c (decode_mknod): Use print_symbolic_mode_t.
   19315 	* printstat.h (DO_PRINTSTAT): Likewise.
   19316 	* syscall.c (trace_syscall_exiting): Use print_numeric_long_umask.
   19317 	* tests/umode_t.c: New file.
   19318 	* tests/Makefile.am (EXTRA_DIST): Add it.
   19319 	* tests/creat.c: Rewrite as a thin wrapper around umode_t.c
   19320 	* tests/mkdir.c: Likewise.
   19321 	* tests/mkdirat.c: Likewise.
   19322 	* tests/mknod.c: Extend test coverage of mknod syscall.
   19323 	* tests/mknodat.c: Extend test coverage of mknodat syscall.
   19324 	* tests/umask.c: Extend test coverage of umask syscall.
   19325 	* tests/creat.test: Update the value specified for strace -a parameter.
   19326 	* tests/mkdir.test: Likewise.
   19327 	* tests/mkdirat.test: Likewise.
   19328 	* tests/mknodat.test: Likewise.
   19329 
   19330 2016-08-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   19331 
   19332 	tests: simplify attach-f-p.test.
   19333 	* tests/attach-f-p.c Simplify communications between threads
   19334 	by replacing per-thread timers with pipes.
   19335 	* tests/attach-f-p.test: Do not ignore signals.
   19336 
   19337 	tests: cleanup attach-p-cmd.test.
   19338 	* tests/attach-p-cmd-cmd.c (main): Cleanup expected output.
   19339 	* tests/attach-p-cmd-p.c (main): Print expected output.
   19340 	* tests/attach-p-cmd.test: Do not print expected output.
   19341 
   19342 	ip_mreq.test: rewrite from match_grep to match_diff.
   19343 	* tests/ip_mreq.c (main): Print expected output.
   19344 	* tests/ip_mreq.test: Use run_strace_match_diff.
   19345 	* tests/ip_mreq.expected: Remove.
   19346 	* tests/Makefile.am (EXTRA_DIST): Remove it.
   19347 
   19348 	fanotify_mark.test: rewrite from match_grep to match_diff.
   19349 	* tests/fanotify_mark.c (main): Print expected output.
   19350 	* tests/fanotify_mark.test: Use run_strace_match_diff.
   19351 	* tests/fanotify_mark.expected: Remove.
   19352 	* tests/Makefile.am (EXTRA_DIST): Remove it.
   19353 
   19354 	signalfd4.test: rewrite from match_grep to match_diff.
   19355 	* tests/signalfd4.c (get_sigset_size): New function.
   19356 	(main): Use it.  Print expected output.
   19357 	* tests/signalfd4.test: Use run_strace_match_diff.
   19358 	* tests/signalfd4.expected: Remove.
   19359 	* tests/Makefile.am (EXTRA_DIST): Remove it.
   19360 
   19361 2016-07-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   19362 
   19363 	tests: rename signalfd.test to signalfd4.test.
   19364 	* tests/signalfd.c: Rename to signalfd4.c.
   19365 	* tests/signalfd.test: Rename to signalfd4.test.
   19366 	* tests/signalfd.expected: Rename to signalfd4.expected.
   19367 	* tests/.gitignore: Replace signalfd with signalfd4.
   19368 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19369 	(DECODER_TESTS): Replace signalfd.test with signalfd4.test.
   19370 	(EXTRA_DIST): Replace signalfd.expected with signalfd4.expected.
   19371 
   19372 2016-07-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   19373 
   19374 	memfd_create.test: rewrite from match_grep to match_diff.
   19375 	* tests/memfd_create.c (main): Print expected output.
   19376 	* tests/memfd_create.test: Use run_strace_match_diff.
   19377 	* tests/memfd_create.expected: Remove.
   19378 	* tests/Makefile.am (EXTRA_DIST): Remove it.
   19379 
   19380 2016-07-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   19381 
   19382 	Set exit status to 1 if strace has not traced any processes.
   19383 	* strace.c (main): Initialize exit_code with 1 when no processes
   19384 	has been attached.
   19385 	* strace.1: Document it.
   19386 	* NEWS: Mention this change.
   19387 
   19388 	Attach to the target process before attempting to attach to its siblings
   19389 	* strace.c (attach_tcb): Attach to tcp->pid first.
   19390 
   19391 	Report the name of ptrace command when ptrace_attach_or_seize fails.
   19392 	* strace.c (ptrace_attach_cmd): New variable.
   19393 	(ptrace_attach_or_seize): Save last ptrace command's name
   19394 	to ptrace_attach_cmd.
   19395 	(attach_tcb, startup_child): Use it in error diagnostics.
   19396 
   19397 	strace.c: refactor startup_attach.
   19398 	* strace.c (startup_attach): Move the inner part of the big loop
   19399 	over tcbtab elements ...
   19400 	(attach_tcb): ... to this new function.
   19401 
   19402 	startup_attach: do not use atoi.
   19403 	* strace.c (startup_attach): Replace atoi with string_to_uint.
   19404 
   19405 2016-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   19406 
   19407 	Do not enable mpers runtime checks if mpers is not enabled.
   19408 	* m4/mpers.m4 (HAVE_RUNTIME): Enable iff both mpers and runtime
   19409 	work properly.
   19410 
   19411 2016-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   19412 
   19413 	linux/dummy_check.sh: remove obsolete script.
   19414 	Starting with commit v4.10-62-ga0bd374, function prototypes
   19415 	of syscall parsers are generated at build time.
   19416 
   19417 	* linux/dummy_check.sh: Remove.
   19418 
   19419 2016-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   19420 
   19421 	generate_xlat_in.sh: remove obsolete script.
   19422 	This script has been created by commit v4.8-180-g0ed617b
   19423 	for the one-shot job of automatic convertion of xlat structures
   19424 	from *.c files to xlat/*.in files.
   19425 
   19426 	* generate_xlat_in.sh: Remove.
   19427 
   19428 2016-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   19429 
   19430 	tests: use terse notation in designated initializers where appropriate.
   19431 	* tests/btrfs.c (btrfs_test_dev_replace_ioctl): Initialize
   19432 	struct btrfs_ioctl_dev_replace_args using terse notation.
   19433 	* tests/clock_nanosleep.c (main): Initialize struct timespec
   19434 	using terse notation.
   19435 	* tests/nanosleep.c (main): Likewise.
   19436 
   19437 2016-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   19438 
   19439 	Consistently use extended regular expressions where appropriate.
   19440 	When grep or sed is used with basic regular expressions containing
   19441 	'(', ')', '{', '}', '|', '?', and '+' special characters, convert them
   19442 	to extended regular expressions for better portability and readability.
   19443 
   19444 	* generate_mpers_am.sh: Convert grep and sed BREs to EREs.
   19445 	* Makefile.am (ioctl_redefs%.h, m%_type_defs.h, m%_funcs.h,
   19446 	mpers_printer_decl_pattern, printers.h, %_printer_decls.h,
   19447 	%_printer_defs.h): Convert sed BREs to EREs.
   19448 	* generate_sen.sh: Likewise.
   19449 	* linux/mips/genstub.sh: Likewise.
   19450 	* make-dsc: Likewise.
   19451 	* mpers.sh: Likewise.
   19452 	* xlat/gen.sh: Likewise.
   19453 	* tests/Makefile.am (ksysent.h): Likewise.
   19454 	* tests/ksysent.sed: Likewise.
   19455 	* tests/pc.test: Likewise.
   19456 	* tests/strace-S.test: Likewise.
   19457 	* tests/strace-V.test: Likewise.
   19458 	* tests/strace-k.test: Likewise.
   19459 
   19460 2016-07-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   19461 
   19462 	tests: fix extended regexps.
   19463 	* tests/adjtimex.c (main): Consistently quote curly braces
   19464 	in expected output.
   19465 	* tests/uio.expected: Likewise.
   19466 
   19467 2016-07-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   19468 
   19469 	Post-release administrivia.
   19470 	* NEWS: Add header line for the next release.
   19471 	* debian/changelog.in: Add a changelog entry for 4.13-1.
   19472 	* strace.spec.in: Likewise.
   19473 
   19474 2016-07-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   19475 
   19476 	Prepare for 4.13 release.
   19477 	* NEWS: Update for 4.13 release.
   19478 
   19479 	Fix one more code pattern that might break gcc strict aliasing rules.
   19480 	* btrfs.c (btrfs_ioctl): Add one more expicit cast to "void *",
   19481 	to avoid breaking strict-aliasing rules reported by some gcc compilers.
   19482 	* syscall.c (decode_socket_subcall): Likewise.
   19483 	* util.c (next_set_bit): Likewise.
   19484 	* tests/btrfs.c (btrfs_test_send_ioctl): Likewise.
   19485 
   19486 	Fix casts of ptrace's third argument.
   19487 	* strace.c (maybe_allocate_tcb): Replace "(char *) 0" with NULL
   19488 	as ptrace's third argument.
   19489 	* linux/sparc64/get_scno.c (arch_get_scno): Cast third argument
   19490 	of ptrace to "void *'.
   19491 	* syscall.c (get_regs): Likewise.
   19492 	* upeek.c (upeek): Likewise.
   19493 	* util.c (umoven): Likewise.
   19494 
   19495 	tests/btrfs.c: do not include the same header file twice.
   19496 	* tests/btrfs.c: Do not include <sys/fcntl.h>, <fcntl.h> is enough.
   19497 
   19498 	tests: fix accept4.test on systems that lack SOCK_CLOEXEC definition.
   19499 	* tests/accept4.c: Check that O_CLOEXEC is defined.  Use O_CLOEXEC
   19500 	instead of SOCK_CLOEXEC.
   19501 
   19502 2016-07-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   19503 
   19504 	tests: fix vhangup.test.
   19505 	* tests/vhangup.c (main): Fix expected output for the case when
   19506 	the calling process has CAP_SYS_TTY_CONFIG capability.
   19507 
   19508 	Reported-by: Yun-Chih Chen <b03902074 (a] ntu.edu.tw>
   19509 
   19510 2016-07-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   19511 
   19512 	tests: fix chown.test.
   19513 	* tests/chown.test: Fix the value specified for strace -a parameter.
   19514 
   19515 	Reported-by: Yun-Chih Chen <b03902074 (a] ntu.edu.tw>
   19516 
   19517 2016-07-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   19518 
   19519 	x32: fix syscall entries for x86_64 variants of io_setup and io_submit.
   19520 	* linux/x32/syscallent.h (64:io_setup, 64:io_submit): Change handler
   19521 	to printargs.
   19522 
   19523 	tests/ipc.c: fix typo.
   19524 
   19525 2016-07-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   19526 
   19527 	NEWS: Prepare for 4.13 release.
   19528 
   19529 2016-07-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   19530 
   19531 	debian: add gcc-multilib to Build-Depends for relevant architectures.
   19532 	* debian/control (Build-Depends) [amd64, ppc64, sparc64, x32]:
   19533 	Add gcc-multilib to enable multiple personalities support.
   19534 
   19535 2016-07-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   19536 
   19537 	tests: check decoding of ipc syscall.
   19538 	* tests/ipc.c: New file.
   19539 	* tests/ipc.test: New test.
   19540 	* tests/.gitignore: Add ipc.
   19541 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19542 	(DECODER_TESTS): Add ipc.test.
   19543 
   19544 	Fix corner cases of ipc syscall decoding.
   19545 	* xlat/ipccalls.in: New file.
   19546 	* ipc.c: New file.
   19547 	* Makefile.am (libstrace_a_SOURCES): Add it.
   19548 	* linux/dummy.h (sys_ipc): Remove stub alias.
   19549 	* syscall.c (decode_ipc_subcall): Treat 1st argument of ipc syscall
   19550 	as "unsigned int".
   19551 	[S390 || S390X]: Skip ipc cubcalls that have non-zero version.
   19552 	[SPARC64]: Likewise, for the native personality.
   19553 	Save ipc cubcall version for later use by specific ipc parsers.
   19554 	* ipc_msg.c (SYS_FUNC(msgrcv)): Handle non-zero ipc subcall version.
   19555 	[SPARC64]: Handle non-ipc_kludge case for the native personality.
   19556 	* linux/subcall.h (msgrcv): Change nargs from 4 to 5.
   19557 	* linux/s390/syscallent.h (ipc): Change nargs from 6 to 5.
   19558 	* linux/s390x/syscallent.h (ipc): Likewise.
   19559 
   19560 2016-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   19561 
   19562 	tests: skip netlink_protocol.test on old systems.
   19563 	* tests/netlink_protocol.c: Check that HAVE_SYS_XATTR_H is defined.
   19564 	Include <stdlib.h> and <sys/xattr.h>.
   19565 	(main): Check that system.sockprotoname attribute is supported.
   19566 
   19567 	Do not print too many arguments of socketcall syscall.
   19568 	* socketcall.c (SYS_FUNC(socketcall)): Print just "call" and "args"
   19569 	syscall arguments.
   19570 	* tests/socketcall.c (test_socketcall): Update expected output.
   19571 	* tests/socketcall.test: Likewise.
   19572 
   19573 2016-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   19574 
   19575 	tests/nsyscalls.c: change the type of syscall arguments to kernel_ulong_t
   19576 	As most syscalls on x32 and mips n32 are actually 64-bit,
   19577 	check that 64-bit syscall arguments are decoded properly.
   19578 
   19579 	This also workarounds x32 gcc sign extension bug
   19580 	reported by Eugene Syromyatnikov at
   19581 	https://sourceforge.net/p/strace/mailman/message/35150860/
   19582 
   19583 	* tests/nsyscalls.c: Include "kernel_types.h".
   19584 	(main): Change the type of syscall arguments to kernel_ulong_t.
   19585 
   19586 2016-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   19587 
   19588 	x32, mips n32: make printargs print full 64-bit syscall arguments.
   19589 	As most of x32 syscalls are regular x86_64 syscalls, they should be
   19590 	printed by default as 64-bit syscalls, and syscall parsers at their
   19591 	discretion might print syscalls differently.  This is already
   19592 	implemented in 64-bit strace tracing x32 personality processes,
   19593 	and now x32 strace will also behave this way.
   19594 
   19595 	Similar reasoning applies to mips n32.
   19596 
   19597 	* util.c (printargs) [HAVE_STRUCT_TCB_EXT_ARG]: Print syscall arguments
   19598 	from ext_arg array using %llx format.
   19599 
   19600 2016-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   19601 
   19602 	tests: check decoding of socketcall syscall.
   19603 	* tests/socketcall.c: New file.
   19604 	* tests/socketcall.test: New test.
   19605 	* tests/.gitignore: Add socketcall.
   19606 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19607 	(DECODER_TESTS): Add socketcall.test.
   19608 
   19609 	Fix corner cases of socketcall syscall.
   19610 	* xlat/socketcalls.in: New file.
   19611 	* socketcall.c: New file.
   19612 	* Makefile.am (libstrace_a_SOURCES): Add it.
   19613 	* linux/dummy.h (sys_socketcall): Remove stub alias.
   19614 	* syscall.c (decode_socket_subcall): Treat 1st argument of socketcall
   19615 	as "int".  Do not substitute syscall until all socketcall arguments
   19616 	have been fetched successfully.
   19617 
   19618 2016-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   19619 
   19620 	tests: check decoding and dumping of send and recv syscalls.
   19621 	* tests/unix-pair-send-recv.c: New file.
   19622 	* tests/unix-pair-send-recv.expected: Likewise.
   19623 	* tests/unix-pair-send-recv.test: New test.
   19624 	* tests/.gitignore: Add unix-pair-send-recv.
   19625 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19626 	(DECODER_TESTS): Add unix-pair-send-recv.test.
   19627 	(EXTRA_DIST): Add unix-pair-send-recv.expected.
   19628 
   19629 	tests: rename unix-pair-send-recv to unix-pair-sendto-recvfrom.
   19630 	* dumpio.expected: Rename to unix-pair-sendto-recvfrom.expected.
   19631 	* dumpio.test: Rename to unix-pair-sendto-recvfrom.test.
   19632 	* unix-pair-send-recv.c: Rename to unix-pair-sendto-recvfrom.c
   19633 	* .gitignore: Rename unix-pair-send-recv to unix-pair-sendto-recvfrom.
   19634 	* Makefile.am (check_PROGRAMS): Likewise.
   19635 	(DECODER_TESTS): Add unix-pair-sendto-recvfrom.test.
   19636 	(MISC_TESTS): Remove dumpio.test.
   19637 	(EXTRA_DIST): Rename dumpio.expected
   19638 	to unix-pair-sendto-recvfrom.expected.
   19639 
   19640 	tests: check decoding of shutdown syscall.
   19641 	* tests/shutdown.c: New file.
   19642 	* tests/shutdown.test: New test.
   19643 	* tests/.gitignore: Add shutdown.
   19644 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19645 	(DECODER_TESTS): Add shutdown.test.
   19646 
   19647 	xlat/shutdown_modes.in: convert to modern syntax.
   19648 	* xlat/shutdown_modes.in: Replace open-coded xlat table with a list
   19649 	of constants.
   19650 
   19651 	tests: check silent decoding of sendmmsg and recvmmsg syscalls.
   19652 	* tests/mmsg-silent.c: New file.
   19653 	* tests/mmsg-silent.test: New test.
   19654 	* tests/.gitignore: Add mmsg-silent.
   19655 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19656 	(DECODER_TESTS): Add mmsg-silent.test.
   19657 
   19658 	Print unsent messages of failed sendmmsg syscall.
   19659 	* mmsghdr.c (decode_mmsgvec): Clear syserror for the time of printing
   19660 	struct mmsghdr array in !use_msg_len case.
   19661 	(SYS_FUNC(sendmmsg)): As failed sendmmsg syscall does not
   19662 	set msg_len fields, tell this to decode_mmsgvec.
   19663 	* tests/mmsg_name.c (test_mmsg_name): Check it.
   19664 
   19665 	Print unsent messages of sendmmsg syscall.
   19666 	* defs.h (decode_mmsgvec): Add int argument.
   19667 	* mmsghdr.c (print_struct_mmsghdr_config): Add msg_len_vlen field.
   19668 	(print_struct_mmsghdr): Print struct mmsghdr.msg_len only for
   19669 	msg_len_vlen first elements of struct mmsghdr array.
   19670 	(decode_mmsgvec): Add msg_len_vlen argument.
   19671 	(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Pass to decode_mmsgvec
   19672 	the number of elements of struct mmsghdr array that contain meaningful
   19673 	struct mmsghdr.msg_len.
   19674 	* tests/mmsg_name.c (test_mmsg_name): Check it.
   19675 
   19676 	tests: check verbose decoding of msg_name* fields of struct mmsghdr array
   19677 	* tests/mmsg_name-v.c: New file.
   19678 	* tests/mmsg_name-v.test: New test.
   19679 	* tests/.gitignore: Add mmsg_name-v.
   19680 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19681 	(DECODER_TESTS): Add mmsg_name-v.test.
   19682 
   19683 	tests: check decoding of msg_name* fields of struct mmsghdr array.
   19684 	* tests/mmsg_name.c: New file.
   19685 	* tests/mmsg_name.test: New test.
   19686 	* tests/.gitignore: Add mmsg_name.
   19687 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19688 	(DECODER_TESTS): Add mmsg_name.test.
   19689 
   19690 2016-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   19691 
   19692 	Fix decoding of msg_name* fields of recvmmsg syscall's msghdr array argument
   19693 	As msg_namelen fields of recvmmsg syscall's struct msghdr array have
   19694 	the same read-write semantics as struct msghdr argument of recvmsg
   19695 	syscall, parser of recvmmsg syscall needs a similar fix.
   19696 
   19697 	* mmsghdr.c (print_struct_mmsghdr): Increment p_user_msg_namelen field.
   19698 	(mmsgvec_data): New structure.
   19699 	(free_mmsgvec_data, save_mmsgvec_namelen): New functions.
   19700 	(decode_mmsgvec): Take into account the data saved
   19701 	by save_mmsgvec_namelen function.
   19702 	(SYS_FUNC(recvmmsg)): Use save_mmsgvec_namelen.
   19703 
   19704 2016-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   19705 
   19706 	mmsghdr.c: rewrite decode_mmsgvec using print_array.
   19707 	* fetch_struct_mmsghdr.c (sizeof_struct_mmsghdr): New mpers printer.
   19708 	* mmsghdr.c: Include <limits.h>.
   19709 	(print_struct_mmsghdr_config): New structure.
   19710 	(fetch_struct_mmsghdr_or_printaddr, print_struct_mmsghdr): New functions.
   19711 	(decode_mmsgvec): Rewrite using them and print_array.
   19712 
   19713 	tests: check decoding of timeout argument of recvmmsg syscall.
   19714 	* tests/recvmmsg-timeout.c: New file.
   19715 	* tests/recvmmsg-timeout.test: New test.
   19716 	* tests/.gitignore: Add recvmmsg-timeout.
   19717 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19718 	(DECODER_TESTS): Add recvmmsg-timeout.test.
   19719 
   19720 	Fix printing of remaining timeout of recvmmsg syscall.
   19721 	* mmsghdr.c (SYS_FUNC(recvmmsg)): Do not print remaining timeout
   19722 	when the 5th syscall argument is NULL.
   19723 	* tests/mmsg.c (main): Update expected output.
   19724 
   19725 	Remove configure checks for recvmmsg and sendmmsg.
   19726 	* configure.ac (AC_CHECK_FUNCS): Remove recvmmsg and sendmmsg.
   19727 
   19728 	tests: add recv_mmsg and send_mmsg functions to libtests.
   19729 	* tests/tests.h (recv_mmsg, send_mmsg): New prototype.
   19730 	* tests/libmmsg.c: New file.
   19731 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   19732 	* tests/mmsg.c Do not check for __NR_sendmmsg, __NR_recvmmsg,
   19733 	HAVE_SENDMMSG, and HAVE_RECVMMSG.  Do not include unused headers.
   19734 	(recv_mmsg, send_mmsg): Remove.
   19735 
   19736 	tests: add socketcall function to libtests.
   19737 	* tests/tests.h (socketcall): New prototype.
   19738 	* tests/libsocketcall.c: New file.
   19739 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   19740 
   19741 2016-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   19742 
   19743 	Use IOV_MAX instead of UIO_MAXIOV.
   19744 	IOV_MAX appears to be more portable than UIO_MAXIOV.
   19745 
   19746 	* msghdr.c: Include <limits.h>. Remove fallback defintion of UIO_MAXIOV.
   19747 	(get_optmem_max): Replace UIO_MAXIOV with IOV_MAX.
   19748 	* tests/msg_control.c: Likewise.
   19749 
   19750 2016-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   19751 
   19752 	Unabuse struct tcb.auxstr.
   19753 	As we've got a proper mechanism that parsers can use for storing private
   19754 	data between entering and exiting stages, all cases of struct tcb.auxstr
   19755 	abuse should go.
   19756 
   19757 	* btrfs.c (btrfs_ioctl): Use set_tcb_priv_ulong and get_tcb_priv_ulong
   19758 	instead of abusing tcp->auxstr.
   19759 	* file_handle.c (SYS_FUNC(name_to_handle_at)): Likewise.
   19760 	* msghdr.c (SYS_FUNC(recvmsg)): Likewise.
   19761 	* net.c (decode_sockname, SYS_FUNC(recvfrom)): Likewise.
   19762 	* v4l2.c (print_v4l2_queryctrl): Likewise.
   19763 
   19764 2016-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   19765 
   19766 	Fix race condition in decoding timeout argument of recvmmsg syscall.
   19767 	As the value returned by sprint_timespec points to a static area and may
   19768 	be overwritten by subsequent calls to sprint_timespec, it is not safe to
   19769 	save this value on entering syscall and use it later on exiting.
   19770 
   19771 	* mmsghdr.c (SYS_FUNC(recvmmsg)): On entering syscall, copy the value
   19772 	returned by sprint_timespec to a dynamically allocated memory, and save
   19773 	the pointer using set_tcb_priv_data.  On exiting, restore it using
   19774 	get_tcb_priv_data.
   19775 
   19776 2016-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   19777 
   19778 	Fix race condition in decoding rt_sigtimedwait's timeout argument.
   19779 	As the value returned by sprint_timespec points to a static area and may
   19780 	be overwritten by subsequent calls to sprint_timespec, it is not safe to
   19781 	save this value on entering syscall and use it later on exiting.
   19782 
   19783 	* signal.c (SYS_FUNC(rt_sigtimedwait)): On entering syscall, copy the
   19784 	value returned by sprint_timespec to a dynamically allocated memory,
   19785 	and save the pointer using set_tcb_priv_data.  On exiting, restore it
   19786 	using get_tcb_priv_data.
   19787 
   19788 2016-07-18  Patrik Jakobsson  <patrik.jakobsson (a] linux.intel.com>
   19789 
   19790 	Add private data field to struct tcb.
   19791 	We need to be able to store private data in the struct tcb across it's
   19792 	lifetime.  To ensure proper deallocation of this stored data a callback
   19793 	must be provided along with the data.  The callback is executed
   19794 	automatically on exiting syscall, and when the life of the tcb ends.
   19795 
   19796 	* defs.h (struct tcb): Add _priv_data and _free_priv_data fields.
   19797 	(get_tcb_priv_data, set_tcb_priv_data, free_tcb_priv_data):
   19798 	New prototypes.
   19799 	(get_tcb_priv_ulong, set_tcb_priv_ulong): New static inline functions.
   19800 	* strace.c (get_tcb_priv_data, set_tcb_priv_data, free_tcb_priv_data):
   19801 	New functions.
   19802 	(droptcb): Call free_tcb_priv_data.
   19803 	* syscall.c (trace_syscall_exiting): Call free_tcb_priv_data
   19804 	when clearing TCB_INSYSCALL flag.
   19805 
   19806 2016-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   19807 
   19808 	net.c: move parsers of sendmsg and recvmsg syscalls to msghdr.c.
   19809 	* defs.h (fetch_msghdr_namelen, decode_msghdr): Remove.
   19810 	* net.c (SYS_FUNC(sendmsg), SYS_FUNC(recvmsg)): Move ...
   19811 	* msghdr.c: ... here.
   19812 	(fetch_msghdr_namelen, decode_msghdr): Add static qualifier.
   19813 
   19814 	net.c: move parsers of sendmmsg and recvmmsg syscalls to mmsghdr.c.
   19815 	* defs.h (decode_mmsgvec): Remove.
   19816 	* net.c: Do not include "msghdr.h".
   19817 	(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Move ...
   19818 	* mmsghdr.c: ... here.
   19819 	(decode_mmsgvec): Add static qualifier.
   19820 
   19821 	msghdr.c: move all mmsghdr parsers to a separate file.
   19822 	* msghdr.h (print_struct_msghdr): New prototype.
   19823 	* msghdr.c (print_msghdr): Rename to print_struct_msghdr, remove
   19824 	static qualifier, all callers changed.
   19825 	(decode_mmsghdr, decode_mmsgvec, dumpiov_in_mmsghdr): Move to ...
   19826 	* mmsghdr.c: ... new file.
   19827 	* Makefile.am (strace_SOURCES): Add it.
   19828 
   19829 2016-07-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   19830 
   19831 	tests: disable part of msg_name test on non-glibc systems.
   19832 	Sadly, musl recvmsg wrapper blindly dereferences 2nd argument,
   19833 	so limit the affected part of the test to glibc that doesn't.
   19834 
   19835 	* tests/msg_name.c (test_msg_name) [!__GLIBC__]: Do not test
   19836 	with inaccessible 2nd argument.
   19837 
   19838 2016-07-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   19839 
   19840 	Print struct iovec as a regular structure.
   19841 	* io.c (print_iovec): Print names of iov_base and iov_len fields.
   19842 	* tests/aio.c (main): Update expected output.
   19843 	* tests/inet-cmsg.c (main): Likewise.
   19844 	* tests/mmsg.c (main): Likewise.
   19845 	* tests/msg_name.c (test_msg_name): Likewise.
   19846 	* tests/preadv-pwritev.c (main): Likewise.
   19847 	* tests/preadv2-pwritev2.c (main): Likewise.
   19848 	* tests/preadv.c (main): Likewise.
   19849 	* tests/pwritev.c (main): Likewise.
   19850 	* tests/readv.c (main): Likewise.
   19851 	* tests/recvmsg.c (main): Likewise.
   19852 	* tests/vmsplice.c (main): Likewise.
   19853 	* tests/scm_rights-fd.test: Likewise.
   19854 	* tests/uio.expected: Likewise.
   19855 
   19856 	tests: check decoding of msghdr.msg_name* arguments of recvmsg syscall.
   19857 	* tests/msg_name.c: New file.
   19858 	* tests/msg_name.test: New test.
   19859 	* tests/.gitignore: Add msg_name.
   19860 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19861 	(DECODER_TESTS): Add msg_name.test.
   19862 
   19863 2016-07-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   19864 
   19865 	Fix decoding of struct msghdr.msg_name* arguments of recvmsg syscall.
   19866 	As the msghdr.msg_namelen argument of recvmsg syscall has the same
   19867 	read-write semantics as the address length argument of recvfrom syscall,
   19868 	parser of recvmsg syscall needs a similar fix.
   19869 
   19870 	* defs.h (fetch_msghdr_namelen): New prototype.
   19871 	(decode_msghdr): Add "int *" argument.
   19872 	* msghdr.c (print_msghdr): Likewise.  Treat it as a pointer to struct
   19873 	msghdr.msg_namelen passed to the kernel.  Pass to decode_sockaddr
   19874 	the size of socket address actually returned by the kernel.
   19875 	Print both user and kernel address lengths when the value changes.
   19876 	(decode_msghdr, decode_mmsghdr): Add "int *" argument,
   19877 	forward it to print_msghdr.
   19878 	(decode_mmsgvec): Update decode_mmsghdr invocation.
   19879 	(fetch_msghdr_namelen): New function.
   19880 	* net.c (SYS_FUNC(sendmsg)): Update decode_msghdr invocation.
   19881 	(SYS_FUNC(recvmsg)): Use fetch_msghdr_namelen on entering to save
   19882 	struct msghdr.msg_namelen.  On exiting, pass the saved value
   19883 	to decode_msghdr.
   19884 
   19885 2016-07-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   19886 
   19887 	Update generic ioctl entries from linux 4.7.
   19888 	* linux/64/ioctls_inc.h: Update from linux v4.7 using ioctls_gen.sh.
   19889 	* linux/32/ioctls_inc_align32.h: Likewise.
   19890 	* linux/32/ioctls_inc_align64.h: Likewise.
   19891 
   19892 2016-07-12  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   19893 
   19894 	x32: update ioctl entries from linux 4.7.
   19895 	* linux/x32/ioctls_inc0.h: Update from linux v4.7 using ioctls_gen.sh.
   19896 
   19897 	maint: update for linux 4.7.
   19898 	* maint/ioctls_sym.sh: Drop obsolete workarounds for linux/btrfs.h.
   19899 
   19900 2016-07-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   19901 
   19902 	block.c: remove BLKDAXGET support.
   19903 	BLKDAXGET was removed by linux kernel commit v4.7-rc1~78^2^2~4.
   19904 
   19905 	* block.c: Do not define BLKDAXGET.
   19906 	(block_ioctl): Remove BLKDAXGET support.
   19907 	* tests/ioctl_block.c (main): Remove BLKDAXGET test.
   19908 
   19909 2016-07-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   19910 
   19911 	Fix printing of socklen argument of bind and sendto syscalls.
   19912 	* net.c (SYS_FUNC(bind)): Print 3rd syscall argument using %d format.
   19913 	(SYS_FUNC(sendto)): Print 6th syscall argument using %d format.
   19914 
   19915 	tests: check decoding of sockaddr related arguments of recvfrom syscall.
   19916 	* configure.ac (AC_CHECK_FUNCS): Add recvfrom.
   19917 	* tests/recvfrom.c: New file.
   19918 	* tests/recvfrom.test: New test.
   19919 	* tests/.gitignore: Add recvfrom.
   19920 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19921 	(DECODER_TESTS): Add recvfrom.test.
   19922 
   19923 	Fix decoding of sockaddr related arguments of recvfrom syscall.
   19924 	* net.c (SYS_FUNC(recvfrom)): Use fetch_socklen.  Save the address
   19925 	length passed to the kernel and print it on error.  Do not print more
   19926 	bytes of the socket address than actually returned by the kernel.
   19927 	Print both user and kernel address lengths when the returned address
   19928 	is truncated.
   19929 
   19930 	tests: check decoding of accept4 syscall.
   19931 	* configure.ac (AC_CHECK_FUNCS): Add accept4.
   19932 	* tests/accept4.c: New file.
   19933 	* tests/accept4.test: New test.
   19934 	* tests/.gitignore: Add accept4.
   19935 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19936 	(DECODER_TESTS): Add accept4.test.
   19937 
   19938 	tests: check decoding of accept syscall.
   19939 	* tests/accept.c: New file.
   19940 	* tests/accept.test: New test.
   19941 	* tests/.gitignore: Add accept.
   19942 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19943 	(DECODER_TESTS): Add accept.test.
   19944 
   19945 	tests: check decoding of getpeername syscall.
   19946 	* tests/getpeername.c: New file.
   19947 	* tests/getpeername.test: New test.
   19948 	* tests/.gitignore: Add getpeername.
   19949 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19950 	(DECODER_TESTS): Add getpeername.test.
   19951 
   19952 	tests: check decoding of getsockname syscall.
   19953 	* tests/getsockname.c: New file.
   19954 	* tests/getsockname.test: New test.
   19955 	* tests/sockname.c: New file.
   19956 	* tests/.gitignore: Add getsockname.
   19957 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   19958 	(DECODER_TESTS): Add getsockname.test.
   19959 	(EXTRA_DIST): Add sockname.c.
   19960 
   19961 	Print both values of changing address length in sockname family syscalls
   19962 	* net.c (decode_sockname): Print both user and kernel address lengths
   19963 	when the value changes.
   19964 	* tests/net-y-unix.c (main): Update expected output.
   19965 	* tests/net-yy-unix.c (main): Likewise.
   19966 	* tests/net.expected: Likewise.
   19967 
   19968 	Enhance diagnostics of address truncation in sockname family syscalls.
   19969 	* net.c (decode_sockname): Print both user and kernel address lengths
   19970 	when the returned address is truncated.
   19971 	* tests/sun_path.expected: Update expected output.
   19972 
   19973 	Fix decoding of getsockname, getpeername, accept, and accept4 syscalls.
   19974 	* net.c (fetch_socklen): New function.
   19975 	(decode_sockname): Use it.  On entering syscall, decode early
   19976 	and return RVAL_DECODED when possible.  On error, print the address
   19977 	length passed to the kernel.  Do not print more bytes of the socket
   19978 	address than actually returned by the kernel.
   19979 
   19980 2016-07-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   19981 
   19982 	Prepare parsers of sockname family syscalls for the upcoming fix.
   19983 	* net.c (do_sockname): Rename to decode_sockname, drop second argument,
   19984 	do not print sock_type_flags, return RVAL_DECODED on exiting.
   19985 	(SYS_FUNC(accept), SYS_FUNC(getsockname)): Use decode_sockname instead
   19986 	of do_sockname, take its return code into account.
   19987 	(SYS_FUNC(accept4)): Likewise.  Print sock_type_flags when
   19988 	decode_sockname returns RVAL_DECODED.
   19989 
   19990 2016-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   19991 
   19992 	netlink: handle multipart netlink messages.
   19993 	Handle multipart netlink messages made of multiple struct nlmsghdr
   19994 	headers with associated payload in one byte stream.
   19995 
   19996 	* netlink.c (fetch_nlmsghdr, print_nlmsghdr,
   19997 	decode_nlmsghdr_with_payload): New functions.
   19998 	(decode_netlink): Use them.
   19999 	* tests/netlink_parsing.c (send_query): Check them.
   20000 
   20001 2016-07-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20002 
   20003 	tests: extend netlink protocol check.
   20004 	* tests/netlink_protocol.c (send_query): Check that no part
   20005 	of netlink message is fetched beyond the end of message.
   20006 	Check decoding of zero address and zero length messages.
   20007 	Check decoding of messages with nlmsg_len exceeding message length.
   20008 
   20009 2016-07-07  Fabien Siron  <fabien.siron (a] epita.fr>
   20010 
   20011 	tests: check decoding of netlink protocol.
   20012 	* tests/netlink_protocol.test: New test.
   20013 	* tests/netlink_protocol.c: New file.
   20014 	* tests/.gitignore: Add netlink_protocol.
   20015 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20016 	(DECODER_TESTS): Add netlink_protocol.test.
   20017 
   20018 2016-07-07  Fabien Siron  <fabien.siron (a] epita.fr>
   20019 
   20020 	Add a general netlink socket parser.
   20021 	Introduce a general socket netlink parser which prints the header and
   20022 	a string for the remaining part of the buffer.  It doesn't handle all
   20023 	the netlink flags and types yet because the parser needs more
   20024 	information, this will be implemented later.
   20025 
   20026 	* net.c (decode_sockbuf): New function.
   20027 	(SYS_FUNC(send), SYS_FUNC(sendto), SYS_FUNC(recv), SYS_FUNC(recvfrom)):
   20028 	Use it instead of printstr.
   20029 	* msghdr.c (print_msghdr): Pass IOV_DECODE_NETLINK to tprint_iov_upto()
   20030 	for netlink sockets.
   20031 	* netlink.c: New file.
   20032 	* Makefile.am (strace_SOURCES): Add it.
   20033 	* defs.h (decode_netlink, getfdproto): New prototypes.
   20034 	(iov_decode): Add IOV_DECODER_NETLINK.
   20035 	* io.c (print_iovec): Use decode_netlink().
   20036 	* util.c (getfdproto): Remove static keyword.
   20037 	* xlat/netlink_flags.in: New file.
   20038 	* xlat/netlink_types.in: New file.
   20039 
   20040 2016-07-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20041 
   20042 	Update sigaltstack SS_* constants.
   20043 	* xlat/sigaltstack_flags.in: Add SS_AUTODISARM introduced
   20044 	by linux kernel commit v4.7-rc1~195^2.
   20045 
   20046 	Update fs *_MAGIC constants.
   20047 	* xlat/fsmagic.in: Add NSFS_MAGIC, TRACEFS_MAGIC, BPF_FS_MAGIC,
   20048 	and UDF_SUPER_MAGIC introduced by linux kernel commits
   20049 	v3.19-rc1~53^2~7^2~1, v4.1-rc1~147^2~4, v4.4-rc1~141^2~17^2~1,
   20050 	and v4.7-rc1~161^2, respectively.
   20051 
   20052 2016-07-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   20053 
   20054 	Update KEYCTL_* constants.
   20055 	* xlat/keyctl_commands.in: Add KEYCTL_DH_COMPUTE introduced
   20056 	by linux kernel commit v4.7-rc1~124^2~2^2~2^2.
   20057 
   20058 	Update input event constants.
   20059 	* xlat/evdev_keycode.in: Add KEY_* constants introduced
   20060 	by linux kernel commit v4.7-rc6~32^2~6^2.
   20061 
   20062 2016-07-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   20063 
   20064 	Update RWF_* constants.
   20065 	* xlat/rwf_flags.in: Add RWF_DSYNC and RWF_SYNC introduced
   20066 	by linux kernel commit v4.7-rc1~158^2~1.
   20067 
   20068 2016-07-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20069 
   20070 	Update BPF_MAP_TYPE_* constants.
   20071 	* xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_TRACEPOINT introduced
   20072 	by linux kernel commit v4.7-rc1~154^2~332^2~6.
   20073 
   20074 2016-07-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   20075 
   20076 	msghdr.c: limit output when printing excessively large messages.
   20077 	Limit output of struct msghdr.msg_control when
   20078 	struct msghdr.msg_controllen is greater than the maximum ancillary
   20079 	buffer size specified in /proc/sys/net/core/optmem_max file.
   20080 
   20081 	* configure.ac (AC_CHECK_FUNCS): Add open64.
   20082 	* defs.h (read_int_from_file): New prototype.
   20083 	* util.c (read_int_from_file): New function.
   20084 	* msghdr.c (get_optmem_max): New function based on read_int_from_file.
   20085 	(decode_msg_control): Use it to check control_len argument.
   20086 	* tests/msg_control.c (test_big_len): New function.
   20087 	(main): Use it to test printing of excessively large messages.
   20088 
   20089 2016-07-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   20090 
   20091 	tests: add read_int_from_file function to libtests.
   20092 	* tests/overflowuid.c (read_int_from_file): New function.
   20093 	(check_overflow_id): Use it.
   20094 	* tests/tests.h (read_int_from_file): New prototype.
   20095 
   20096 2016-07-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   20097 
   20098 	msghdr.c: limit IP_RECVOPTS/IP_RETOPTS output in abbrev mode.
   20099 	* msghdr.c (print_cmsg_ip_opts): Do not print more than max_strlen
   20100 	bytes of ip options in abbrev mode.
   20101 	* tests/msg_control.c (print_ip_opts): Use DEFAULT_STRLEN.
   20102 	(test_sol_ip): Test IP_RETOPTS output in abbrev mode.
   20103 
   20104 	msghdr.c: limit SCM_RIGHTS output in abbrev mode.
   20105 	* msghdr.c (print_scm_rights): Do not print more than max_strlen
   20106 	descriptors in abbrev mode.
   20107 	* tests/msg_control.c (DEFAULT_STRLEN): New macro.
   20108 	(print_fds): Use it.
   20109 	(test_scm_rights3): New function.
   20110 	(main): Use it to test SCM_RIGHTS output in abbrev mode.
   20111 	* tests/msg_control-v.c: New file.
   20112 	* tests/msg_control-v.test: New test.
   20113 	* tests/.gitignore: Add msg_control-v.
   20114 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20115 	(DECODER_TESTS): Add msg_control-v.test.
   20116 
   20117 2016-07-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   20118 
   20119 	tests: check decoding of struct msghdr ancillary data.
   20120 	* tests/msg_control.c: New file.
   20121 	* tests/msg_control.test: New test.
   20122 	* tests/.gitignore: Add msg_control.
   20123 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20124 	(DECODER_TESTS): Add msg_control.test.
   20125 
   20126 2016-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   20127 
   20128 	msghdr.c: reorganize struct cmsghdr handler.
   20129 	* msghdr.c (sock_ee): New structure.
   20130 	(print_scm_rights, print_scm_creds, print_scm_security,
   20131 	print_cmsg_ip_pktinfo, print_cmsg_uint, print_cmsg_ip_opts,
   20132 	print_cmsg_ip_recverr, print_cmsg_ip_origdstaddr): Remove data_len
   20133 	argument validity check, don't print ", cmsg_data=" prefix here.
   20134 	(print_cmsg_ip_tos): Likewise.  Rename to print_cmsg_uint8_t.
   20135 	(cmsg_printer): New type.
   20136 	(cmsg_socket_printers, cmsg_ip_printers): New arrays.
   20137 	(print_cmsg_type_data): Use them to handle struct cmsghdr
   20138 	and its cmsg_data.
   20139 
   20140 	msghdr.c: merge print_cmsg_ip_ttl and print_cmsg_ip_checksum.
   20141 	* msghdr.c (print_cmsg_ip_ttl): Rename to print_cmsg_uint.
   20142 	(print_cmsg_ip_checksum): Remove.
   20143 	(print_cmsg_type_data): Replace print_cmsg_ip_ttl
   20144 	and print_cmsg_ip_checksum with print_cmsg_uint.
   20145 
   20146 	msghdr.c: enhance representation of unprintable part of msg_control array
   20147 	* msghdr.c (decode_msg_control): When msg_control array has an
   20148 	unprintable part, print its address.
   20149 
   20150 	msghdr.c: apply a sane limit to the length of IP_ORIGDSTADDR address.
   20151 	* msghdr.c (print_cmsg_ip_origdstaddr): Limit address length to the size
   20152 	of struct sockaddr_storage.
   20153 
   20154 	msghdr.c: fix printing SCM_RIGHTS array.
   20155 	* msghdr.c (print_scm_rights): Do not print array elements outside
   20156 	bounds defined by struct cmsghdr.cmsg_len.
   20157 
   20158 	msghdr.c: print unrecognized struct cmsghdr.cmsg_type in hex.
   20159 	* msghdr.c (print_cmsg_type_data): Use %#x format when printing
   20160 	struct cmsghdr.cmsg_type as an integer.
   20161 
   20162 	msghdr.c: fix printing of struct in_pktinfo.
   20163 	* msghdr.c (print_cmsg_ip_pktinfo): Fix printing
   20164 	of struct in_pktinfo.ipi_addr.
   20165 
   20166 	msghdr.c: fix representation of struct cmsghdr.cmsg_data integer arrays.
   20167 	* msghdr.c (print_cmsg_ip_opts): Print struct cmsghdr.cmsg_data
   20168 	as an array of hexadecimal integers.
   20169 	* tests/inet-cmsg.c (print_opts): Update expected output.
   20170 
   20171 	msghdr.c: fix representation of integer struct cmsghdr.cmsg_data values.
   20172 	* msghdr.c (print_cmsg_ip_ttl, print_cmsg_ip_tos,
   20173 	print_cmsg_ip_checksum): Print struct cmsghdr.cmsg_data value as an
   20174 	array element.
   20175 	* tests/inet-cmsg.c (print_ttl, print_tos): Update expected output.
   20176 
   20177 	msghdr.c: when printing struct struct cmsghdr.cmsg_data, also print its name
   20178 	* msghdr.c (print_scm_rights, print_scm_creds, print_scm_security,
   20179 	print_cmsg_ip_pktinfo, print_cmsg_ip_ttl, print_cmsg_ip_tos,
   20180 	print_cmsg_ip_checksum, print_cmsg_ip_opts, print_cmsg_ip_recverr,
   20181 	print_cmsg_ip_origdstaddr): Print "cmsg_data=" before its contents.
   20182 	* tests/inet-cmsg.c (print_pktinfo, print_ttl, print_tos, print_opts,
   20183 	print_origdstaddr): Update expected output.
   20184 	* tests/scm_rights-fd.test: Likewise.
   20185 
   20186 2016-06-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   20187 
   20188 	msghdr.c: print struct mmsghdr as a regular structure.
   20189 	* msghdr.c (decode_mmsghdr): Print names of msg_hdr and msg_len fields.
   20190 	* tests/mmsg.c (main): Update expected output.
   20191 
   20192 	net.c: move all msghdr and mmsghdr parsers to a separate file.
   20193 	* defs.h (msg_flags, socketlayers, decode_msghdr, decode_mmsg):
   20194 	New prototypes.
   20195 	* msghdr.c: New file.
   20196 	* Makefile.am (strace_SOURCES): Add it.
   20197 	* net.c: Move all msghdr and mmsghdr parsers to msghdr.c.
   20198 
   20199 	Mpersify fetchers of struct msghdr and struct mmsghdr.
   20200 	* fetch_struct_msghdr.c: New file.
   20201 	* fetch_struct_mmsghdr.c: Likewise.
   20202 	* Makefile.am (strace_SOURCES): Add them.
   20203 	* net.c (struct msghdr32, struct mmsghdr32, copy_from_msghdr32,
   20204 	fetch_msghdr, fetch_mmsghdr): Remove.
   20205 	(decode_msghdr, dumpiov_in_msghdr): Use fetch_struct_msghdr instead
   20206 	of fetch_msghdr.
   20207 	(decode_mmsghdr): Change msg_len argument to use_msg_len.
   20208 	Use fetch_struct_mmsghdr instead of fetch_mmsghdr.
   20209 	Return fetch_struct_mmsghdr's return code.
   20210 	(decode_mmsg): Rename to decode_mmsgvec.  Take addr and len arguments.
   20211 	Do not print vlen and flags.  Check decode_mmsghdr's return code.
   20212 	Print mmsghdr array using square brackets.
   20213 	(dumpiov_in_mmsghdr): Use fetch_struct_mmsghdr instead of fetch_mmsghdr.
   20214 	(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Use decode_mmsgvec instead
   20215 	of decode_mmsg.  Print vlen and flags.
   20216 	* tests/mmsg.c (main): Update expected output.
   20217 
   20218 	net.c: move fallback definition of struct mmsghdr to a separate file.
   20219 	* msghdr.h: New file.
   20220 	* Makefile.am (strace_SOURCES): Add it.
   20221 	* net.c: Include it.  Move fallback definition of struct mmsghdr there.
   20222 	* tests/mmsg.c: Include "msghdr.h".  Remove fallback definition
   20223 	of struct mmsghdr.
   20224 
   20225 2016-06-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   20226 
   20227 	net.c: print struct msghdr as a regular structure.
   20228 	* net.c (print_msghdr): Print msg_name, msg_namelen, msg_iov,
   20229 	and msg_iovlen fields like other regular fields.
   20230 	* tests/inet-cmsg.c (main): Update expected output.
   20231 	* tests/mmsg.c (main): Likewise.
   20232 	* tests/recvmsg.c (main): Likewise.
   20233 	* tests/scm_rights-fd.test: Likewise.
   20234 
   20235 	net.c: rename some internal functions for consistency and readability.
   20236 	* net.c (printcmsghdr): Rename to decode_msg_control.
   20237 	(do_msghdr): Rename to print_msghdr.
   20238 	(extractmsghdr): Rename to fetch_msghdr.
   20239 	(extractmmsghdr): Rename to fetch_mmsghdr.
   20240 	(printmsghdr): Rename to decode_msghdr.
   20241 	(printmmsghdr): Rename to decode_mmsghdr.
   20242 	All callers updated.
   20243 
   20244 	net.c: when printing struct msghdr.msg_control, also print its name.
   20245 	* net.c (printcmsghdr): Skip control messages of zero length.
   20246 	Always print "msg_control=" before the control message.
   20247 	(do_msghdr): Print control message before its length, not after.
   20248 	* tests/inet-cmsg.c (main): Update expected output.
   20249 	* tests/scm_rights-fd.test: Likewise.
   20250 
   20251 	Assume that libc provides struct msghdr.msg_control.
   20252 	* configure.ac (AC_CHECK_MEMBERS): Remove struct msghdr.msg_control.
   20253 	* net.c (do_msghdr): Remove HAVE_STRUCT_MSGHDR_MSG_CONTROL check.
   20254 
   20255 2016-06-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   20256 
   20257 	net.c: move all sockaddr parsers to a separate file.
   20258 	* sockaddr_ll.c: Rename to sockaddr.c
   20259 	(print_sockaddr_data_ll): Add static keyword.
   20260 	* Makefile.am (strace_SOURCES): Likewise.
   20261 	* defs.h (print_sockaddr_data_ll): Remove.
   20262 	(addrfams): New prototype.
   20263 	* net.c: Move all sockaddr parsers to sockaddr.c.
   20264 
   20265 	net.c: rename printsock to decode_sockaddr.
   20266 	* defs.h (printsock): Rename to decode_sockaddr.
   20267 	* net.c (printsock): Likewise.
   20268 	(do_msghdr, SYS_FUNC(bind), do_sockname, SYS_FUNC(sendto),
   20269 	SYS_FUNC(recvfrom)): Replace printsock with decode_sockaddr.
   20270 
   20271 	defs.h: remove unused prototype.
   20272 	* defs.h (print_sock_optmgmt): Remove.
   20273 
   20274 	tests: check decoding of sockaddr structures.
   20275 	* tests/net-sockaddr.c: New file.
   20276 	* tests/net-sockaddr.test: New test.
   20277 	* tests/.gitignore: Add net-sockaddr.
   20278 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20279 	(DECODER_TESTS): Add net-sockaddr.test.
   20280 
   20281 2016-06-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   20282 
   20283 	net.c: fix printing AF_PACKET socket addresses.
   20284 	* defs.h (print_ifindex, print_sockaddr_data_ll): New prototypes.
   20285 	* net.c: Stop including "xlat/af_packet_types.h".
   20286 	(print_ifindex): Remove static keyword.
   20287 	(print_sockaddr_data_l): Remove.
   20288 	* sockaddr_ll.c: New file.
   20289 	* Makefile.am (strace_SOURCES): Add it.
   20290 	* xlat/arp_hardware_types.in: New file.
   20291 	* xlat/ethernet_protocols.in: Likewise.
   20292 
   20293 	net.c: skip details of too short socket addresses, part 2.
   20294 	* net.c (sa_printers): Add minimal address length for each socket family.
   20295 	(print_sockaddr): Call socket family specific sockaddr printer
   20296 	only when socket address length is greater or equal
   20297 	the minimal address length for the socket family.
   20298 
   20299 	net.c: fix printing AF_BLUETOOTH socket addresses.
   20300 	* xlat/hci_channels.in: New file.
   20301 	* net.c (print_sockaddr_data_raw): New function.
   20302 	(print_sockaddr): Use it.
   20303 	[HAVE_BLUETOOTH_BLUETOOTH_H]: Include "xlat/hci_channels.h".
   20304 	[HAVE_BLUETOOTH_BLUETOOTH_H] (print_sockaddr_data_bt): Fix printing
   20305 	sockaddr_hci, sockaddr_sco, sockaddr_rc, and sockaddr_l2 structures.
   20306 
   20307 	net.c: fix printing AF_IPX sockets addresses, part 2.
   20308 	* net.c (print_sockaddr_data_ipx): Print sockaddr_ipx.sipx_network
   20309 	using %#08x format.  Print elements of sockaddr_ipx.sipx_node array
   20310 	and sockaddr_ipx.sipx_type using %#02x format.
   20311 
   20312 2016-06-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   20313 
   20314 	net.c: fix printing AF_UNIX abstract socket addresses.
   20315 	AF_UNIX abstract socket address specified by sockaddr_un.sun_path
   20316 	is not a NUL-terminated string.
   20317 
   20318 	* net.c (SIZEOF_SA_FAMILY): New macro.
   20319 	(print_sockaddr_data_un): Use it.  Specify actual address length
   20320 	in print_quoted_string calls.  Do not set QUOTE_0_TERMINATED flag
   20321 	when printing an abstract socket address.
   20322 
   20323 2016-06-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   20324 
   20325 	net.c: fix printing field names of struct sockaddr_nl.
   20326 	* net.c (print_sockaddr_data_nl): Change "pid" to "nl_pid", "groups"
   20327 	to "nl_groups".  Print sockaddr_nl.nl_groups using %#08x format.
   20328 	* tests/net-yy-netlink.c (main): Update.
   20329 
   20330 	net.c: fix printing struct sockaddr_in6.sin6_flowinfo.
   20331 	* net.c (print_sockaddr_data_in6): Convert sockaddr_in6.sin6_flowinfo
   20332 	from network order to host order before printing.
   20333 
   20334 2016-06-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   20335 
   20336 	net.c: do not print sockaddr_in6.sin6_scope_id unnecessarily.
   20337 	Prior to RFC2553, struct sockaddr_in6 had no sin6_scope_id field.
   20338 	As the kernel still accepts RFC2133 editions of struct sockaddr_in6,
   20339 	print sockaddr_in6.sin6_scope_id only when it is specified.
   20340 
   20341 	* net.c (SIN6_MIN_LEN): New macro.
   20342 	(print_sockaddr_data_in6): Print sockaddr_in6.sin6_scope_id only when
   20343 	socket address length exceeds SIN6_MIN_LEN.
   20344 
   20345 2016-06-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   20346 
   20347 	net.c: fix printing raw data of socket addresses.
   20348 	* net.c (print_sockaddr): When printing socket address raw data, read
   20349 	exactly the number of data bytes specified for the socket addess.
   20350 
   20351 	net.c: skip details of too short socket addresses.
   20352 	* net.c (print_sockaddr): Print socket address details only when
   20353 	the address size is greater than sizeof(struct sockaddr.sa_family).
   20354 	(print_sockaddr_data_un): Remove handling of addrlen == 2.
   20355 	* tests/net-y-unix.c (main): Update expected pattern.
   20356 	* tests/net-yy-unix.c (main): Likewise.
   20357 	* tests/net.expected: Likewise.
   20358 
   20359 2016-06-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   20360 
   20361 	Assume that libc provides struct sockaddr_in6.sin6_scope_id.
   20362 	* configure.ac (AC_CHECK_MEMBERS): Remove
   20363 	struct sockaddr_in6.sin6_scope_id.
   20364 	* net.c (print_sockaddr_data_in6): Remove
   20365 	HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID check.
   20366 
   20367 	Split print_sockaddr.
   20368 	* net.c (sockaddr_buf_t): Remove.
   20369 	(sockaddr_printer): New type.
   20370 	(sa_printers): New array of sockaddr_printer.
   20371 	(print_sockaddr): Use it.  Move printers of family specific
   20372 	sockaddr data to separate funcions.
   20373 
   20374 2016-06-22  Fabien Siron  <fabien.siron (a] epita.fr>
   20375 
   20376 	Add a enum for decoding to tprint_iov() and tprint_iov_upto()
   20377 	Introduce a new type iov_decode which will be used instead of the integer
   20378 	"decode" as a parameter.
   20379 
   20380 	* defs.h (iov_decode): New enum.
   20381 	(tprint_iov, tprint_iov_upto): Change type of "decode_iov" to enum iov_decode.
   20382 	* aio.c (print_iocb): Change type of "decode_iov" to enum iov_decode in
   20383 	tprint_iov() call.
   20384 	* keyctl.c (keyctl_instantiate_key_iov): Likewise.
   20385 	* process.c (ptrace): Likewise.
   20386 	* process_vm.c (process_vm_readv, process_vm_writev): Likewise.
   20387 	* io.c (writev, do_pwritev, vmsplice): Likewise.
   20388 	(print_iovec): Replace the condition with a switch.
   20389 	(tprint_iov_upto): Change type of "decode_iov" to enum iov_decode.
   20390 	(readv, do_preadv): Change type of "decode_iov" to enum iov_decode in
   20391 	tprint_iov_upto() call.
   20392 	* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
   20393 	print_sg_io_v4_res): Likewise.
   20394 	* net.c (do_msghdr): Adapt call of tprint_iov_upto().
   20395 
   20396 2016-06-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   20397 
   20398 	printsock: fix zero padding of sockaddr buffer.
   20399 	Before this change printsock used to erroneously clear the last byte
   20400 	of sockaddr buffer.
   20401 
   20402 	* net.c (printsock): Use struct sockaddr_storage as a sockaddr buffer.
   20403 	Reserve additional byte after the sockaddr buffer for zero padding.
   20404 	Do not clear memory that is going to be overwritten by umoven.
   20405 	Clear the tail of sockaddr buffer that was not overwritten by umoven.
   20406 
   20407 2016-06-21  Fabien Siron  <fabien.siron (a] epita.fr>
   20408 
   20409 	Change printsock to return socket family.
   20410 	* defs.h (printsock): Change return type to int.
   20411 	* net.c (printsock): Likewise.  Return socket family on success
   20412 	and -1 in case of an error.
   20413 
   20414 2016-06-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   20415 
   20416 	Unexport addrfams.
   20417 	* defs.h (addrfams): Remove.
   20418 
   20419 	sock.c: use print_sockaddr.
   20420 	* sock.c (print_ifreq_addr): Remove.
   20421 	(PRINT_IFREQ_ADDR): New macro.
   20422 	(print_ifreq, decode_ifconf): Use it instead of print_ifreq_addr.
   20423 
   20424 	Export print_sockaddr function.
   20425 	* defs.h (print_sockaddr): New prototype.
   20426 	* net.c (print_sockaddr): Remove static keyword.
   20427 	Change type of address pointer to "const void *".
   20428 	(print_cmsg_ip_recverr, print_group_req): Remove redundant casts
   20429 	in print_sockaddr invocations.
   20430 
   20431 	xlat/addrfams.in: provide fallback definitions.
   20432 	* xlat/addrfams.in: add fallback definitions for constants.
   20433 
   20434 	Update AF_* constants.
   20435 	* xlat/addrfams.in: Add AF_QIPCRTR.
   20436 
   20437 	Assume that libc provides inet_ntop and inet_pton.
   20438 	* configure.ac (AC_CHECK_FUNCS): Remove inet_ntop and inet_pton.
   20439 	* net.c (sockaddr_buf_t, print_sockaddr, print_mreq6): Remove
   20440 	HAVE_INET_NTOP checks.
   20441 	* tests/ip_mreq.c: Remove HAVE_INET_PTON check.
   20442 
   20443 	net.c: use SO_LINGER unconditionally.
   20444 	* net.c (print_linger, print_getsockopt, print_setsockopt): Do not check
   20445 	for SO_LINGER availability.
   20446 
   20447 	net.c: use AF_BLUETOOTH unconditionally.
   20448 	* net.c (print_sockaddr, SYS_FUNC(socket)): Do not check
   20449 	for AF_BLUETOOTH availability.
   20450 
   20451 2016-06-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   20452 
   20453 	Consistently use AF_UNIX over AF_LOCAL.
   20454 	As these constants have the same value 1, let's use and print only one
   20455 	of them, e.g. AF_UNIX.
   20456 
   20457 	* xlat/addrfams.in (AF_LOCAL): Remove.
   20458 	* tests/net-accept-connect.c (main): Replace AF_LOCAL with AF_UNIX.
   20459 	* tests/net-y-unix.c: Likewise.
   20460 	* tests/net-yy-unix.c: Likewise.
   20461 	* tests/netlink_unix_diag.c: Likewise.
   20462 
   20463 2016-06-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   20464 
   20465 	net.c: fix printing AF_IPX sockets.
   20466 	* net.c (print_sockaddr): Print sockaddr_ipx as a regular structure.
   20467 	(SYS_FUNC(socket)): Remove special handling of AF_IPX.
   20468 
   20469 	net.c: use AF_IPX unconditionally.
   20470 	* net.c (sockaddr_buf_t, print_sockaddr, SYS_FUNC(socket)): Do not check
   20471 	for AF_IPX availability.
   20472 
   20473 	Cleanup netipx/ipx.h availability check.
   20474 	* configure.ac (AC_CHECK_HEADERS): Add netipx/ipx.h.
   20475 	* net.c: Check for HAVE_NETIPX_IPX_H instead of __GLIBC__.
   20476 
   20477 2016-06-19  Fabien Siron  <fabien.siron (a] epita.fr>
   20478 
   20479 	Make getfdproto return enum instead of string.
   20480 	Introduce a new enum type sock_proto and use it instead of strings for socket
   20481 	protocols identification.
   20482 
   20483 	* defs.h (sock_proto): New enum.
   20484 	(get_proto_by_name): New function.
   20485 	* socketutils.c (protocols): New static table.
   20486 	(print_sockaddr_by_inode): Use it.  Change type of "proto" argument
   20487 	to sock_proto.
   20488 	(get_proto_by_name): New function.
   20489 	* util.c (getfdproto): Use it.  Change return type to sock_proto.
   20490 	(printfd): Update.
   20491 
   20492 2016-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   20493 
   20494 	Split travis-ci.sh.
   20495 	* travis-ci.sh: Split into travis-build.sh, travis-install.sh,
   20496 	and travis-success.sh files.
   20497 	* .travis.yml (before_install, after_success, git): New mappings.
   20498 	(script): Change to travis-build.sh.
   20499 	(addons, install): Remove.
   20500 	(env): Remove matrix.
   20501 	(matrix): Replace exclude list with include list.
   20502 
   20503 2016-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   20504 
   20505 	Introduce HAVE_STRUCT_TCB_EXT_ARG macro.
   20506 	Check for "if HAVE_STRUCT_TCB_EXT_ARG" instead of
   20507 	"if defined LINUX_MIPSN32 || defined X32".
   20508 
   20509 	* defs.h (HAVE_STRUCT_TCB_EXT_ARG): Define for LINUX_MIPSN32 || X32.
   20510 	(struct tcb): Check it instead of LINUX_MIPSN32 || X32.
   20511 	(RVAL_LUDECIMAL): Likewise.
   20512 	* io.c (print_lld_from_low_high_val): Likewise.
   20513 	* lseek.c (SYS_FUNC(lseek)): Likewise.
   20514 	* mem.c (SYS_FUNC(mmap)): Likewise.
   20515 	* syscall.c (trace_syscall_exiting): Likewise.
   20516 	* util.c (getllval): Likewise.
   20517 
   20518 2016-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   20519 
   20520 	btrfs: fix build with fresh linux/btrfs.h.
   20521 	Fix build with fresh <linux/btrfs.h> that provides a slightly different
   20522 	definition of struct btrfs_ioctl_defrag_range_args.
   20523 
   20524 	* btrfs.c (btrfs_ioctl): Cast "len" member of
   20525 	struct btrfs_ioctl_defrag_range_args to uint64_t.
   20526 	* tests/btrfs.c (btrfs_print_defrag_range_args): Cast "start" and "len"
   20527 	members of struct btrfs_ioctl_defrag_range_args to uint64_t.
   20528 
   20529 2016-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   20530 
   20531 	btrfs: provide fallback definitions for BTRFS_IOC_QUOTA_RESCAN*
   20532 	<linux/btrfs.h> was introduced in linux v3.9-rc1 while some
   20533 	of btrfs ioctls were added later, e.g. BTRFS_IOC_QUOTA_RESCAN
   20534 	and BTRFS_IOC_QUOTA_RESCAN_STATUS in v3.10-rc2,
   20535 	or BTRFS_IOC_QUOTA_RESCAN_WAIT in v3.11-rc1.
   20536 
   20537 	* btrfs.c [!BTRFS_IOC_QUOTA_RESCAN]
   20538 	(struct btrfs_ioctl_quota_rescan_args): New structure.
   20539 	(BTRFS_IOC_QUOTA_RESCAN, BTRFS_IOC_QUOTA_RESCAN_STATUS): New macros.
   20540 	[!BTRFS_IOC_QUOTA_RESCAN_WAIT] (BTRFS_IOC_QUOTA_RESCAN_WAIT): New macro.
   20541 	* tests/btrfs.c: Likewise.
   20542 
   20543 	Reported-by: Li Er <phoooyb (a] gmail.com>
   20544 
   20545 2016-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   20546 
   20547 	configure.ac: fix checks for btrfs specific structures.
   20548 	* configure.ac (AC_CHECK_MEMBERS): Fix typo in the check for
   20549 	struct btrfs_ioctl_defrag_range_args.start and
   20550 	struct btrfs_ioctl_search_args_v2.buf_size.
   20551 
   20552 2016-06-16  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   20553 
   20554 	README: add system requirements and beautify the file.
   20555 
   20556 2016-06-16  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   20557 
   20558 	tests: add signal_receive.test.
   20559 	* tests/signal_receive.c: New file.
   20560 	* tests/signal_receive.test: New test.
   20561 	* tests/.gitignore: Add signal_receive.
   20562 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20563 	(MISC_TESTS): Add signal_receive.test.
   20564 
   20565 	tests: add signal2name function to libtests.
   20566 	* tests/tests.h (signal2name): New prototype.
   20567 	* tests/signal2name.c: New file.
   20568 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   20569 
   20570 2016-06-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   20571 
   20572 	net.c: use AF_INET6 unconditionally.
   20573 	* net.c (SYS_FUNC(socket)): Do not check for AF_INET6 availability.
   20574 
   20575 2016-06-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   20576 
   20577 	configure.ac: do not check for linux/in6.h.
   20578 	The last user of <linux/in6.h> was removed by commit v4.9-252-gf362a33.
   20579 
   20580 	* configure.ac (AC_CHECK_HEADERS): Remove linux/in6.h.
   20581 
   20582 2016-06-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   20583 
   20584 	net.c: use AF_PACKET unconditionally.
   20585 	* net.c: Do not check for AF_PACKET availability.
   20586 
   20587 	net.c: include <linux/if_packet.h> unconditionally.
   20588 	* configure.ac (AC_CHECK_HEADERS): Remove linux/if_packet.h.
   20589 	* net.c: Include <linux/if_packet.h> unconditionally.
   20590 
   20591 	net.c: use ICMP_FILTER unconditionally.
   20592 	* net.c: Do not check for ICMP_FILTER availability.
   20593 
   20594 	net.c: include <linux/icmp.h> unconditionally.
   20595 	* configure.ac (AC_CHECK_HEADERS): Remove linux/icmp.h.
   20596 	* net.c: Follow the example of tests/net-icmp_filter.c and include
   20597 	<linux/icmp.h> unconditionally.
   20598 
   20599 2016-06-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   20600 
   20601 	net.c: use AF_NETLINK unconditionally.
   20602 	* net.c: Do not check for AF_NETLINK availability.
   20603 
   20604 	net.c: include <linux/netlink.h> unconditionally.
   20605 	* configure.ac (AC_CHECK_HEADERS): Remove linux/netlink.h.
   20606 	* net.c: Follow the example of socketutils.c and include
   20607 	<linux/netlink.h> unconditionally.
   20608 
   20609 2016-06-14  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   20610 
   20611 	Remove UNDEFINED_SCNO.
   20612 	Since UNDEFINED_SCNO is set if and only if !SCNO_IS_VALID
   20613 	and since tcp->s_ent can only be set to &sysent[tcp->scno]
   20614 	(or to &unknown, but only when !SCNO_IS_VALID), there is no need
   20615 	to check for UNDEFINED_SCNO before calling syscall_name(tcp->scno).
   20616 
   20617 	* defs.h (UNDEFINED_SCNO): Remove.
   20618 	* syscall.c (get_scno, trace_syscall_entering, trace_syscall_exiting):
   20619 	Remove checks for UNDEFINED_SCNO.
   20620 
   20621 2016-06-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   20622 
   20623 	tests/attach-f-p.c: fix typo in comment.
   20624 
   20625 2016-06-14  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   20626 
   20627 	strace.c: fix style in function definition.
   20628 	* strace.c (kill_save_errno): Move the type of return value
   20629 	to another line.
   20630 
   20631 	Turn on more compiler warnings.
   20632 	* configure.ac (gl_WARN_ADD): Add -Wempty-body, -Wformat-security,
   20633 	-Wignored-qualifiers, -Winit-self, -Wlogical-op,
   20634 	-Wmissing-parameter-type, -Wnested-externs, -Wold-style-declaration,
   20635 	-Wold-style-definition, -Wtype-limits.
   20636 
   20637 	strace.c: fix a warning reported by -Wold-style-definition.
   20638 	* strace.c (usage): Add void to the list of function argments.
   20639 
   20640 2016-06-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   20641 
   20642 	tests/ioctl_evdev.c: fix typo in comment.
   20643 
   20644 2016-06-14  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   20645 
   20646 	Move printargs* functions to util.c.
   20647 	* syscall.c (printargs, printargs_u, printargs_d): Move ...
   20648 	* util.c: ... here.
   20649 
   20650 	tests/xgetrlimit.c: fix a warning reported by -Wtype-limits.
   20651 	* tests/xgetrlimit.c (sprint_rlim): Explicitly cast constants
   20652 	to the type of argument.
   20653 
   20654 2016-06-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   20655 
   20656 	Consistently use printaddr for printing addresses.
   20657 	* bjm.c (SYS_FUNC(init_module)): Use printaddr.
   20658 	* clone.c (SYS_FUNC(clone)): Likewise.
   20659 	* evdev.c (ff_effect_ioctl): Likewise.
   20660 	* mtd.c (decode_mtd_oob_buf): Likewise.
   20661 	* net.c (SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg), SYS_FUNC(getsockopt)):
   20662 	Likewise.
   20663 	* print_sigevent.c (print_sigevent): Likewise.
   20664 	* printsiginfo.c (printsigval, print_si_info): Likewise.
   20665 	* signal.c (decode_new_sigaction): Likewise.
   20666 	* sysmips.c (SYS_FUNC(sysmips)): Likewise.
   20667 	* util.c (printpathn, printstr, umoven_or_printaddr): Likewise.
   20668 	* v4l2.c (print_v4l2_buffer, print_v4l2_framebuffer,
   20669 	umoven_or_printaddr_ignore_syserror): Likewise.
   20670 	* tests/net-icmp_filter.c (main): Update.
   20671 
   20672 	Based on patch by Eugene Syromyatnikov <evgsyr (a] gmail.com>.
   20673 
   20674 2016-06-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   20675 
   20676 	tests/attach-p-cmd-p.c: cleanup.
   20677 	* attach-p-cmd-p.c (handler): Move code ...
   20678 	(main): ... here.  Unblock SIGALRM only.
   20679 	Use alarm() instead of setitimer().
   20680 	Replace endless loop with a pause() call.
   20681 	Check that chdir() returns ENOENT.
   20682 
   20683 	tests: enhance test coverage of SIGCHLD siginfo_t.
   20684 	* tests/siginfo.c: New file.
   20685 	* tests/siginfo.test: New test.
   20686 	* tests/wait.c: Remove.
   20687 	* tests/wait.expected: Remove.
   20688 	* tests/wait.test: Remove.
   20689 	* tests/.gitignore: Add siginfo, remove wait.
   20690 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20691 	(DECODER_TESTS): Add siginfo.test, remove wait.test.
   20692 	(EXTRA_DIST): Remove wait.expected.
   20693 
   20694 	tests: extend test coverage of waitid syscall.
   20695 	* tests/waitid.c: New file.
   20696 	* tests/waitid-v.c: Likewise.
   20697 	* tests/waitid.test: New test.
   20698 	* tests/waitid-v.test: Likewise.
   20699 	* tests/.gitignore: Add waitid and waitid-v.
   20700 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20701 	(DECODER_TESTS): Add waitid.test and waitid-v.test.
   20702 
   20703 	tests: extend test coverage of wait4 syscall.
   20704 	* tests/wait4.c: New file.
   20705 	* tests/wait4-v.c: Likewise.
   20706 	* tests/wait4.test: New test.
   20707 	* tests/wait4-v.test: Likewise.
   20708 	* tests/.gitignore: Add wait4 and wait4-v.
   20709 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20710 	(DECODER_TESTS): Add wait4.test and wait4-v.test.
   20711 
   20712 	tests: add widen_to_ull macro to tests.h.
   20713 	* tests.h (widen_to_ull): New macro, copied from defs.h
   20714 
   20715 	Fix sign extension issues in the parser of struct rusage.
   20716 	* printrusage.c (printrusage): Do not cast members of struct rusage
   20717 	to type long, use widen_to_ull instead.
   20718 
   20719 2016-06-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   20720 
   20721 	tests: check decoding of waitpid syscall.
   20722 	* tests/waitpid.c: New file.
   20723 	* tests/waitpid.test: New test.
   20724 	* tests/.gitignore: Add waitpid.
   20725 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20726 	(DECODER_TESTS): Add waitpid.test.
   20727 
   20728 2016-06-09  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   20729 
   20730 	tests: add strace-E.test.
   20731 	* tests/strace-E.expected: New file.
   20732 	* tests/strace-E.test: New test.
   20733 	* tests/Makefile.am (MISC_TESTS): Add it.
   20734 	(EXTRA_DIST): Add strace-E.expected.
   20735 
   20736 2016-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   20737 
   20738 	strace.spec.in: enable libunwind on more platforms.
   20739 	* strace.spec.in: Add libunwind-devel to BuildRequires for RHEL8 family.
   20740 
   20741 2016-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   20742 
   20743 	make-dist: generate strace-*.tar.gz, strace.dsc, and strace.spec.
   20744 	Change make-dist to generate strace-*.tar.gz, strace.dsc,
   20745 	and strace.spec in addition to strace-*.tar.xz.
   20746 
   20747 	* configure.ac (AM_INIT_AUTOMAKE): Remove no-dist-gzip.
   20748 	* make-dsc: New file.
   20749 	* make-dist: Use it.
   20750 	* .gitignore: Add strace-*.tar.gz, strace.dsc, and strace.spec.
   20751 
   20752 2016-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   20753 
   20754 	Parametrize debian/changelog.
   20755 	* configure.ac (CHANGELOGTIME): Rename to RPM_CHANGELOGTIME.
   20756 	(DEB_CHANGELOGTIME): New variable.
   20757 	(AC_CONFIG_FILES): Add debian/changelog.
   20758 	* strace.spec.in: Rename CHANGELOGTIME to RPM_CHANGELOGTIME.
   20759 	* debian/changelog: Rename to ...
   20760 	* debian/changelog.in: ... this file.  Add parametrized entry.
   20761 	* debian/.gitignore: New file.
   20762 
   20763 	git-version-gen: replace '-' with '.' in generated version.
   20764 	* git-version-gen: Replace '-' with '.' so version conforms to policies
   20765 	* configure.ac (SPEC_VERSION): Remove.
   20766 	* strace.spec.in: Replace SPEC_VERSION with PACKAGE_VERSION.
   20767 	Remove %srcname.
   20768 
   20769 2016-06-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20770 
   20771 	Parametrize strace.spec.
   20772 	* configure.ac (SPEC_VERSION, CHANGELOGTIME): Define.
   20773 	(AC_CONFIG_FILES): Add strace.spec.
   20774 	* strace.spec: Rename to ...
   20775 	* strace.spec.in: ... this file.  Parametrize Version, srcname,
   20776 	and the last %changelog entry.  Initialize .tarball-version file.
   20777 
   20778 	strace.spec: adopt for OBS.
   20779 	* strace.spec: Parametrize libunwind-devel BRs, BuildRoot, and %defattr.
   20780 
   20781 2016-06-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20782 
   20783 	tests: remove obsolete strace-f.test.
   20784 	strace-f.test is too inexact while fork-f.test does the right thing.
   20785 
   20786 	* tests/strace-f.test: Remove.
   20787 	* tests/Makefile.am (MISC_TESTS): Remove it.
   20788 	* strace.spec (BuildRequires): Remove time.
   20789 
   20790 2016-06-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20791 
   20792 	tests: always distribute strace-k.test.
   20793 	Fix distribution of tests/strace-k.test file when configured
   20794 	without libunwind.
   20795 
   20796 	* tests/Makefile.am (EXTRA_DIST): Add strace-k.test.
   20797 
   20798 2016-06-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   20799 
   20800 	make-dist: skip news-check for non-releases.
   20801 	* make-dist: Run news-check only when the commit being built
   20802 	matches a release tag.
   20803 
   20804 2016-06-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   20805 
   20806 	tests: check decoding of setrlimit, getrlimit, and ugetrlimit syscalls.
   20807 	* tests/getrlimit.c: New file.
   20808 	* tests/setrlimit.c: Likewise.
   20809 	* tests/ugetrlimit.c: Likewise.
   20810 	* tests/xgetrlimit.c: Likewise.
   20811 	* tests/getrlimit.test: New test.
   20812 	* tests/setrlimit.test: Likewise.
   20813 	* tests/ugetrlimit.test: Likewise.
   20814 	* tests/.gitignore: Add getrlimit, setrlimit, and ugetrlimit.
   20815 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20816 	(DECODER_TESTS): Add getrlimit.test, setrlimit.test,
   20817 	and ugetrlimit.test.
   20818 	(EXTRA_DIST): Add xgetrlimit.c.
   20819 
   20820 	tests: check decoding of prlimit64 syscall.
   20821 	* tests/prlimit64.c: New file.
   20822 	* tests/prlimit64.test: New test.
   20823 	* tests/.gitignore: Add prlimit64.
   20824 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20825 	(DECODER_TESTS): Add prlimit64.test.
   20826 
   20827 	Fix decoding of pid_t argument of prlimit64 syscall.
   20828 	* resource.c (SYS_FUNC(prlimit64)): Print pid_t syscall
   20829 	argument using %d format.
   20830 
   20831 2016-06-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   20832 
   20833 	Do not check for old sysctl enums.
   20834 	Assume that sysctl enums defined since linux v2.6 are always defined,
   20835 	with a signle exception: check for CTL_PROC which definition was removed
   20836 	in v2.6.18 and restored later in v2.6.23.
   20837 
   20838 	* configure.ac (AC_CHECK_DECLS): Remove old constants.
   20839 	* xlat/sysctl_kern.in: Mark constants older than KERN_PRINTK_RATELIMIT
   20840 	as unconditional.
   20841 	* xlat/sysctl_net.in: Mark constants older than NET_LLC
   20842 	as unconditional.
   20843 	* xlat/sysctl_net_core.in: Mark constants older than NET_CORE_BUDGET
   20844 	as unconditional.
   20845 	* xlat/sysctl_net_ipv4.in: Mark constants older than
   20846 	NET_IPV4_IGMP_MAX_MSF as unconditional.
   20847 	* xlat/sysctl_net_ipv4_conf.in: Mark constants older than
   20848 	NET_IPV4_CONF_FORCE_IGMP_VERSION as unconditional.
   20849 	* xlat/sysctl_net_ipv4_route.in: Mark constants older than
   20850 	NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS as unconditional.
   20851 	* xlat/sysctl_net_ipv6.in: Mark constants older than
   20852 	NET_IPV6_MLD_MAX_MSF as unconditional.
   20853 	* xlat/sysctl_net_ipv6_route.in: Mark constants older than
   20854 	NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS as unconditional.
   20855 	* xlat/sysctl_net_unix.in: Mark all constants as unconditional.
   20856 	* xlat/sysctl_root.in: Mark constants older than CTL_ARLAN
   20857 	as unconditional.
   20858 	* xlat/sysctl_vm.in: Mark constants older than VM_MAX_MAP_COUNT
   20859 	as unconditional.
   20860 
   20861 2016-06-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   20862 
   20863 	xlat: extend syntax.
   20864 	* xlat/gen.sh: Implement #conditional directive that turns on
   20865 	preprocessor checks turned off earlier by #unconditional directive.
   20866 
   20867 2016-06-06  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   20868 
   20869 	mpers.awk: remove unnecessary type attribute retrieval.
   20870 	* mpers.awk (what_is): Do not retrieve "type" attribute
   20871 	for "enumeration_type".
   20872 
   20873 	tests/ptrace.c: fix fork() return value check.
   20874 	* tests/ptrace.c (test_peeksiginfo): Explicitly cast fork() return value
   20875 	to pid_t.
   20876 
   20877 	.gitignore: add missing files that should be ignored.
   20878 	* .gitignore: Add ioctl_redefs[12].h and libstrace.a.
   20879 
   20880 2016-06-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   20881 
   20882 	debian: sync with the package.
   20883 	* debian/control (Build-Depends) [amd64]: Remove libunwind-dev.
   20884 	* debian/changelog: Sync with 4.12-3.
   20885 	* debian/rules: Likewise.
   20886 
   20887 2016-06-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   20888 
   20889 	tests/strace-S.test: fix testing 64-bit strace using a 32-bit userspace.
   20890 	* tests/strace-S.test: Measure wall clock time instead of system time.
   20891 	Use local "./readv" instead of system "date" as a sample executable.
   20892 
   20893 	Reported-by: Steve McIntyre <steve (a] einval.com>
   20894 
   20895 2016-06-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   20896 
   20897 	tests/strace-S.test: enhance error diagnostics.
   20898 	* tests/strace-S.test: If strace output does not meet expectations,
   20899 	print the output.
   20900 
   20901 2016-06-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   20902 
   20903 	.gitignore: sort the list of ignored patterns.
   20904 	* .gitignore: Sort.
   20905 
   20906 2016-06-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   20907 
   20908 	maint: post-release administrivia.
   20909 	* NEWS: Add header line for the next release.
   20910 
   20911 2016-05-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   20912 
   20913 	Prepare for 4.12 release.
   20914 	* NEWS: Update for 4.12 release.
   20915 	* debian/changelog: 4.12-1.
   20916 	* strace.spec: 4.12-1.
   20917 
   20918 	Sync strace.spec and debian/changelog with packages.
   20919 	* debian/changelog: Sync with 4.11-1.
   20920 	* strace.spec: Sync with 4.11.0.163.9720-2.
   20921 
   20922 2016-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   20923 
   20924 	Mpersify hdio.c.
   20925 	* defs.h (hdio_ioctl): Remove.
   20926 	* hdio.c: Mpersify struct hd_geometry.
   20927 	(hdio_ioctl): Mpersify.
   20928 
   20929 2016-05-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   20930 
   20931 	loop.c: decode LOOP_SET_DIRECT_IO.
   20932 	* loop.c (loop_ioctl) [LOOP_SET_DIRECT_IO] : Handle LOOP_SET_DIRECT_IO.
   20933 
   20934 	loop.c: fix printing of arrays.
   20935 	* loop.c (decode_loop_info): Use square brackets to print
   20936 	struct loop_info.lo_init and struct loop_info.reserved arrays.
   20937 	(decode_loop_info64): Use square brackets to print
   20938 	struct loop_info64.lo_init array.
   20939 
   20940 	loop.c: fix printing of structure members' names.
   20941 	* loop.c (decode_loop_info, decode_loop_info64): Do not strip "lo_"
   20942 	prefix from printed names.
   20943 
   20944 	loop.c: optimize decoding of paired ioctls.
   20945 	* loop.c (loop_ioctl): Optimize decoding of LOOP_[GS]ET_STATUS
   20946 	and LOOP_[GS]ET_STATUS64 ioctl pairs.
   20947 
   20948 2016-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   20949 
   20950 	tests/ioctl_evdev.c: check EVIOCGUNIQ decoding.
   20951 	* tests/ioctl_evdev.c (main): Check EVIOCGUNIQ(0) decoding.
   20952 
   20953 	tests/ioctl_mtd.c: fix build with musl.
   20954 	* tests/ioctl_mtd.c: Include <linux/ioctl.h>.
   20955 
   20956 	tests: check decoding of 'M' type ioctls.
   20957 	* tests/ioctl_mtd.c: New file.
   20958 	* tests/ioctl_mtd.test: New test.
   20959 	* tests/.gitignore: Add ioctl_mtd.
   20960 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20961 	(DECODER_TESTS): Add ioctl_mtd.test.
   20962 
   20963 	Mpersify mtd.c.
   20964 	* defs.h (mtd_ioctl): Remove.
   20965 	* mtd.c: Mpersify struct mtd_oob_buf and ioctl numbers.
   20966 	(mtd_ioctl): Mpersify.
   20967 
   20968 	mtd.c: refactor.
   20969 	* mtd.c (mtd_ioctl): Move parsers of structures to separate functions.
   20970 
   20971 	Move parser of UBI_* ioctls to a separate file.
   20972 	* mtd.c (ubi_ioctl): Move to ...
   20973 	* ubi.c: ... new file.
   20974 	* Makefile.am (strace_SOURCES): Add it.
   20975 
   20976 	tests: check decoding of EVIOC* ioctls.
   20977 	* tests/ioctl_evdev.c: New file.
   20978 	* tests/ioctl_evdev-v.c: Likewise.
   20979 	* tests/ioctl_evdev.test: New test.
   20980 	* tests/ioctl_evdev-v.test: Likewise.
   20981 	* tests/.gitignore: Add ioctl_evdev and ioctl_evdev-v.
   20982 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   20983 	(DECODER_TESTS): Add ioctl_evdev.test and ioctl_evdev-v.test.
   20984 
   20985 	Mpersify EVIOC* ioctl parser.
   20986 	* defs.h (evdev_abs): New xlat prototype.
   20987 	(evdev_ioctl): Remove.
   20988 	* evdev.c: Do not include "xlat/evdev_abs.h".
   20989 	Mpersify struct ff_effect and ioctl numbers.
   20990 	(evdev_ioctl): Mpersify.
   20991 	* NEWS: Mention this enhancement.
   20992 
   20993 	evdev.c: fix printing of unrecognized event type passed to EVIOCGBIT.
   20994 	* evdev.c (bit_ioctl): If event type is not unrecognized,
   20995 	print the argument as an address.
   20996 
   20997 	evdev.c: fix printing of EV_PWR's argument.
   20998 	* evdev.c (bit_ioctl): Fix printing of comma before EV_PWR's argument.
   20999 
   21000 	evdev.c: fix indentation.
   21001 	* evdev.c: Fix indentation of print formats.
   21002 
   21003 	evdev.c: fix decoding of EVIOCGNAME, EVIOCGPHYS, and EVIOCGUNIQ.
   21004 	* evdev.c (evdev_read_ioctl): Fix printing of the string returned
   21005 	in response to EVIOCGNAME, EVIOCGPHYS, and EVIOCGUNIQ requests.
   21006 
   21007 	evdev.c: fix EVIOCGVERSION decoding.
   21008 	* evdev.c (evdev_read_ioctl): Print EVIOCGVERSION's argument
   21009 	using #x format.
   21010 
   21011 	evdev.c: fix EVIOCGMTSLOTS decoding.
   21012 	* evdev.c (mtslots_ioctl): Use umove_or_printaddr.
   21013 
   21014 	evdev.c: fix bitset decoding.
   21015 	* evdev.c (decode_bitset): Use umove_or_printaddr.
   21016 
   21017 	evdev.c: fix decoding of struct input_id.
   21018 	* evdev.c (getid_ioctl): Use umove_or_printaddr.
   21019 
   21020 	evdev.c: fix decoding of struct input_keymap_entry.
   21021 	* evdev.c (keycode_V2_ioctl): Use umove_or_printaddr.
   21022 
   21023 	evdev.c: fix decoding of EVIOCGKEYCODE/EVIOCSKEYCODE.
   21024 	* evdev.c (keycode_ioctl): Use umove_or_printaddr.
   21025 
   21026 	evdev.c: fix decoding of struct input_absinfo.
   21027 	* evdev.c (abs_ioctl): Use umove_or_printaddr.
   21028 
   21029 	evdev.c: fix decoding of struct ff_effect.
   21030 	* evdev.c (ff_effect_ioctl): Use umove_or_printaddr.
   21031 	Fix printing of struct ff_effect.u member names.
   21032 
   21033 	evdev.c: fix printing of struct ff_envelope.fade_level.
   21034 	* evdev.c (decode_envelope): Print struct ff_envelope.fade_level
   21035 	using #x format.
   21036 
   21037 	evdev.c: fix decoding of EVIOCGRAB and EVIOCREVOKE.
   21038 	* evdev.c (evdev_write_ioctl): Print argument of EVIOCGRAB
   21039 	and EVIOCREVOKE as unsigned long.
   21040 
   21041 	evdev.c: fix EVIOCRMFF decoding.
   21042 	* evdev.c (evdev_write_ioctl): Print EVIOCRMFF's argument as int.
   21043 
   21044 	evdev.c: move handling of EVIOCGBIT to a separate function.
   21045 	* evdev.c (evdev_read_ioctl): Move EVIOCGBIT handling to ...
   21046 	(bit_ioctl): ... new function.
   21047 
   21048 2016-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   21049 
   21050 	evdev.c: reorder ioctl command checks.
   21051 	Change the order of ioctl command cheks to match the kernel:
   21052 	1st, check for fixed-number fixed-length commands,
   21053 	2nd, check for fixed-number variable-length commands,
   21054 	3rd, check for multi-number fixed-length commands,
   21055 	4thm check for multi-number variable-length commands.
   21056 
   21057 	* evdev.c (evdev_read_ioctl, evdev_write_ioctl): Reorder
   21058 	ioctl command checks.
   21059 
   21060 2016-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   21061 
   21062 	evdev.c: decode all directions except _IOC_READ on entering syscall.
   21063 	* evdev.c (evdev_write_ioctl): Remove exiting check.
   21064 	(evdev_read_ioctl): Move entering check ...
   21065 	(evdev_ioctl): ... here.  Add RVAL_DECODED to return code in _IOC_WRITE
   21066 	and default cases.
   21067 
   21068 	evdev.c: fix indentation of preprocessor directives.
   21069 	* evdev.c: Fix indentation of preprocessor directives.
   21070 	Move inclusion of <linux/ioctl.h> into [HAVE_LINUX_INPUT_H].
   21071 
   21072 2016-05-28  Jeff Mahoney  <jeffm (a] suse.com>
   21073 
   21074 	file_ioctl.c: print first two extents for FIDEDUPERANGE in abbrev mode.
   21075 	* file_ioctl.c (file_ioctl, print_file_dedupe_range_info): Print first
   21076 	two elements of info array in abbrev mode.
   21077 	* tests/btrfs.c (btrfs_test_extent_same_ioctl): Handle newly
   21078 	printed elements.
   21079 
   21080 2016-05-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   21081 
   21082 	ioctl.c: fix typo in decoding of EVIOCSABS's parameter.
   21083 	* ioctl.c (evdev_decode_number): Fix typo in printxval default value.
   21084 
   21085 2016-05-27  Jeff Mahoney  <jeffm (a] suse.com>
   21086 
   21087 	tests: check decoding of btrfs RDWR ioctls returned data.
   21088 	* tests/btrfs-vw.test: New file.
   21089 	* tests/btrfs-w.test: New file.
   21090 	* tests/Makefile.am (DECODER_TESTS): Add them.
   21091 
   21092 	tests/btrfs.c: fix live btrfs_test_search_ioctls output.
   21093 	* tests/btrfs.c (btrfs_test_search_ioctls): Use print_tree_search_buf
   21094 	for BTRFS_IOC_TREE_SEARCH and fix missing whitespace.
   21095 
   21096 	btrfs.c: don't use print_array in btrfs_print_tree_search.
   21097 	* btrfs.c (btrfs_print_tree_search): Don't use print_array.  The buffer
   21098 	represents a series of variable sized records, not an array.
   21099 
   21100 	btrfs.c: fix print_array usage in btrfs_print_logical_ino_container.
   21101 	* btrfs.c: (btrfs_print_logical_ino_container) Fix the element count
   21102 	to reflect the number of records rather than the number of items.
   21103 
   21104 2016-05-26  Jeff Mahoney  <jeffm (a] suse.com>
   21105 
   21106 	tests/btrfs.c: fix btrfs-v for BTRFS_IOC_TREE_SEARCH.
   21107 	* tests/btrfs.c (btrfs_test_send_ioctl): Assign key_reference
   21108 	to search_args for BTRFS_IOC_TREE_SEARCH ioctl tests.
   21109 
   21110 2016-05-26  Fabien Siron  <fabien.siron (a] epita.fr>
   21111 
   21112 	Fix -yy documentation.
   21113 	* strace.c (usage): Fix description of -yy option.
   21114 	* strace.1: Likewise.
   21115 
   21116 2016-05-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   21117 
   21118 	tests/ioctl_block.c: tweak magic constants to make the test more reliable
   21119 	* tests/ioctl_block.c (main): Change bad pointer to make
   21120 	its lower 32-bit part closer to -1U.
   21121 
   21122 	tests/btrfs.c: check basic decoding of read-only ioctls.
   21123 	* tests/btrfs.c (btrfs_test_read_ioctls): New function.
   21124 	(main): Use it.
   21125 
   21126 	tests: check decoding of BLK* ioctls.
   21127 	* configure.ac (AC_CHECK_TYPES): Add struct blk_user_trace_setup.
   21128 	* tests/ioctl_block.c: New file.
   21129 	* tests/ioctl_block.test: New test.
   21130 	* tests/.gitignore: Add ioctl_block.
   21131 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21132 	(DECODER_TESTS): Add ioctl_block.test.
   21133 
   21134 	Mpersify BLK* ioctl parser.
   21135 	* defs.h (block_ioctl): Remove.
   21136 	* block.c: Mpersify struct blk_user_trace_setup,
   21137 	struct blkpg_ioctl_arg, struct blkpg_partition, and ioctl numbers.
   21138 	(block_ioctl): Mpersify.
   21139 	* NEWS: Mention this enhancement.
   21140 
   21141 	block.c: optimize decoding of paired ioctls.
   21142 	* block.c (block_ioctl): Optimize decoding of commands that return
   21143 	a signed int.
   21144 
   21145 	block.c: fix printing of uint64_t pairs.
   21146 	* block.c (block_ioctl): Print uint64_t values using PRIu64 format.
   21147 
   21148 	block.c: fix printing of struct blk_user_trace_setup.
   21149 	* block.c (block_ioctl): Fix printing of comma before
   21150 	struct blk_user_trace_setup.name on exiting syscall.
   21151 
   21152 	Move parser of 'X' type ioctls to a separate file.
   21153 	* fs_x_ioctl.c: New file.
   21154 	* Makefile.am (strace_SOURCES): Add it.
   21155 	* block.c: (block_ioctl): Move parser of FITRIM, FIFREEZE, and FITHAW
   21156 	to fs_x_ioctl.c.
   21157 	* defs.h (fs_x_ioctl): New prototype.
   21158 	* ioctl.c (ioctl_decode): Call fs_x_ioctl for ioctl type 'X'.
   21159 
   21160 	Move parser of HDIO_* ioctls to a separate file.
   21161 	* hdio.c: New file.
   21162 	* Makefile.am (strace_SOURCES): Add it.
   21163 	* block.c: Do not include <linux/hdreg.h>.
   21164 	(block_ioctl): Move parser of HDIO_GETGEO to hdio.c.
   21165 	* defs.h (hdio_ioctl): New prototype.
   21166 	* ioctl.c (ioctl_decode): Call hdio_ioctl for ioctl type 0x03.
   21167 
   21168 	Fix explicit casts of signed integer types to unsigned long long.
   21169 	* defs.h (widen_to_ull): New macro.
   21170 	* dirent.c (print_old_dirent, SYS_FUNC(getdents)): Use it in place
   21171 	of explicit casts to unsigned long long.
   21172 	* io.c (print_lld_from_low_high_val): Likewise.
   21173 	* lseek.c (SYS_FUNC(llseek)): Likewise.
   21174 	* printsiginfo.c (print_si_info): Likewise.
   21175 	* printstat.h (DO_PRINTSTAT): Likewise.
   21176 	* sysinfo.c (SYS_FUNC(sysinfo)): Likewise.
   21177 	* times.c (SYS_FUNC(times)): Likewise.
   21178 	* fetch_struct_statfs.c (ASSIGN_NUMBER): Remove.
   21179 	(fetch_struct_statfs, fetch_struct_statfs64): Replace ASSIGN_NUMBER
   21180 	with widen_to_ull.
   21181 
   21182 	scsi.c: print __u64 types using PRI__u64 format.
   21183 	* scsi.c (print_sg_io_v4_req, print_sg_io_v4_res): Remove explicit casts
   21184 	to unsigned long long, print fields of type __u64 using PRI__u64 format.
   21185 
   21186 2016-05-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   21187 
   21188 	tests: check decoding of RTC_* ioctls.
   21189 	* configure.ac (AC_CHECK_FUNCS): Add ioctl_rtc.
   21190 	* tests/ioctl_rtc.c: New file.
   21191 	* tests/ioctl_rtc-v.c: Likewise.
   21192 	* tests/ioctl_rtc.test: New test.
   21193 	* tests/ioctl_rtc-v.test: Likewise.
   21194 	* tests/.gitignore: Add ioctl_rtc and ioctl_rtc-v.
   21195 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21196 	(DECODER_TESTS): Add ioctl_rtc.test and ioctl_rtc-v.test.
   21197 
   21198 	Mpersify RTC_* ioctl parser.
   21199 	* defs.h (rtc_ioctl): Remove.
   21200 	* rtc.c: Mpersify struct rtc_pll_info and ioctl numbers.
   21201 	(rtc_ioctl): Mpersify.
   21202 	* NEWS: Mention this enhancement.
   21203 
   21204 	rtc.c: fix decoding of struct rtc_wkalrm.
   21205 	* rtc.c (decode_rtc_wkalrm): Print field name of struct rtc_wkalrm.time.
   21206 
   21207 	file_ioctl.c: print file descriptors using printfd.
   21208 	* file_ioctl.c (print_file_dedupe_range_info): Print
   21209 	struct file_dedupe_range_info.dest_fd using printfd.
   21210 	(file_ioctl): Print struct file_clone_range.src_fd using printfd.
   21211 
   21212 	rtc.c: do not print argument of ioctls that have no arguments.
   21213 	* rtc.c (rtc_ioctl): Do not print argument of RTC_{A,U,P,W}IE_{ON,OFF}
   21214 	and RTC_VL_CLR ioctls.
   21215 
   21216 	rtc.c: decode RTC_PLL_GET and RTC_PLL_SET.
   21217 	* rtc.c (rtc_ioctl): Decode RTC_PLL_GET and RTC_PLL_SET
   21218 
   21219 	rtc.c: optimize decoding of paired ioctls.
   21220 	* rtc.c (rtc_ioctl): Optimize decoding of RTC_ALM_READ/RTC_ALM_SET,
   21221 	RTC_RD_TIME/RTC_SET_TIME, and RTC_WKALM_RD/RTC_WKALM_SET ioctl pairs.
   21222 
   21223 	block.c: handle BLKDAXGET.
   21224 	* block.c [!BLKDAXGET] (BLKDAXGET): Define.
   21225 	(block_ioctl): Handle it.
   21226 
   21227 	tests: check decoding of mount syscall.
   21228 	* tests/mount.c: New file.
   21229 	* tests/mount.test: New test.
   21230 	* tests/.gitignore: Add mount.
   21231 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21232 	(DECODER_TESTS): Add mount.
   21233 
   21234 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21235 
   21236 	tests/vhangup.c: diassociate from the controlling terminal first.
   21237 	* tests/vhangup.c (main): Call setsid before vhangup.
   21238 
   21239 2016-05-24  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   21240 
   21241 	tests: add vhangup.test.
   21242 	* tests/vhangup.c: New file.
   21243 	* tests/vhangup.test: New test.
   21244 	* tests/.gitignore: Add vhangup.
   21245 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21246 	(DECODER_TESTS): Add vhangup.test.
   21247 
   21248 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21249 
   21250 	NEWS: Prepare for 4.12 release.
   21251 
   21252 2016-05-24  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   21253 
   21254 	tests/btrfs.c: fix build on x32.
   21255 	* tests/btrfs.c (btrfs_test_ino_path_ioctls): Fix printing of st_ino.
   21256 
   21257 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21258 
   21259 	tests/btrfs.c: fix build with u64 based BTRFS_IOC_DEFAULT_SUBVOL.
   21260 	* tests/btrfs.c: Fix build on systems where BTRFS_IOC_DEFAULT_SUBVOL
   21261 	is defined using unexported type "u64".
   21262 
   21263 	btrfs.c: fix build on systems without BTRFS_IOC_FILE_EXTENT_SAME.
   21264 	* btrfs.c (btrfs_ioctl): Skip BTRFS_IOC_FILE_EXTENT_SAME case
   21265 	if this constant is not defined.
   21266 	* tests/btrfs.c (btrfs_test_extent_same_ioctl): Skip this part
   21267 	of the test if BTRFS_IOC_FILE_EXTENT_SAME is not defined.
   21268 
   21269 	tests/btrfs.c: fix printing struct btrfs_ioctl_clone_range_args.
   21270 	* tests/btrfs.c (btrfs_test_clone_ioctls): Print __u64 members
   21271 	of struct btrfs_ioctl_clone_range_args using PRI__u64 format.
   21272 
   21273 	tests/btrfs.c: tweak magic constants to make the test more reliable.
   21274 	* tests/btrfs.c (btrfs_test_sync_ioctls): Change u64val
   21275 	to 0xdeadbeefbadc0ded.
   21276 	(btrfs_test_subvol_ioctls): Likewise.  Change bad_pointer
   21277 	to make their lower 32-bit parts closer to -1U.
   21278 
   21279 	btrfs.c: print file descriptors using printfd.
   21280 	* btrfs.c (btrfs_ioctl): Print struct btrfs_ioctl_send_args.send_fd,
   21281 	struct btrfs_ioctl_vol_args.fd, and struct btrfs_ioctl_vol_args_v2.fd
   21282 	using printfd.
   21283 	* tests/btrfs.c (btrfs_print_vol_args_v2, btrfs_test_subvol_ioctls,
   21284 	btrfs_test_device_ioctls, btrfs_test_clone_ioctls,
   21285 	btrfs_test_send_ioctl): Update.
   21286 
   21287 	tests/btrfs.c: do not print errno in case of fs type mismatch.
   21288 	* tests/btrfs.c (main): Use error_msg_and_fail instead of
   21289 	perror_msg_and_fail when the fs type of the given directory
   21290 	is not BTRFS_SUPER_MAGIC.
   21291 
   21292 	tests/btrfs.c: fix indentation.
   21293 	* tests/btrfs.c: Fix indentation of preprocessor directives
   21294 	and function prototypes.
   21295 
   21296 	tests/btrfs.c: sort included headers.
   21297 	* tests/btrfs.c: Sort included headers.
   21298 
   21299 	tests/btrfs.c: do not use alloca.
   21300 	* tests/btrfs.c: Don't include <alloca.h>.
   21301 	(btrfs_test_subvol_ioctls): Allocate
   21302 	struct btrfs_ioctl_vol_args_v2.qgroup_inherit using tail_alloc.
   21303 
   21304 	tests/btrfs.c: fix build on systems without <linux/btrfs.h> or <linux/fiemap.h>
   21305 	* tests/btrfs.c: Include "tests.h" first.
   21306 	Skip the test if [!HAVE_LINUX_BTRFS_H].  Skip parts of the test
   21307 	that use struct fiemap if [!HAVE_LINUX_FIEMAP_H].
   21308 
   21309 2016-05-24  Jeff Mahoney  <jeffm (a] suse.com>
   21310 
   21311 	tests: add testing for btrfs ioctls.
   21312 	* tests/btrfs.c: New file.
   21313 	* tests/btrfs.test: New test.
   21314 	* tests/btrfs-v.test: Likewise.
   21315 	* tests/.gitignore: Add btrfs.
   21316 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21317 	(DECODER_TESTS): Add btrfs.test and btrfs-v.test.
   21318 
   21319 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21320 
   21321 	tests/file_ioctl.c: use tail_alloc.
   21322 	* tests/file_ioctl.c (main): Allocate struct fiemap using tail_alloc.
   21323 
   21324 	tests/file_ioctl.c: fix build on systems without <linux/fiemap.h>
   21325 	* tests/file_ioctl.c: Include "tests.h" first.
   21326 	Skip the test if [!HAVE_LINUX_FIEMAP_H].
   21327 
   21328 2016-05-24  Jeff Mahoney  <jeffm (a] suse.com>
   21329 
   21330 	tests: add testing for FS_IOC_FIEMAP.
   21331 	This is limited to FIEMAP.  FICLONE* and FIDEDUPERANGE originated in
   21332 	btrfs and will be tested there.
   21333 
   21334 	* tests/file_ioctl.c: New file.
   21335 	* tests/file_ioctl.test: New test.
   21336 	* tests/.gitignore: Add file_ioctl.
   21337 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21338 	(DECODER_TESTS): Add file_ioctl.test.
   21339 
   21340 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21341 
   21342 	Mpersify btrfs.c.
   21343 	* btrfs.c: Mpersify 3 arch-specific structures
   21344 	and corresponding ioctl numbers.
   21345 	(btrfs_ioctl): Mpersify.
   21346 	* defs.h (btrfs_ioctl): Remove.
   21347 
   21348 	btrfs.c: use print_array.
   21349 	* btrfs.c (print_btrfs_data_container_logical_ino,
   21350 	print_btrfs_data_container_ino_path, print_uint64,
   21351 	print_btrfs_ioctl_search_header, print_objectid_callback,
   21352 	print_btrfs_ioctl_space_info): New functions.
   21353 	(btrfs_print_logical_ino_container, btrfs_print_ino_path_container):
   21354 	Rewrite printers of struct btrfs_data_container.val array
   21355 	using print_array.
   21356 	(btrfs_print_qgroup_inherit): Rewrite printer of
   21357 	struct btrfs_qgroup_inherit.qgroups array using print_array.
   21358 	(btrfs_print_tree_search): Rewrite printer of
   21359 	struct btrfs_ioctl_search_header array using print_array.
   21360 	(btrfs_ioctl): Rewrite printer of
   21361 	struct btrfs_ioctl_send_args.clone_sources and
   21362 	struct btrfs_ioctl_space_args.spaces using print_array.
   21363 
   21364 	btrfs.c: simplify BTRFS_IOC_GET_FSLABEL parser.
   21365 	* btrfs.c (btrfs_ioctl): Share code of parser of BTRFS_IOC_SET_FSLABEL
   21366 	with parser of BTRFS_IOC_GET_FSLABEL only on BTRFS_IOC_GET_FSLABEL's
   21367 	entering.
   21368 
   21369 	btrfs.c: fix BTRFS_IOC_TREE_SEARCH_V2 output.
   21370 	* btrfs.c (btrfs_ioctl): Fix BTRFS_IOC_TREE_SEARCH_V2 output
   21371 	in case of EOVERFLOW and failed umove.
   21372 
   21373 	btrfs.c: cleanup use of tcp->auxstr.
   21374 	* btrfs.c (btrfs_ioctl): Reset tcp->auxstr only if it is set.
   21375 
   21376 	btrfs.c: cleanup struct btrfs_ioctl_get_dev_stats.nr_items check.
   21377 	* btrfs.c (btrfs_ioctl): Cleanup check of iterator of
   21378 	btrfs_ioctl_get_dev_stats.values array.
   21379 
   21380 	btrfs.c: do not use BTRFS_SUBVOL_NAME_MAX.
   21381 	* btrfs.c [BTRFS_SUBVOL_NAME_MAX]: Remove.
   21382 	(btrfs_ioctl): Use sizeof(struct btrfs_ioctl_vol_args_v2.name)
   21383 	instead of BTRFS_SUBVOL_NAME_MAX + 1.
   21384 
   21385 	btrfs.c: mark some function arguments as const.
   21386 	* btrfs.c (btrfs_print_balance_args, btrfs_print_features,
   21387 	btrfs_print_qgroup_limit, btrfs_print_data_container_header,
   21388 	btrfs_print_logical_ino_container, btrfs_print_ino_path_container,
   21389 	btrfs_print_qgroup_inherit): Mark some function arguments as const.
   21390 
   21391 	btrfs.c: use umove instead of umoven.
   21392 	* btrfs.c: Use umove instead of umoven and umove_or_printaddr
   21393 	instead of umoven_or_printaddr.
   21394 
   21395 	btrfs.c: remove unused variable.
   21396 	* btrfs.c (btrfs_ioctl): Remove "ret" variable.
   21397 
   21398 	btrfs.c: use printxval/printxval64 instead of printxvals.
   21399 	* btrfs.c (btrfs_ioctl): Do not call printxvals directly,
   21400 	use printxval/printxval64 wrappers that do the right thing.
   21401 
   21402 	btrfs.c: fix indentation.
   21403 	* btrfs.c: Fix indentation of preprocessor directives and print formats.
   21404 
   21405 	xlat/btrfs_dev_stats_values.in: cleanup.
   21406 	* xlat/btrfs_dev_stats_values.in: Remove HAVE_DECL_* defines,
   21407 	use #unconditional instead.
   21408 
   21409 	file_ioctl.c: use print_array.
   21410 	* file_ioctl.c (file_ioctl): Rewrite printers of
   21411 	struct file_dedupe_range_info and struct fiemap_extent arrays
   21412 	using print_array.
   21413 
   21414 	file_ioctl.c: fix indentation.
   21415 	* file_ioctl.c: Fix indentation of preprocessor directives
   21416 	and print formats.
   21417 
   21418 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21419 
   21420 	file_ioctl.c: include <linux/ioctl.h> instead of <sys/ioctl.h>
   21421 	Being a wrapper around <linux/ioctl.h>, <sys/ioctl.h> brings
   21422 	no benefits for this parser.
   21423 
   21424 	* file_ioctl.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
   21425 
   21426 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21427 
   21428 	file_ioctl.c: fix build on systems without <linux/fiemap.h>
   21429 	* configure.ac (AC_CHECK_HEADERS): Add linux/fiemap.h.
   21430 	* file_ioctl.c: Do not include <linux/fiemap.h> and xlat/fiemap_*.h
   21431 	if [!HAVE_LINUX_FIEMAP_H].
   21432 	(file_ioctl): Do not parse FS_IOC_FIEMAP if [!HAVE_LINUX_FIEMAP_H].
   21433 
   21434 	ioctl.c: fix build.
   21435 	* ioctl.c (ioctl_decode): Move definition of "ret" variable
   21436 	to [ALPHA || POWERPC] case.
   21437 	[ALPHA || POWERPC]: Fix syntax error.
   21438 
   21439 2016-05-24  Jeff Mahoney  <jeffm (a] suse.com>
   21440 
   21441 	ioctl: add decoding for FS_IOC_FIEMAP.
   21442 	* file_ioctl.c: Include <linux/fiemap.h>, "xlat/fiemap_flags.h",
   21443 	and "xlat/fiemap_extent_flags.h".
   21444 	(file_ioctl): Handle FS_IOC_FIEMAP.
   21445 	* ioctl.c (ioctl_decode): Use file_ioctl for decoding 'f' code ioctls.
   21446 
   21447 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21448 
   21449 	Add xlat/fiemap_flags.in and xlat/fiemap_extent_flags.in.
   21450 	* xlat/fiemap_flags.in: New file.
   21451 	* xlat/fiemap_extent_flags.in: Likewise.
   21452 
   21453 2016-05-24  Jeff Mahoney  <jeffm (a] suse.com>
   21454 
   21455 	ioctl: add decoding support for btrfs ioctls.
   21456 	* btrfs.c: New file.
   21457 	* file_ioctl.c: Likewise.
   21458 	* Makefile.am (strace_SOURCES): Add them.
   21459 	* configure.ac (AC_CHECK_HEADERS): Add linux/btrfs.h.
   21460 	(AC_CHECK_MEMBERS): Add struct btrfs_ioctl_feature_flags.compat_flags,
   21461 	struct btrfs_ioctl_fs_info_args.nodesize,
   21462 	struct btrfs_ioctl_defrag_range_args.start,
   21463 	and struct btrfs_ioctl_search_args_v2.buf_size.
   21464 	(AC_CHECK_DECLS): Add BTRFS_COMPRESS_* enums.
   21465 	* defs.h (btrfs_ioctl, file_ioctl): New prototypes.
   21466 	* ioctl.c (ioctl_decode) [HAVE_LINUX_BTRFS_H]: Use btrfs_ioctl.
   21467 	* xlat/btrfs_balance_args.in: New file.
   21468 	* xlat/btrfs_balance_ctl_cmds.in: Likewise.
   21469 	* xlat/btrfs_balance_flags.in: Likewise.
   21470 	* xlat/btrfs_balance_state.in: Likewise.
   21471 	* xlat/btrfs_compress_types.in: Likewise.
   21472 	* xlat/btrfs_defrag_flags.in: Likewise.
   21473 	* xlat/btrfs_dev_replace_cmds.in: Likewise.
   21474 	* xlat/btrfs_dev_replace_results.in: Likewise.
   21475 	* xlat/btrfs_dev_replace_state.in: Likewise.
   21476 	* xlat/btrfs_dev_stats_flags.in: Likewise.
   21477 	* xlat/btrfs_dev_stats_values.in: Likewise.
   21478 	* xlat/btrfs_features_compat.in: Likewise.
   21479 	* xlat/btrfs_features_compat_ro.in: Likewise.
   21480 	* xlat/btrfs_features_incompat.in: Likewise.
   21481 	* xlat/btrfs_key_types.in: Likewise.
   21482 	* xlat/btrfs_qgroup_ctl_cmds.in: Likewise.
   21483 	* xlat/btrfs_qgroup_inherit_flags.in: Likewise.
   21484 	* xlat/btrfs_qgroup_limit_flags.in: Likewise.
   21485 	* xlat/btrfs_qgroup_status_flags.in: Likewise.
   21486 	* xlat/btrfs_scrub_flags.in: Likewise.
   21487 	* xlat/btrfs_send_flags.in: Likewise.
   21488 	* xlat/btrfs_snap_flags_v2.in: Likewise.
   21489 	* xlat/btrfs_space_info_flags.in: Likewise.
   21490 	* xlat/btrfs_tree_objectids.in: Likewise.
   21491 
   21492 2016-05-24  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   21493 
   21494 	x32: update ioctl entries from linux 4.6.
   21495 	* linux/x32/ioctls_inc0.h: Update from linux v4.6 using ioctls_gen.sh.
   21496 
   21497 2016-05-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   21498 
   21499 	tests/attach-f-p.c: sleep a bit more to let the tracer catch up.
   21500 	On noticeably lagging systems, the parent process may invoke its chdir
   21501 	call before the tracer gets notified about completion of its last child
   21502 	process.  Add extra sleep in the parent process to win the race.
   21503 
   21504 	* tests/attach-f-p.c (main): Change timerid into a static array.
   21505 	Arm a timer in the parent process and wait for it.
   21506 
   21507 2016-05-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   21508 
   21509 	tests/attach-p-cmd-cmd.c: fix potential errno clobbering.
   21510 	* tests/attach-p-cmd-cmd.c (main): Call getpid before chdir.
   21511 
   21512 	tests/net-yy-netlink.c: robustify against libc specific issues.
   21513 	* tests/net-yy-netlink.c (main): Use getsockname instead of recvmsg
   21514 	as the latter has notible implementation differences that make
   21515 	the test unreliable.
   21516 
   21517 	tests/net-yy-netlink.c: robustify against os specific issues.
   21518 	* tests/net-yy-netlink.c (main): Pass a pointer to a real struct msghdr
   21519 	as NULL doesn't work well on some systems.
   21520 
   21521 	tests/net-yy-{inet,netlink}.test: cleanup.
   21522 	* tests/net-yy-inet.test: Do not pass arguments to net-yy-inet
   21523 	as the latter does not accept them.
   21524 	* tests/net-yy-netlink.test: Do not pass arguments to net-yy-netlink
   21525 	as the latter does not accept them.
   21526 
   21527 2016-05-22  Jeff Mahoney  <jeffm (a] suse.com>
   21528 
   21529 	tests: define PRI__[dux]64 macros to print __s64 and __u64 values.
   21530 	Rather than cast every __u64 or __s64 before printing,
   21531 	define printing helpers for those types directly.
   21532 
   21533 	This complements commit 1f3482bedad505a41caf1d61b3a4e7e09a2f4330.
   21534 
   21535 	* tests/tests.h (PRI__d64, PRI__u64, PRI__x64): New macros.
   21536 
   21537 2016-05-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   21538 
   21539 	tests: remove manual creation of memory mapping holes.
   21540 	We used to call tail_alloc(1) to create memory mapping holes around
   21541 	regular tail_alloc allocations.  This is no longer needed since regular
   21542 	tail_alloc allocations create additional memory mapping holes.
   21543 
   21544 	* tests/clock_adjtime.c (main): Remove creation of memory mapping holes
   21545 	using tail_alloc(1).
   21546 	* tests/futimesat.c (main): Likewise.
   21547 	* tests/get_mempolicy.c (print_nodes, main): Likewise.
   21548 	* tests/getgroups.c (main): Likewise.
   21549 	* tests/getresugid.c (main): Likewise.
   21550 	* tests/ioctl_uffdio.c (main): Likewise.
   21551 	* tests/ioctl_v4l2.c (main): Likewise.
   21552 	* tests/move_pages.c (main): Likewise.
   21553 	* tests/net-icmp_filter.c (main): Likewise.
   21554 	* tests/ptrace.c (test_peeksiginfo, main): Likewise.
   21555 	* tests/pwritev.c (main): Likewise.
   21556 	* tests/set_mempolicy.c (print_nodes): Likewise.
   21557 	* tests/setgroups.c (main): Likewise.
   21558 	* tests/umovestr3.c (main): Likewise.
   21559 	* tests/utimes.c (main): Likewise.
   21560 	* tests/xattr.c (main): Likewise.
   21561 
   21562 2016-05-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   21563 
   21564 	tests: make tail_alloc create additional memory mapping holes.
   21565 	* tests/tail_alloc.c (tail_alloc): Create additional memory mapping
   21566 	holes before and after the allocated memory.
   21567 
   21568 2016-05-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   21569 
   21570 	mpers: add support of conditionally compiled printers.
   21571 	We used to declare and define all printers marked with
   21572 	MPERS_PRINTER_DECL, including ifdef'ed ones.  That approach left us
   21573 	no way to conditionally compile mpersified printers, which was not
   21574 	a problem until btrfs ioctls appeared on the horizon.
   21575 
   21576 	With this change, those mpersified printers that are not going
   21577 	to be compiled are also won't be declared and won't be added to
   21578 	struct_printers.
   21579 
   21580 	This is implemented by filtering all source files containing
   21581 	MPERS_PRINTER_DECL markers through CPP.  As a nice side effect, this
   21582 	also lifts an ugly requirement of writing all MPERS_PRINTER_DECL
   21583 	declarations in a single line.
   21584 
   21585 	* README-mpers: Update description of MPERS_PRINTER_DECL syntax.
   21586 	* defs.h [IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into
   21587 	a recursive variadic macro.
   21588 	[!IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into a variadic macro.
   21589 	All callers changed.
   21590 	* Makefile.am (mpers_preproc_files, mpers_printer_decl_pattern):
   21591 	New variables.
   21592 	(CLEANFILES): Add $(mpers_preproc_files).
   21593 	(%.c.mpers.i): New rule.
   21594 	(printers.h, %_printer_decls.h, %_printer_defs.h): Use
   21595 	mpers_preproc_files instead of srcdir_mpers_source_files,
   21596 	use mpers_printer_decl_pattern.
   21597 	* .gitignore: Add /*.mpers.i.
   21598 
   21599 2016-05-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   21600 
   21601 	Remove redundant declaration of v4l2_ioctl.
   21602 	There is no need to declare mpers printers in defs.h because
   21603 	they are already declared in printers.h or native_printer_decls.h.
   21604 
   21605 	This complements commit 1e56814f77594a22a74ddee629639eb0bb7edf3a.
   21606 
   21607 	* defs.h (v4l2_ioctl): Remove.
   21608 
   21609 2016-05-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   21610 
   21611 	Fix one more code pattern that might break gcc strict aliasing rules.
   21612 	* socketutils.c (receive_responses): Turn static buffer into a union
   21613 	to avoid breaking of gcc strict aliasing rules.
   21614 	* tests/netlink_inet_diag.c (check_responses): Likewise.
   21615 	* tests/netlink_netlink_diag.c (check_responses): Likewise.
   21616 	* tests/netlink_unix_diag.c (check_responses): Likewise.
   21617 
   21618 2016-05-21  Fabien Siron  <fabien.siron (a] epita.fr>
   21619 
   21620 	tests: add check for netlink protocol decoding with -yy option.
   21621 	* tests/netlink_netlink_diag.c: New file.
   21622 	* tests/net-yy-netlink.c: New file.
   21623 	* tests/net-yy-netlink.test: New test.
   21624 	* tests/.gitignore: Add net-yy-netlink and netlink_netlink_diag
   21625 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21626 	(TESTS): Add net-yy-netlink.test.
   21627 
   21628 2016-05-18  Fabien Siron  <fabien.siron (a] epita.fr>
   21629 
   21630 	Add netlink domain sockets support to socketutils.
   21631 	* linux/netlink_diag.h: New file.
   21632 	* Makefile.am (EXTRA_DIST): Add it.
   21633 	* socketutils.c: Include it and "xlat/netlink_protocols.h".
   21634 	(netlink_send_query, netlink_parse_response, netlink_print): New
   21635 	functions.
   21636 	(print_sockaddr_by_inode): Hook up netlink_print.
   21637 
   21638 2016-05-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   21639 
   21640 	tests/pread64-pwrite64.c: robustify against os specific issues.
   21641 	Do not assume that pwrite64 syscall fails when only part of the
   21642 	specified memory buffer is accessible.  With some kernels, one
   21643 	accessible byte at the end of page is enough for pwrite64 syscall
   21644 	to return 1.
   21645 
   21646 	* tests/pread64-pwrite64.c (main): Tweak the test that can lead
   21647 	to a partial write.
   21648 
   21649 2016-05-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   21650 
   21651 	tests/read-write.c: robustify against os specific issues.
   21652 	Do not assume that write syscall fails when only part of the specified
   21653 	memory buffer is accessible.  With some kernels, one accessible byte
   21654 	at the end of page is enough for write syscall to return 1.
   21655 
   21656 	* tests/read-write.c (main): Tweak the test that can lead to a partial
   21657 	write.
   21658 
   21659 2016-05-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   21660 
   21661 	umovestr3.test: extend test coverage.
   21662 	* tests/umovestr3.c: Include <sys/param.h>.
   21663 	(main): Test with each number between PATH_MAX-1 and 0.
   21664 
   21665 	tests/timer_create.c: robustify against os specific issues.
   21666 	* tests/timer_create.c (main): Do not assume any specific error code
   21667 	returned by timer_create, print whatever it is.
   21668 
   21669 	Fix some compilation warnings on older systems.
   21670 	* print_statfs.c (print_statfs_flags): Define only
   21671 	for [HAVE_STRUCT_STATFS_F_FLAGS || HAVE_STRUCT_STATFS64_F_FLAGS].
   21672 	* tests/inet-cmsg.c (print_origdstaddr): Define only
   21673 	for [IP_ORIGDSTADDR].
   21674 
   21675 	Update generic ioctl entries from linux 4.6.
   21676 	* linux/64/ioctls_inc.h: Update from linux v4.6 using ioctls_gen.sh.
   21677 	* linux/32/ioctls_inc_align32.h: Likewise.
   21678 	* linux/32/ioctls_inc_align64.h: Likewise.
   21679 	* NEWS: Mention this.
   21680 
   21681 	maint: update for linux 4.6.
   21682 	* maint/ioctls_sym.sh: Update workarounds for linux/kvm.h.
   21683 
   21684 	Update SOL_* constants.
   21685 	* xlat/socketlayers.in: Add SOL_KCM.
   21686 
   21687 	Update MSG_* constants.
   21688 	* xlat/msg_flags.in: Add MSG_BATCH.
   21689 
   21690 	Update AF_* constants.
   21691 	* xlat/addrfams.in: Add AF_KCM.
   21692 
   21693 2016-05-17  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   21694 
   21695 	tests: add brk.test.
   21696 	* tests/brk.c: New file.
   21697 	* tests/brk.test: New test.
   21698 	* tests/.gitignore: Add brk.
   21699 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21700 	(DECODER_TESTS): Add brk.test.
   21701 
   21702 2016-05-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   21703 
   21704 	Fix printing of invalid arguments of term ioctls.
   21705 	* term.c (term_ioctl): Print arguments of TCXONC and TCFLSH ioctls
   21706 	using printxval_long.
   21707 
   21708 	mips: fix printing of invalid operations argument of sysmips syscall.
   21709 	* sysmips.c (SYS_FUNC(sysmips)): Print 1st argument of syscall using
   21710 	printxval_long.
   21711 
   21712 	bfin: fix printing of invalid flags argument of sram_alloc syscall.
   21713 	* sram_alloc.c (SYS_FUNC(sram_alloc)): Print 2nd argument using
   21714 	printflags_long.
   21715 
   21716 2016-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   21717 
   21718 	Fix printing of invalid arguments of prctl syscall.
   21719 	* prctl.c (SYS_FUNC(prctl)): Print 2nd syscall argument
   21720 	of PR_CAPBSET_DROP, PR_CAPBSET_READ, PR_CAP_AMBIENT, PR_MCE_KILL,
   21721 	and PR_SET_SECCOMP using printxval_long.
   21722 	Print 2nd syscall argument of PR_SET_SECUREBITS using printflags_long.
   21723 	Print 3rd syscall argument of PR_CAP_AMBIENT and PR_MCE_KILL using
   21724 	printxval_long.
   21725 	* tests/prctl-seccomp-strict.c (main): Update.
   21726 
   21727 	Fix printing of invalid flags argument of perf_event_open syscall.
   21728 	* numa.c (SYS_FUNC(perf_event_open)): Print 5th argument of syscall
   21729 	using printflags_long.
   21730 
   21731 	or1k: fix printing of invalid 1st argument of or1k_atomic syscall.
   21732 	* or1k_atomic.c (SYS_FUNC(or1k_atomic)): Print 1st argument using
   21733 	printxval_long.
   21734 
   21735 	Fix printing of invalid flags argument of get_mempolicy syscall.
   21736 	* numa.c (SYS_FUNC(get_mempolicy)): Print 5th argument of syscall
   21737 	using printxval_long.
   21738 
   21739 	Fix printing of invalid mode argument of mbind syscall.
   21740 	* numa.c (SYS_FUNC(mbind)): Print 3rd argument of syscall
   21741 	using printxval_long.
   21742 	* tests/mbind.c (main): Update.
   21743 
   21744 	Fix printing of invalid argument of MTDFILEMODE ioctl.
   21745 	* mtd.c (mtd_ioctl): Print 3rd argument of MTDFILEMODE ioctl
   21746 	using printflags_long.
   21747 
   21748 	Fix printing of invalid flags argument of mount syscall.
   21749 	* mount.c (SYS_FUNC(mount)): Print 1st argument using printflags_long.
   21750 
   21751 	Fix printing of invalid arguments of memory mapping related syscalls.
   21752 	* mem.c (print_mmap): Print 3rd and 4th arguments of syscall
   21753 	using printflags_long.
   21754 	(SYS_FUNC(mprotect)): Print 3rd argument of syscall using
   21755 	printflags_long.
   21756 	(SYS_FUNC(mremap)): Print 4th argument of syscall using printflags_long.
   21757 	(SYS_FUNC(remap_file_pages)): Print 3rd and 4th arguments of syscall
   21758 	using printflags_long.
   21759 	* tests/remap_file_pages.c (main): Update.
   21760 
   21761 	Fix printing of invalid flags argument of kexec_load and kexec_file_load
   21762 	* kexec.c (SYS_FUNC(kexec_load), SYS_FUNC(kexec_file_load)): Print
   21763 	flags argument using printflags_long.
   21764 
   21765 	Fix printing of invalid 3rd argument of fcntl/fcntl64 syscall.
   21766 	* fcntl.c (print_fcntl): Print 3rd argument of F_NOTIFY, F_SETLEASE, and
   21767 	F_ADD_SEALS operations using printflags_long.
   21768 
   21769 	Fix printing of invalid flags argument of unshare syscall.
   21770 	* clone.c (SYS_FUNC(unshare)): Print 1st argument using printflags_long.
   21771 
   21772 	Introduce printflags_long and printxval_long.
   21773 	* defs.h (printflags_long, printxval_long): New static inline functions.
   21774 
   21775 	Fix printing of invalid struct xfs_dqblk.d_flags.
   21776 	* quota.c (decode_cmd_data): Explicitly cast struct xfs_dqblk.d_flags
   21777 	to uint8_t to avoid potential sign-extension bug when printing
   21778 	invalid struct xfs_dqblk.d_flags.
   21779 
   21780 	Fix printing of invalid struct ubi_mkvol_req.vol_type.
   21781 	* mtd.c (ubi_ioctl): Explicitly cast struct ubi_mkvol_req.vol_type
   21782 	to unsigned short to avoid potential sign-extension bug when printing
   21783 	invalid struct ubi_mkvol_req.vol_type.
   21784 
   21785 2016-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   21786 
   21787 	Fix decoding of prctl/arch_prctl operation argument.
   21788 	Consistently treat operation argument of prctl/arch_prctl syscalls
   21789 	as int to match the kernel behaviour.
   21790 
   21791 	* prctl.c (SYS_FUNC(prctl), SYS_FUNC(arch_prctl)): Assign 1st argument
   21792 	of syscalls to a variable of type unsigned int and use it in all
   21793 	subsequent checks and lookups.
   21794 
   21795 2016-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   21796 
   21797 	Fix printing of struct sched_attr.sched_flags.
   21798 	* sched.c (print_sched_attr): Print sched_flags using printflags64.
   21799 
   21800 	Fix printing of struct statfs.f_flags.
   21801 	* print_statfs.c (print_statfs_flags): Print flags using printflags64.
   21802 
   21803 	Fix printing of invalid struct ifreq.ifr_flags.
   21804 	* sock.c (print_ifreq): Explicitly cast struct ifreq.ifr_flags
   21805 	to unsigned short to avoid potential sign-extension bug when printing
   21806 	invalid struct ifreq.ifr_flags.
   21807 
   21808 	Fix printing of invalid struct pollfd.events.
   21809 	* poll.c (print_pollfd): Explicitly cast struct pollfd.events
   21810 	to unsigned short to avoid potential sign-extension bug when printing
   21811 	invalid struct pollfd.events.
   21812 
   21813 	Fix printing of invalid struct sembuf.sem_flg.
   21814 	* ipc_sem.c (print_sembuf): Explicitly cast struct sembuf.sem_flg
   21815 	to unsigned short to avoid potential sign-extension bug when printing
   21816 	invalid struct sembuf.sem_flg.
   21817 
   21818 	Fix printing of invalid l_type and l_whence in fcntl/fcntl64 syscalls.
   21819 	* fcntl.c (print_struct_flock64): Explicitly cast l_type and l_whence
   21820 	fields to unsigned short to avoid potential sign-extension bug when
   21821 	printing invalid l_type or l_whence fields.
   21822 
   21823 	Fix printing of fanotify_mark mask argument.
   21824 	* fanotify.c (SYS_FUNC(fanotify_mark)): Print mask using printflags64.
   21825 
   21826 2016-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   21827 
   21828 	Fix decoding of epoll_ctl operation argument.
   21829 	Consistently treat operation argument of epoll_ctl syscall as int
   21830 	to match the kernel behaviour.
   21831 
   21832 	* epoll.c (SYS_FUNC(epoll_ctl)): Assign 2nd argument of syscall
   21833 	to a variable of type unsigned int and use it in all subsequent
   21834 	checks and lookups.
   21835 	* tests/epoll_ctl.c (invoke_syscall): New function.
   21836 	(main): Use it.
   21837 
   21838 2016-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   21839 
   21840 	Fix printing of invalid d_type in getdents syscall.
   21841 	* dirent.c (SYS_FUNC(getdents)): Treat d_type as unsigned char to avoid
   21842 	potential sign-extension bug when printing invalid d_type.
   21843 
   21844 	bfin: fix decoding of cacheflush syscall.
   21845 	* cacheflush.c (SYS_FUNC(cacheflush)): Print 2nd argument
   21846 	using %lu format.  Print 3rd argument as flags.
   21847 
   21848 	Fix decoding of BPF_MAP_UPDATE_ELEM flags.
   21849 	* bpf.c (bpf_map_update_elem): Print attr.flags using printxval64.
   21850 
   21851 2016-05-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   21852 
   21853 	Fix decoding of fcntl/fcntl64 operation argument.
   21854 	Consistently treat operation argument of fcntl/fcntl64 syscalls as int
   21855 	to match the kernel behaviour.
   21856 
   21857 	* fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Assign
   21858 	2nd argument of syscall to a variable of type unsigned int
   21859 	and use it in all subsequent checks and lookups.
   21860 	* tests/struct_flock.c (invoke_test_syscall): New function.
   21861 	(test_flock_einval, test_flock): Use it.
   21862 	* tests/fcntl.c (test_flock64_einval): Use it.
   21863 	* tests/fcntl64.c (test_flock64_einval, test_flock64): Use it.
   21864 
   21865 2016-05-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   21866 
   21867 	Rename sprintflags64 to sprintflags.
   21868 	* defs.h (sprintflags): Remove.
   21869 	(sprintflags64): Rename to sprintflags.
   21870 	* util.c (sprintflags64): Rename to sprintflags.
   21871 
   21872 	Prepare for transition from sprintflags64 to sprintflags.
   21873 	* fcntl.c (print_fcntl): Cast 3rd argument of sprintflags
   21874 	to unsigned long.
   21875 	* membarrier.c (SYS_FUNC(membarrier)): Likewise.
   21876 	* prctl.c (SYS_FUNC(prctl)): Likewise.
   21877 	* poll.c (decode_poll_exiting): Cast 3rd argument of sprintflags
   21878 	to unsigned short.
   21879 
   21880 2016-05-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   21881 
   21882 	Rename xlookup64 to xlookup.
   21883 	* defs.h (xlookup): Remove.
   21884 	(xlookup64): Rename to xlookup.
   21885 	* util.c (xlookup64): Rename to xlookup.
   21886 
   21887 	Prepare for transition from xlookup64 to xlookup.
   21888 	* fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)):
   21889 	Cast 2nd argument of xlookup to unsigned long.
   21890 	* prctl.c (SYS_FUNC(prctl)): Likewise.
   21891 	* sched.c (SYS_FUNC(sched_getscheduler)): Likewise.
   21892 	* time.c (do_adjtimex): Likewise.
   21893 	* ioprio.c (sprint_ioprio): Change type of the argument
   21894 	and local variables from int to unsigned int.
   21895 	* keyctl.c (print_keyring_serial_number): Cast 2nd argument
   21896 	of xlookup to unsigned int.
   21897 	* net.c (tprint_sock_type): Change type of the argument to unsigned int.
   21898 	* printmode.c (sprintmode): Likewise.
   21899 	* printsiginfo.c (printsigval):  Change type of si_code argument
   21900 	to unsigned int.
   21901 
   21902 2016-05-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   21903 
   21904 	v4l2: fix build with old kernel headers.
   21905 	Prior to v2.6.25-rc3, <linux/videodev2.h> didn't include all
   21906 	required headers, resulting to omission of V4L2_* constants.
   21907 
   21908 	This issue doesn't arise in v4l2.c and tests/ioctl_v4l2.c files
   21909 	because they already include all necessary headers themselves.
   21910 
   21911 	* configure.ac (AC_CHECK_DECLS): Include <sys/time.h>, <linux/ioctl.h>,
   21912 	and <linux/types.h> before <linux/videodev2.h>.
   21913 
   21914 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21915 
   21916 	configure.ac: do not check for sys/ioctl.h and ioctls.h.
   21917 	Since sys/ioctl.h is included unconditionally when needed
   21918 	and ioctls.h doesn't exist, these checks are redundant.
   21919 
   21920 	* configure.ac (AC_CHECK_HEADERS): Remove ioctls.h and sys/ioctl.h.
   21921 
   21922 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21923 
   21924 	sock.c: include <linux/ioctl.h> instead of <sys/ioctl.h> or <ioctls.h>
   21925 	Include <linux/ioctl.h> for <linux/sockios.h> on alpha, sh, and sh64
   21926 	architectures because their <asm/sockios.h> use _IOR and _IOW macros
   21927 	but don't include anything that would define these macros.
   21928 
   21929 	Being a wrapper around <linux/ioctl.h>, <sys/ioctl.h> brings
   21930 	no benefits in this case.  <ioctls.h> simply doesn't exist.
   21931 
   21932 	* sock.c [ALPHA || SH || SH64]: Include <linux/ioctl.h>
   21933 	instead of <sys/ioctl.h> or <ioctls.h>.
   21934 
   21935 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21936 
   21937 	v4l2: include <linux/ioctl.h> instead of <sys/ioctl.h>
   21938 	Being a wrapper around <linux/ioctl.h>, <sys/ioctl.h> brings
   21939 	no benefits for parser of VIDIOC_* ioctls.
   21940 
   21941 	* v4l2.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
   21942 
   21943 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21944 
   21945 	printsiginfo: remove "verbose" argument.
   21946 	Remove erroneous use of verbose(tcp) as a printing limit
   21947 	for already fetched members of siginfo_t structure.
   21948 
   21949 	* printsiginfo.h (printsiginfo): Remove boolean argument.
   21950 	* printsiginfo.c (printsigval): Remove boolean argument, print
   21951 	si_int and si_ptr members unconditionally.  All callers changed.
   21952 	(print_si_info): Remove boolean argument, print si_utime and si_stime
   21953 	members unconditionally.  All callers changed.
   21954 	(printsiginfo): Remove boolean argument.  All callers changed.
   21955 
   21956 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21957 
   21958 	tests/ptrace.c: tweak magic constants to make the test more reliable.
   21959 	* tests/ptrace.c (main): Change bad_request and bad_data to make they
   21960 	lower 32-bit parts closer to -1U.
   21961 
   21962 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21963 
   21964 	tests/ioctl_v4l2.c: fix build on older systems.
   21965 	Fix build on systems without HAVE_DECL_V4L2_CTRL_TYPE_STRING or
   21966 	V4L2_CTRL_CLASS_CAMERA.
   21967 
   21968 	* tests/ioctl_v4l2.c (main) [VIDIOC_S_EXT_CTRLS]: Disable part of the
   21969 	test if [!HAVE_DECL_V4L2_CTRL_TYPE_STRING].
   21970 	Replace V4L2_CTRL_CLASS_CAMERA with V4L2_CTRL_CLASS_USER.
   21971 
   21972 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21973 
   21974 	Do not use htole32 function.
   21975 	htole32 function is not portable enough.
   21976 
   21977 	* v4l2.c (print_pixelformat): Rewrite initialization of pixel format
   21978 	union without using of htole32.
   21979 	* tests/ioctl_v4l2.c (main): Likewise.
   21980 
   21981 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21982 
   21983 	tests/ioctl_v4l2.c: fix typo.
   21984 	* tests/ioctl_v4l2.c (main)
   21985 	[!HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE]: Fix typo in expected
   21986 	output string.
   21987 
   21988 	tests: check decoding of ptrace syscall.
   21989 	* tests/ptrace.c: New file.
   21990 	* tests/ptrace.test: New test.
   21991 	* tests/.gitignore: Add ptrace.
   21992 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   21993 	(DECODER_TESTS): Add ptrace.
   21994 
   21995 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   21996 
   21997 	ptrace: decode data argument of PTRACE_PEEKSIGINFO request.
   21998 	The data argument of PTRACE_PEEKSIGINFO request is a pointer
   21999 	to siginfo_t array.
   22000 
   22001 	* printsiginfo.c (print_siginfo_t): New function.
   22002 	(print_siginfo_array): New mpers printer.
   22003 	* process.c (SYS_FUNC(ptrace)): Print data argument of
   22004 	PTRACE_PEEKSIGINFO request using print_siginfo_array.
   22005 
   22006 2016-05-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   22007 
   22008 	ptrace: decode data argument of PTRACE_SECCOMP_GET_FILTER request.
   22009 	* process.c (SYS_FUNC(ptrace)): Print data argument of
   22010 	PTRACE_SECCOMP_GET_FILTER request on exiting using print_seccomp_fprog.
   22011 
   22012 	ptrace: decode argument of PTRACE_GETEVENTMSG request.
   22013 	* process.c (SYS_FUNC(ptrace)): Print data argument of
   22014 	PTRACE_GETEVENTMSG request on exiting using printnum_ulong.
   22015 
   22016 	ptrace: decode arguments of PTRACE_[GS]ETSIGMASK requests.
   22017 	* process.c (SYS_FUNC(ptrace)): Print arguments of PTRACE_GETSIGMASK
   22018 	and PTRACE_SETSIGMASK requests using print_sigset_addr_len.
   22019 
   22020 	ptrace: return RVAL_DECODED for requests decoded on entering.
   22021 	* process.c (SYS_FUNC(ptrace)): Return RVAL_DECODED on entering for all
   22022 	ptrace requests except those that are partially decoded in exiting,
   22023 
   22024 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22025 
   22026 	ptrace: print PTRACE_O_* flags using printflags64.
   22027 	As flags argument has a long integer type, print it using printflags64
   22028 	because printflags takes unsigned int argument.
   22029 
   22030 	* process.c (SYS_FUNC(ptrace)): Print PTRACE_O_* flags
   22031 	using printflags64.
   22032 
   22033 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22034 
   22035 	ptrace: print data argument of PTRACE_SEIZE et al requests as flags.
   22036 	* process.c (SYS_FUNC(ptrace)): Print data argument of
   22037 	PTRACE_SEIZE and PTRACE_OLDSETOPTIONS as PTRACE_O_* flags.
   22038 
   22039 	ptrace: print data argument of PTRACE_SINGLEBLOCK et al requests as signo
   22040 	* process.c (SYS_FUNC(ptrace)): Print data argument of
   22041 	PTRACE_SINGLEBLOCK, PTRACE_SYSEMU, and PTRACE_SYSEMU_SINGLESTEP requests
   22042 	as a signal number.
   22043 
   22044 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22045 
   22046 	ptrace: decode addr argument of PTRACE_PEEKSIGINFO request.
   22047 	The addr argument of PTRACE_PEEKSIGINFO request is a pointer to
   22048 	a struct ptrace_peeksiginfo_args.
   22049 
   22050 	* process.c: Include "xlat/ptrace_peeksiginfo_flags.h".
   22051 	(SYS_FUNC(ptrace)): Print addr argument of PTRACE_PEEKSIGINFO request
   22052 	as a struct ptrace_peeksiginfo_args.
   22053 	* xlat/ptrace_peeksiginfo_flags.in: New file.
   22054 
   22055 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22056 
   22057 	ptrace: fix printing addr argument of PTRACE_GETSIGMASK et al requests.
   22058 	For PTRACE_GETSIGMASK and PTRACE_SETSIGMASK requests, addr argument
   22059 	contains the size of the buffer pointed to by data argument.
   22060 	For PTRACE_SECCOMP_GET_FILTER request, addr argument contains
   22061 	an offset counter.
   22062 
   22063 	* process.c (SYS_FUNC(ptrace)): Print addr argument of
   22064 	PTRACE_GETSIGMASK, PTRACE_SETSIGMASK, and PTRACE_SECCOMP_GET_FILTER
   22065 	requests using %lu format.
   22066 
   22067 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22068 
   22069 	ptrace: do not print data argument of some requests on sparc.
   22070 	On sparc, kernel ignores data argument of PTRACE_GETREGS,
   22071 	PTRACE_SETREGS, PTRACE_GETFPREGS, and PTRACE_SETFPREGS requests.
   22072 
   22073 	* process.c (SYS_FUNC(ptrace)) [SPARC || SPARC64]: Return RVAL_DECODED
   22074 	right after printing addr argument if request is one of PTRACE_GETREGS,
   22075 	PTRACE_SETREGS, PTRACE_GETFPREGS, or PTRACE_SETFPREGS.
   22076 
   22077 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22078 
   22079 	ptrace: do not print addr and data arguments of PTRACE_ATTACH-like requests
   22080 	As kernel ignores addr and data arguments of PTRACE_ATTACH,
   22081 	PTRACE_INTERRUPT, PTRACE_KILL, and PTRACE_LISTEN request,
   22082 	we do not print them either.
   22083 
   22084 	* process.c (SYS_FUNC(ptrace)): After printing pid argument, return
   22085 	RVAL_DECODED if request is one of PTRACE_ATTACH, PTRACE_INTERRUPT,
   22086 	PTRACE_KILL, or PTRACE_LISTEN.
   22087 
   22088 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22089 
   22090 	ptrace: do not print arguments of PTRACE_TRACEME request.
   22091 	As kernel ignores arguments of PTRACE_TRACEME request,
   22092 	we do not print them either.
   22093 
   22094 	* process.c (SYS_FUNC(ptrace)): If request is PTRACE_TRACEME,
   22095 	return early with RVAL_DECODED.
   22096 
   22097 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22098 
   22099 	ptrace: print request using printxval64.
   22100 	As first argument of ptrace syscall has a long integer type, print
   22101 	it using printxval64 because printxval takes unsigned int argument.
   22102 
   22103 	* process.c (SYS_FUNC(ptrace)): Change type of "request" variable
   22104 	from "long" to "unsigned long", print it using printxval64 instead
   22105 	of printxval.
   22106 
   22107 2016-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   22108 
   22109 	Do not sign-extend siginfo_t.si_syscall.
   22110 	* printsiginfo.c (print_si_info): Explicitly cast si_syscall member
   22111 	of siginfo_t that has type "int" to "unsigned int", to avoid sign
   22112 	extension when passed to syscall_name function.
   22113 
   22114 	Export print_seccomp_fprog for further use in parser of ptrace syscall.
   22115 	* defs.h (print_seccomp_fprog): New prototype.
   22116 	* seccomp.c (print_seccomp_fprog): Remove "static" keyword.
   22117 	Move printing of struct seccomp_fprog fields ...
   22118 	(print_seccomp_filter): ... here.
   22119 
   22120 2016-05-11  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22121 
   22122 	tests: add munlockall.test.
   22123 	* tests/munlockall.c: New file.
   22124 	* tests/munlockall.test: New test.
   22125 	* tests/.gitignore: Add munlockall.
   22126 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22127 	(DECODER_TESTS): Add munlockall.test.
   22128 
   22129 	tests: add link.test.
   22130 	* tests/link.c: New file.
   22131 	* tests/link.test: New test.
   22132 	* tests/.gitignore: Add link.
   22133 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22134 	(DECODER_TESTS): Add link.test.
   22135 
   22136 2016-05-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   22137 
   22138 	tests: check decoding and dumping of preadv2 and pwritev2 syscalls.
   22139 	* tests/preadv2-pwritev2.c: New file.
   22140 	* tests/preadv2-pwritev2.test: New test.
   22141 	* tests/.gitignore: Add preadv2-pwritev2.
   22142 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22143 	(DECODER_TESTS): Add preadv2-pwritev2.
   22144 
   22145 	Implement decoding of preadv2 and pwritev2 syscalls.
   22146 	* io.c: Include "xlat/rwf_flags.h".
   22147 	(do_preadv, do_pwritev, SYS_FUNC(preadv2), SYS_FUNC(pwritev2)):
   22148 	New functions.
   22149 	(SYS_FUNC(preadv)): Use do_preadv.
   22150 	(SYS_FUNC(pwritev)): Use do_pwritev.
   22151 	* linux/32/syscallent.h (preadv2, pwritev2): New entries.
   22152 	* linux/64/syscallent.h: Likewise.
   22153 	* linux/arm/syscallent.h: Likewise.
   22154 	* linux/hppa/syscallent.h: Likewise.
   22155 	* linux/i386/syscallent.h: Likewise.
   22156 	* linux/ia64/syscallent.h: Likewise.
   22157 	* linux/m68k/syscallent.h: Likewise.
   22158 	* linux/mips/syscallent-n32.h: Likewise.
   22159 	* linux/mips/syscallent-n64.h: Likewise.
   22160 	* linux/mips/syscallent-o32.h: Likewise.
   22161 	* linux/powerpc/syscallent.h: Likewise.
   22162 	* linux/powerpc64/syscallent.h: Likewise.
   22163 	* linux/s390/syscallent.h: Likewise.
   22164 	* linux/s390x/syscallent.h: Likewise.
   22165 	* linux/sparc/syscallent.h: Likewise.
   22166 	* linux/sparc64/syscallent.h: Likewise.
   22167 	* linux/x32/syscallent.h: Likewise.
   22168 	* linux/x86_64/syscallent.h: Likewise.
   22169 	* syscall.c (dumpio): Handle SEN_preadv2 and SEN_pwritev2.
   22170 	* xlat/rwf_flags.in: New file.
   22171 	* NEWS: Mention parsers of new syscalls.
   22172 
   22173 2016-05-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   22174 
   22175 	tests: extend test coverage of xattr family syscalls.
   22176 	* tests/xattr.c: Check decoding of all xattr family syscalls.
   22177 	* tests/xattr.test: Use run_strace_match_diff.
   22178 	* tests/xattr.expected: Remove.
   22179 	* tests/Makefile.am (EXTRA_DIST): Remove it.
   22180 
   22181 	tests: add print_quoted_memory function to libtests.
   22182 	* tests/print_quoted_string.c (print_quoted_memory): New function.
   22183 	(print_quoted_string): Use it.
   22184 	* tests/tests.h (print_quoted_memory): New prototype.
   22185 
   22186 	Fix corner cases of xattr family syscalls decoding.
   22187 	* xattr.c (print_xattr_val): Do not take insize into account, print it
   22188 	as unsigned long.
   22189 	Do not decode xattr values of size larger than XATTR_SIZE_MAX.
   22190 	Use static buffer for fetching xattr values.
   22191 	(print_xattr_list): Do not decode string when size is zero.
   22192 
   22193 2016-05-10  Dr. David Alan Gilbert  <dgilbert (a] redhat.com>
   22194 
   22195 	userfaultfd: Add ioctl tests.
   22196 	* tests/ioctl_uffdio.c: New file.
   22197 	* tests/ioctl_uffdio.test: New test.
   22198 	* tests/.gitignore: Add ioctl_uffdio.
   22199 	* tests/Makefile.am (check_PROGRAMS):  Likewise.
   22200 	(DECODER_TESTS): Add ioctl_uffdio.test.
   22201 
   22202 2016-05-10  Dr. David Alan Gilbert  <dgilbert (a] redhat.com>
   22203 
   22204 	Decode UFFDIO_* ioctls.
   22205 	Decode the ioctls associated with the userfaultfd fd.
   22206 	Note that they tend to read from and also return result in it's data
   22207 	structure.
   22208 
   22209 	* configure.ac (AC_CHECK_HEADERS): Add linux/userfaultfd.h.
   22210 	* userfaultfd.c [HAVE_LINUX_USERFAULTFD_H]: Add ioctl decoder.
   22211 	* defs.h (uffdio_ioctl): New prototype.
   22212 	* ioctl.c (ioctl_decode) [HAVE_LINUX_USERFAULTFD_H]: Wire in
   22213 	uffdio_ioctl.
   22214 	* xlat/uffd_*.in: Create flag xlat for all the IOCTLs.
   22215 
   22216 2016-05-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   22217 
   22218 	Update AX_CODE_COVERAGE.
   22219 	* m4/ax_code_coverage.m4: Update to serial 16.
   22220 	* Makefile.am (CODE_COVERAGE_LCOV_OPTIONS): Remove.
   22221 	(CODE_COVERAGE_GENHTML_OPTIONS): Update, add prefix.
   22222 	(CODE_COVERAGE_BRANCH_COVERAGE): Set to 1.
   22223 
   22224 	strace-ff.test: fix race condition.
   22225 	* tests/strace-ff.test: Wait for completion of PR_SET_PTRACER command.
   22226 
   22227 	tests/epoll_pwait.c: fix for x32.
   22228 	* tests/epoll_pwait.c (main): Explicitly cast last syscall argument
   22229 	to kernel_ulong_t.
   22230 
   22231 	strace-S.test: check "-S name"
   22232 	* tests/strace-S.test: Add a check for "-c -S name" output.
   22233 
   22234 	Fix NULL dereference in "-S name" when syscall table has holes.
   22235 	* count.c (syscall_cmp): Do not pass NULL to strcmp.
   22236 
   22237 	strace-S.test: cleanup.
   22238 	* tests/strace-S.test: Rewrite using sed.
   22239 
   22240 2016-05-09  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22241 
   22242 	tests: add strace-S.test.
   22243 	* tests/strace-S.test: New test.
   22244 	* tests/Makefile.am (MISC_TESTS): Add it.
   22245 
   22246 2016-05-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   22247 
   22248 	strace-ff.test: check that -ff does not create unexpected output files.
   22249 	* tests/strace-ff.expected: New file.
   22250 	* tests/Makefile.am (EXTRA_DIST): Add it.
   22251 	* tests/strace-ff.test: Use it.  Check that no other output files
   22252 	have been created.
   22253 
   22254 2016-05-09  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22255 
   22256 	tests: add strace-ff.test.
   22257 	* tests/strace-ff.test: New test.
   22258 	* tests/Makefile.am (MISC_TESTS): Add it.
   22259 
   22260 2016-05-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   22261 
   22262 	strace-V.test: cleanup.
   22263 	* tests/strace-V.test: Move config.h parser to a function.
   22264 	Rename $OUT to $EXP, swap arguments passed to match_diff.
   22265 
   22266 2016-05-09  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22267 
   22268 	tests: add strace-V.test.
   22269 	* tests/strace-V.test: New test.
   22270 	* tests/Makefile.am (MISC_TESTS): Add it.
   22271 
   22272 2016-05-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   22273 
   22274 	tests: check decoding of epoll_pwait syscall.
   22275 	* tests/epoll_pwait.c: New file.
   22276 	* tests/epoll_pwait.test: New test.
   22277 	* tests/.gitignore: Add epoll_pwait.
   22278 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22279 	(DECODER_TESTS): Add epoll_pwait.test.
   22280 
   22281 2016-05-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   22282 
   22283 	Assume that sys/epoll.h exists.
   22284 	This header file was added in glibc-2.3.2,
   22285 	so it's safe to assume its availability.
   22286 
   22287 	* configure.ac (AC_CHECK_HEADERS): Remove sys/epoll.h.
   22288 	* epoll.c: Include <sys/epoll.h> unconditionally.
   22289 	Compile [HAVE_SYS_EPOLL_H] code unconditionally.
   22290 	* tests/epoll_ctl.c: Do not check for HAVE_SYS_EPOLL_H.
   22291 	* tests/epoll_wait.c: Likewise.
   22292 
   22293 2016-05-08  Fabien Siron  <fabien.siron (a] epita.fr>
   22294 
   22295 	Factorize send_query functions.
   22296 	* socketutils.c (send_query): New function.
   22297 	(inet_send_query, unix_send_query): Use it.
   22298 
   22299 2016-05-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   22300 
   22301 	tests: relax timings.
   22302 	Allow nanosleep(2) to spend 10% more time to make the test suite
   22303 	more reliable on slow systems.
   22304 
   22305 	* tests/count.test: Treat 1.1 seconds as valid output.
   22306 	* tests/strace-T.expected: Likewise.
   22307 	* tests/strace-r.expected: Likewise.
   22308 
   22309 2016-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   22310 
   22311 	tests/attach-f-p.c: increase timeouts.
   22312 	Increase timeouts to make the test more reliable on slow systems.
   22313 
   22314 	* tests/attach-f-p.c (its): Increase timeouts to 1, 2, and 3 seconds,
   22315 	respectively.
   22316 
   22317 2016-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   22318 
   22319 	Remove unused functions.
   22320 	* defs.h (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr):
   22321 	Remove.
   22322 	* util.c (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr):
   22323 	Likewise.
   22324 
   22325 	v4l2.c: use print_array function.
   22326 	* v4l2.c (print_v4l2_ext_control, umoven_or_printaddr_ignore_syserror):
   22327 	New functions.
   22328 	(print_v4l2_ext_controls): Use them via print_array.
   22329 
   22330 	uid.c: use print_array function.
   22331 	* uid.c (print_gid): New function.
   22332 	(print_groups): Use it via print_array.
   22333 
   22334 	seccomp.c: use print_array function.
   22335 	* seccomp.c (decode_filter, decode_seccomp_fprog): Remove.
   22336 	(print_bpf_filter): New function.
   22337 	(print_seccomp_fprog): Use it via print_array.
   22338 	* tests/seccomp-filter-v.c (main): Update.
   22339 
   22340 	scsi.c: use print_array function.
   22341 	* scsi.c (print_uchar): New function.
   22342 	(print_sg_io_buffer): Use it via print_array.
   22343 
   22344 	poll.c: use print_array function.
   22345 	* poll.c (print_pollfd): Change for use as print_array callback.
   22346 	(decode_poll_entering): Use print_array.
   22347 	* tests/poll.c: Update.
   22348 	* tests/poll.test: Update.
   22349 
   22350 	numa.c: use print_array function.
   22351 	* numa.c (print_node): New function.
   22352 	(print_nodemask): Use it via print_array.
   22353 	(print_page_array, print_int_array): Remove.
   22354 	(print_addr): New function.
   22355 	(print_status, print_int): Change for use as print_array callback.
   22356 	(SYS_FUNC(move_pages)): Use print_addr, print_int, and print_status
   22357 	via print_array.
   22358 	* tests/move_pages.c: Update.
   22359 	* tests/set_mempolicy.c: Likewise.
   22360 	* tests/set_mempolicy.test: Likewise.
   22361 
   22362 	mem.c: use print_array function.
   22363 	* mem.c [POWERPC] (print_protmap_entry): New function.
   22364 	[POWERPC] (SYS_FUNC(subpage_prot)): Use it via print_array.
   22365 
   22366 	kexec.c: use print_array function.
   22367 	* kexec.c (print_seg): Change for use as print_array callback.
   22368 	(print_kexec_segments): Use print_array.
   22369 
   22370 	ipc_sem.c: use print_array function.
   22371 	* ipc_sem.c (tprint_sembuf): Rename to print_sembuf, change signature
   22372 	for use as print_array callback.
   22373 	(tprint_sembuf_array): Use print_array.
   22374 
   22375 	io.c: use print_array function.
   22376 	* io.c (print_iovec_config): New structure.
   22377 	(print_iovec): New function.
   22378 	(tprint_iov_upto): Use print_array.
   22379 	* tests/preadv.c (main): Update.
   22380 	* tests/pwritev.c (print_iovec, main): Likewise.
   22381 
   22382 	epoll.c: use print_array function.
   22383 	* epoll.c (print_epoll_event): Change signature for use as print_array
   22384 	callback, all users updated.
   22385 	(print_epoll_event_array): Remove.
   22386 	(epoll_wait_common): Change to use print_array instead
   22387 	of print_epoll_event_array.
   22388 
   22389 	aio.c: use print_array function.
   22390 	* aio.c (print_iocbp): New function.
   22391 	(SYS_FUNC(io_submit)): Use it via print_array.  Use widen_to_long
   22392 	to process long int argument.
   22393 	(print_io_event): Change to print struct io_event fetched elsewhere.
   22394 	(SYS_FUNC(io_cancel)): Update use of print_io_event.
   22395 	(SYS_FUNC(io_getevents)): Use print_io_event via print_array.
   22396 	Use widen_to_long to print long int arguments.
   22397 	* tests/aio.c (main): Check decoding of io_submit with negative "nr".
   22398 
   22399 	Introduce print_array function for consistent decoding of arrays.
   22400 	* defs.h (print_array): New prototype.
   22401 	* util.c (print_array): New function.
   22402 
   22403 2016-05-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   22404 
   22405 	Fix corner cases of ICMP_FILTER decoding.
   22406 	* net.c (print_icmp_filter): Print icmp_filter for any positive length.
   22407 	* tests/net-icmp_filter.c: New file.
   22408 	* tests/net-icmp_filter.test: New test.
   22409 	* tests/.gitignore: Add net-icmp_filter.
   22410 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22411 	(DECODER_TESTS): Add net-icmp_filter.test.
   22412 
   22413 2016-05-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   22414 
   22415 	xlat: do not strip "1<<" prefix from xlat strings.
   22416 	* xlat/gen.sh (cond_xlat, gen_header): Do not strip "1<<" prefix
   22417 	from xlat strings to fix incorrect output.
   22418 	* tests/caps.awk: Update.
   22419 
   22420 	Reported-by: Dr. David Alan Gilbert <dgilbert (a] redhat.com>
   22421 
   22422 2016-05-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   22423 
   22424 	tests/xstatfsx.c: fix mips o32 support.
   22425 	mips o32 differs from all other 32-bit architectures by defining
   22426 	__kernel_fsid_t structure as an array of long ints.
   22427 
   22428 	* tests/xstatfsx.c (print_statfs): Explicitly cast elements
   22429 	of PRINT_F_FSID array to unsigned int.
   22430 
   22431 2016-05-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   22432 
   22433 	Mpersify VIDIOC_* ioctl parser.
   22434 	* v4l2.c: Mpersify arch-specific structures.
   22435 	(v4l2_ioctl): Mpersify.
   22436 	* tests/ioctl_v4l2.c: New file.
   22437 	* tests/ioctl_v4l2.test: New test.
   22438 	* tests/.gitignore: Add ioctl_v4l2.
   22439 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22440 	(DECODER_TESTS): Add ioctl_v4l2.test.
   22441 
   22442 2016-05-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   22443 
   22444 	Mpersify ioctl macros.
   22445 	As values of some ioctl macros differ between personalities, these
   22446 	personality specific ioctl macros should be properly defined for
   22447 	mpersified code.  Implement this by redefining personality specific
   22448 	ioctl macros from ioctlent*.h for each file that includes MPERS_DEFS.
   22449 
   22450 	* Makefile.am (ioctl_macros_h): New variable.
   22451 	(ioctl_macros%.h): New rule.
   22452 	(BUILT_SOURCES, CLEANFILES): Add $(ioctl_macros_h).
   22453 	(m%_type_defs.h): #include MPERS_$(mpers_PREFIX)IOCTL_MACROS.
   22454 	* defs.h [HAVE_M32_MPERS] (MPERS_m32_IOCTL_MACROS): New macro.
   22455 	[HAVE_MX32_MPERS] (MPERS_mx32_IOCTL_MACROS): Likewise.
   22456 
   22457 	Acked-by: Elvira Khabirova <lineprinter0 (a] gmail.com>
   22458 
   22459 2016-05-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   22460 
   22461 	Fix decoding of VIDIOC_* ioctls.
   22462 	* v4l2.c: Fix numerous bugs in decoding of VIDIOC_* ioctls.
   22463 	* tests/ioctl.c (main): Update.
   22464 
   22465 2016-05-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   22466 
   22467 	nsyscalls.test: add mips o32 support.
   22468 	Out-of-range syscalls looks differently on mips o32.
   22469 
   22470 	* tests/nsyscalls.c (main): Handle LINUX_MIPSO32.
   22471 	* tests/nsyscalls.test: Trace syscall called "syscall" on mips.
   22472 
   22473 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22474 
   22475 	Remove initialization of big holes in syscallent.h files.
   22476 	There is no need to explicitly initialize big holes after conversion
   22477 	of syscallent.h files to use designated initializers.  For architectures
   22478 	that have some data at the end of syscallent.h this initialization of
   22479 	big holes is no-op, for others it just inflates the table unnecessarily.
   22480 
   22481 	* linux/arc/syscallent.h: Remove initialization of arch specific block
   22482 	at the end of table.
   22483 	* linux/metag/syscallent.h: Likewise.
   22484 	* linux/nios2/syscallent.h: Likewise.
   22485 	* linux/or1k/syscallent.h: Likewise.
   22486 	* linux/tile/syscallent.h: Likewise.
   22487 	* linux/tile/syscallent1.h: Likewise.
   22488 	* linux/arm/syscallent.h: Remove explicit initialization of a big hole
   22489 	before socket subcalls.
   22490 	* linux/i386/syscallent.h: Likewise.
   22491 	* linux/m68k/syscallent.h: Likewise.
   22492 	* linux/mips/syscallent-n32.h: Likewise.
   22493 	* linux/powerpc/syscallent.h: Likewise.
   22494 	* linux/powerpc64/syscallent.h: Likewise.
   22495 	* linux/s390/syscallent.h: Likewise.
   22496 	* linux/s390x/syscallent.h: Likewise.
   22497 	* linux/sh/syscallent.h: Likewise.
   22498 	* linux/sh64/syscallent.h: Likewise.
   22499 	* linux/sparc/syscallent.h: Likewise.
   22500 	* linux/sparc64/syscallent.h: Likewise.
   22501 	* linux/mips/syscallent-compat.h: Remove explicit initialization
   22502 	of big holes between different mips ABIs.
   22503 	* linux/mips/syscallent-n64.h: Remove explicit initialization
   22504 	of big holes before socket subcalls and between different mips ABIs.
   22505 	* linux/mips/syscallent-o32.h: Likewise.
   22506 
   22507 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22508 
   22509 	xlat: make "1<<val" syntax work with 64-bit values.
   22510 	* xlat/gen.sh(cond_xlat, gen_header): Generate 1UUL<<val
   22511 	for 1<<val syntax.
   22512 
   22513 	Reported-by: Dr. David Alan Gilbert <dgilbert (a] redhat.com>
   22514 
   22515 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22516 
   22517 	Fix typo in XLAT_TYPE_PAIR.
   22518 	* xlat.h (XLAT_TYPE_PAIR): Take "type" parameter.
   22519 
   22520 	Reported-by: Dr. David Alan Gilbert <dgilbert (a] redhat.com>
   22521 
   22522 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22523 
   22524 	Fix decoding of move_pages syscall.
   22525 	* numa.c (print_page_array, print_status, print_int, print_int_array):
   22526 	New functions.
   22527 	(SYS_FUNC(move_pages)): Rewrite using these functions.
   22528 	* tests/move_pages.c: New file.
   22529 	* tests/move_pages.test: New test.
   22530 	* tests/.gitignore: Add move_pages.
   22531 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22532 	(DECODER_TESTS): Add move_pages.test.
   22533 
   22534 	tests: check decoding of mbind syscall.
   22535 	* tests/mbind.c: New file.
   22536 	* tests/mbind.test: New test.
   22537 	* tests/.gitignore: Add mbind.
   22538 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22539 	(DECODER_TESTS): Add mbind.test.
   22540 
   22541 2016-04-29  Jeff Mahoney  <jeffm (a] suse.com>
   22542 
   22543 	Change type of struct xlat.val to uint64_t.
   22544 	Some ioctls have flags fields that are 64-bit.  A 32-bit val means
   22545 	these flags will never be matched or printed.
   22546 
   22547 	* xlat.h: Include <stdint.h>.
   22548 	(struct xlat): Change type of val to uint64_t.
   22549 
   22550 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22551 
   22552 	xlat: extend syntax with #val_type directive.
   22553 	When #val_type directive is encountered, gen.sh starts using
   22554 	XLAT_TYPE/XLAT_TYPE_PAIR macros instead of XLAT/XLAT_PAIR,
   22555 	with #val_type's argument as a type.
   22556 
   22557 	For example, "#val_type uint64_t" means values of type uint64_t.
   22558 
   22559 	* xlat/gen.sh (gen_header, print_xlat, print_xlat_pair):
   22560 	Add val_type support.
   22561 
   22562 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22563 
   22564 	xlat/gen.sh: prepare for adding #val_type directive support.
   22565 	This is essentially a no-op change that makes the following change
   22566 	easier to read.
   22567 
   22568 	* xlat/gen.sh (print_xlat, print_xlat_pair): New functions.
   22569 	(cond_xlat, gen_header): Use them.
   22570 
   22571 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22572 
   22573 	Introduce XLAT_TYPE and XLAT_TYPE_PAIR macros.
   22574 	* xlat.h (XLAT_TYPE): New macro, similar to XLAT but casts
   22575 	to the specified type instead of unsigned int.
   22576 	(XLAT_TYPE_PAIR): New macro, similar to XLAT_PAIR but casts
   22577 	to the specified type instead of unsigned int.
   22578 
   22579 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22580 
   22581 	xlat: generate xlat pairs using new XLAT_PAIR macro.
   22582 	Before this change there were two forms of xlat entries: those that use XLAT
   22583 	or XLAT_END macros, and others verbatim entries.  This change converts
   22584 	the latter to use new XLAT_PAIR macro.
   22585 
   22586 	This is necessary for the upcoming change of xlat.val type.
   22587 
   22588 	* xlat.h (XLAT_PAIR): New macro.
   22589 	* xlat/gen.sh (cond_xlat, gen_header): Use it.
   22590 
   22591 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22592 
   22593 	Explicitly cast argument of XLAT macro to unsigned int.
   22594 	This is necessary for the upcoming change of xlat.val type.
   22595 
   22596 	* xlat.h (XLAT): Cast the argument to unsigned int.
   22597 
   22598 2016-04-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   22599 
   22600 	Change type of {s,t}print_open_modes's argument to unsigned.
   22601 	As "flags" argument of sprint_open_modes and tprint_open_modes is
   22602 	involved only in bit operations, change its type to unsigned.
   22603 
   22604 	* defs.h.c (sprint_open_modes, tprint_open_modes): Change type
   22605 	to unsigned int.
   22606 	* open.c (sprint_open_modes, tprint_open_modes): Likewise.
   22607 
   22608 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22609 
   22610 	tests/remap_file_pages.c: fix for the upcoming change of xlat.val type.
   22611 	The "flags" argument of remap_file_page syscall has type "unsigned
   22612 	long", so it is not correct to load most significant bits with garbage
   22613 	ans assume they are going to be ignored.
   22614 
   22615 	* tests/remap_file_pages.c (main): Remove artificial garbage from flags.
   22616 
   22617 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22618 
   22619 	Introduce printflags64 function.
   22620 	This is necessary for the upcoming change of xlat.val type.
   22621 
   22622 	* defs.h (printflags): Rename to printflags64, change type of integer
   22623 	argument to uint64_t.
   22624 	(printflags): New static inline function.
   22625 	* util.c (printflags): Rename to printflags64, change type of integer
   22626 	argument to uint64_t.  Print it using PRIx64 format.
   22627 	Based on patch by Jeff Mahoney <jeffm (a] suse.com>.
   22628 
   22629 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22630 
   22631 	Introduce sprintflags64 function.
   22632 	This is necessary for the upcoming change of xlat.val type.
   22633 
   22634 	* defs.h (sprintflags): Rename to sprintflags64, change type of integer
   22635 	argument to uint64_t.
   22636 	(sprintflags): New static inline function.
   22637 	* util.c (sprintflags): Rename to sprintflags64, change type of integer
   22638 	argument to uint64_t.  Print it using PRIx64 format.
   22639 	Based on patch by Jeff Mahoney <jeffm (a] suse.com>.
   22640 
   22641 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22642 
   22643 	printxvals: change type of integer argument to uint64_t.
   22644 	This is necessary for the upcoming change of xlat.val type.
   22645 	All users of printxvals are already prepared for this change.
   22646 
   22647 	* defs.h (printxvals): Change type of integer argument to uint64_t.
   22648 	* util.c (printxvals): Likewise.  Print it using PRIx64 format.
   22649 	Patch by Jeff Mahoney <jeffm (a] suse.com>.
   22650 
   22651 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22652 
   22653 	xlat_search: change type of integer argument to uint64_t.
   22654 	This is necessary for the upcoming change of xlat.val type.
   22655 	All users of addflags are already prepared for this change.
   22656 
   22657 	* defs.h (xlat_search): Change type of integer argument to uint64_t.
   22658 	* util.c (xlat_search): Likewise.  Pass it by pointer.
   22659 	(xlat_bsearch_compare): Treat first argument as a pointer.
   22660 	Patch by Jeff Mahoney <jeffm (a] suse.com>.
   22661 
   22662 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22663 
   22664 	Introduce xlookup64 function.
   22665 	This is necessary for the upcoming change of xlat.val type.
   22666 
   22667 	* defs.h (xlookup): Rename to xlookup64, change type of integer argument
   22668 	to uint64_t.
   22669 	(xlookup): New static inline function.
   22670 	* util.c (xlookup): Rename to xlookup64, change type of integer
   22671 	argument to uint64_t.
   22672 	Based on patch by Jeff Mahoney <jeffm (a] suse.com>.
   22673 
   22674 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22675 
   22676 	addflags: change type of integer argument to uint64_t.
   22677 	This is necessary for the upcoming change of xlat.val type.
   22678 	All users of addflags are already prepared for this change.
   22679 
   22680 	* defs.h (addflags): Change type of integer argument to uint64_t.
   22681 	* util.c (addflags): Likewise.  Print it using PRIx64 format.
   22682 	Based on patch by Jeff Mahoney <jeffm (a] suse.com>.
   22683 
   22684 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22685 
   22686 	Introduce printxval64 wrapper.
   22687 	This is necessary for the upcoming change of xlat.val type.
   22688 
   22689 	* defs.h (printxval64): New static inline function.
   22690 
   22691 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22692 
   22693 	Turn printxval macro into a static inline function.
   22694 	This is necessary for the upcoming change of xlat.val type.
   22695 
   22696 	* defs.h (printxval): Change to static inline function.
   22697 
   22698 2016-04-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   22699 
   22700 	tests: check decoding of migrate_pages syscall.
   22701 	* tests/migrate_pages.c: New file.
   22702 	* tests/migrate_pages.test: New test.
   22703 	* tests/.gitignore: Add migrate_pages.
   22704 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22705 	(DECODER_TESTS): Add migrate_pages.test.
   22706 
   22707 	Fix decoding of migrate_pages syscall.
   22708 	* numa.c (SYS_FUNC(migrate_pages)): Print syscall arguments
   22709 	in the right order.
   22710 
   22711 	tests: check decoding of set_mempolicy syscall.
   22712 	* tests/set_mempolicy.c: New file.
   22713 	* tests/set_mempolicy.test: New test.
   22714 	* tests/.gitignore: Add set_mempolicy.
   22715 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22716 	(DECODER_TESTS): Add set_mempolicy.test.
   22717 
   22718 	tests: check decoding of get_mempolicy syscall.
   22719 	* tests/get_mempolicy.c: New file.
   22720 	* tests/get_mempolicy.test: New test.
   22721 	* tests/.gitignore: Add get_mempolicy.
   22722 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22723 	(DECODER_TESTS): Add get_mempolicy.test.
   22724 
   22725 	numa: fix decoding of nodemask arrays.
   22726 	* numa.c (get_nodes): Rewrite an rename to print_nodemask.
   22727 	All callers updated.
   22728 	(SYS_FUNC(mbind), SYS_FUNC(set_mempolicy), SYS_FUNC(get_mempolicy)):
   22729 	Print a delimiter before nodemask argument.
   22730 
   22731 2016-04-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   22732 
   22733 	Fix decoding of policy argument of get_mempolicy syscall.
   22734 	* numa.c (SYS_FUNC(get_mempolicy)): Print policy argument in square
   22735 	brackets to indicate indirect access.
   22736 
   22737 	Fix decoding of pid_t argument of migrate_pages syscall.
   22738 	* numa.c (SYS_FUNC(migrate_pages)): Print pid_t syscall
   22739 	argument using %d format.
   22740 
   22741 	tests: add printxval function to libtests.
   22742 	* tests/tests.h (printxval): New prototype.
   22743 	* tests/printxval.c: New file.
   22744 	* tests/Makefile.am  (libtests_a_SOURCES): Add it.
   22745 
   22746 	tests: check decoding of remap_file_pages syscall.
   22747 	* tests/remap_file_pages.c: New file.
   22748 	* tests/remap_file_pages.test: New test.
   22749 	* tests/.gitignore: Add remap_file_pages.
   22750 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22751 	(DECODER_TESTS): Add remap_file_pages.test.
   22752 
   22753 2016-04-27  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22754 
   22755 	tests: add pause.test.
   22756 	* tests/pause.c: New file.
   22757 	* tests/pause.test: New test.
   22758 	* tests/.gitignore: Add pause.
   22759 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22760 	(DECODER_TESTS): Add pause.test.
   22761 
   22762 	tests: add kill.test.
   22763 	* tests/kill.c: New file.
   22764 	* tests/kill.test: New test.
   22765 	* tests/.gitignore: Add kill.
   22766 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22767 	(DECODER_TESTS): Add kill.test.
   22768 
   22769 2016-04-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   22770 
   22771 	Fix decoding of pid_t arguments of kill and tgkill syscalls.
   22772 	* signal.c (SYS_FUNC(kill), SYS_FUNC(tgkill)): Print pid_t syscall
   22773 	arguments using %d format.
   22774 
   22775 2016-04-27  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22776 
   22777 	tests: add mlock.test.
   22778 	* tests/mlock.c: New file.
   22779 	* tests/mlock.test: New test.
   22780 	* tests/.gitignore: Add mlock.
   22781 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22782 	(DECODER_TESTS): Add mlock.test.
   22783 
   22784 2016-04-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   22785 
   22786 	Move parsers of NUMA related syscalls to numa.c.
   22787 	* mem.c (get_nodes, SYS_FUNC(mbind), SYS_FUNC(set_mempolicy),
   22788 	SYS_FUNC(get_mempolicy), SYS_FUNC(migrate_pages), SYS_FUNC(move_pages)):
   22789 	Move ...
   22790 	* numa.c: ... here.
   22791 	* Makefile.am (strace_SOURCES): Add numa.c
   22792 
   22793 	tests/umovestr3.c: robustify against os specific issues.
   22794 	* tests/umovestr3.c (main): Create extra gap before unreadable page.
   22795 
   22796 	tests: extend test coverage of umovestr short read condition.
   22797 	* tests/umovestr3.c: New file.
   22798 	* tests/umovestr3.test: New test.
   22799 	* tests/.gitignore: Add umovestr3.
   22800 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22801 	(DECODER_TESTS): Add umovestr3.test.
   22802 
   22803 	tests: check decoding of out-of-range syscalls.
   22804 	* tests/nsyscalls.c: New file.
   22805 	* tests/nsyscalls.test: New test.
   22806 	* tests/.gitignore: Add nsyscalls.
   22807 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22808 	(DECODER_TESTS): Add nsyscalls.test.
   22809 
   22810 2016-04-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   22811 
   22812 	Fix decoding of 3rd argument of getdents/getdents64 syscalls.
   22813 	* dirent.c (SYS_FUNC(getdents)): Always print 3rd syscall argument
   22814 	as unsigned int.
   22815 	* dirent64.c (SYS_FUNC(getdents64)): Likewise.
   22816 	* tests/getdents.c (main): Check it.
   22817 	* tests/getdents64.c (main): Likewise.
   22818 
   22819 	Fix decoding of LINUX_REBOOT_CMD_RESTART2 argument.
   22820 	* reboot.c (SYS_FUNC(reboot)): Cast numeric arguments to unsigned int.
   22821 
   22822 2016-04-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   22823 
   22824 	.travis.yml: raise sleep delay.
   22825 	Previous sleep delay value seems to be not enough nowadays.
   22826 
   22827 	.travis.yml (SLEEP_A_BIT): Raise sleep delay.
   22828 
   22829 2016-04-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   22830 
   22831 	Move definitions of MPOL_* constants to xlat files.
   22832 	* mem.c (MPOL_DEFAULT, MPOL_PREFERRED, MPOL_BIND, MPOL_INTERLEAVE):
   22833 	Move to xlat/policies.in.
   22834 	(MPOL_F_NODE, MPOL_F_ADDR): Move to xlat/mempolicyflags.in.
   22835 	(MPOL_MF_STRICT, MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Move
   22836 	to xlat/mbindflags.in.
   22837 
   22838 	tests: check decoding of renameat2 syscall.
   22839 	* tests/renameat2.c: New file.
   22840 	* tests/renameat2.test: New test.
   22841 	* tests/.gitignore: Add renameat2.
   22842 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22843 	(DECODER_TESTS): Add renameat2.test.
   22844 
   22845 	Add default values for RENAME_* constants.
   22846 	* xlat/rename_flags.in: Add default values.
   22847 
   22848 	tests: check decoding of utimes syscall.
   22849 	* tests/utimes.c: New file.
   22850 	* tests/utimes.test: New test.
   22851 	* tests/.gitignore: Add utimes.
   22852 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22853 	(DECODER_TESTS): Add utimes.test.
   22854 
   22855 	tests: check decoding of futimesat syscall.
   22856 	* tests/futimesat.c: New file.
   22857 	* tests/futimesat.test: New test.
   22858 	* tests/.gitignore: Add futimesat.
   22859 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22860 	(DECODER_TESTS): Add futimesat.test.
   22861 
   22862 	tests: extend test coverage of mknod syscall.
   22863 	* mknod.c (main): Check more corner cases of mode_t parser.
   22864 	* mknod.test: Update.
   22865 
   22866 2016-04-26  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22867 
   22868 	tests: add sched_yield.test.
   22869 	* tests/sched_yield.c: New file.
   22870 	* tests/sched_yield.test: New test.
   22871 	* tests/.gitignore: Add sched_yield.
   22872 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22873 	(DECODER_TESTS): Add sched_yield.test.
   22874 
   22875 	tests: add sync.test.
   22876 	* tests/sync.c: New file.
   22877 	* tests/sync.test: New test.
   22878 	* tests/.gitignore: Add sync.
   22879 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22880 	(DECODER_TESTS): Add sync.test.
   22881 
   22882 	tests: add mknodat.test.
   22883 	* tests/mknodat.c: New file.
   22884 	* tests/mknodat.test: New test.
   22885 	* tests/.gitignore: Add mknodat.
   22886 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22887 	(DECODER_TESTS): Add mknodat.test.
   22888 
   22889 	tests: add unlink.test.
   22890 	* tests/unlink.c: New file.
   22891 	* tests/unlink.test: New test.
   22892 	* tests/.gitignore: Add unlink.
   22893 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22894 	(DECODER_TESTS): Add unlink.test.
   22895 
   22896 	tests: add reboot.test.
   22897 	* tests/reboot.c: New file.
   22898 	* tests/reboot.test: New test.
   22899 	* tests/.gitignore: Add reboot.
   22900 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22901 	(DECODER_TESTS): Add reboot.test.
   22902 
   22903 2016-04-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   22904 
   22905 	Fix decoding of statfs family syscalls.
   22906 	Fix decoders of fstatfs, fstatfs64, statfs, and statfs64 syscalls
   22907 	by rewriting them using mpers infrastructure.
   22908 
   22909 	* fetch_struct_statfs.c: New file.
   22910 	* fstatfs.c: Likewise.
   22911 	* fstatfs64.c: Likewise.
   22912 	* print_statfs.c: Likewise.
   22913 	* statfs.h: Likewise.
   22914 	* statfs64.c: Likewise.
   22915 	* statfs.c: Remove everything except SYS_FUNC(statfs).
   22916 	* configure.ac: Remove the check for struct statfs64 in <sys/vfs.h>.
   22917 	Add checks for struct statfs and struct statfs64 in <asm/statfs.h>.
   22918 	Add checks for f_frsize and f_flags members of these structures.
   22919 	* defs.h (struct strace_statfs): New forward declaration.
   22920 	(print_struct_statfs, print_struct_statfs64): New prototypes.
   22921 	* Makefile.am (libstrace_a_SOURCES): Add fstatfs.c, fstatfs64.c,
   22922 	statfs.c, and statfs64.c.
   22923 	(strace_SOURCES): Add fetch_struct_statfs.c, print_statfs.c,
   22924 	and statfs.h.
   22925 	* NEWS: Mention this fix.
   22926 	* tests/fstatfs.c: New file.
   22927 	* tests/fstatfs64.c: Likewise.
   22928 	* tests/statfs64.c: Likewise.
   22929 	* tests/xstatfs.c: Likewise.
   22930 	* tests/xstatfs64.c: Likewise.
   22931 	* tests/xstatfsx.c: Likewise.
   22932 	* tests/fstatfs.test: New test.
   22933 	* tests/fstatfs64.test: Likewise.
   22934 	* tests/statfs64.test: Likewise.
   22935 	* tests/statfs.c: Rewrite using xstatfs.c.
   22936 	* tests/statfs.test: Update.
   22937 	* tests/.gitignore: Add fstatfs, fstatfs64, and statfs64.
   22938 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22939 	(DECODER_TESTS): Add  fstatfs.test, fstatfs64.test, and statfs64.test.
   22940 	(EXTRA_DIST): Add xstatfs.c, xstatfs64.c, and xstatfsx.c.
   22941 
   22942 2016-04-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   22943 
   22944 	tests: add printflags function to libtests.
   22945 	* tests/printflags.c: New file.
   22946 	* tests/tests.h (printflags): New prototype.
   22947 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   22948 
   22949 2016-04-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   22950 
   22951 	Move definition of struct xlat to a separate header file.
   22952 	Define struct xlat in a separate file so that it could be used later by
   22953 	tests without inclusion of defs.h header file.
   22954 
   22955 	* defs.h (struct xlat, XLAT, XLAT_END): Move ...
   22956 	* xlat.h: ... here.
   22957 	* Makefile.am (strace_SOURCES): Add xlat.h.
   22958 
   22959 2016-04-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   22960 
   22961 	alpha: decode osf_statfs64 and osf_fstatfs64 syscalls.
   22962 	* linux/alpha/syscallent.h (osf_statfs64, osf_fstatfs64): Set nargs
   22963 	and handler.
   22964 
   22965 2016-04-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   22966 
   22967 	alpha: fix decoding of osf_statfs and osf_fstatfs syscalls.
   22968 	Do not attempt to print struct osf_statfs as if it was the same as
   22969 	struct statfs.  Since struct osf_statfs has never been decoded properly,
   22970 	it is probably too late to implement a decoder, so let's just print the
   22971 	pointer.
   22972 
   22973 	* statfs.c [ALPHA] (SYS_FUNC(osf_statfs), SYS_FUNC(osf_fstatfs)): Move ...
   22974 	* alpha.c: ... here.  Replace printstatfs with printaddr.
   22975 
   22976 2016-04-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   22977 
   22978 	statfs: print f_flags field only when ST_VALID flag is set.
   22979 	* statfs.c (print_statfs_flags): New function.
   22980 	(printstatfs, printstatfs64, printcompat_statfs64): Use it.
   22981 	* xlat/statfs_flags.in (ST_VALID): Move to the head of the list.
   22982 	* tests/statfs.expected: Update.
   22983 
   22984 2016-04-25  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   22985 
   22986 	tests: add symlink.test.
   22987 	* tests/symlink.c: New file.
   22988 	* tests/symlink.test: New test.
   22989 	* tests/.gitignore: Add symlink.
   22990 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22991 	(DECODER_TESTS): Add symlink.test.
   22992 
   22993 	tests: add rmdir.test.
   22994 	* tests/rmdir.c: New file.
   22995 	* tests/rmdir.test: New test.
   22996 	* tests/.gitignore: Add rmdir.
   22997 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   22998 	(DECODER_TESTS): Add rmdir.test.
   22999 
   23000 	tests: add setdomainname.test.
   23001 	* tests/setdomainname.c: New file.
   23002 	* tests/setdomainname.test: New test.
   23003 	* tests/.gitignore: Add setdomainname.
   23004 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23005 	(DECODER_TESTS): Add setdomainname.test.
   23006 
   23007 	tests: add sched_rr_get_interval.test.
   23008 	* tests/sched_rr_get_interval.c: New file.
   23009 	* tests/sched_rr_get_interval.test: New test.
   23010 	* tests/.gitignore: Add sched_rr_get_interval.
   23011 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23012 	(DECODER_TESTS): Add sched_rr_get_interval.test.
   23013 
   23014 2016-04-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   23015 
   23016 	statfs: decode f_flags field of struct statfs.
   23017 	* xlat/statfs_flags.in: New file.
   23018 	* statfs.c: Include "xlat/statfs_flags.h".
   23019 	(printstatfs) [_STATFS_F_FLAGS]: Print statbuf.f_flags as flags.
   23020 	(printstatfs64) [_STATFS_F_FLAGS]: Likewise.
   23021 	(printcompat_statfs64): Likewise.
   23022 	* tests/statfs.expected: Update.
   23023 
   23024 2016-04-25  Zev Weiss  <zev (a] bewilderbeest.net>
   23025 
   23026 	statfs: don't quote f_type macro names.
   23027 	* statfs.c (sprintfstype): Don't add double-quotes to fs magic macros.
   23028 	* tests/statfs.expected: Remove double-quotes.
   23029 
   23030 2016-04-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   23031 
   23032 	tests/shmxt.c: robustify against arch specific issues.
   23033 	Do not treat failed shmat(SHM_RND) as a test failure.
   23034 	This change partially reverts commit
   23035 	bea707377d2ee3e1950bfa43537ef928163a5fa6.
   23036 
   23037 	* tests/shmxt.c (main): Use SHM_RND in the second shmat call,
   23038 	do not treat its potential error as a test failure.
   23039 
   23040 2016-04-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   23041 
   23042 	Rename PRI__s64 to PRI__d64.
   23043 	As PRI__*64 macros mirror PRI*64 macros from inttypes.h, follow the
   23044 	principle of least astonishment and name these macros the same way.
   23045 
   23046 	* defs.h (PRI__s64): Rename to PRI__d64.
   23047 
   23048 2016-04-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   23049 
   23050 	Fix old_mmap output when mmap arguments are unfetchable.
   23051 	* mem.c (SYS_FUNC(old_mmap)): Use umove_or_printaddr instead of umoven
   23052 	to fetch mmap arguments, return RVAL_DECODED when umove_or_printaddr
   23053 	fails.
   23054 	* tests/old_mmap.c (main): Check it.
   23055 
   23056 2016-04-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   23057 
   23058 	aarch64: fix old_mmap output for arm personality.
   23059 	* mem.c (SYS_FUNC(old_mmap)) [AARCH64]: Fetch mmap arguments
   23060 	as 32-bit integers.
   23061 
   23062 	Define old_mmap parser only on architectures that use it.
   23063 	* mem.c (SYS_FUNC(old_mmap)): Define only on AARCH64, ARM, I386, X86_64,
   23064 	X32, M68K, S390, and S390X.
   23065 
   23066 2016-04-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   23067 
   23068 	tests: extend test coverage of mmap syscall.
   23069 	Check decoding of "old mmap" edition of mmap syscall
   23070 	on those architectures that define it.
   23071 
   23072 	* tests/old_mmap.c: New file.
   23073 	* tests/old_mmap.test: New test.
   23074 	* tests/.gitignore: Add old_mmap.
   23075 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23076 	(DECODER_TESTS): Add old_mmap.test.
   23077 
   23078 2016-04-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   23079 
   23080 	tests: extend test coverage of mincore syscall.
   23081 	* tests/mincore.c (print_mincore): New function.
   23082 	(test_mincore): Use it.  Check mincore with invalid vec address.
   23083 	Check mincore with length argument not a multiple of the page size.
   23084 	(main): Check with DEFAULT_STRLEN pages.
   23085 
   23086 2016-04-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   23087 
   23088 	Move parsers of sync_file_range and sync_file_range2 syscalls to libstrace
   23089 	For each given architecture only one of these two syscalls has a
   23090 	syscallent entry.  When each parser is placed into a separate file,
   23091 	moving to libstrace ensures that only one of them that is need
   23092 	is linked into strace executable.
   23093 
   23094 	* sync_file_range.c (SYS_FUNC(sync_file_range2)): Move ...
   23095 	* sync_file_range2.c: ... here.
   23096 	* Makefile.am (strace_SOURCES): Move sync_file_range.c ...
   23097 	(libstrace_a_SOURCES): ... here.  Add sync_file_range2.c.
   23098 	(strace_SOURCES_c): Add filtered libstrace_a_SOURCES.
   23099 
   23100 2016-04-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   23101 
   23102 	tests: check decoding of clock_adjtime syscall.
   23103 	* tests/clock_adjtime.c: New file.
   23104 	* tests/clock_adjtime.test: New test.
   23105 	* tests/.gitignore: Add clock_adjtime.
   23106 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23107 	(DECODER_TESTS): Add clock_adjtime.test.
   23108 
   23109 2016-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   23110 
   23111 	tests: do not include <assert.h> unnecessarily.
   23112 	Automatically change tests/*.c files using the following script:
   23113 
   23114 	for f in tests/*.c; do
   23115 		grep -q '\<assert(' "$f" ||
   23116 			sed -i '/# *include *<assert\.h>/d' "$f"
   23117 	done
   23118 
   23119 2016-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   23120 
   23121 	tests: do not include <errno.h> unnecessarily.
   23122 	Automatically change tests/*.c files using the following script:
   23123 
   23124 	for f in tests/*.c; do
   23125 		grep -Fv errno.h "$f" |
   23126 		grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' ||
   23127 			sed -i '/# *include *<errno\.h>/d' "$f"
   23128 	done
   23129 
   23130 2016-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   23131 
   23132 	tests/xetpriority.c: print syscall() result using %ld format.
   23133 
   23134 	tests/xetpgid.c: print syscall() result using %ld format.
   23135 
   23136 	tests/xchownx.c: use errno2name.
   23137 
   23138 	tests/userfaultfd.c: stop using assert.
   23139 
   23140 	tests/unlinkat.c: print syscall() result using %ld format.
   23141 
   23142 	tests/umount.c: use errno2name.
   23143 
   23144 	tests/truncate64.c: cleanup.
   23145 	* tests/truncate64.c (main): Use errno2name, stop using assert.
   23146 
   23147 	tests/truncate.c: cleanup.
   23148 	* tests/truncate.c (main): Use errno2name, stop using assert.
   23149 
   23150 	tests/tee.c: stop using assert.
   23151 
   23152 	tests/syslog.c: use errno2name.
   23153 
   23154 	tests/sync_file_range2.c: stop using assert.
   23155 
   23156 	tests/sync_file_range.c: stop using assert.
   23157 
   23158 	tests/symlinkat.c: cleanup.
   23159 
   23160 	tests/swap.c: cleanup.
   23161 	* tests/swap.c (error_msg): Remove.
   23162 	(main): Use errno2name.
   23163 
   23164 	tests/splice.c: stop using assert.
   23165 
   23166 	tests/setugid.c: cleanup.
   23167 
   23168 	tests/sethostname.c: use errno2name.
   23169 
   23170 	tests/setgroups.c: use errno2name.
   23171 	* tests/setgroups.c (errno2str): Remove.
   23172 	(main): Use errno2name.
   23173 
   23174 	tests/seccomp-strict.c: cleanup.
   23175 	* tests/seccomp-strict.c (main): Use errno2name, stop using assert.
   23176 
   23177 	tests/seccomp-filter.c: cleanup.
   23178 	* tests/seccomp-filter.c (main): Use errno2name, stop using assert.
   23179 
   23180 	tests/sched_xetscheduler.c: print syscall() result using %ld format.
   23181 
   23182 	tests/sched_xetparam.c: print syscall() result using %ld format.
   23183 
   23184 	tests/renameat.c: print syscall() result using %ld format.
   23185 
   23186 	tests/rename.c: print syscall() result using %ld format.
   23187 
   23188 	tests/readv.c: cleanup.
   23189 
   23190 	tests/pwritev.c: use errno2name.
   23191 
   23192 	tests/preadv-pwritev.c: cleanup.
   23193 
   23194 	tests/prctl-seccomp-strict.c: cleanup.
   23195 	* tests/prctl-seccomp-strict.c (main): Use errno2name,
   23196 	stop using assert.
   23197 
   23198 	tests/openat.c: use errno2name.
   23199 
   23200 	tests/open.c: use errno2name.
   23201 
   23202 	tests/mlockall.c: cleanup.
   23203 
   23204 	tests/mlock2.c: stop using assert.
   23205 
   23206 	tests/mknod.c: print syscall() result using %ld format.
   23207 
   23208 	tests/mkdirat.c: print syscall() result using %ld format.
   23209 
   23210 	tests/lseek.c: cleanup.
   23211 	* tests/lseek.c (main): Use errno2name, stop using assert.
   23212 
   23213 	tests/llseek.c: cleanup.
   23214 	* tests/llseek.c (main): Use errno2name, stop using assert.
   23215 
   23216 	tests/linkat.c: print syscall() result using %ld format.
   23217 
   23218 	tests/iopl.c: use errno2name.
   23219 
   23220 	tests/ioperm.c: use errno2name.
   23221 
   23222 	tests/getgroups.c: use errno2name.
   23223 	* tests/getgroups.c (errno2str): Remove.
   23224 	(main): Use errno2name.
   23225 
   23226 	tests/ftruncate64.c: cleanup.
   23227 	* tests/ftruncate64.c (main): Use errno2name, stop using assert.
   23228 
   23229 	tests/ftruncate.c: cleanup.
   23230 	* tests/ftruncate.c (main): Use errno2name, stop using assert.
   23231 
   23232 	tests/fsync.c: print syscall() result using %ld format.
   23233 
   23234 	tests/flock.c: print syscall() result using %ld format.
   23235 
   23236 	tests/file_handle.c: use errno2name.
   23237 
   23238 	tests/fdatasync.c: print syscall() result using %ld format.
   23239 
   23240 	tests/fchownat.c: use errno2name.
   23241 
   23242 	tests/fchmodat.c: use errno2name.
   23243 
   23244 	tests/fchmod.c: use errno2name.
   23245 
   23246 	tests/faccessat.c: print syscall() result using %ld format.
   23247 
   23248 	tests/epoll_wait.c: print syscall() result using %ld format.
   23249 
   23250 	tests/epoll_ctl.c: print syscall() result using %ld format.
   23251 
   23252 	tests/epoll_create1.c: cleanup.
   23253 	* tests/epoll_create1.c (main): Use errno2name, stop using assert.
   23254 
   23255 	tests/epoll_create.c: print syscall() result using %ld format.
   23256 
   23257 	tests/dup3.c: print syscall() result using %ld format.
   23258 
   23259 	tests/dup2.c: print syscall() result using %ld format.
   23260 
   23261 	tests/dup.c: cleanup.
   23262 
   23263 	tests/creat.c: stop using sys/stat.h.
   23264 
   23265 	tests/copy_file_range.c: stop using assert.
   23266 
   23267 	tests/chroot.c: use errno2name.
   23268 
   23269 	tests/aio.c: use errno2name.
   23270 
   23271 	tests: cleanup acct.test.
   23272 	* tests/acct.c (main): Use errno2name, stop using assert,
   23273 	change sample file name.
   23274 	* tests/acct.test: Update.
   23275 
   23276 	tests: use errno2name()
   23277 	Automatically change tests/*.c files using the following sed regexp:
   23278 	sed -i 's/errno == E[[:alnum:]]\+ ? "E[[:alnum:]]\+" : "E[[:alnum:]]\+"/errno2name()/g'
   23279 
   23280 	tests/dup.c: include "tests.h"
   23281 	This is going to be necessary for the following commit.
   23282 
   23283 2016-04-21  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23284 
   23285 	tests: add getpgrp.test.
   23286 	* tests/getpgrp.c: New file.
   23287 	* tests/getpgrp.test: New test.
   23288 	* tests/.gitignore: Add getpgrp.
   23289 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23290 	(DECODER_TESTS): Add getpgrp.test.
   23291 
   23292 	tests: add access.test.
   23293 	* tests/access.c: New file.
   23294 	* tests/access.test: New test.
   23295 	* tests/.gitignore: Add access.
   23296 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23297 	(DECODER_TESTS): Add access.test.
   23298 
   23299 	tests: add fchdir.test.
   23300 	* tests/fchdir.c: New file.
   23301 	* tests/fchdir.test: New test.
   23302 	* tests/.gitignore: Add fchdir.
   23303 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23304 	(DECODER_TESTS): Add fchdir.test.
   23305 
   23306 	tests: add mkdir.test.
   23307 	* tests/mkdir.c: New file.
   23308 	* tests/mkdir.test: New test.
   23309 	* tests/.gitignore: Add mkdir.
   23310 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23311 	(DECODER_TESTS): Add mkdir.test.
   23312 
   23313 	tests: add getsid.test.
   23314 	* tests/getsid.c: New file.
   23315 	* tests/getsid.test: New test.
   23316 	* tests/.gitignore: Add getsid.
   23317 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23318 	(DECODER_TESTS): Add getsid.test.
   23319 
   23320 2016-04-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   23321 
   23322 	tests: add errno2name function to libtests.
   23323 	Add a simple translator of errno to its name, so one could
   23324 	simply use errno2name() instead of complex expressions like
   23325 	errno == EINVAL ? "EINVAL" : "EFAULT".
   23326 
   23327 	* tests.h (errno2name): New prototype.
   23328 	* errno2name.c: New file.
   23329 	* Makefile.am (libtests_a_SOURCES): Add it.
   23330 
   23331 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23332 
   23333 	hppa: rename ECANCELLED to ECANCELED.
   23334 	hppa seems to be the only architecture that defines ECANCELLED synonym
   23335 	for ECANCELED constant, other architectures just define ECANCELED.
   23336 	Change the way how this constant is printed on hppa to be in line
   23337 	with other architectures.
   23338 
   23339 	* linux/hppa/errnoent.h [253]: Rename ECANCELLED to ECANCELED.
   23340 
   23341 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23342 
   23343 	Remove parser of unimplemented timerfd syscall.
   23344 	timerfd syscall was introduced in v2.6.22-rc1, but in v2.6.25-rc1
   23345 	it was replaced by timerfd_* syscall family.
   23346 
   23347 	* linux/avr32/syscallent.h (timerfd): Fix nargs.
   23348 	* linux/dummy.h (sys_timerfd): Add stub alias.
   23349 	* time.c (SYS_FUNC(timerfd)): Remove.
   23350 
   23351 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23352 
   23353 	tests: workaround kernel bugs in seccomp-strict.test and prctl-seccomp-strict.test
   23354 	If kernel implementation of strict seccomp mode is buggy, test programs
   23355 	will be killed by SIGKILL.  This is a known problem at least on
   23356 	x32 and mips.  Skip affected tests if this is the case.
   23357 
   23358 	This change partially revert commit 9c1a72cd3f3d52d573876ce474b620a5f141fb1b.
   23359 
   23360 	* tests/seccomp-strict.c (main): Remove workaround for x32.
   23361 	* tests/prctl-seccomp-strict.c: Likewise.
   23362 	* tests/seccomp-strict.test: Skip the test if the test program
   23363 	has been killed by SIGKILL.
   23364 	* tests/prctl-seccomp-strict.test: Likewise.
   23365 
   23366 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23367 
   23368 	tests/shmxt.c: do not use SHM_RND, it is unreliable.
   23369 	* tests/shmxt.c (main): Do not set SHM_RND flag.
   23370 
   23371 	tests/rt_sigpending.c: fix for systems where _NSIG > 16 * sizeof(long)
   23372 	* tests/rt_sigsuspend.c (iterate): Do not assume that size will be less
   23373 	than sizeof(long) on the second iteration.
   23374 
   23375 	prctl-seccomp-strict.test: robustify against unrelated prctl invocations
   23376 	* tests/prctl-seccomp-strict.test: Filter out PR_GET_* prctl calls.
   23377 
   23378 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23379 
   23380 	tests: adjust rt_sigpending to older kernels.
   23381 	With linux kernels older than v3.9-rc1, compat rt_sigpending syscall
   23382 	could fail with EFAULT in cases where on later kernels it succeeds.
   23383 	Adjust the test to handle both cases properly.
   23384 
   23385 	* tests/rt_sigpending.c (iterate): Stop iterations if rt_sigpending
   23386 	failed with EFAULT.
   23387 
   23388 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23389 
   23390 	tests: adjust readv/writev and preadv/pwritev tests to older kernels.
   23391 	With linux kernels older than v3.16-rc1, iovec based compat syscalls may
   23392 	return EINVAL in some cases where on later kernels they return EFAULT.
   23393 	Adjust tests to handle both cases properly.
   23394 
   23395 	* tests/preadv-pwritev.c: Include <errno.h>.
   23396 	(main): Print either "EINVAL" or "EFAULT" depending on errno.
   23397 	* tests/pwritev.c: Likewise.
   23398 	* tests/readv.c: Likewise.
   23399 
   23400 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23401 
   23402 	tests: remove obsolete non-strict uid tests.
   23403 	Recently added strict tests for uid/gid related syscalls
   23404 	made old uid tests obsolete.
   23405 
   23406 	* tests/uid.awk: Remove.
   23407 	* tests/uid.c: Remove.
   23408 	* tests/uid.test: Remove.
   23409 	* tests/uid16.c: Remove.
   23410 	* tests/uid16.test: Remove.
   23411 	* tests/uid32.c: Remove.
   23412 	* tests/uid32.test: Remove.
   23413 	* tests/.gitignore: Remove uid, uid16, and uid32.
   23414 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23415 	(DECODER_TESTS): Remove uid.test, uid16.test, and uid32.test.
   23416 	(EXTRA_DIST): Remove uid.awk.
   23417 
   23418 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23419 
   23420 	tests: extend test coverage of getuid/getgid family syscalls.
   23421 	Add strict tests for getuid, getuid32, getgid, getgid32, geteuid,
   23422 	geteuid32, getegid, and getegid32 syscalls.
   23423 
   23424 	* tests/getegid.c: New file.
   23425 	* tests/getegid.test: New test.
   23426 	* tests/getegid32.c: New file.
   23427 	* tests/getegid32.test: New test.
   23428 	* tests/geteuid.c: New file.
   23429 	* tests/geteuid.test: New test.
   23430 	* tests/geteuid32.c: New file.
   23431 	* tests/geteuid32.test: New test.
   23432 	* tests/getgid.c: New file.
   23433 	* tests/getgid.test: New test.
   23434 	* tests/getgid32.c: New file.
   23435 	* tests/getgid32.test: New test.
   23436 	* tests/getuid.c: New file.
   23437 	* tests/getuid.test: New test.
   23438 	* tests/getuid32.c: New file.
   23439 	* tests/getuid32.test: New test.
   23440 	* tests/.gitignore: Add getuid, getuid32, getgid, getgid32, geteuid,
   23441 	* geteuid32, getegid, and getegid32.
   23442 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23443 	(DECODER_TESTS): Add getegid.test, getegid32.test, geteuid.test,
   23444 	geteuid32.test, getgid.test, getgid32.test, getuid.test,
   23445 	and getuid32.test.
   23446 
   23447 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23448 
   23449 	tests: extend test coverage of getresgid32 syscall.
   23450 	* tests/getresgid32.c: New file.
   23451 	* tests/getresgid32.test: New test.
   23452 	* tests/.gitignore: Add getresgid32.
   23453 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23454 	(DECODER_TESTS): Add getresgid32.test.
   23455 
   23456 	tests: extend test coverage of getresgid syscall.
   23457 	* tests/getresgid.c: New file.
   23458 	* tests/getresgid.test: New test.
   23459 	* tests/.gitignore: Add getresgid.
   23460 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23461 	(DECODER_TESTS): Add getresgid.test.
   23462 
   23463 	tests: extend test coverage of getresuid32 syscall.
   23464 	* tests/getresuid32.c: New file.
   23465 	* tests/getresuid32.test: New test.
   23466 	* tests/.gitignore: Add getresuid32.
   23467 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23468 	(DECODER_TESTS): Add getresuid32.test.
   23469 
   23470 	tests: extend test coverage of getresuid syscall.
   23471 	* tests/getresugid.c: New file.
   23472 	* tests/getresuid.c: New file.
   23473 	* tests/getresuid.test: New test.
   23474 	* tests/.gitignore: Add getresuid.
   23475 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23476 	(DECODER_TESTS): Add getresuid.test.
   23477 	(EXTRA_DIST): Add getresugid.c.
   23478 
   23479 2016-04-20  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23480 
   23481 	tests: add symlinkat.test.
   23482 	* tests/symlinkat.c: New file.
   23483 	* tests/symlinkat.test: New test.
   23484 	* tests/.gitignore: Add symlinkat.
   23485 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23486 	(DECODER_TESTS): Add symlinkat.test.
   23487 
   23488 	tests: add iopl.test.
   23489 	* tests/iopl.c: New file.
   23490 	* tests/iopl.test: New test.
   23491 	* tests/.gitignore: Add iopl.
   23492 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23493 	(DECODER_TESTS): Add iopl.test.
   23494 
   23495 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23496 
   23497 	mips o32, powerpc, powerpc64: fix decoding of iopl syscall.
   23498 	* linux/mips/syscallent-o32.h (iopl): Fix nargs.
   23499 	* linux/powerpc/syscallent.h (iopl): Fix nargs and sys_func.
   23500 	* linux/powerpc64/syscallent.h (iopl): Likewise.
   23501 
   23502 2016-04-20  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23503 
   23504 	tests: add ioperm.test.
   23505 	* tests/ioperm.c: New file.
   23506 	* tests/ioperm.test: New test.
   23507 	* tests/.gitignore: Add ioperm.
   23508 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23509 	(DECODER_TESTS): Add ioperm.test.
   23510 
   23511 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23512 
   23513 	Fix corner cases of getgroups and setgroups syscall decoders.
   23514 	* uid.c (print_groups): New function.
   23515 	(SYS_FUNC(setgroups), SYS_FUNC(getgroups)): Use it.
   23516 	Print first syscall argument using %u format.
   23517 	* tests/getgroups.c: New file.
   23518 	* tests/getgroups.test: New test.
   23519 	* tests/getgroups32.c: New file.
   23520 	* tests/getgroups32.test: New test.
   23521 	* tests/setgroups.c: New file.
   23522 	* tests/setgroups.test: New test.
   23523 	* tests/setgroups32.c: New file.
   23524 	* tests/setgroups32.test: New test.
   23525 	* tests/.gitignore: Add getgroups, getgroups32, setgroups,
   23526 	and setgroups32.
   23527 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23528 	(DECODER_TESTS): Add getgroups.test, getgroups32.test,
   23529 	setgroups.test, and setgroups32.test.
   23530 
   23531 	Cleanup setfsuid syscall decoder.
   23532 	* uid.c (SYS_FUNC(setfsuid)): Remove redundant check.
   23533 
   23534 	tests: check decoding of setfsgid32 syscall.
   23535 	* tests/setfsgid32.c: New file.
   23536 	* tests/setfsgid32.test: New test.
   23537 	* tests/.gitignore: Add setfsgid32.
   23538 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23539 	(DECODER_TESTS): Add setfsgid32.test.
   23540 
   23541 	tests: check decoding of setfsgid syscall.
   23542 	* tests/setfsugid.c: New file.
   23543 	* tests/setfsgid.c: New file.
   23544 	* tests/setfsgid.test: New test.
   23545 	* tests/.gitignore: Add setfsgid.
   23546 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23547 	(DECODER_TESTS): Add setfsgid.test.
   23548 	(EXTRA_DIST): Add setfsugid.c.
   23549 
   23550 	tests: check decoding of setfsuid32 syscall.
   23551 	* tests/setfsuid32.c: New file.
   23552 	* tests/setfsuid32.test: New test.
   23553 	* tests/.gitignore: Add setfsuid32.
   23554 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23555 	(DECODER_TESTS): Add setfsuid32.test.
   23556 
   23557 	tests: check decoding of setfsuid syscall.
   23558 	* tests/setfsugid.c: New file.
   23559 	* tests/setfsuid.c: New file.
   23560 	* tests/setfsuid.test: New test.
   23561 	* tests/.gitignore: Add setfsuid.
   23562 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23563 	(DECODER_TESTS): Add setfsuid.test.
   23564 	(EXTRA_DIST): Add setfsugid.c.
   23565 
   23566 	tests: extend test coverage of setresgid32 syscall.
   23567 	* tests/setresgid32.c: New file.
   23568 	* tests/setresgid32.test: New test.
   23569 	* tests/.gitignore: Add setresgid32.
   23570 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23571 	(DECODER_TESTS): Add setresgid32.test.
   23572 
   23573 	tests: extend test coverage of setresgid syscall.
   23574 	* tests/setresgid.c: New file.
   23575 	* tests/setresgid.test: New test.
   23576 	* tests/.gitignore: Add setresgid.
   23577 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23578 	(DECODER_TESTS): Add setresgid.test.
   23579 
   23580 	tests: extend test coverage of setresuid32 syscall.
   23581 	* tests/setresuid32.c: New file.
   23582 	* tests/setresuid32.test: New test.
   23583 	* tests/.gitignore: Add setresuid32.
   23584 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23585 	(DECODER_TESTS): Add setresuid32.test.
   23586 
   23587 	tests: extend test coverage of setresuid syscall.
   23588 	* tests/setresugid.c: New file.
   23589 	* tests/setresuid.c: New file.
   23590 	* tests/setresuid.test: New test.
   23591 	* tests/.gitignore: Add setresuid.
   23592 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23593 	(DECODER_TESTS): Add setresuid.test.
   23594 	(EXTRA_DIST): Add setresugid.c.
   23595 
   23596 	tests: extend test coverage of setregid32 syscall.
   23597 	* tests/setregid32.c: New file.
   23598 	* tests/setregid32.test: New test.
   23599 	* tests/.gitignore: Add setregid32.
   23600 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23601 	(DECODER_TESTS): Add setregid32.test.
   23602 
   23603 	tests: extend test coverage of setregid syscall.
   23604 	* tests/setregid.c: New file.
   23605 	* tests/setregid.test: New test.
   23606 	* tests/.gitignore: Add setregid.
   23607 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23608 	(DECODER_TESTS): Add setregid.test.
   23609 
   23610 	tests: extend test coverage of setreuid32 syscall.
   23611 	* tests/setreuid32.c: New file.
   23612 	* tests/setreuid32.test: New test.
   23613 	* tests/.gitignore: Add setreuid32.
   23614 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23615 	(DECODER_TESTS): Add setreuid32.test.
   23616 
   23617 	tests: extend test coverage of setreuid syscall.
   23618 	* tests/setreugid.c: New file.
   23619 	* tests/setreuid.c: New file.
   23620 	* tests/setreuid.test: New test.
   23621 	* tests/.gitignore: Add setreuid.
   23622 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23623 	(DECODER_TESTS): Add setreuid.test.
   23624 	(EXTRA_DIST): Add setreugid.c.
   23625 
   23626 	tests: extend test coverage of setgid32 syscall.
   23627 	* tests/setgid32.c: New file.
   23628 	* tests/setgid32.test: New test.
   23629 	* tests/.gitignore: Add setgid32.
   23630 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23631 	(DECODER_TESTS): Add setgid32.test.
   23632 
   23633 	tests: extend test coverage of setgid syscall.
   23634 	* tests/setgid.c: New file.
   23635 	* tests/setgid.test: New test.
   23636 	* tests/.gitignore: Add setgid.
   23637 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23638 	(DECODER_TESTS): Add setgid.test.
   23639 
   23640 	tests: extend test coverage of setuid32 syscall.
   23641 	* tests/setuid32.c: New file.
   23642 	* tests/setuid32.test: New test.
   23643 	* tests/.gitignore: Add setuid32.
   23644 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23645 	(DECODER_TESTS): Add setuid32.test.
   23646 
   23647 	tests: extend test coverage of setuid syscall.
   23648 	* tests/setugid.c: New file.
   23649 	* tests/setuid.c: New file.
   23650 	* tests/setuid.test: New test.
   23651 	* tests/.gitignore: Add setuid.
   23652 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23653 	(DECODER_TESTS): Add setuid.test.
   23654 	(EXTRA_DIST): Add setugid.c.
   23655 
   23656 2016-04-20  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23657 
   23658 	tests: add shmxt.test.
   23659 	* tests/shmxt.c: New file.
   23660 	* tests/shmxt.test: New test.
   23661 	* tests/.gitignore: Add shmxt.
   23662 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23663 	(DECODER_TESTS): Add shmxt.test.
   23664 
   23665 2016-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   23666 
   23667 	alpha: fix decoding of shmat syscall.
   23668 	On alpha, shmat syscall is known as osf_shmat.
   23669 
   23670 	* linux/alpha/syscallent.h (osf_shmat): Fix sys_flags and sys_func.
   23671 
   23672 2016-04-20  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23673 
   23674 	tests: add semop.test.
   23675 	* tests/semop.c: New file.
   23676 	* tests/semop.test: New test.
   23677 	* tests/.gitignore: Add semop.
   23678 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23679 	(DECODER_TESTS): Add semop.test.
   23680 
   23681 2016-04-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   23682 
   23683 	prctl-seccomp-filter-v.test: robustify against unrelated prctl invocations
   23684 	* tests/prctl-seccomp-filter-v.test: Filter out PR_GET_* prctl calls.
   23685 
   23686 	Reported-by: Steve McIntyre <steve (a] einval.com>
   23687 
   23688 2016-04-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   23689 
   23690 	tests/pselect6.c: fix potential output mismatch.
   23691 	* tests/pselect6.c (main): In the last case of printing pselect6
   23692 	syscall, print the last argument the same way as in other cases.
   23693 
   23694 	Reported-by: Steve McIntyre <steve (a] einval.com>
   23695 
   23696 2016-04-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   23697 
   23698 	tests: check decoding of fchown32 syscall.
   23699 	* tests/fchown32.c: New file.
   23700 	* tests/fchown32.test: New test.
   23701 	* tests/.gitignore: Add fchown32.
   23702 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23703 	(DECODER_TESTS): Add fchown32.test.
   23704 
   23705 	tests: check decoding of fchown syscall.
   23706 	* tests/fchown.c: New file.
   23707 	* tests/fchown.test: New test.
   23708 	* tests/.gitignore: Add fchown.
   23709 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23710 	(DECODER_TESTS): Add fchown.test.
   23711 
   23712 	tests: check decoding of lchown32 syscall.
   23713 	* tests/lchown32.c: New file.
   23714 	* tests/lchown32.test: New test.
   23715 	* tests/.gitignore: Add lchown32.
   23716 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23717 	(DECODER_TESTS): Add lchown32.test.
   23718 
   23719 	tests: check decoding of lchown syscall.
   23720 	* tests/lchown.c: New file.
   23721 	* tests/lchown.test: New test.
   23722 	* tests/.gitignore: Add lchown.
   23723 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23724 	(DECODER_TESTS): Add lchown.test.
   23725 
   23726 	tests: check decoding of chown32 syscall.
   23727 	* tests/chown32.c: New file.
   23728 	* tests/chown32.test: New test.
   23729 	* tests/.gitignore: Add chown32.
   23730 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23731 	(DECODER_TESTS): Add chown32.test.
   23732 
   23733 	tests: check decoding of chown syscall.
   23734 	* tests/chown.c: New file.
   23735 	* tests/chown.test: New test.
   23736 	* tests/xchownx.c: New file.
   23737 	* tests/.gitignore: Add chown.
   23738 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23739 	(DECODER_TESTS): Add chown.test.
   23740 	(EXTRA_DIST): Add xchownx.c.
   23741 
   23742 	Fix decoding of 16-bit uid_t/git_t.
   23743 	* uid.c (printuid): Always cast value to uid_t.
   23744 
   23745 2016-04-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   23746 
   23747 	tests: move kernel uid overflow check to libtests.
   23748 	This code used in two different places, so move it to the library.
   23749 
   23750 	* tests/overflowuid.c: New file.
   23751 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   23752 	* tests/tests.h (check_overflowuid, check_overflowgid): New prototypes.
   23753 	* tests/uid.c (main): Use check_overflowuid.
   23754 	* tests/uid16.c (main): Likewise.
   23755 
   23756 2016-04-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   23757 
   23758 	tests: skip seccomp-strict.test and prctl-seccomp-strict.test on x32.
   23759 	As x86_64 kernel does not support x32 syscall numbers in
   23760 	SECCOMP_MODE_STRICT, skip affected tests on x32.
   23761 
   23762 	* tests/seccomp-strict.c (main) [__x86_64__ && __ILP32__]: Bail out
   23763 	using error_msg_and_skip.
   23764 	* tests/prctl-seccomp-strict.c: Likewise.
   23765 
   23766 2016-04-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   23767 
   23768 	tests: add seccomp-filter.test.
   23769 	* tests/seccomp-filter.c: New file.
   23770 	* tests/seccomp-filter.test: New test.
   23771 	* tests/.gitignore: Add seccomp-filter.
   23772 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23773 	(DECODER_TESTS): Add seccomp-filter.test.
   23774 
   23775 2016-04-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   23776 
   23777 	seccomp: fix decoding of sock_fprog and sock_filter structures.
   23778 	Always print struct sock_fprog.len.
   23779 	Fix printing of unfetchable elements in sock_filter array.
   23780 	Fix printing of large sock_filter arrays.
   23781 
   23782 	* seccomp.c (decode_fprog): Rewrite into decode_seccomp_fprog and
   23783 	print_seccomp_fprog.
   23784 	(print_seccomp_filter): Replace decode_fprog with print_seccomp_fprog.
   23785 	* tests/prctl-seccomp-filter-v.c (main): Update.
   23786 	* tests/seccomp-filter-v.c: New file.
   23787 	* tests/seccomp-filter-v.test: New test.
   23788 	* tests/.gitignore: Add seccomp-filter-v.
   23789 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23790 	(DECODER_TESTS): Add seccomp-filter-v.test.
   23791 
   23792 2016-04-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   23793 
   23794 	seccomp: print SECCOMP_* and BPF_* constants in a more compact way.
   23795 	* seccomp.c (decode_bpf_code, decode_bpf_stmt): Replace " | " with "|".
   23796 	* tests/prctl-seccomp-filter-v.c: Update.
   23797 
   23798 	tests: rename seccomp.test to prctl-seccomp-filter-v.test.
   23799 	* tests/.gitignore: Replace seccomp with prctl-seccomp-filter-v.
   23800 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23801 	(DECODER_TESTS): Replace seccomp.test with prctl-seccomp-filter-v.test.
   23802 	* tests/seccomp.c: Rename to tests/prctl-seccomp-filter-v.c.
   23803 	* tests/seccomp.test: Rename to tests/prctl-seccomp-filter-v.test.
   23804 
   23805 	tests: add seccomp-strict.test.
   23806 	* tests/seccomp-strict.c: New file.
   23807 	* tests/seccomp-strict.test: New test.
   23808 	* tests/.gitignore: Add seccomp-strict.
   23809 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23810 	(DECODER_TESTS): Add seccomp-strict.test.
   23811 
   23812 	tests: add prctl-seccomp-strict.test.
   23813 	* tests/prctl-seccomp-strict.c: New file.
   23814 	* tests/prctl-seccomp-strict.test: New test.
   23815 	* tests/.gitignore: Add prctl-seccomp-strict.
   23816 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23817 	(DECODER_TESTS): Add prctl-seccomp-strict.test.
   23818 
   23819 	tests: bring lists back to the sorted order.
   23820 
   23821 2016-04-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   23822 
   23823 	tests/epoll_create1.c: extend for the case of ENOSYS.
   23824 	* epoll_create1.c: Make the test work in case of epoll_create1
   23825 	returning ENOSYS.
   23826 
   23827 	tests/epoll_ctl.c: extend epoll_ctl coverage.
   23828 	* tests/epoll_ctl.c (main): Check EPOLL_CTL_DEL decoding.  Check
   23829 	decoding of long int descriptors and NULL struct epoll_event pointer.
   23830 
   23831 2016-04-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   23832 
   23833 	tests: add mlockall.test.
   23834 	* tests/mlockall.c: New file.
   23835 	* tests/mlockall.test: New test.
   23836 	* tests/.gitignore: Add mlockall.
   23837 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23838 	(DECODER_TESTS): Add mlockall.test.
   23839 
   23840 2016-04-08  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23841 
   23842 	tests: add epoll_wait.test.
   23843 	* tests/epoll_wait.c: New file.
   23844 	* tests/epoll_wait.test: New test.
   23845 	* tests/.gitignore: Add epoll_wait.
   23846 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23847 	(DECODER_TESTS): Add epoll_wait.test.
   23848 
   23849 	tests: add epoll_ctl.test.
   23850 	* tests/epoll_ctl.c: New file.
   23851 	* tests/epoll_ctl.test: New test.
   23852 	* tests/.gitignore: Add epoll_ctl.
   23853 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23854 	(DECODER_TESTS): Add epoll_ctl.test.
   23855 
   23856 	tests: add epoll_create.test.
   23857 	* tests/epoll_create.c: New file.
   23858 	* tests/epoll_create.test: New test.
   23859 	* tests/.gitignore: Add epoll_create.
   23860 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23861 	(DECODER_TESTS): Add epoll_create.test.
   23862 
   23863 2016-04-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   23864 
   23865 	tests/pread64-pwrite64.c: minor cleanup.
   23866 	* tests/pread64-pwrite64.c: Do not include <sys/uio.h>.
   23867 
   23868 2016-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   23869 
   23870 	Fix decoding of swapon flags.
   23871 	* swapon.c (SYS_FUNC(swapon)): Print priority regardless
   23872 	of SWAP_FLAG_PREFER flag being set.
   23873 	* tests/swap.c (error_msg): Handle EINVAL.
   23874 	(main): Check decoding of swapon flags.
   23875 
   23876 	tests/unlinkat.c: check AT_* decoding.
   23877 	* tests/unlinkat.c (main): Check decoding of AT_* constants.
   23878 
   23879 	tests/linkat.c: check AT_* decoding.
   23880 	* tests/linkat.c (main): Check decoding of AT_* constants.
   23881 
   23882 2016-04-06  Elliott Hughes  <enh (a] google.com>
   23883 
   23884 	Improve decoding of Android's PR_SET_VMA prctl.
   23885 	Before:
   23886 
   23887 	  prctl(0x53564d41 /* PR_??? */, 0, 0x7f8ab53000, 4096,
   23888 	        "atexit handlers") = 0
   23889 
   23890 	After:
   23891 
   23892 	  prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x7fa8cbd000, 4096,
   23893 	        "atexit handlers") = 0
   23894 
   23895 	* prctl.c (SYS_FUNC(prctl)) [__ANDROID__]: Do not define PR_SET_VMA.
   23896 	* Hard-code PR_SET_VMA_ANON_NAME, the only current sub-option.
   23897 	* xlat/prctl_options.in: Add PR_SET_VMA.
   23898 
   23899 2016-04-06  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   23900 
   23901 	tests: add mkdirat.test.
   23902 	* tests/mkdirat.c: New file.
   23903 	* tests/mkdirat.test: New test.
   23904 	* tests/.gitignore: Add mkdirat.
   23905 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23906 	(DECODER_TESTS): Add mkdirat.test.
   23907 
   23908 	tests: add swap.test.
   23909 	* tests/swap.c: New file.
   23910 	* tests/swap.test: New test.
   23911 	* tests/.gitignore: Add swap.
   23912 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23913 	(DECODER_TESTS): Add swap.test.
   23914 
   23915 	tests: add unlinkat.test.
   23916 	* tests/unlinkat.c: New file.
   23917 	* tests/unlinkat.test: New test.
   23918 	* tests/.gitignore: Add unlinkat.
   23919 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23920 	(DECODER_TESTS): Add unlinkat.test.
   23921 
   23922 	tests: add linkat.test.
   23923 	* tests/linkat.c: New file.
   23924 	* tests/linkat.test: New test.
   23925 	* tests/.gitignore: Add linkat.
   23926 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23927 	(DECODER_TESTS): Add linkat.test.
   23928 
   23929 2016-04-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   23930 
   23931 	tests: add sync_file_range.test and sync_file_range2.test.
   23932 	* configure.ac (AC_CHECK_FUNCS): Add sync_file_range.
   23933 	* tests/sync_file_range.c: New file.
   23934 	* tests/sync_file_range2.c: Likewise.
   23935 	* tests/sync_file_range.test: New test.
   23936 	* tests/sync_file_range2.test: Likewise.
   23937 	* tests/.gitignore: Add sync_file_range and sync_file_range2.
   23938 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23939 	(DECODER_TESTS): Add sync_file_range.test and sync_file_range2.test.
   23940 
   23941 2016-04-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   23942 
   23943 	Add default values for SYNC_FILE_RANGE_* constants.
   23944 	* xlat/sync_file_range_flags.in: Add default values.
   23945 
   23946 2016-04-05  Elliott Hughes  <enh (a] google.com>
   23947 
   23948 	Fix sync_file_range2 output.
   23949 	Before:
   23950 
   23951 	  sync_file_range2(3SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|
   23952 	    SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0, )
   23953 
   23954 	After:
   23955 
   23956 	  sync_file_range2(3, SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|
   23957 	    SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0)
   23958 
   23959 	* sync_file_range.c (SYS_FUNC(sync_file_range2)): Output the ", "
   23960 	in the right place.
   23961 
   23962 2016-04-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   23963 
   23964 	Replace PF_* constants with AF_*
   23965 	AF_* constants appear to be more standardized, and in practice there's
   23966 	always a one to one relationship between AF_* and PF_*, so let's
   23967 	use AF_* instead of PF_*.
   23968 
   23969 	* xlat/domains.in: Remove.
   23970 	* net.c: Do not define PF_UNSPEC.  Stop including "xlat/domains.h".
   23971 	Replace PF_* with AF_*.  Replace domains with addrfams.
   23972 	* tests/inet-cmsg.c: Replace PF_INET with AF_INET.
   23973 	* tests/net-yy-inet.c: Likewise.
   23974 	* tests/netlink_inet_diag.c: Likewise.
   23975 	* tests/net-accept-connect.c: Replace PF_LOCAL with AF_LOCAL.
   23976 	* tests/net-y-unix.c: Likewise.
   23977 	* tests/net-yy-unix.c: Likewise.
   23978 	* tests/netlink_unix_diag.c: Likewise.
   23979 	* tests/net.expected: Replace PF_ with AF_.
   23980 
   23981 2016-04-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   23982 
   23983 	tests: add read-write.test.
   23984 	* tests/read-write.c: New file.
   23985 	* tests/read-write.test: New test.
   23986 	* tests/.gitignore: Add read-write.
   23987 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   23988 	(DECODER_TESTS): Add read-write.test.
   23989 
   23990 2016-04-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   23991 
   23992 	tests/pread64-pwrite64.test: extend dumpio coverage.
   23993 	* tests/pread64-pwrite64.c (dump_str, print_hex, test_dump):
   23994 	New functions.
   23995 	(main): Use them to test dumping of various data.
   23996 	* tests/pread64-pwrite64.test: Update.
   23997 
   23998 	tests: add hexdump_memdup function to libtests.
   23999 	* tests/hexdump_strdup.c (hexdump_memdup): New function.
   24000 	(hexdump_strdup): Use it.
   24001 	* tests/tests.h (hexdump_memdup): New prototype.
   24002 
   24003 	tests: add fchownat.test.
   24004 	* tests/fchownat.c: New file.
   24005 	* tests/fchownat.test: New test.
   24006 	* tests/.gitignore: Add fchownat.
   24007 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24008 	(DECODER_TESTS): Add fchownat.test.
   24009 
   24010 	tests: add fchmodat.test.
   24011 	* tests/fchmodat.c: New file.
   24012 	* tests/fchmodat.test: New test.
   24013 	* tests/.gitignore: Add fchmodat.
   24014 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24015 	(DECODER_TESTS): Add fchmodat.test.
   24016 
   24017 	Fix printing of negative offsets in pread64 and pwrite64 syscalls.
   24018 	* io.c (SYS_FUNC(pread), SYS_FUNC(pwrite)): Print offset
   24019 	using %lld format string.
   24020 	* tests/pread64-pwrite64.c: New file.
   24021 	* tests/pread64-pwrite64.test: New test.
   24022 	* tests/.gitignore: Add pread64-pwrite64.
   24023 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24024 	(pread64_pwrite64_CPPFLAGS): New variable.
   24025 	(DECODER_TESTS): Add pread64-pwrite64.
   24026 
   24027 	tests/hexdump_strdup.c: add support for longer strings.
   24028 	* tests/hexdump_strdup.c (hexdump_strdup): Output extra space character
   24029 	before hexdumping of the 9th symbol.
   24030 
   24031 	tests/preadv-pwritev.c: fix typo in error diagnostics.
   24032 	* tests/preadv-pwritev.c (main): Fix typo in error message.
   24033 
   24034 2016-04-01  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24035 
   24036 	tests: add chroot.test.
   24037 	* tests/chroot.c: New file.
   24038 	* tests/chroot.test: New test.
   24039 	* tests/.gitignore: Add chroot.
   24040 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24041 	(DECODER_TESTS): Add chroot.test.
   24042 
   24043 	tests: add fdatasync.test.
   24044 	* tests/fdatasync.c: New file.
   24045 	* tests/fdatasync.test: New test.
   24046 	* tests/.gitignore: Add fdatasync.
   24047 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24048 	(DECODER_TESTS): Add fdatasync.test.
   24049 
   24050 	tests: add fsync.test.
   24051 	* tests/fsync.c: New file.
   24052 	* tests/fsync.test: New test.
   24053 	* tests/.gitignore: Add fsync.
   24054 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24055 	(DECODER_TESTS): Add fsync.test.
   24056 
   24057 	tests: add sethostname.test.
   24058 	* tests/sethostname.c: New file.
   24059 	* tests/sethostname.test: New test.
   24060 	* tests/.gitignore: Add sethostname.
   24061 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24062 	(DECODER_TESTS): Add sethostname.test.
   24063 
   24064 2016-04-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   24065 
   24066 	Consistently handle unsigned arguments of mmap* and remap_file_pages.
   24067 	Explicitly declare first 4 arguments of mmap* and all remap_file_pages
   24068 	arguments as unsigned to avoid potential sign extension issues.
   24069 
   24070 	* mem.c (print_mmap, SYS_FUNC(remap_file_pages)): Assign syscall
   24071 	arguments to local variables of appropriate types.
   24072 
   24073 2016-04-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   24074 
   24075 	Consistently handle 2nd and 3rd arguments of [gs]etsockopt as unsigned.
   24076 	The second (level) and third (optname) arguments of getsockopt and
   24077 	setsockopt syscalls are enums, so treat them consistently as enums:
   24078 	use "unsigned int" type to avoid potential sign extension issues.
   24079 
   24080 	* net.c (print_sockopt_fd_level_name, print_getsockopt,
   24081 	print_setsockopt): Change type of "level" and "name" arguments
   24082 	from "int" to "unsigned int".
   24083 
   24084 2016-04-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   24085 
   24086 	Add sentinel attribute to printxvals.
   24087 	* gcc_compat.h (ATTRIBUTE_SENTINEL): New macro.
   24088 	* defs.h (printxvals): Add ATTRIBUTE_SENTINEL.
   24089 
   24090 	Cleanup parser of ptrace syscall.
   24091 	* process.c (print_user_offset_addr): New function for printing offset
   24092 	address in the tracee's USER area.
   24093 	(SYS_FUNC(ptrace)): Assign syscall arguments to local variables with
   24094 	appropriate types.  Print pid argument as int.  Use switch statement
   24095 	in the code that handles address argument.  Use print_user_offset_addr
   24096 	to print address in PTRACE_PEEKUSER and PTRACE_POKEUSER requests.
   24097 
   24098 2016-03-31  Jeff Mahoney  <jeffm (a] suse.com>
   24099 
   24100 	Define PRI__[uxs]64 macros to print __s64 and __u64 values.
   24101 	Rather than cast every __u64 or __s64 before printing,
   24102 	define printing helpers for those types directly.
   24103 
   24104 	* defs.h (PRI__s64, PRI__u64, PRI__x64): New macros.
   24105 
   24106 2016-03-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   24107 
   24108 	Implement dumping of preadv and pwritev syscalls.
   24109 	* syscall.c (dumpio): Add SEN_preadv and SEN_pwritev.
   24110 	* NEWS: Mention this.
   24111 	* tests/preadv-pwritev.c: New file.
   24112 	* tests/preadv-pwritev.test: New test.
   24113 	* tests/.gitignore: Add preadv-pwritev.
   24114 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24115 	(preadv_pwritev_CPPFLAGS): New variable.
   24116 	(DECODER_TESTS): Add preadv-pwritev.
   24117 
   24118 2016-03-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   24119 
   24120 	Fix decoding of preadv syscall in case of short read.
   24121 	* io.c (SYS_FUNC(preadv)): Call tprint_iov_upto instead
   24122 	of tprint_iov and specify syscall return value as a data size limit.
   24123 	* NEWS: Mention it.
   24124 	* tests/preadv.c (main): Add a test case for preadv short read.
   24125 
   24126 	Fix printing of negative offsets in preadv and pwritev syscalls.
   24127 	* io.c (print_llu_from_low_high_val): Rename to
   24128 	print_lld_from_low_high_val, all callers changed.
   24129 	Print value as a signed integer.
   24130 	* tests/preadv.c: New file.
   24131 	* tests/preadv.test: New test.
   24132 	* tests/pwritev.c: New file.
   24133 	* tests/pwritev.test: New test.
   24134 	* tests/.gitignore: Add preadv and pwritev.
   24135 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24136 	(preadv_CPPFLAGS, pwritev_CPPFLAGS): New variables.
   24137 	(DECODER_TESTS): Add preadv.test and pwritev.test.
   24138 
   24139 	Fix printing of unreadable struct iovec.
   24140 	* io.c (tprint_iov_upto): If the first element of iovec array is
   24141 	unreadable, print its address without array markup.
   24142 	* tests/readv.c (main): Check it.
   24143 
   24144 	tests: factor out a part common to many simply organized test scripts.
   24145 	* tests/init.sh (run_strace_match_diff): New function.
   24146 	* tests/acct.test: Rewrite using run_strace_match_diff.
   24147 	* tests/aio.test: Likewise.
   24148 	* tests/alarm.test: Likewise.
   24149 	* tests/chmod.test: Likewise.
   24150 	* tests/clock_nanosleep.test: Likewise.
   24151 	* tests/clock_xettime.test: Likewise.
   24152 	* tests/copy_file_range.test: Likewise.
   24153 	* tests/creat.test: Likewise.
   24154 	* tests/dup.test: Likewise.
   24155 	* tests/dup2.test: Likewise.
   24156 	* tests/dup3.test: Likewise.
   24157 	* tests/epoll_create1.test: Likewise.
   24158 	* tests/execveat-v.test: Likewise.
   24159 	* tests/execveat.test: Likewise.
   24160 	* tests/fchmod.test: Likewise.
   24161 	* tests/fcntl.test: Likewise.
   24162 	* tests/file_handle.test: Likewise.
   24163 	* tests/flock.test: Likewise.
   24164 	* tests/fork-f.test: Likewise.
   24165 	* tests/ftruncate.test: Likewise.
   24166 	* tests/ftruncate64.test: Likewise.
   24167 	* tests/getcwd.test: Likewise.
   24168 	* tests/getdents.test: Likewise.
   24169 	* tests/getdents64.test: Likewise.
   24170 	* tests/getrandom.test: Likewise.
   24171 	* tests/getrusage.test: Likewise.
   24172 	* tests/getxxid.test: Likewise.
   24173 	* tests/inet-cmsg.test: Likewise.
   24174 	* tests/init.sh: Likewise.
   24175 	* tests/membarrier.test: Likewise.
   24176 	* tests/mincore.test: Likewise.
   24177 	* tests/mknod.test: Likewise.
   24178 	* tests/mlock2.test: Likewise.
   24179 	* tests/mmsg.test: Likewise.
   24180 	* tests/nanosleep.test: Likewise.
   24181 	* tests/open.test: Likewise.
   24182 	* tests/openat.test: Likewise.
   24183 	* tests/pselect6.test: Likewise.
   24184 	* tests/readdir.test: Likewise.
   24185 	* tests/readlink.test: Likewise.
   24186 	* tests/readv.test: Likewise.
   24187 	* tests/recvmsg.test: Likewise.
   24188 	* tests/rename.test: Likewise.
   24189 	* tests/renameat.test: Likewise.
   24190 	* tests/rt_sigpending.test: Likewise.
   24191 	* tests/rt_sigprocmask.test: Likewise.
   24192 	* tests/rt_sigqueueinfo.test: Likewise.
   24193 	* tests/rt_sigsuspend.test: Likewise.
   24194 	* tests/rt_sigtimedwait.test: Likewise.
   24195 	* tests/rt_tgsigqueueinfo.test: Likewise.
   24196 	* tests/sched_get_priority_mxx.test: Likewise.
   24197 	* tests/sched_xetaffinity.test: Likewise.
   24198 	* tests/sched_xetparam.test: Likewise.
   24199 	* tests/sched_xetscheduler.test: Likewise.
   24200 	* tests/seccomp.test: Likewise.
   24201 	* tests/select.test: Likewise.
   24202 	* tests/sendfile.test: Likewise.
   24203 	* tests/sendfile64.test: Likewise.
   24204 	* tests/splice.test: Likewise.
   24205 	* tests/statx.sh: Likewise.
   24206 	* tests/sysinfo.test: Likewise.
   24207 	* tests/syslog.test: Likewise.
   24208 	* tests/tee.test: Likewise.
   24209 	* tests/time.test: Likewise.
   24210 	* tests/timer_create.test: Likewise.
   24211 	* tests/timer_xettime.test: Likewise.
   24212 	* tests/timerfd_xettime.test: Likewise.
   24213 	* tests/times-fail.test: Likewise.
   24214 	* tests/times.test: Likewise.
   24215 	* tests/truncate.test: Likewise.
   24216 	* tests/truncate64.test: Likewise.
   24217 	* tests/umask.test: Likewise.
   24218 	* tests/umount.test: Likewise.
   24219 	* tests/umount2.test: Likewise.
   24220 	* tests/userfaultfd.test: Likewise.
   24221 	* tests/vmsplice.test: Likewise.
   24222 	* tests/xet_robust_list.test: Likewise.
   24223 	* tests/xetitimer.test: Likewise.
   24224 	* tests/xetpgid.test: Likewise.
   24225 	* tests/xetpriority.test: Likewise.
   24226 	* tests/xettimeofday.test: Likewise.
   24227 
   24228 	tests: introduce $NAME.
   24229 	* tests/init.sh (NAME): New variable, defined to ${ME_%.test}.
   24230 	(run_prog, match_awk, match_diff, match_grep): Replace ${ME_%.test}
   24231 	with $NAME.
   24232 	* tests/fcntl.test: Likewise.
   24233 	* tests/fstat.test: Likewise.
   24234 	* tests/mmap.test: Likewise.
   24235 	* tests/net-y-unix.test: Likewise.
   24236 	* tests/net-yy-inet.test: Likewise.
   24237 	* tests/net-yy-unix.test: Likewise.
   24238 	* tests/open.test: Likewise.
   24239 	* tests/openat.test: Likewise.
   24240 	* tests/poll.test: Likewise.
   24241 	* tests/ppoll.test: Likewise.
   24242 	* tests/readlink.test: Likewise.
   24243 	* tests/select.test: Likewise.
   24244 	* tests/statx.sh: Likewise.
   24245 	* tests/uname.test: Likewise.
   24246 
   24247 2016-03-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   24248 
   24249 	tests: move definitions of $OUT and $ERR to init.sh.
   24250 	As virtually every test defines either one or both of OUT and ERR
   24251 	variables and these definitions are exactly the same, move definitions
   24252 	of these variables from individual tests to init.sh.
   24253 
   24254 	* tests/init.sh (OUT, ERR): New variables.
   24255 	* tests/ipc.sh: Remove initialization of OUT variable.
   24256 	* tests/statx.sh: Likewise.
   24257 	* tests/*.test: Remove initialization of OUT and ERR variables.
   24258 
   24259 2016-03-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   24260 
   24261 	tests: simplify sendfile.test and sendfile64.test.
   24262 	Use the executable itself for input by default.
   24263 
   24264 	* tests/sendfile.c (main): Use av[0] instead of av[1] for input.
   24265 	* tests/sendfile64.c (main): Likewise.
   24266 	* tests/sendfile.test: Invoke run_prog without arguments.
   24267 	* tests/sendfile64.test: Likewise.
   24268 
   24269 2016-03-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   24270 
   24271 	open.test, openat.test: lift /proc requirement.
   24272 	While -P option needs /proc to match descriptors, it does not use
   24273 	/proc to match pathnames.  As these tests do not need descriptor
   24274 	match, the /proc requirement can be safely lifted.
   24275 
   24276 	* tests/open.test: Lift /proc/self/fd/ requirement.
   24277 	* tests/openat.test: Likewise.
   24278 
   24279 2016-03-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   24280 
   24281 	quotactl: add decoding of Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA.
   24282 	* quota.c (if_nextdqblk): New structure.
   24283 	(decode_cmd_data): Handle Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA.
   24284 
   24285 	Update Q_* constants.
   24286 	* xlat/quotacmds.in: Add Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA introduced
   24287 	by linux kernel commits v4.6-rc1~65^2~9^2~5 and v4.6-rc1~65^2~9^2~6.
   24288 
   24289 	Update CLONE_* constants.
   24290 	* xlat/clone_flags.in: Rename CLONE_STOPPED to CLONE_NEWCGROUP.
   24291 	The former was removed by linux kernel commit v2.6.38-rc1~217.
   24292 	The latter was introduced by linux kernel commit v4.6-rc1~67^2~8.
   24293 
   24294 	Update BPF_MAP_TYPE_* constants.
   24295 	* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_PERCPU_HASH,
   24296 	BPF_MAP_TYPE_PERCPU_ARRAY, and BPF_MAP_TYPE_STACK_TRACE introduced by
   24297 	linux kernel commits v4.6-rc1~91^2~326^2~5, v4.6-rc1~91^2~326^2~4, and
   24298 	v4.6-rc1~91^2~212^2~1, respectively.
   24299 
   24300 	Update SO_* constants.
   24301 	* xlat/sockoptions.in: Add SO_CNX_ADVICE introduced by linux kernel
   24302 	commit v4.6-rc1~91^2~176.
   24303 
   24304 	Update SEGV_* constants.
   24305 	* xlat/sigsegv_codes.in: Add SEGV_PKUERR introduced by linux kernel
   24306 	commit v4.6-rc1~68^2~23.
   24307 
   24308 	avr32: wire up copy_file_range syscall.
   24309 	* linux/avr32/syscallent.h [325]: Add copy_file_range entry.
   24310 
   24311 2016-03-28  JayRJoshi  <jay.r.joshi100 (a] gmail.com>
   24312 
   24313 	tests/uname.test: check abbreviated output, use print_quoted_string.
   24314 	* tests/uname.c (main): Use print_quoted_string to print
   24315 	utsname members.  Add abbrev check.
   24316 	* tests/uname.test: Add abbrev check.
   24317 
   24318 2016-03-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   24319 
   24320 	faccessat.test: robustify against libcs invoking faccessat syscall on their own
   24321 	* tests/faccessat.c (TMP_FILE): Rename to sample, change its value
   24322 	to "faccessat.sample".
   24323 	* tests/faccessat.test: Rewrite using openat.test.
   24324 
   24325 	openat.test: robustify against libcs invoking openat syscall on their own
   24326 	* tests/openat.c (main): Rename fname to sample, change its value
   24327 	to "openat.sample".
   24328 	* tests/openat.test: Use -P option to filter out openat syscalls
   24329 	made by libc and dynamic linker.
   24330 
   24331 	tests: add open.test.
   24332 	* tests/open.c: New file.
   24333 	* tests/open.test: New test.
   24334 	* tests/.gitignore: Add open.
   24335 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24336 	(DECODER_TESTS): Add open.test.
   24337 
   24338 2016-03-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   24339 
   24340 	Update generic ioctl entries from linux 4.5.
   24341 	* linux/64/ioctls_inc.h: Update from linux v4.5 using ioctls_gen.sh.
   24342 	* linux/32/ioctls_inc_align32.h: Likewise.
   24343 	* linux/32/ioctls_inc_align64.h: Likewise.
   24344 	* NEWS: Mention this.
   24345 
   24346 2016-03-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   24347 
   24348 	maint: update for linux 4.5.
   24349 	* maint/ioctls_sym.sh: Update workarounds for drm/*_drm.h files.
   24350 	Add workarounds for xen/gntdev.h and net/nfc/nci_core.h files.
   24351 	Update path of saa6588.h and exynos-fimc.h files.
   24352 
   24353 2016-03-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   24354 
   24355 	Fix decoding of device numbers in mknod and mknodat syscalls.
   24356 	* mknod.c (decode_mknod): Treat device number argument as unsigned int.
   24357 	* tests/mknod.c: Include <sys/sysmacros.h> or <sys/mkdev.h>
   24358 	for definition of makedev macro.
   24359 	(main): Add a check for a character special file.
   24360 
   24361 2016-03-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   24362 
   24363 	sparc64: fix decoding of mknod and mknodat syscalls for sparc personality
   24364 	Remove remnants of solaris personality support in mknod parser
   24365 	that resulted to sparc personality being decoded as old solaris
   24366 	personality.  This complements commit v4.10-45-gdf4dd8b and fixes
   24367 	commit v4.10-46-g588a90f.
   24368 
   24369 	* mknod.c (decode_mknod) [SPARC || SPARC64]: Remove.
   24370 
   24371 2016-03-25  Katerina Koukiou  <k.koukiou (a] googlemail.com>
   24372 
   24373 	tests: add openat.test.
   24374 	* tests/openat.c: New file.
   24375 	* tests/openat.test: New test.
   24376 	* tests/.gitignore: Add openat.
   24377 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24378 	(DECODER_TESTS): Add openat.test.
   24379 
   24380 2016-03-25  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24381 
   24382 	tests: add renameat.test.
   24383 	* tests/renameat.c: New file.
   24384 	* tests/renameat.test: New test.
   24385 	* tests/.gitignore: Add renameat.
   24386 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24387 	(DECODER_TESTS): Add renameat.test.
   24388 
   24389 	tests: add faccessat.test.
   24390 	* tests/faccessat.c: New file.
   24391 	* tests/faccessat.test: New test.
   24392 	* tests/.gitignore: Add faccessat.
   24393 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24394 	(DECODER_TESTS): Add faccessat.test.
   24395 
   24396 	tests: add creat.test.
   24397 	* tests/creat.c: New file.
   24398 	* tests/creat.test: New test.
   24399 	* tests/.gitignore: Add creat.
   24400 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24401 	(DECODER_TESTS): Add creat.test.
   24402 
   24403 	tests: add mknod.test.
   24404 	* tests/mknod.c: New file.
   24405 	* tests/mknod.test: New test.
   24406 	* tests/.gitignore: Add mknod.
   24407 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24408 	(DECODER_TESTS): Add mknod.test.
   24409 
   24410 	tests: add syslog.test.
   24411 	* tests/syslog.c: New file.
   24412 	* tests/syslog.test: New test.
   24413 	* tests/.gitignore: Add syslog.
   24414 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24415 	(DECODER_TESTS): Add syslog.test.
   24416 
   24417 2016-03-23  JayRJoshi  <jay.r.joshi100 (a] gmail.com>
   24418 
   24419 	tests/scm_rights-fd.test: fix pathname regex.
   24420 	Pathname containing >, }, or non-printable characters was resulting
   24421 	in failing of the test.
   24422 
   24423 	* tests/scm_rights-fd.test: Fix pathname regex and simplify things.
   24424 
   24425 2016-03-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   24426 
   24427 	tests: add strace-r.test.
   24428 	* tests/strace-r.expected: New file.
   24429 	* tests/strace-r.test: New test.
   24430 	* tests/Makefile.am (MISC_TESTS): Add it.
   24431 	(EXTRA_DIST): Add strace-r.expected.
   24432 
   24433 	tests: add strace-ttt.test.
   24434 	* tests/strace-ttt.test: New test.
   24435 	* tests/Makefile.am (MISC_TESTS): Add it.
   24436 
   24437 	tests: add strace-tt.test.
   24438 	* tests/strace-tt.test: New test.
   24439 	* tests/Makefile.am (MISC_TESTS): Add it.
   24440 
   24441 	tests: add strace-t.test.
   24442 	* tests/strace-t.test: New test.
   24443 	* tests/Makefile.am (MISC_TESTS): Add it.
   24444 
   24445 	tests: add strace-T.test.
   24446 	* tests/strace-T.expected: New file.
   24447 	* tests/strace-T.test: New test.
   24448 	* tests/Makefile.am (MISC_TESTS): Add it.
   24449 	(EXTRA_DIST): Add strace-T.expected.
   24450 
   24451 2016-03-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   24452 
   24453 	tests: split out tests of specific decoders.
   24454 	Split TESTS into three groups: tests of specific decoders, libunwind
   24455 	tests, and all other tests.
   24456 
   24457 	* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
   24458 	bexecve.test, count-f.test, count.test, detach-running.test,
   24459 	detach-sleeping.test, detach-stopped.test, dumpio.test,
   24460 	filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
   24461 	pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
   24462 	strace-f.test, and vfork-f.test to MISC_TESTS.
   24463 	Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
   24464 	Add $(DECODER_TESTS) and $(MISC_TESTS).
   24465 
   24466 2016-03-23  JayRJoshi  <jay.r.joshi100 (a] gmail.com>
   24467 
   24468 	tests: add getcwd.test.
   24469 	* tests/getcwd.c: New file.
   24470 	* tests/getcwd.test: New test.
   24471 	* tests/.gitignore: Add getcwd.
   24472 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24473 	(TESTS): Add getcwd.test.
   24474 
   24475 	tests: add print_quoted_string function to libtests.
   24476 	* tests/tests.h (print_quoted_string): New prototype.
   24477 	* tests/print_quoted_string.c: New file.
   24478 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   24479 
   24480 2016-03-17  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24481 
   24482 	tests: add xetpriority.test.
   24483 	* resource.c (SYS_FUNC(getpriority), SYS_FUNC(setpriority)): Print
   24484 	the second syscall argument using %d format.
   24485 	* tests/xetpriority.c: New file.
   24486 	* tests/xetpriority.test: New test.
   24487 	* tests/.gitignore: Add xetpriority.
   24488 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24489 	(TESTS): Add xetpriority.test.
   24490 
   24491 2016-03-15  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24492 
   24493 	tests: add flock.test.
   24494 	* tests/flock.c: New file.
   24495 	* tests/flock.test: New test.
   24496 	* tests/.gitignore: Add flock.
   24497 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24498 	(TESTS): Add flock.test.
   24499 
   24500 	tests: add sched_xetscheduler.test.
   24501 	* tests/sched_xetscheduler.c: New file.
   24502 	* tests/sched_xetscheduler.test: New test.
   24503 	* tests/.gitignore: Add sched_xetscheduler.
   24504 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24505 	(TESTS): Add sched_xetscheduler.test.
   24506 
   24507 2016-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   24508 
   24509 	alpha: fix SOCK_DIAG_BY_FAMILY tests.
   24510 	This complements commit v4.9-368-g301c65c.
   24511 
   24512 	* tests/netlink_inet_diag.c (check_responses): Align "buf"
   24513 	on sizeof(long) boundary.
   24514 	* tests/netlink_unix_diag.c (check_responses): Likewise.
   24515 
   24516 2016-03-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   24517 
   24518 	Update EPOLL* constants.
   24519 	* xlat/epollevents.in: Add EPOLLWAKEUP and EPOLLEXCLUSIVE.
   24520 
   24521 2016-03-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   24522 
   24523 	tests: add count-f.test.
   24524 	* tests/count-f.c: New file.
   24525 	* tests/count-f.expected: Likewise.
   24526 	* tests/count-f.test: New test.
   24527 	* tests/.gitignore: Add count-f.
   24528 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24529 	(count_f_LDADD): New variable.
   24530 	(EXTRA_DIST): Add count-f.expected.
   24531 	(TESTS): Add count-f.test.
   24532 
   24533 2016-02-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   24534 
   24535 	hppa: wire up copy_file_range syscall.
   24536 	* linux/hppa/syscallent.h [346]: Add copy_file_range entry.
   24537 
   24538 2016-03-11  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24539 
   24540 	tests: filter strace output in uname test.
   24541 	* tests/uname.test: Use uniq to filter strace output.
   24542 
   24543 2016-03-10  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24544 
   24545 	tests: add sched_xetparam.test.
   24546 	* tests/sched_xetparam.c: New file.
   24547 	* tests/sched_xetparam.test: New test.
   24548 	* tests/.gitignore: Add sched_xetparam.
   24549 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24550 	(TESTS): Add sched_xetparam.test.
   24551 
   24552 	tests: add sched_get_priority_mxx.test.
   24553 	* tests/sched_get_priority_mxx.c: New file.
   24554 	* tests/sched_get_priority_mxx.test: New test.
   24555 	* tests/.gitignore: Add sched_get_priority_mxx.
   24556 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24557 	(TESTS): Add sched_get_priority_mxx.test.
   24558 
   24559 	tests: add dup.test, dup2.test, and dup3.test.
   24560 	* tests/dup.c: New file.
   24561 	* tests/dup.test: New test.
   24562 	* tests/dup2.c: New file.
   24563 	* tests/dup2.test: New test.
   24564 	* tests/dup3.c: New file.
   24565 	* tests/dup3.test: New test.
   24566 	* tests/.gitignore: Add dup, dup2, and dup3.
   24567 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24568 	(TESTS): Add dup.test, dup2.test, and dup3.test.
   24569 
   24570 2016-03-10  Fabien Siron  <fabien.siron (a] epita.fr>
   24571 
   24572 	tests: add fchmod.test.
   24573 	* tests/fchmod.c: New file.
   24574 	* tests/fchmod.test: New test.
   24575 	* tests/.gitignore: Add fchmod.
   24576 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24577 	(TESTS): Add fchmod.test.
   24578 
   24579 2016-03-09  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24580 
   24581 	tests: add acct.test.
   24582 	* tests/acct.c: New file.
   24583 	* tests/acct.test: New test.
   24584 	* tests/.gitignore: Add acct.
   24585 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24586 	(TESTS): Add acct.test.
   24587 
   24588 2016-03-07  Anchit Jain  <anchitjain1234 (a] gmail.com>
   24589 
   24590 	tests: add chmod.test.
   24591 	* tests/chmod.c: New file.
   24592 	* tests/chmod.test: New test.
   24593 	* tests/.gitignore: Add chmod.
   24594 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24595 	(TESTS): Add chmod.test.
   24596 
   24597 2016-03-05  Nahim El Atmani  <naam (a] lse.epita.fr>
   24598 
   24599 	Reduce memory usage while managing tcbs allocation.
   24600 	* strace.c (init):  Remove initial memory allocation for tcbtab.
   24601 	(expand_tcbtab): Do initial memory allocation when tcbtabsize == 0.
   24602 
   24603 	Reviewed-By: Gabriel Laskar <gabriel (a] lse.epita.fr>
   24604 	Reported-by: haris iqbal <haris.phnx (a] gmail.com>
   24605 
   24606 2016-03-01  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24607 
   24608 	tests: add umask.test.
   24609 	* tests/umask.c: New file.
   24610 	* tests/umask.test: New test.
   24611 	* tests/.gitignore: Add umask.
   24612 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24613 	(TESTS): Add umask.test.
   24614 
   24615 	tests: add rename.test.
   24616 	* tests/rename.c: New file.
   24617 	* tests/rename.test: New test.
   24618 	* tests/.gitignore: Add rename.
   24619 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24620 	(TESTS): Add rename.test.
   24621 
   24622 	tests: add uname.test.
   24623 	* tests/uname.c: New file.
   24624 	* tests/uname.test: New test.
   24625 	* tests/.gitignore: Add uname.
   24626 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24627 	(TESTS): Add uname.test.
   24628 
   24629 2016-02-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   24630 
   24631 	mips: wire up copy_file_range syscall.
   24632 	* linux/mips/syscallent-n32.h [6324]: Add copy_file_range entry.
   24633 	* linux/mips/syscallent-n64.h [5320]: Likewise.
   24634 	* linux/mips/syscallent-o32.h [4360]: Likewise.
   24635 
   24636 2016-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   24637 
   24638 	tests: add rt_sigsuspend.test.
   24639 	* tests/rt_sigsuspend.c: New file.
   24640 	* tests/rt_sigsuspend.test: New test.
   24641 	* tests/.gitignore: Add rt_sigsuspend.
   24642 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24643 	(TESTS): Add rt_sigsuspend.test.
   24644 
   24645 	Print pid_t arguments of rt_sigqueueinfo and rt_tgsigqueueinfo as int.
   24646 	* signal.c (SYS_FUNC(rt_sigqueueinfo)): Print first syscall argument
   24647 	using %d format.
   24648 	(SYS_FUNC(rt_tgsigqueueinfo)): Print first and second syscall arguments
   24649 	using %d format.
   24650 	* tests/rt_tgsigqueueinfo.c: New file.
   24651 	* tests/rt_tgsigqueueinfo.test: New test.
   24652 	* tests/.gitignore: Add rt_tgsigqueueinfo.
   24653 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24654 	(TESTS): Add rt_tgsigqueueinfo.test.
   24655 
   24656 	getrusage.test: fix build on x32.
   24657 	* tests/getrusage.c: Include <stdint.h>
   24658 	(main): Print members of struct timeval using %ju format.
   24659 
   24660 2016-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   24661 
   24662 	getrusage.test: check that getrusage parser does not access extra memory
   24663 	Place struct rusage at the end of an allocated memory page followed by
   24664 	an inaccessible page.
   24665 
   24666 	* tests/getrusage.c (main): Use tail_alloc.
   24667 
   24668 2016-02-19  Fei Jie  <feij.fnst (a] cn.fujitsu.com>
   24669 
   24670 	tests: add getrusage.test.
   24671 	* tests/getrusage.c: New file.
   24672 	* tests/getrusage.test: New test.
   24673 	* tests/.gitignore: Add getrusage.
   24674 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24675 	(TESTS): Add getrusage.test.
   24676 
   24677 2016-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   24678 
   24679 	Print rt_sigtimedwait return value as a signal name.
   24680 	* signal.c (SYS_FUNC(rt_sigtimedwait)): Decode return value.
   24681 	* tests/rt_sigtimedwait.c: New file.
   24682 	* tests/rt_sigtimedwait.test: New test.
   24683 	* tests/.gitignore: Add rt_sigtimedwait.
   24684 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24685 	(TESTS): Add rt_sigtimedwait.test.
   24686 
   24687 	tests: add rt_sigprocmask.test.
   24688 	* tests/rt_sigprocmask.c: New file.
   24689 	* tests/rt_sigprocmask.test: New test.
   24690 	* tests/.gitignore: Add rt_sigprocmask.
   24691 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24692 	(TESTS): Add rt_sigprocmask.test.
   24693 
   24694 	Fix corner cases of rt_sigpending syscall decoder.
   24695 	* signal (print_sigset_addr_len_limit): New function, cloned from
   24696 	print_sigset_addr_len with added minimal length argument.
   24697 	Treat length less than minimal length or greater than NSIG/8 as invalid.
   24698 	Do not align length to 4-byte boundary.  Align destination buffer
   24699 	to 4-byte boundary and initialize it with zeroes so that subsequent
   24700 	call to sprintsigmask_n will not access uninitialized data.
   24701 	(print_sigset_addr_len): Turn into a wrapper around
   24702 	print_sigset_addr_len_limit with current_wordsize
   24703 	as a minimal length argument.
   24704 	(SYS_FUNC(rt_sigpending)): Call print_sigset_addr_len_limit
   24705 	instead of print_sigset_addr_len with 1 as a minimal length argument.
   24706 	* tests/rt_sigpending.c: New file.
   24707 	* tests/rt_sigpending.test: New test.
   24708 	* tests/.gitignore: Add rt_sigpending.
   24709 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24710 	(TESTS): Add rt_sigpending.test.
   24711 
   24712 2016-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   24713 
   24714 	Change unix_diag requests back to use full dump instead of exact match.
   24715 	Unfortunately, 64-bit linux kernel has a bug in matching inode numbers
   24716 	greater than INT_MAX, so unix_diag exact match is not reliable.
   24717 
   24718 	This partially reverts commit 69bfc89770152033d4aa0bc5673fc46e65d89838.
   24719 
   24720 	* socketutils.c (unix_send_query): Add NLM_F_DUMP to nlmsg_flags,
   24721 	remove initialization of udiag_cookie.
   24722 	* tests/netlink_unix_diag.c (send_query): Remove "inode" argument,
   24723 	add NLM_F_DUMP to nlmsg_flags, remove initialization of udiag_ino
   24724 	and udiag_cookie.
   24725 	(check_responses): Remove "inode" argument and its use.
   24726 	(main): Remove invocation of inode_of_sockfd and passing of listening
   24727 	socket inode to send_query and check_responses.
   24728 
   24729 2016-02-19  Michael Shigorin  <mike (a] altlinux.org>
   24730 
   24731 	tests: avoid using cpp -dD.
   24732 	-dD is less portable across some peculiar preprocessors.
   24733 
   24734 	tests/Makefile.am (ksysent.h): Use cpp -dM instead of cpp -dD.
   24735 
   24736 2016-02-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   24737 
   24738 	tests: add poll.test.
   24739 	* tests/poll.c: New file.
   24740 	* tests/poll.test: New test.
   24741 	* tests/.gitignore: Add poll.
   24742 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24743 	(TESTS): Add poll.test.
   24744 
   24745 	Fix abbreviated output of poll and ppoll decoders.
   24746 	* poll.c (decode_poll_entering, decode_poll_exiting): Fix corner cases
   24747 	of abbreviated output.
   24748 	* tests/ppoll-v.expected: Update.
   24749 	* tests/ppoll.expected: Update.
   24750 	* tests/ppoll.test: Update.
   24751 
   24752 	Print unfetchable address in poll and ppoll decoders.
   24753 	* poll.c (decode_poll_entering): Replace umove call with
   24754 	umove_or_printaddr.
   24755 	(decode_poll_exiting): Print unfetchable address when umove call fails.
   24756 
   24757 	Print offsets in lseek and _llseek syscalls as signed integers.
   24758 	* lseek.c (SYS_FUNC(lseek)): Print offset using %lld format.
   24759 	(SYS_FUNC(llseek)): Likewise.  Treat high and low components of offset
   24760 	as unsigned long integers.
   24761 	* tests/llseek.c (main): Check that negative offset is printed properly.
   24762 	* tests/lseek.c (main): Likewise.
   24763 
   24764 2016-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   24765 
   24766 	tests: add xetpgid.test.
   24767 	* tests/xetpgid.c: New file.
   24768 	* tests/xetpgid.test: New test.
   24769 	* tests/.gitignore: Add xetpgid.
   24770 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24771 	(TESTS): Add xetpgid.test.
   24772 
   24773 	tests: add alarm.test.
   24774 	* tests/alarm.c: New file.
   24775 	* tests/alarm.test: New test.
   24776 	* tests/.gitignore: Add alarm.
   24777 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24778 	(TESTS): Add alarm.test.
   24779 
   24780 	Replace printargs_lu and printargs_ld with printargs_u and printargs_d.
   24781 	* defs.h (printargs_lu): Rename to printargs_u.
   24782 	(printargs_ld): Rename to printargs_d.
   24783 	* syscall.c (printargs_lu): Rename to printargs_u.  Replace %lu with %u.
   24784 	(printargs_ld): Rename to printargs_d.  Replace %ld with %d.
   24785 	* linux/dummy.h (sys_getpgrp): Change to printargs.
   24786 	(sys_alarm): Change to printargs_u.
   24787 	(sys_getpgid, sys_getsid, sys_nice, sys_setpgid, sys_setpgrp,
   24788 	sys_timer_delete, sys_timer_getoverrun): Change to printargs_d.
   24789 
   24790 	Change printargs_lu and printargs_ld to return RVAL_DECODED.
   24791 	* syscall.c (printargs_lu, printargs_ld): Return RVAL_DECODED.
   24792 
   24793 	redirect.test: fix the way how strace output is discarded.
   24794 	* tests/redirect.test: Disable tracing of syscalls, signals,
   24795 	and exit status instead of redirecting strace output to /dev/null.
   24796 
   24797 	tests: extend coverage of struct iovec arrays.
   24798 	* tests/readv.c (main): Check decoding of empty, inaccessible,
   24799 	and partially inaccessible iovec arrays.
   24800 	* tests/readv.test: Update.
   24801 
   24802 	Implement dumping of vmsplice syscall.
   24803 	* syscall.c (dumpio): Add SEN_vmsplice.
   24804 	* NEWS: Mention this.
   24805 	* tests/vmsplice.c: New file.
   24806 	* tests/vmsplice.test: New test.
   24807 	* tests/.gitignore: Add vmsplice.
   24808 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24809 	(TESTS): Add vmsplice.test.
   24810 
   24811 	tests: add tee.test.
   24812 	* tests/tee.c: New file.
   24813 	* tests/tee.test: New test.
   24814 	* tests/.gitignore: Add tee.
   24815 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24816 	(TESTS): Add tee.test.
   24817 
   24818 	Fix printing of negative offsets in splice syscall.
   24819 	* io.c (SYS_FUNC(splice)): Use PRId64 instead of PRIu64 for printing
   24820 	offsets.
   24821 	* tests/splice.c: New file.
   24822 	* tests/splice.test: New test.
   24823 	* tests/.gitignore: Add splice.
   24824 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24825 	(TESTS): Add splice.test.
   24826 
   24827 	Implement copy_file_range syscall decoding.
   24828 	* copy_file_range.c: New file.
   24829 	* Makefile.am (strace_SOURCES): Add it.
   24830 	* linux/32/syscallent.h (copy_file_range): New entry.
   24831 	* linux/64/syscallent.h: Likewise.
   24832 	* linux/arm/syscallent.h: Likewise.
   24833 	* linux/i386/syscallent.h: Likewise.
   24834 	* linux/ia64/syscallent.h: Likewise.
   24835 	* linux/m68k/syscallent.h: Likewise.
   24836 	* linux/powerpc/syscallent.h: Likewise.
   24837 	* linux/powerpc64/syscallent.h: Likewise.
   24838 	* linux/s390/syscallent.h: Likewise.
   24839 	* linux/s390x/syscallent.h: Likewise.
   24840 	* linux/sparc/syscallent.h: Likewise.
   24841 	* linux/sparc64/syscallent.h: Likewise.
   24842 	* linux/x32/syscallent.h: Likewise.
   24843 	* linux/x86_64/syscallent.h: Likewise.
   24844 	* pathtrace.c (pathtrace_match): Add SEN_copy_file_range.
   24845 	* NEWS: Mention new syscall parser.
   24846 	* tests/copy_file_range.c: New file.
   24847 	* tests/copy_file_range.test: New test.
   24848 	* tests/.gitignore: Add copy_file_range.
   24849 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   24850 	(TESTS): Add copy_file_range.test.
   24851 
   24852 	Update fs *_MAGIC constants.
   24853 	* xlat/fsmagic.in: Add CGROUP2_SUPER_MAGIC and OVERLAYFS_SUPER_MAGIC.
   24854 
   24855 	Update IPV6_* constants.
   24856 	* xlat/sockipv6options.in: Add IPV6_HDRINCL.
   24857 
   24858 	Update SO_* constants.
   24859 	* xlat/sockoptions.in: Add SO_ATTACH_REUSEPORT_CBPF
   24860 	and SO_ATTACH_REUSEPORT_EBPF.
   24861 
   24862 	Update MADV_* constants.
   24863 	* xlat/madvise_cmds.in: Add MAD_FREE.
   24864 
   24865 2016-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   24866 
   24867 	tests: robustify execve and execveat tests.
   24868 	* tests/execve.c (main): Use one page gap between two mapped regions
   24869 	for an address that is more likely to be not yet mapped.
   24870 	* tests/execveat.c (main): Likewise.
   24871 
   24872 	tests: simplify execve test.
   24873 	* tests/execve.c (main): Simplify the test assuming that execve syscall
   24874 	never returns ENOSYS.
   24875 
   24876 2016-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   24877 
   24878 	Fix numbers of syscall arguments in syscall tables.
   24879 	This semi-automatic change brings syscall tables in sync with kernel's
   24880 	include/linux/syscalls.h file.
   24881 
   24882 	* linux/aarch64/syscallent.h (recv): Fix nargs.
   24883 	* linux/alpha/syscallent.h (sigaltstack, init_module,
   24884 	sched_getscheduler, settimeofday): Likewise.
   24885 	* linux/arm/syscallent.h (signal, pciconfig_iobase, msgrcv, msgctl,
   24886 	shmat, shmdt, shmctl, semtimedop, get_mempolicy, set_mempolicy,
   24887 	timerfd_create): Likewise.
   24888 	* linux/bfin/syscallent.h (signal, delete_module): Likewise.
   24889 	* linux/hppa/syscallent.h (init_module, munlockall, sched_getscheduler,
   24890 	io_cancel, set_tid_address, listxattr, llistxattr, flistxattr,
   24891 	removexattr, lremovexattr, fremovexattr): Likewise.
   24892 	* linux/i386/syscallent.h (signal, mmap): Likewise.
   24893 	* linux/ia64/syscallent.h (init_module, readv, writev,
   24894 	sched_getscheduler): Likewise.
   24895 	* linux/m68k/syscallent.h (signal, request_key): Likewise.
   24896 	* linux/microblaze/syscallent.h (signal, clone, fstatfs64, vmsplice):
   24897 	Likewise.
   24898 	* linux/mips/syscallent-n32.h (getpgid, statfs, fstatfs, init_module,
   24899 	delete_module): Likewise.
   24900 	* linux/mips/syscallent-n64.h (getpgid, statfs, fstatfs, init_module,
   24901 	delete_module): Likewise.
   24902 	* linux/mips/syscallent-o32.h (signal, statfs, fstatfs, ioperm,
   24903 	fstatfs64): Likewise.
   24904 	* linux/powerpc/syscallent.h (signal, spu_run, spu_create): Likewise.
   24905 	* linux/powerpc64/syscallent.h (signal, pread64, pwrite64, readahead,
   24906 	fadvise64, lookup_dcookie, spu_run, spu_create, sync_file_range2,
   24907 	fallocate, preadv, pwritev, fanotify_mark): Likewise.
   24908 	* linux/s390/syscallent.h (signal, mmap, lookup_dcookie, ipc): Likewise.
   24909 	* linux/s390x/syscallent.h (signal, ipc): Likewise.
   24910 	* linux/sh/syscallent.h (signal, ipc, munlockall, fstatfs64, vmsplice):
   24911 	Likewise.
   24912 	* linux/sh64/syscallent.h (signal, ipc, msgrcv, msgctl, shmat, shmdt,
   24913 	shmctl, fstatfs64, vmsplice): Likewise.
   24914 	* linux/sparc/syscallent.h (ptrace, dup, signal, ipc): Likewise.
   24915 	* linux/sparc64/syscallent.h (ptrace, dup, signal, pread64, pwrite64,
   24916 	readahead, lookup_dcookie, fadvise64, fadvise64_64, ipc,
   24917 	sync_file_range, fallocate, preadv, pwritev, fanotify_mark): Likewise.
   24918 	* linux/x32/syscallent.h (64:recvmsg): Likewise.
   24919 	* linux/xtensa/syscallent.h (mremap, futex, reboot, init_module,
   24920 	delete_module, request_key, getcpu, ioprio_set, ioprio_get, utimensat,
   24921 	futimesat, fchmodat, faccessat): Likewise.
   24922 	* NEWS: Mention this fix.
   24923 
   24924 2016-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   24925 
   24926 	s390: decode fadvise64 and fadvise64_64.
   24927 	* linux/s390/syscallent.h (fadvise64): Set sys_func.
   24928 	(fadvise64_64): Set nargs and sys_func.
   24929 
   24930 	mips n64: use the most optimal parser for fadvise64 syscall.
   24931 	* linux/mips/syscallent-n64.h (fadvise64): Replace SEN(fadvise64_64)
   24932 	with SEN(fadvise64).
   24933 
   24934 	ia64: decode fstatfs64 and statfs64.
   24935 	* linux/ia64/syscallent.h (fstatfs64, statfs64): Set nargs and sys_func.
   24936 
   24937 2016-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   24938 
   24939 	alpha, ia64, mips, sh, sh64: fix the number of pipe syscall arguments.
   24940 	On alpha, ia64, mips, sh, sh64, sparc, and sparc64 architectures
   24941 	pipe syscall does not take arguments.
   24942 
   24943 	* linux/alpha/syscallent.h (pipe): Change nargs to 0.
   24944 	* linux/ia64/syscallent.h (pipe): Likewise.
   24945 	* linux/mips/syscallent-n32.h (pipe): Likewise.
   24946 	* linux/mips/syscallent-n64.h (pipe): Likewise.
   24947 	* linux/mips/syscallent-o32.h (pipe): Likewise.
   24948 	* linux/sh/syscallent.h (pipe): Likewise.
   24949 	* linux/sh64/syscallent.h (pipe): Likewise.
   24950 
   24951 2016-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   24952 
   24953 	alpha, ia64, mips, sh*, sparc*: fix error path decoding of pipe syscall.
   24954 	* net.c (do_pipe) [HAVE_GETRVAL2]: Remove.
   24955 	Always call decode_pair_fd on exiting.
   24956 	(SYS_FUNC(pipe)) [HAVE_GETRVAL2]: Call printpair_fd instead of do_pipe.
   24957 
   24958 	Fix pathtrace match for pipe2 syscall.
   24959 	* pathtrace.c (pathtrace_match): As pipe2 syscall has no descriptors
   24960 	or paths to test, move SEN_pipe2 to the appropriate category.
   24961 
   24962 	avr32: wire up missing syscalls.
   24963 	* linux/avr32/syscallent.h [322..324]: Add userfaultfd, membarrier,
   24964 	and mlock2 entries.
   24965 
   24966 2016-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   24967 
   24968 	tests: check decoding of madvise, mlockall, mremap, and msync syscalls.
   24969 	* tests/mmap.c (main): Change output format from regexp to verbatim.
   24970 	Add tests for madvise, mlockall, mremap, and msync syscalls.
   24971 	* tests/mmap.test: Convert from match_grep to match_diff.
   24972 	Add madvise, mlockall, mremap, and msync syscalls to syscall filter.
   24973 
   24974 2016-02-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   24975 
   24976 	Simplify decoding of waitpid and wait4 syscalls.
   24977 	* wait.c (printwaitn): Replace "n" and "bitness" integer arguments
   24978 	with a single print_rusage function pointer.  All callers updated.
   24979 
   24980 	waitid: print pid argument as int.
   24981 	* wait.c (SYS_FUNC(waitid)): As the type of second syscall argument
   24982 	in the kernel is pid_t, print it as int.
   24983 
   24984 	waitid: always print 5th argument.
   24985 	* wait.c (SYS_FUNC(waitid)): Do not check for tcp->s_ent->nargs
   24986 	as waitid syscall has 5 arguments.
   24987 
   24988 	socketutils: add const qualifier to variables.
   24989 	* socketutils.c (cache_and_print_inode_details): Make "details"
   24990 	parameter const.
   24991 	(print_sockaddr_by_inode_cached): Make "e" variable const.
   24992 	(inet_send_query): Make struct nlmsghdr and struct inet_diag_req_v2
   24993 	members const.  Make "msg" variable const.
   24994 	(inet_parse_response): Make "data" parameter and diag_msg variable const.
   24995 	(receive_responses): Make "h" and "rc" variables const.
   24996 	(unix_send_query): Make struct nlmsghdr and struct unix_diag_req
   24997 	members const.  Make "msg" variable const.
   24998 	(unix_print): Make all parameters const.
   24999 	(print_sockaddr_by_inode): Make proto_name parameter const.
   25000 
   25001 	print_sockaddr_by_inode: cleanup protocol lookup.
   25002 	* socketutils.c (tcp_v4_print, udp_v4_print, tcp_v6_print,
   25003 	udp_v6_print): New functions.
   25004 	(print_sockaddr_by_inode): Make "protocols" array static, replace
   25005 	"family" and "protocol" members with "print" in its underlying
   25006 	structure.  Iterate through protocols array when the protocol name
   25007 	is specified.
   25008 
   25009 2016-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   25010 
   25011 	tests: check that -f -p attaches to threads properly.
   25012 	Check that -f -p attaches and follows all threads of the given pid.
   25013 
   25014 	* tests/attach-f-p.c: New file.
   25015 	* tests/attach-f-p.test: New test.
   25016 	* tests/.gitignore: Add attach-f-p.
   25017 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25018 	(attach_f_p_LDADD): New variable.
   25019 	(TESTS): Add attach-f-p.test.
   25020 
   25021 2016-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   25022 
   25023 	Introduce libstrace.a for potentially conditional compilation units.
   25024 	Some files are used conditionally depending on architecture and
   25025 	configuration.  Create a library for the purpose of keeping such
   25026 	compilation units.
   25027 
   25028 	* Makefile.am (strace_LDADD, noinst_LIBRARIES): Add libstrace.a.
   25029 	(libstrace_a_CPPFLAGS): New variable, set to $(strace_CPPFLAGS).
   25030 	(libstrace_a_CFLAGS): New variable, set to $(strace_CFLAGS).
   25031 	(libstrace_a_SOURCES): New variable, set to upeek.c.
   25032 	* util.c (upeek): Move ...
   25033 	* upeek.c: ... here.
   25034 
   25035 2016-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   25036 
   25037 	travis-ci: pass more gcov arguments to codecov.
   25038 
   25039 	tests: extend coverage of struct itimerspec.
   25040 	* tests/timer_xettime.c (main): Check decoding of NULL struct itimerspec
   25041 	pointer.
   25042 
   25043 	tests: extend coverage of utimensat syscall.
   25044 	* tests/utimensat.c (main): Check decoding of NULL struct timespec
   25045 	pointer.
   25046 
   25047 	tests: extend coverage of time syscall.
   25048 	* tests/time.c (main): Check decoding of NULL time_t pointer.
   25049 
   25050 	tests: extend coverage of struct sigevent.
   25051 	* tests/timer_create.c (main): Check decoding of NULL struct sigevent
   25052 	pointer.  Check decoding of invalid sigev_notify value.
   25053 
   25054 2016-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   25055 
   25056 	tests: extend coverage of execve and execveat syscalls.
   25057 	Check decoding of inaccessible or partially inaccessible arrays.
   25058 
   25059 	* tests/execve-v.c: New file.
   25060 	* tests/execveat-v.c: Likewise.
   25061 	* tests/execve-v.test: New test.
   25062 	* tests/execveat-v.test: Likewise.
   25063 	* tests/execve.c: Rewrite.
   25064 	* tests/execveat.c: Likewise.
   25065 	* tests/execve.test: Likewise.
   25066 	* tests/execveat.test: Likewise.
   25067 	* tests/execve.expected: Remove.
   25068 	* tests/execve-v.expected: Likewise.
   25069 	* tests/execveat.expected: Likewise.
   25070 	* tests/execveat-v.expected: Likewise.
   25071 	* tests/.gitignore: Add execve-v and execveat-v.
   25072 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25073 	(TESTS): Add execve-v.test and execveat-v.test.
   25074 	(EXTRA_DIST): Remove execve.expected, execve-v.expected,
   25075 	execveat.expected, and execveat-v.expected.
   25076 
   25077 2016-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   25078 
   25079 	Fix decoding of execve and execveat syscalls with invalid input.
   25080 	* execve.c (printargv): Fix decoding of inaccessible or partially
   25081 	inaccessible array.
   25082 	(printargc): Diagnose inaccessible or partially inaccessible array.
   25083 	(decode_execve, SYS_FUNC(execv)): Update printargv and printargc callers.
   25084 
   25085 	tests: extend coverage of capget syscall.
   25086 	* tests/caps.c (main): Check decoding of inaccessible cap_user_header_t
   25087 	and/or cap_user_data_t.
   25088 	* tests/caps.awk: Update match patterns.
   25089 	* tests/caps.test: Update.
   25090 
   25091 	tests: extend coverage of sched_getaffinity syscall.
   25092 	* tests/sched_xetaffinity.c (main): Check decoding of pointer
   25093 	to inaccessible cpu_set_t.
   25094 
   25095 	tests: extend coverage of utime syscall.
   25096 	* tests/utime.c (main): Check decoding of NULL struct utimbuf pointer.
   25097 	Check decoding of struct utimbuf located at the end of page boundary.
   25098 	* tests/utime.test: Update.
   25099 
   25100 	tests: extend coverage of sysinfo syscall.
   25101 	* tests/sysinfo.c (main): Check decoding of NULL struct sysinfo pointer.
   25102 	Check decoding of struct sysinfo located at the end of page boundary.
   25103 	* tests/sysinfo.test: Update.
   25104 
   25105 	tests: extend coverage of adjtimex syscall.
   25106 	* tests/adjtimex.c (main): Check decoding of NULL struct timex pointer.
   25107 	Check decoding of struct timex located at the end of page boundary.
   25108 	* tests/adjtimex.test: Update.
   25109 
   25110 	tests: check that strace does not retain stdin and stdout descriptors.
   25111 	* tests/redirect.test: New test.
   25112 	* tests/Makefile.am (TESTS): Add it.
   25113 
   25114 	Create a dummy pipe descriptor instead of opening /dev/null.
   25115 	* strace.c (open_dev_null): Rename to open_dummy_desc.  All callers
   25116 	changed.  Create a pipe and return its first descriptor instead of
   25117 	opening /dev/null.
   25118 
   25119 2016-02-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   25120 
   25121 	If stdin/stdout aren't open on startup, open them to /dev/null.
   25122 	Otherwise, -oLOGFILE may end up using one of them. This conflicts
   25123 	with the previous change, which closes stdin/out in strace.
   25124 
   25125 	* strace.c (init): If fcntl(F_GETFD) fails on stdin or stdout,
   25126 	sanitize them: open /dev/null and dup it until fds 0,1,2
   25127 	are all used up.
   25128 
   25129 2016-02-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   25130 
   25131 	Close stdin/out after child is forked.
   25132 	Testcase:
   25133 
   25134 	{ sleep 1; yes | head -n99999; } | strace -o/dev/null sh -c 'exec <&-; sleep 9'
   25135 
   25136 	The writer (head) will be able to perform writes to write end of the pipe.
   25137 	With strace call removed, head will immediately get SIGPIPE.
   25138 
   25139 	This change fixes this: now writer immediately gets SIGPIPE with strace too.
   25140 
   25141 	* strace.c (startup_child): Close stdin/out and reopen them to /dev/null.
   25142 
   25143 2016-02-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   25144 
   25145 	tests: add opipe.test.
   25146 	Check that -o |pipe_command works.  In particular, check that
   25147 	strace waits for completion of piped command.
   25148 
   25149 	* tests/opipe.test: New test.
   25150 	* tests/Makefile.am (TESTS): Add it.
   25151 
   25152 2016-02-05  Keith Owens  <kaos.ocs (a] gmail.com>
   25153 
   25154 	strace-graph: print the pid in the graph.
   25155 	* strace-graph: Prefix each command with its pid.
   25156 
   25157 	strace-graph: cope with clone immediately followed by exit.
   25158 	* strace-graph: A clone() followed by exit() with no intervening fork
   25159 	or execve resulted in the new pid having no seq key.  That breaks when
   25160 	trying to use seq as an array reference.  Ensure that clone populates
   25161 	the new pid with an empty seq entry.
   25162 
   25163 	strace-graph: handle recent strace output.
   25164 	* strace-graph: Fix regex for --SIG.  Ignore '+++ exited with <n> +++'
   25165 	lines.  Handle exit_group syscall as well as _exit.
   25166 
   25167 	strace-graph: handle strace -T.
   25168 	* strace-graph: Ignore extra ' <time.spent>' field added by strace -T.
   25169 
   25170 	strace-graph: use "strict" and "warnings" pragmas.
   25171 	* strace-graph: Set "use strict" and "use warnings" options.  Fix errors
   25172 	detected by strict/warnings.  $result is really a string, it can be "-1"
   25173 	followed by an error text.
   25174 
   25175 2016-02-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   25176 
   25177 	Add README.md file with links to build status and test coverage.
   25178 
   25179 	travis-ci: prepare and submit test coverage report.
   25180 
   25181 	tests: extend readlink and readlinkat coverage.
   25182 	* tests/readlink.c (PREFIX, TARGET, LINKPATH): New macros.
   25183 	(main): Allocate memory for string and buffer passed to the syscall
   25184 	being tested using tail_alloc mechanism.  Create and cleanup test
   25185 	symlink.  Test syscall error path output.  Print hexquoted strings
   25186 	using hexquote_strndup.
   25187 	* tests/readlinkat.c: Likewise.
   25188 	* tests/readlink.test: Remove creation and cleanup of test symlinks.
   25189 
   25190 	tests: add hexquote_strndup function to libtests.
   25191 	* tests/tests.h (hexquote_strndup): New prototype.
   25192 	* tests/hexquote_strndup.c: New file.
   25193 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   25194 
   25195 	readlinkat.test: use readlink.test.
   25196 	* tests/readlink.test (syscall): Initialize from $0.
   25197 	* tests/readlinkat.test: Source readlink.test.
   25198 
   25199 2016-02-04  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   25200 
   25201 	Add configure --enable-code-coverage option.
   25202 	* m4/ax_code_coverage.m4: New file.
   25203 	* configure.ac: Use AX_CODE_COVERAGE.
   25204 	* Makefile.am: Add @CODE_COVERAGE_RULES@.
   25205 	(CODE_COVERAGE_LCOV_OPTIONS, CODE_COVERAGE_GENHTML_OPTIONS,
   25206 	CODE_COVERAGE_IGNORE_PATTERN): New variables.
   25207 	(strace_CPPFLAGS): Add $(CODE_COVERAGE_CPPFLAGS).
   25208 	(strace_CFLAGS): Add $(CODE_COVERAGE_CFLAGS).
   25209 	(strace_LDADD): Add $(CODE_COVERAGE_LDFLAGS).
   25210 	* .gitignore: Add *.gcda and *.gcno.
   25211 
   25212 2016-02-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   25213 
   25214 	Makefile.am: introduce strace_CFLAGS and derivatives.
   25215 	* Makefile.am (strace_CFLAGS): New variable, set to $(AM_CFLAGS).
   25216 	(libmpers_CFLAGS): New variable, set to $(strace_CFLAGS).
   25217 	(libmpers_m32_a_CFLAGS, libmpers_mx32_a_CFLAGS): New variables,
   25218 	set to $(libmpers_CFLAGS).
   25219 
   25220 	Makefile.am: use strace_CPPFLAGS consistently.
   25221 	* Makefile.am (libmpers_CPPFLAGS): Replace $(AM_CPPFLAGS)
   25222 	with $(strace_CPPFLAGS).
   25223 
   25224 2016-02-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   25225 
   25226 	tests: replace net-fd.test with net-y-unix.test.
   25227 	Unlike the former test that was based on match_grep,
   25228 	the new one uses match_diff and does more rigorous testing.
   25229 
   25230 	* tests/net-y-unix.c: New file.
   25231 	* tests/net-y-unix.test: New test.
   25232 	* tests/net-fd.test: Remove.
   25233 	* tests/net-fd.expected: Remove.
   25234 	* tests/.gitignore: Add net-y-unix.
   25235 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25236 	(TESTS): Replace net-fd.test with net-y-unix.test.
   25237 	(net-fd.log): Remove.
   25238 	(EXTRA_DIST): Remove net-fd.expected.
   25239 
   25240 2016-02-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   25241 
   25242 	Implement caching of print_sockaddr_by_inode.
   25243 	As -yy parser, compared to -y, needs to do at least 5 extra syscalls
   25244 	(getxattr, socket, sendmsg, recvmsg, close) to print socket details,
   25245 	caching results of netlink conversations between strace and kernel
   25246 	noticeably reduces amount of system time spent by strace.
   25247 
   25248 	The caching is safe since sockets do not change their addresses after
   25249 	successful bind or connect syscall.
   25250 
   25251 	* defs.h (string_quote, print_sockaddr_by_inode_cached): New prototypes.
   25252 	* socketutils.c (cache_entry): New type.
   25253 	(CACHE_SIZE, CACHE_MASK): New macros.
   25254 	(cache): New static array.
   25255 	(cache_and_print_inode_details): New static function.
   25256 	(print_sockaddr_by_inode_cached): New function.
   25257 	(inet_parse_response, unix_parse_response): Use
   25258 	cache_and_print_inode_details.
   25259 	* util.c (printfd): Use string_quote and print_sockaddr_by_inode_cached.
   25260 	(string_quote): Remove static qualifier.
   25261 	* NEWS: Mention this improvement.
   25262 	* tests/unix-yy.c (main): Update.
   25263 
   25264 2016-02-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   25265 
   25266 	Change unix_diag requests to use exact match instead of full dump.
   25267 	* socketutils.c (unix_send_query): Remove NLM_F_DUMP from nlmsg_flags,
   25268 	initialize udiag_cookie.
   25269 	* tests/netlink_unix_diag.c (send_query): Remove "family" and "proto"
   25270 	arguments, add "inode" argument, remove NLM_F_DUMP from nlmsg_flags,
   25271 	initialize udiag_ino and udiag_cookie.
   25272 	(check_responses): Add "inode" argument, check inode match.
   25273 	(main): Pass listening socket inode to send_query and check_responses.
   25274 
   25275 	Robustify netlink response parsers.
   25276 	* socketutils.c (inet_parse_response, unix_parse_response): Change
   25277 	return type from bool to int, return -1 on all parse errors except
   25278 	inode mismatch.
   25279 	(receive_responses): Stop on the first nlmsg_type that is not
   25280 	SOCK_DIAG_BY_FAMILY, also stop when the parser returns -1.
   25281 	* tests/netlink_inet_diag.c (check_responses): Stop on short messages,
   25282 	on first nlmsg_type that is not SOCK_DIAG_BY_FAMILY, print more verbose
   25283 	diagnostics for NLMSG_ERROR.
   25284 	* tests/netlink_unix_diag.c (check_responses): Likewise.
   25285 
   25286 	inet_parse_response: add a safety check.
   25287 	* socketutils.c (inet_parse_response): Check that netlink message
   25288 	is large enough to contain a inet_diag_msg structure.
   25289 
   25290 	receive_responses: avoid potential hangup.
   25291 	* socketutils.c (receive_responses): Pass MSG_DONTWAIT to recvmsg after
   25292 	the first recvmsg call to avoid potential hangup.
   25293 
   25294 2016-02-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   25295 
   25296 	tests: replace net-yy.test with net-yy-inet.test.
   25297 	Unlike the former test that was based on match_awk,
   25298 	the new one uses match_diff and does more rigorous testing.
   25299 
   25300 	* tests/net-yy-inet.c: New file.
   25301 	* tests/net-yy-inet.test: New test.
   25302 	* tests/net-yy.test: Remove.
   25303 	* tests/net-yy-accept.awk: Remove.
   25304 	* tests/net-yy-connect.awk: Remove.
   25305 	* tests/inet-accept-connect-send-recv.c: Remove.
   25306 	* tests/.gitignore: Replace inet-accept-connect-send-recv
   25307 	with net-yy-inet.
   25308 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25309 	(TESTS): Replace net-yy.test with net-yy-inet.test.
   25310 	(EXTRA_DIST): Remove net-yy-accept.awk and net-yy-connect.awk.
   25311 
   25312 2016-02-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   25313 
   25314 	tests: replace unix-yy.test with net-yy-unix.test.
   25315 	Unlike the former test that was based on match_awk,
   25316 	the new one uses match_diff and does more rigorous testing.
   25317 
   25318 	* tests/net-yy-unix.c: New file.
   25319 	* tests/net-yy-unix.test: New test.
   25320 	* tests/unix-yy.test: Remove.
   25321 	* tests/unix-yy-accept.awk: Remove.
   25322 	* tests/unix-yy-connect.awk: Remove.
   25323 	* tests/.gitignore: Add net-yy-unix.
   25324 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25325 	(TESTS): Replace unix-yy.test with net-yy-unix.test.
   25326 	(EXTRA_DIST): Remove unix-yy-accept.awk and unix-yy-connect.awk.
   25327 
   25328 2016-02-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   25329 
   25330 	tests: add inode_of_sockfd function to libtests.
   25331 	* tests/tests.h (inode_of_sockfd): New prototype.
   25332 	* tests/inode_of_sockfd.c: New file.
   25333 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   25334 
   25335 	unix_parse_response: add a safety check.
   25336 	* socketutils.c (unix_parse_response): Check that netlink message
   25337 	is large enough to contain a unix_diag_msg structure.
   25338 
   25339 2016-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   25340 
   25341 	Fixed decoding of mincore syscall's last argument.
   25342 	* mem.c (SYS_FUNC(mincore)): Print only those bytes of the vector
   25343 	that were written by the kernel.
   25344 	* NEWS: Mention this fix.
   25345 	* tests/mincore.c: New file.
   25346 	* tests/mincore.test: New test.
   25347 	* tests/Makefile.am (check_PROGRAMS): Add mincore.
   25348 	(TESTS): Add mincore.test.
   25349 	* tests/.gitignore: Add mincore.
   25350 
   25351 2016-01-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   25352 
   25353 	Move fallback -yy socket print from printfd to print_sockaddr_by_inode.
   25354 	* util.c (printfd): In -yy mode, move fallback print of proto:[inode] ...
   25355 	* socketutils.c (to print_sockaddr_by_inode): ... here.
   25356 
   25357 2016-01-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   25358 
   25359 	Implement simultaneous use of -p option and tracing of a command.
   25360 	* strace.c (init): Allow -p option along with a command.
   25361 	(startup_child): In -D mode, record the parent of the tracer process
   25362 	as strace_child.
   25363 	(startup_attach): Save trace_tracer_pid before -D mode fork.
   25364 	When tracing a command in -f mode, do not check for the command's
   25365 	threads as it has no threads at this moment.
   25366 	Never attach to the tracer process.
   25367 	In -D mode, never attach to the parent of the tracer process,
   25368 	terminate that process only once at the end of startup_attach,
   25369 	and reset strace_child.
   25370 	* strace.1: Document that -p option can be used along with tracing
   25371 	of a command.
   25372 	* NEWS: Mention it.
   25373 	* tests/attach-p-cmd-cmd.c: New file.
   25374 	* tests/attach-p-cmd-p.c: Likewise.
   25375 	* tests/attach-p-cmd.test: New test.
   25376 	* tests/.gitignore: Add attach-p-cmd-cmd and attach-p-cmd-p.
   25377 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25378 	(TESTS): Add attach-p-cmd.test.
   25379 
   25380 	This fixes Debian bug #549942.
   25381 
   25382 2016-01-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   25383 
   25384 	strace.1: fix format of -P description.
   25385 	* strace.1 (-P): Write trailing using regular font.
   25386 
   25387 2016-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   25388 
   25389 	tests: use local nanosleep based sleep utility replacement.
   25390 	* tests/sleep.c: New file.
   25391 	* tests/.gitignore: Add sleep.
   25392 	* tests/Makefile.am (check_PROGRAMS): Likewise.
   25393 	* tests/count.test: Use it instead of system sleep utility.
   25394 
   25395 	tests: add error_msg_and_fail function to libtests.
   25396 	* tests/tests.h (error_msg_and_fail): New prototype.
   25397 	* tests/error_msg.c (error_msg_and_fail): New function.
   25398 
   25399 2016-01-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   25400 
   25401 	Fix dumping of recvmmsg syscall in case of short read.
   25402 	* net.c (dumpiov_in_mmsghdr): Call dumpiov_upto instead of dumpiov,
   25403 	pass data size limit to dumpiov_upto.
   25404 	* NEWS: Mention this fix.
   25405 	* tests/mmsg.c (main): Update.
   25406 
   25407 	Fix dumping of recvmsg syscall in case of short read.
   25408 	* defs.h (dumpiov_in_msghdr): Add unsigned long argument.
   25409 	* net.c (dumpiov_in_msghdr): Add data_size argument.  Call dumpiov_upto
   25410 	instead of dumpiov, pass data_size to dumpiov_upto.
   25411 	* syscall.c (dumpio): Pass data size limit to dumpiov_in_msghdr.
   25412 	* NEWS: Mention this fix.
   25413 	* tests/recvmsg.c: New file.
   25414 	* tests/recvmsg.test: New test.
   25415 	* tests/Makefile.am (check_PROGRAMS): Add recvmsg.
   25416 	(TESTS): Add recvmsg.test.
   25417 	* tests/.gitignore: Add recvmsg.
   25418 
   25419 	Fix decoding and dumping of readv syscall in case of short read.
   25420 	* defs.h (dumpiov_upto): New prototype.
   25421 	(dumpiov): Change to a wrapper around dumpiov_upto.
   25422 	* util.c (dumpiov): Rename to dumpiov_upto, add and check data_size
   25423 	argument.
   25424 	* io.c (SYS_FUNC(readv)): Call tprint_iov_upto instead
   25425 	of tprint_iov and specify syscall return value as a data size limit.
   25426 	* syscall.c (dumpio): In case of SEN_readv, call dumpiov_upto instead
   25427 	of dumpiov and specify syscall return value as a data size limit.
   25428 	* NEWS: Mention this fix.
   25429 	* tests/readv.c: New file.
   25430 	* tests/readv.test: New test.
   25431 	* tests/Makefile.am (check_PROGRAMS): Add readv.
   25432 	(TESTS): Add readv.test.
   25433 	* tests/.gitignore: Add readv.
   25434 
   25435 	tests/tests.h: add ARRAY_SIZE and LENGTH_OF macros.
   25436 	* tests/tests.h (ARRAY_SIZE, LENGTH_OF): New macros.
   25437 	* tests/aio.c (ARRAY_SIZE): Remove.
   25438 	* tests/mmsg.c (LENGTH_OF): Remove.
   25439 
   25440 	tests: add hexdump_strdup function to libtests.
   25441 	* tests/tests.h (hexdump_strdup): New prototype.
   25442 	* tests/hexdump_strdup.c: New file.
   25443 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   25444 
   25445 	tests: add tprintf function to libtests.
   25446 	* tests/tests.h (tprintf): New prototype.
   25447 	* tests/tprintf.c: New file.
   25448 	* tests/Makefile.am (libtests_a_SOURCES): Add it.
   25449 	* tests/mmsg.c: Use tprintf.
   25450 
   25451 2016-01-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   25452 
   25453 	quotactl: add Q_XGETQSTATV command decoding.
   25454 	* quota.c (fs_qfilestatv, fs_quota_statv): New structures.
   25455 	(decode_cmd_data): Handle Q_XGETQSTATV case.
   25456 
   25457 	quotactl: add decoding of if_dqinfo.dqi_flags constants.
   25458 	* xlat/if_dqinfo_flags.in: New file.
   25459 	* quota.c: Include "xlat/if_dqinfo_flags.h".
   25460 	(decode_cmd_data): Print struct if_dqinfo.dqi_flags using printflags.
   25461 
   25462 	quotactl: consistenly decode all write and unknown commands on entering.
   25463 	* quota.c (decode_cmd_data): Change return type to int.
   25464 	Return 0 on entering Q_GETQUOTA, Q_V1_GETQUOTA, Q_V2_GETQUOTA,
   25465 	Q_XGETQUOTA, Q_GETFMT, Q_GETINFO, Q_V2_GETINFO, Q_V1_GETSTATS,
   25466 	Q_V2_GETSTATS, and Q_XGETQSTAT commands, return RVAL_DECODED
   25467 	for any other command.
   25468 	(SYS_FUNC(quotactl)): On entering, print third argument of any command.
   25469 	For any command except Q_QUOTAON and Q_V1_QUOTAON, call decode_cmd_data
   25470 	and forward its return value.
   25471 
   25472 	quotactl: fix Q_QUOTAON command decoding.
   25473 	* quota.c (SYS_FUNC(quotactl)): Print Q_QUOTAON 4th argument as a path.
   25474 
   25475 	quotactl: print third argument as unsigned int.
   25476 	* quota.c (SYS_FUNC(quotactl)): Consistently print the third
   25477 	argument using "%u" format.
   25478 
   25479 	quotactl: fix Q_XQUOTAOFF command decoding.
   25480 	* quota.c (decode_cmd_data): Print xfs quota flags argument.
   25481 
   25482 	quotactl: fix Q_GETFMT and Q_XQUOTAON commands decoding.
   25483 	* quota.c (decode_cmd_data): As quota format value and xfs quota flags
   25484 	are in-memory constants, print it like an array of one element instead
   25485 	of a structure.
   25486 
   25487 2016-01-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   25488 
   25489 	Update quotactl constants.
   25490 	* xlat/quota_formats.in: Add QFMT_OCFS2 and QFMT_VFS_V1.
   25491 	* xlat/quotacmds.in: Add Q_XGETQSTATV.
   25492 	* xlat/quotatypes.in: Add PRJQUOTA.
   25493 	* xlat/xfs_quota_flags.in: Add FS_QUOTA_PDQ_ACCT and FS_QUOTA_PDQ_ENFD.
   25494 
   25495 2016-01-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   25496 
   25497 	Replace u_int{8,16,32,64} with uint{8,16,32,64}
   25498 	* util.c: Replace u_int{32,64} with uint{32,64}.
   25499 	* quota.c: Replace u_int{8,16,32,64} with uint{8,16,32,64}.
   25500 
   25501 	Move definitions of quotactl constants to xlat files.
   25502 	* quota.c (Q_*): Move to xlat/quotacmds.in.
   25503 	(USRQUOTA, GRPQUOTA): Move to xlat/quotatypes.in.
   25504 	(QFMT_VFS_OLD, QFMT_VFS_V0): Move to xlat/quota_formats.in.
   25505 	(XFS_QUOTA_*): Move to xlat/xfs_quota_flags.in.
   25506 	(XFS_*_QUOTA): Move to xlat/xfs_dqblk_flags.in.
   25507 	(QIF_*): Move to xlat/if_dqblk_valid.in.
   25508 	(IIF_*): Move to xlat/if_dqinfo_valid.in.
   25509 
   25510 2016-01-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   25511 
   25512 	llseek.test: robustify against libcs invoking _llseek syscall on their own
   25513 	* tests/llseek.test: Filter out _llseek calls made with non-negative
   25514 	descriptor arguments.
   25515 
   25516 	lseek.test: robustify against libcs invoking lseek syscall on their own.
   25517 	* tests/lseek.test: Filter out lseek calls made with non-negative
   25518 	descriptor arguments.
   25519 
   25520 2016-01-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   25521 
   25522 	mmsg.test: fix regression introduced by commit v4.11-138-g6e815ce.
   25523 	This fixes the test on platforms where both __NR_sendmmsg and
   25524 	HAVE_SENDMMSG are defined but the former is not implemented by the
   25525 	kernel and the second is implemented as an indirect syscall.
   25526 
   25527 	* tests/mmsg.c (LENGTH_OF): New macro.
   25528 	(send_mmsg, recv_mmsg): Print expected output in case of ENOSYS.
   25529 	(main): Redirect stdout to a new descriptor.  Use LENGTH_OF.
   25530 	Print expected output.
   25531 	* tests/mmsg.test: Update.
   25532 	* tests/mmsg.expected: Remove.
   25533 	* tests/Makefile.am (EXTRA_DIST): Remove mmsg.expected.
   25534 
   25535 2016-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   25536 
   25537 	aio.test: check memory access by aio decoders.
   25538 	* tests/aio.c (main): Place all objects passed to io_* syscalls
   25539 	at the end of memory pages followed by inaccessible pages.
   25540 
   25541 2016-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   25542 
   25543 	s390, s390x: fix printing of syscalls unknown to the kernel.
   25544 	On s390/s390x, syscalls with NR up to 255 can be implemented
   25545 	directly using "svc NR", for NR >= 256 "svc 0" with %r1=NR is used.
   25546 	The latter method is allowed for NR < 256, too.
   25547 
   25548 	When the syscall number specified directly or indirectly is recognized
   25549 	by the kernel, i.e. it is less than its NR_syscalls value, it is stored
   25550 	in %r2 and is available to arch_get_scno via s390_regset.gprs[2].
   25551 	For syscall numbers >= NR_syscalls this register is set to 0,
   25552 	but %r1 remains unchanged and could be used by arch_get_scno
   25553 	via s390_regset.gprs[1] to decide what the syscall number is.
   25554 
   25555 	* linux/s390/get_scno.c (arch_get_scno): If s390_regset.gprs[2] is zero,
   25556 	take syscall number from s390_regset.gprs[1].
   25557 	* NEWS: Mention this fix.
   25558 
   25559 	This fixes Debian bug #485979 and Fedora bug #1298294.
   25560 
   25561 2016-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   25562 
   25563 	s390, s390x: print all syscall arguments for syscall number 0.
   25564 	* linux/s390/syscallent.h [0]: Set nargs to MA.
   25565 	* linux/s390x/syscallent.h: Likewise.
   25566 
   25567 	mips o32: alias sys_syscall to printargs.
   25568 	* linux/dummy.h (sys_syscall): Alias to printargs.
   25569 	* syscall.c [LINUX_MIPSO32] (SYS_FUNC(syscall)): Remove.
   25570 
   25571 2016-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   25572 
   25573 	travis-ci: update build matrix.
   25574 	Add clang-3.6/x86_64, clang-3.6/x86, and musl-gcc/x86_64 to the matrix.
   25575 
   25576 	* .travis.yml (compiler): Add gcc, clang-3.6, and musl-gcc.
   25577 	(env): Add matrix, remove global ENABLE_GCC_WERROR.
   25578 	(matrix): Add exclude, remove include.
   25579 	* travis-ci.sh: Add support for clang and musl-gcc.
   25580 	Use --enable-gcc-Werror for gcc build unconditionally.
   25581 
   25582 2016-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   25583 
   25584 	mpers.awk: add support for DWARF files generated by clang.
   25585 	* mpers.awk: Define default_pointer_size.  Initialize byte_size
   25586 	for DW_TAG_pointer_type to default_pointer_size.  Set parent
   25587 	for DW_TAG_member only.  Handle DW_AT_count as an alternative
   25588 	to DW_AT_upper_bound.
   25589 
   25590 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25591 
   25592 	configure.ac: reorder some statements for better readability.
   25593 	* configure.ac: Sort and group together AC_PROG_*, AC_C_*, AC_TYPE_*,
   25594 	AC_HEADER_*, AC_CHECK_FUNCS, AC_CHECK_TYPES, AC_CHECK_MEMBERS,
   25595 	and AC_CHECK_HEADERS.
   25596 
   25597 	scm_rights-fd.test: rewrite without fork.
   25598 	* tests/scm_rights.c (main): Rewrite without fork.
   25599 	Place all objects passed to sendmsg and recvmsg at the end
   25600 	of memory pages followed by inaccessible pages.
   25601 	* tests/scm_rights-fd.test: Update.
   25602 
   25603 	tests: fix clang "duplicate 'const' declaration specifier" warnings.
   25604 	* tests/ksysent.c (pstr_t): Remove second const specifier.
   25605 	* tests/mmsg.c (main): Remove second const specifier from one[], two[],
   25606 	and three[].
   25607 
   25608 	tests/times.c: fix clang compilation warning.
   25609 	* tests/times.c (main): Initialize dummy variable.
   25610 
   25611 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25612 
   25613 	tests/mmsg.c: fix build on rhel6/ppc.
   25614 	There are weird platforms that define __NR_sendmmsg but at the same time
   25615 	do not define __NR_recvmmsg.  Add a workaround for them.
   25616 
   25617 	* configure.ac (AC_CHECK_FUNCS): Add recvmmsg.
   25618 	* tests/mmsg.c: Check for __NR_recvmmsg || HAVE_RECVMMSG.
   25619 
   25620 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25621 
   25622 	s390: fix sigreturn decoding on recent kernels.
   25623 	Linux kernel commit v4.3-rc1-50-g8d4bd0e corrected uc_sigmask
   25624 	of the compat signal frame, so remove the old workaround.
   25625 
   25626 	* linux/s390/arch_sigreturn.c (arch_sigreturn) [S390]: Remove.
   25627 
   25628 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25629 
   25630 	Update PTRACE_* constants.
   25631 	* ptrace.h (PTRACE_SECCOMP_GET_FILTER): Define.
   25632 	* xlat/ptrace_cmds.in: Add PTRACE_SECCOMP_GET_FILTER.
   25633 
   25634 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25635 
   25636 	Fix struct sigevent decoding for musl.
   25637 	Do not rely on "struct sigevent.__pad" being located at the same address
   25638 	as "struct sigevent.sigev_notify_thread_id", it's not the case with musl
   25639 	libc.  Do not rely on struct sigevent definition at all to access
   25640 	sigev_notify_thread_id.
   25641 
   25642 	* configure.ac (AC_CHECK_MEMBERS): Remove struct sigevent._sigev_un._pad
   25643 	and struct sigevent.__pad.
   25644 	* sigevent.h: New file.
   25645 	* Makefile.am (strace_SOURCES): Add it.
   25646 	* print_sigevent.c: Include it.
   25647 	* print_sigevent.c (struct_sigevent): Remove.
   25648 	(print_sigevent): Update all struct_sigevent users.
   25649 	* tests/timer_create.c: Include "sigevent.h".
   25650 	(main): Use struct_sigevent instead of struct sigevent,
   25651 	all struct sigevent clients changed.
   25652 
   25653 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25654 
   25655 	syscall.c: include <signal.h>
   25656 	All users of NSIG macro must include <signal.h>.
   25657 	This complements commit v4.10-184-g0e946ab.
   25658 
   25659 	* syscall.c: Include <signal.h>.
   25660 
   25661 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25662 
   25663 	signal.c: fix musl libc compilation warning.
   25664 	musl libc defines SIGRTMAX to a function that returns signed int,
   25665 	which obviously makes gcc -Wsign-compare unhappy.
   25666 
   25667 	* signal.c (signame): Cast ASM_SIGRTMAX to unsigned int.
   25668 
   25669 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25670 
   25671 	tests: fix TEST_SYSCALL_{NR,STR} and STRUCT_STAT_STR macros for musl.
   25672 	The contents of TEST_SYSCALL_NAME and STRUCT_STAT macros was subject
   25673 	to macro expansion when used in definitions of TEST_SYSCALL_NR,
   25674 	TEST_SYSCALL_STR, and STRUCT_STAT_STR macros.
   25675 
   25676 	As some libcs, e.g. musl libc, define lfs64 names as macros
   25677 	(stat64 as stat, lstat64 as lstat, etc.), this might result to incorrect
   25678 	expansion of TEST_SYSCALL_NR, TEST_SYSCALL_STR, and STRUCT_STAT_STR
   25679 	macros.  To avoid this problem, define these macros directly and remove
   25680 	TEST_SYSCALL_NAME macro.
   25681 
   25682 	* tests/_newselect.c (TEST_SYSCALL_NAME): Remove.
   25683 	(TEST_SYSCALL_NR, TEST_SYSCALL_STR): New macros.
   25684 	* tests/fcntl.c: Likewise.
   25685 	* tests/fcntl64.c: Likewise.
   25686 	* tests/fstat.c: Likewise.
   25687 	* tests/fstatat64.c: Likewise.
   25688 	* tests/lstat.c: Likewise.
   25689 	* tests/newfstatat.c: Likewise.
   25690 	* tests/select.c: Likewise.
   25691 	* tests/stat.c: Likewise.
   25692 	* tests/fstat64.c (TEST_SYSCALL_NAME): Remove.
   25693 	(TEST_SYSCALL_NR, TEST_SYSCALL_STR, STRUCT_STAT_STR): New macros.
   25694 	* tests/lstat64.c: Likewise.
   25695 	* tests/stat64.c: Likewise.
   25696 	* tests/fstatx.c (TEST_SYSCALL_NR, nrify, nrify_): Remove.
   25697 	* tests/lstatx.c: Likewise.
   25698 	* tests/struct_flock.c (TEST_SYSCALL_NR, TEST_SYSCALL_STR, nrify,
   25699 	nrify_, stringify, stringify_): Remove.
   25700 	* tests/xselect.c: Likewise.
   25701 	* tests/xstatx.c: Check TEST_SYSCALL_STR instead of TEST_SYSCALL_NAME.
   25702 	(STRUCT_STAT_STR, TEST_SYSCALL_STR, stringify, stringify_): Remove.
   25703 	[!STRUCT_STAT] (STRUCT_STAT_STR): New macro.
   25704 
   25705 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25706 
   25707 	tests/struct_flock.c: fix musl libc compilation warnings.
   25708 	The size of off_t is not something one can rely upon.  For example,
   25709 	musl libc unconditionally defines it as an int64_t type on x86.
   25710 	A cast to the target type helps to avoid these libc differences.
   25711 
   25712 	* configure.ac: Call AC_C_TYPEOF.
   25713 	* tests/struct_flock.c (TYPEOF_FLOCK_OFF_T): New macro.
   25714 	(test_flock_einval): Use it instead of off_t.
   25715 
   25716 2016-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   25717 
   25718 	tests/inet-cmsg.c: fix musl libc compilation warnings.
   25719 	The types that are used to define msg_namelen member of struct msghdr
   25720 	and cmsg_len member of struct cmsghdr differ between libcs.
   25721 	For example, glibc defines them as size_t, while musl libc - as type
   25722 	socklen_t.  Print these fields using %lu format to avoid issues caused
   25723 	by libc differences.
   25724 
   25725 	* tests/inet-cmsg.c (main): Cast mh.msg_controllen and c->cmsg_len
   25726 	to unsigned long and print them using %lu format.
   25727 
   25728 2016-01-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   25729 
   25730 	aio.test: include <fcntl.h> instead of <sys/fcntl.h>
   25731 	* tests/aio.c: Include <fcntl.h> instead of <sys/fcntl.h>.
   25732 
   25733 	mmsg.test: check memory access by sendmmsg and recvmmsg decoders.
   25734 	* tests/tests.h (tail_memdup): New prototype.
   25735 	* tests/tail_alloc.c (tail_memdup): New function.
   25736 	* tests/mmsg.c (main): Place all objects passed to sendmmsg and recvmmsg
   25737 	at the end of memory pages followed by inaccessible pages.
   25738 
   25739 	mmsg.test: check decoding of flags passed to sendmmsg and recvmmsg.
   25740 	* tests/mmsg.c (main): Pass MSG_DONTROUTE|MSG_NOSIGNAL to sendmmsg.
   25741 	Pass MSG_DONTWAIT to recvmmsg.
   25742 	* tests/mmsg.expected: Update.
   25743 
   25744 2016-01-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   25745 
   25746 	mmsg.test: prefer direct sendmmsg/recvmmsg syscalls to libc wrappers.
   25747 	* tests/mmsg.c: Include <sys/syscall.h>.
   25748 	Check for __NR_sendmmsg as an alternative to HAVE_SENDMMSG.
   25749 	[!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define.
   25750 	(send_mmsg, recv_mmsg): New functions.
   25751 	(main): Use them instead of sendmmsg and recvmmsg.
   25752 
   25753 	Reported-by: Szabolcs Nagy <nsz (a] port70.net>
   25754 
   25755 2016-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   25756 
   25757 	sigreturn.test: use RT_5 signal number instead of RT_2.
   25758 	Make the test compatible with musl libc that uses RT_2 internally.
   25759 
   25760 	* tests/sigreturn.c (main): Replace RT_2 with RT_5.
   25761 	* tests/sigreturn.test: Likewise.
   25762 
   25763 	Reported-by: Szabolcs Nagy <nsz (a] port70.net>
   25764 
   25765 2016-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   25766 
   25767 	avr32: wire up accept4 syscall.
   25768 	* linux/avr32/syscallent.h [321]: Add accept4 entry.
   25769 
   25770 2016-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   25771 
   25772 	sparc64: fix names of {s,g}etres{u,g}id syscalls.
   25773 	* linux/sparc64/syscallent.h [108 ... 111]: Use sparc64 syscall names.
   25774 
   25775 	sparc64: remove sparc32 syscall entries.
   25776 	* linux/sparc64/syscallent.h [31, 32, 35, 44, 53, 56, 69, 70, 72, 77,
   25777 	82, 84, 87, 89, 91, 94, 112, 115, 155, 231]: Unassign.
   25778 
   25779 	sparc: remove sparc64 syscall entries.
   25780 	* linux/sparc/syscallent.h [52, 163]: Unassign.
   25781 
   25782 	sparc64: clone syscallent.h from sparc.
   25783 	* linux/sparc64/syscallent.h: Clone from linux/sparc/syscallent.h.
   25784 
   25785 	sparc: fix mlock2 sysentry, wire up bind, listen, and setsockopt syscalls
   25786 	* linux/sparc/syscallent.h [353]: Move mlock2 entry to 356.
   25787 	[353, 354, 355]: Add bind, listen, and setsockopt entries.
   25788 	* NEWS: Mention this.
   25789 
   25790 2016-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   25791 
   25792 	tests: do not use settimeofday wrapper provided by libc.
   25793 	Workaround limitations of settimeofday wrapper provided by musl libc.
   25794 
   25795 	* tests/xettimeofday.c (main): Call settimeofday using syscall().
   25796 
   25797 	Reported-by: Szabolcs Nagy <nsz (a] port70.net>
   25798 
   25799 2016-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   25800 
   25801 	ioctl.test: robustify against libcs invoking ioctl syscall on their own.
   25802 	* tests/ioctl.test: Filter out from the log ioctl calls with standard
   25803 	descriptor arguments.
   25804 
   25805 	Reported-by: Szabolcs Nagy <nsz (a] port70.net>
   25806 
   25807 2016-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   25808 
   25809 	alpha: enhance decoding of getxpid, getxuid, and getxgid syscalls.
   25810 	Print the second return value of getxpid, getxuid, and getxgid syscalls
   25811 	that return a pair of values using the same mechanism as pipe syscall.
   25812 
   25813 	* alpha.c: New file.
   25814 	* Makefile.am (strace_SOURCES): Add it.
   25815 	* linux/alpha/syscallent.h [20]: Change SEN(getpid) to SEN(getxpid).
   25816 	[24]: Change SEN(getuid) to SEN(getxuid).
   25817 	[47]: Change SEN(getgid) to SEN(getxgid).
   25818 	* NEWS: Mention this enhancement.
   25819 	* tests/uid.awk: Update for getxgid output change.
   25820 	* tests/uid.test: Cleanup.
   25821 	* tests/getxxid.c: New file.
   25822 	* tests/getxxid.test: New test.
   25823 	* tests/Makefile.am (check_PROGRAMS): Add getxxid.
   25824 	(TESTS): Add getxxid.test.
   25825 	* tests/.gitignore: Add getxxid.
   25826 
   25827 2016-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   25828 
   25829 	Cleanup parser of getpagesize syscall.
   25830 	* mem.c (SYS_FUNC(getpagesize)): Decode on entering syscall.
   25831 
   25832 	alpha: alias getdtablesize to printargs.
   25833 	* linux/dummy.h [ALPHA] (sys_getdtablesize): Alias to printargs.
   25834 	* desc.c [ALPHA] (SYS_FUNC(getdtablesize)): Remove.
   25835 
   25836 2016-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   25837 
   25838 	tests: change text marker in fork-f and vfork-f tests.
   25839 	Use chdir syscalls instead of pwrite64 syscalls as a method of inserting
   25840 	text markers into strace output because the former are more portable.
   25841 
   25842 	* tests/fork-f.c (logit): Rename to logit_. Use chdir instead of pwrite.
   25843 	(logit): New macro wrapper around logit_.
   25844 	(main): Update expected output.
   25845 	* tests/vfork-f.c: Likewise.
   25846 	* tests/fork-f.test: Update.
   25847 
   25848 2016-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   25849 
   25850 	Fix printing of 32-bit times syscall return value on 64-bit architectures
   25851 	This change complements commit v4.9-359-gd93d9f8 by fixing
   25852 	RVAL_UDECIMAL case.
   25853 	The only syscall that appears to be affected is the times syscall.
   25854 
   25855 	* syscall.c (trace_syscall_exiting): In case of RVAL_UDECIMAL,
   25856 	when current personality is 32-bit, print 32-bit return code.
   25857 	* NEWS: Mention this fix.
   25858 
   25859 	Reported-by: Steve McIntyre <steve (a] einval.com>
   25860 
   25861 2016-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   25862 
   25863 	tests/vfork-f.c: support platforms without vfork.
   25864 	On some platforms, e.g. hppa glibc, vfork() is implemented using fork
   25865 	syscall, so the test cannot rely on the parent process remaining blocked
   25866 	until the child process either terminates or calls execve.
   25867 
   25868 	* tests/vfork-f.c (main): Explicitly block the parent until the child
   25869 	either terminates or calls execve.
   25870 
   25871 2016-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   25872 
   25873 	Fix and enhance decoding of sched_[gs]etaffinity syscalls.
   25874 	Print cpu_set_t as a set of integers, similar to the way
   25875 	fd_set is printed as a set of descriptors.
   25876 
   25877 	* affinity.c: Include <sched.h>.
   25878 	(get_cpuset_size): New function.
   25879 	(print_affinitylist): Rewrite using get_cpuset_size and next_set_bit.
   25880 	(sched_getaffinity, sched_setaffinity): Print first two args as ints.
   25881 	* NEWS: Mention this enhancement.
   25882 	* tests/sched_xetaffinity.c: New file.
   25883 	* tests/sched_xetaffinity.test: New test.
   25884 	* tests/Makefile.am (check_PROGRAMS): Add sched_xetaffinity.
   25885 	(TESTS): Add sched_xetaffinity.test.
   25886 	* tests/.gitignore: Add sched_xetaffinity.
   25887 
   25888 	Reported-by: Joe Korty <joe.korty (a] ccur.com>
   25889 
   25890 2016-01-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   25891 
   25892 	tests: convert epoll_create1.test from match_grep to match_diff.
   25893 	* tests/epoll_create1.c (main): Print expected output.
   25894 	* tests/epoll_create1.test: Use match_diff instead of match_grep.
   25895 	* tests/epoll_create1.expected: Remove.
   25896 	* tests/Makefile.am (EXTRA_DIST): Remove epoll_create1.expected.
   25897 
   25898 	tests/struct_flock.c: use libtests.
   25899 	* tests/struct_flock.c (create_sample): Return void,
   25900 	all callers changed.  Use perror_msg_and_fail.
   25901 	* tests/fcntl.c: Use SKIP_MAIN_UNDEFINED.
   25902 	* tests/fcntl64.c: Likewise.
   25903 
   25904 	tests/file_handle.c: use libtests.
   25905 	* tests/file_handle.c: Use SKIP_MAIN_UNDEFINED.
   25906 	(main): Use assert and perror_msg_and_skip.
   25907 
   25908 	tests/uid32.c: use libtests.
   25909 	* tests/uid32.c: Use SKIP_MAIN_UNDEFINED.
   25910 
   25911 	tests/uid16.c: use libtests.
   25912 	* tests/uid16.c: Use SKIP_MAIN_UNDEFINED.
   25913 	(main): Use perror_msg_and_skip.
   25914 
   25915 	tests/uid.c: use libtests.
   25916 	* tests/uid.c: Use SKIP_MAIN_UNDEFINED.
   25917 	(main): Use perror_msg_and_skip.
   25918 
   25919 	tests/netlink_unix_diag.c: use libtests.
   25920 	* tests/netlink_unix_diag.c (send_query, check_responses, main):
   25921 	Use perror_msg_and_skip.
   25922 
   25923 	tests/netlink_inet_diag.c: use libtests.
   25924 	* tests/netlink_inet_diag.c (send_query, check_responses, main):
   25925 	Use perror_msg_and_skip.
   25926 
   25927 	tests/readdir.c: use libtests.
   25928 	* tests/readdir.c: Use SKIP_MAIN_UNDEFINED.
   25929 	(main): Use perror_msg_and_skip.
   25930 
   25931 	tests/getdents64.c: use libtests.
   25932 	* tests/getdents64.c: Use SKIP_MAIN_UNDEFINED.
   25933 	(main): Use perror_msg_and_skip.
   25934 
   25935 	tests/getdents.c: use libtests.
   25936 	* tests/getdents.c: Use SKIP_MAIN_UNDEFINED.
   25937 	(main): Use perror_msg_and_skip.
   25938 
   25939 	tests/ipc_shm.c: use libtests.
   25940 	* tests/ipc_shm.c (cleanup): New function.
   25941 	(main): Use it and perror_msg_and_skip.
   25942 
   25943 	tests/ipc_sem.c: use libtests.
   25944 	* tests/ipc_sem.c (cleanup): New function.
   25945 	(main): Use it and perror_msg_and_skip.
   25946 
   25947 	tests/ipc_msg.c: use libtests.
   25948 	* tests/ipc_msg.c (cleanup): New function.
   25949 	(main): Use it and perror_msg_and_skip.
   25950 
   25951 	tests/ipc_msgbuf.c: use libtests.
   25952 	* tests/ipc_msgbuf.c (cleanup): New function.
   25953 	(main): Use it and perror_msg_and_skip.
   25954 
   25955 	tests/mq.c: use libtests.
   25956 	* tests/mq.c: Use SKIP_MAIN_UNDEFINED.
   25957 	(main): Use perror_msg_and_skip.
   25958 
   25959 	tests/utimensat.c: use libtests.
   25960 	* tests/utimensat.c: Use SKIP_MAIN_UNDEFINED.
   25961 	(main): Use assert and perror_msg_and_skip.
   25962 
   25963 	tests/ppoll.c: use libtests.
   25964 	* tests/ppoll.c (main): Use assert, perror_msg_and_skip,
   25965 	and perror_msg_and_fail.
   25966 
   25967 	tests/mmsg.c: use libtests.
   25968 	* tests/mmsg.c: Use SKIP_MAIN_UNDEFINED.
   25969 	(main): Use perror_msg_and_skip.
   25970 
   25971 	tests/ip_mreq.c: use libtests.
   25972 	* tests/ip_mreq.c: Use SKIP_MAIN_UNDEFINED.
   25973 	(main): Use perror_msg_and_skip.
   25974 
   25975 	tests/ioctl.c: use libtests.
   25976 	* tests/ioctl.c: Use SKIP_MAIN_UNDEFINED.
   25977 	(main): Use %m printf format specifier.
   25978 
   25979 	tests/pipe.c: use libtests.
   25980 	* tests/pipe.c: Use SKIP_MAIN_UNDEFINED.
   25981 	(main): Use perror_msg_and_fail and perror_msg_and_skip.
   25982 
   25983 	tests/getrandom.c: use libtests.
   25984 	* tests/getrandom.c: Use SKIP_MAIN_UNDEFINED.
   25985 	(main): Use perror_msg_and_skip.
   25986 
   25987 	tests/signalfd.c: use libtests.
   25988 	* tests/signalfd.c: Use SKIP_MAIN_UNDEFINED.
   25989 	(main): Use perror_msg_and_skip.
   25990 
   25991 	tests/pc.c: use libtests.
   25992 	* tests/pc.c (main): Use assert, get_page_size, perror_msg_and_fail,
   25993 	and perror_msg_and_skip.
   25994 
   25995 	tests/uio.c: use libtests.
   25996 	* tests/uio.c: Use SKIP_MAIN_UNDEFINED.
   25997 
   25998 	tests/bpf.c: use libtests.
   25999 	* tests/bpf.c: Use SKIP_MAIN_UNDEFINED.
   26000 	(main) Use perror_msg_and_skip.
   26001 
   26002 	tests/aio.c: use libtests.
   26003 	* tests/aio.c: Use SKIP_MAIN_UNDEFINED.
   26004 	(main) Use perror_msg_and_skip.
   26005 
   26006 	tests/sched_xetattr.c: use libtests.
   26007 	* tests/sched_xetattr.c: Use SKIP_MAIN_UNDEFINED.
   26008 	(main) Use perror_msg_and_skip.
   26009 
   26010 	tests/wait.c: use libtests.
   26011 	* tests/wait.c (main): Use perror_msg_and_fail.
   26012 
   26013 	tests/vfork-f.c: use libtests.
   26014 	* tests/vfork-f.c (main): Use assert and perror_msg_and_fail.
   26015 
   26016 	tests/fork-f.c: use libtests.
   26017 	* tests/fork-f.c (main): Use assert and perror_msg_and_fail.
   26018 
   26019 	tests/userfaultfd.c: use libtests.
   26020 	* tests/userfaultfd.c: Use SKIP_MAIN_UNDEFINED.
   26021 	(main): Use assert.
   26022 
   26023 	tests/mlock2.c: use libtests.
   26024 	* tests/mlock2.c: Use SKIP_MAIN_UNDEFINED.
   26025 	(main): Use assert.
   26026 
   26027 	tests/membarrier.c: use libtests.
   26028 	* tests/membarrier.c: Use SKIP_MAIN_UNDEFINED.
   26029 	(main): Use assert.
   26030 
   26031 	tests/nanosleep.c: use libtests.
   26032 	* tests/nanosleep.c (main): Use assert, perror_msg_and_fail,
   26033 	and perror_msg_and_skip.
   26034 
   26035 	tests/timerfd_xettime.c: use libtests.
   26036 	* tests/timerfd_xettime.c: Use SKIP_MAIN_UNDEFINED.
   26037 	(main): Use perror_msg_and_skip.
   26038 
   26039 	tests/timer_xettime.c: use libtests.
   26040 	* tests/timer_xettime.c: Use SKIP_MAIN_UNDEFINED.
   26041 	(main): Use perror_msg_and_skip.
   26042 
   26043 	tests/timer_create.c: use libtests.
   26044 	* tests/timer_create.c: Use SKIP_MAIN_UNDEFINED.
   26045 	(main): Use perror_msg_and_skip.
   26046 
   26047 	tests/clock_xettime.c: use libtests.
   26048 	* tests/clock_xettime.c: Use SKIP_MAIN_UNDEFINED.
   26049 	(main): Use perror_msg_and_skip.
   26050 
   26051 	tests/clock_nanosleep.c: use libtests.
   26052 	* tests/clock_nanosleep.c (main): Use assert and perror_msg_and_skip.
   26053 
   26054 	tests/truncate64.c: use libtests.
   26055 	* tests/truncate64.c: Use SKIP_MAIN_UNDEFINED.
   26056 	(main): Use assert and perror_msg_and_skip.
   26057 
   26058 	tests/truncate.c: use libtests.
   26059 	* tests/truncate.c: Use SKIP_MAIN_UNDEFINED.
   26060 	(main): Use assert and perror_msg_and_skip.
   26061 
   26062 	tests/ftruncate64.c: use libtests.
   26063 	* tests/ftruncate64.c: Use SKIP_MAIN_UNDEFINED.
   26064 	(main): Use assert and perror_msg_and_skip.
   26065 
   26066 	tests/ftruncate.c: use libtests.
   26067 	* tests/ftruncate.c: Use SKIP_MAIN_UNDEFINED.
   26068 	(main): Use assert and perror_msg_and_skip.
   26069 
   26070 2016-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   26071 
   26072 	tests/llseek.c: use libtests.
   26073 	* tests/llseek.c: Use SKIP_MAIN_UNDEFINED.
   26074 	(main): Use assert and perror_msg_and_skip.
   26075 
   26076 	tests/lseek.c: use libtests.
   26077 	* tests/lseek.c: Use SKIP_MAIN_UNDEFINED.
   26078 	(main): Use assert and perror_msg_and_skip.
   26079 
   26080 	tests/readlinkat.c: use libtests.
   26081 	* tests/readlinkat.c: Use SKIP_MAIN_UNDEFINED.
   26082 	(main): Use perror_msg_and_skip.
   26083 
   26084 	tests/readlink.c: use libtests.
   26085 	* tests/readlink.c: Use SKIP_MAIN_UNDEFINED.
   26086 	(main): Use perror_msg_and_skip.
   26087 
   26088 	tests/xattr.c: use libtests.
   26089 	* tests/xattr.c: Use SKIP_MAIN_UNDEFINED.
   26090 	(main): Use perror_msg_and_skip.
   26091 
   26092 	tests/seccomp.c: use libtests.
   26093 	* tests/seccomp.c: Use SKIP_MAIN_UNDEFINED.
   26094 	(main): Use perror_msg_and_fail and perror_msg_and_skip.
   26095 
   26096 	tests/restart_syscall.c: use libtests.
   26097 	* tests/restart_syscall.c (main): Use assert, perror_msg_and_fail,
   26098 	and perror_msg_and_skip.
   26099 
   26100 	tests/inet-cmsg.c: use libtests.
   26101 	* tests/inet-cmsg.c (main): Use perror_msg_and_skip.
   26102 
   26103 	tests/eventfd.c: use libtests.
   26104 	* tests/eventfd.c: Use SKIP_MAIN_UNDEFINED.
   26105 	(main): Use perror_msg_and_skip.
   26106 
   26107 	tests/epoll_create1.c: use libtests.
   26108 	* tests/epoll_create1.c: Use SKIP_MAIN_UNDEFINED.
   26109 	(main): Use assert and perror_msg_and_skip.
   26110 
   26111 	tests/mmap.c: use libtests.
   26112 	* tests/mmap.c (main): Use get_page_size and perror_msg_and_fail.
   26113 
   26114 	tests/fanotify_mark.c: use libtests.
   26115 	* tests/fanotify_mark.c: Use SKIP_MAIN_UNDEFINED.
   26116 
   26117 	tests/inet-accept-connect-send-recv.c: use libtests.
   26118 	* tests/inet-accept-connect-send-recv.c (main): Use perror_msg_and_skip
   26119 	and perror_msg_and_fail.
   26120 
   26121 	tests/net-accept-connect.c: use libtests.
   26122 	* tests/net-accept-connect.c (main): Use perror_msg_and_skip
   26123 	and perror_msg_and_fail.
   26124 
   26125 	tests/unix-pair-send-recv.c: use libtests.
   26126 	* tests/unix-pair-send-recv.c (main): Use perror_msg_and_skip
   26127 	and perror_msg_and_fail.
   26128 
   26129 2016-01-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   26130 
   26131 	tests/xselect.c: use libtests.
   26132 	* tests/xselect.c (main): Use assert, perror_msg_and_fail,
   26133 	and perror_msg_and_skip.
   26134 
   26135 	tests/pselect6.c: use libtests.
   26136 	* tests/pselect6.c: Use SKIP_MAIN_UNDEFINED.
   26137 	(main): Use assert, perror_msg_and_fail, and perror_msg_and_skip.
   26138 
   26139 2016-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   26140 
   26141 	tests/oldselect.c: use libtests.
   26142 	* tests/oldselect.c: Use SKIP_MAIN_UNDEFINED.
   26143 	(main): Use perror_msg_and_fail and perror_msg_and_skip.
   26144 
   26145 	tests/select.c: use libtests.
   26146 	* tests/select.c: Use SKIP_MAIN_UNDEFINED.
   26147 
   26148 	tests/_newselect.c: use libtests.
   26149 	* tests/_newselect.c: Use SKIP_MAIN_UNDEFINED.
   26150 
   26151 	tests/fstatat.c: use libtests.
   26152 	* tests/fstatat.c: Use SKIP_MAIN_UNDEFINED.
   26153 
   26154 	tests/newfstatat.c: use libtests.
   26155 	* tests/newfstatat.c: Use SKIP_MAIN_UNDEFINED.
   26156 
   26157 	tests/fstatat64.c: use libtests.
   26158 	* tests/fstatat64.c: Use SKIP_MAIN_UNDEFINED.
   26159 
   26160 	tests/xstatx.c: use libtests.
   26161 	* tests/xstatx.c: Use SKIP_MAIN_UNDEFINED.
   26162 
   26163 	tests/stat64.c: use libtests.
   26164 	* tests/stat64.c: Use SKIP_MAIN_UNDEFINED.
   26165 
   26166 	tests/stat.c: use libtests.
   26167 	* tests/stat.c: Use SKIP_MAIN_UNDEFINED.
   26168 
   26169 	tests/lstat64.c: use libtests.
   26170 	* tests/lstat64.c: Use SKIP_MAIN_UNDEFINED.
   26171 
   26172 	tests/lstat.c: use libtests.
   26173 	* tests/lstat.c: Use SKIP_MAIN_UNDEFINED.
   26174 
   26175 	tests/fstat64.c: use libtests.
   26176 	* tests/fstat64.c: Use SKIP_MAIN_UNDEFINED.
   26177 
   26178 	tests/fstat.c: use libtests.
   26179 	* tests/fstat.c: Use SKIP_MAIN_UNDEFINED.
   26180 
   26181 	tests/statfs.c: use libtests.
   26182 	* tests/statfs.c (main): Use perror_msg_and_fail.
   26183 
   26184 2016-01-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   26185 
   26186 	tests/xettimeofday.c: use libtests.
   26187 	* tests/xettimeofday.c (main): Use assert and perror_msg_and_skip.
   26188 
   26189 	tests/utime.c: use libtests.
   26190 	* tests/utime.c (main): Use assert and perror_msg_and_skip.
   26191 
   26192 	tests/filter-unavailable.c: use libtests.
   26193 	* tests/filter-unavailable.c (main): Use perror_msg_and_fail.
   26194 
   26195 	tests/scm_rights.c: use libtests.
   26196 	* tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
   26197 
   26198 	tests/caps.c: use libtests.
   26199 	* tests/caps.c (main): Use perror_msg_and_skip.
   26200 
   26201 	tests/rt_sigqueueinfo.c: use libtests.
   26202 	* tests/rt_sigqueueinfo.c (main): Use assert and perror_msg_and_skip.
   26203 
   26204 	tests/umount.c: use libtests.
   26205 	* tests/umount.c: Use SKIP_MAIN_UNDEFINED.
   26206 	(main): Use perror_msg_and_fail.
   26207 
   26208 	tests/umount2.c: use libtests.
   26209 	* tests/umount2.c (main): Use perror_msg_and_fail.
   26210 
   26211 2016-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   26212 
   26213 	tests/times.c: use libtests.
   26214 	* tests/times.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
   26215 
   26216 2016-01-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   26217 
   26218 	tests/times-fail.c: use assert.
   26219 	* tests/times-fail.c (main): Use assert.
   26220 
   26221 	tests/memfd_create.c: use libtests.
   26222 	* tests/memfd_create.c: Use SKIP_MAIN_UNDEFINED.
   26223 
   26224 	tests/execveat.c: use libtests.
   26225 	* tests/execveat.c: Use SKIP_MAIN_UNDEFINED.
   26226 
   26227 	tests/xetitimer.c: use libtests.
   26228 	* tests/xetitimer.c (main): Use perror_msg_and_skip.
   26229 
   26230 2016-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   26231 
   26232 	tests/sysinfo.c: use libtests.
   26233 	* tests/sysinfo.c (main): Use perror_msg_and_skip.
   26234 
   26235 	tests/sigaltstack.c: use libtests.
   26236 	* tests/sigaltstack.c (main): Use perror_msg_and_skip.
   26237 
   26238 	tests/adjtimex.c: use libtests.
   26239 	* tests/adjtimex.c (main): Use perror_msg_and_skip.
   26240 
   26241 	tests/xet_robust_list.c: use libtests.
   26242 	* tests/xet_robust_list.c: Use SKIP_MAIN_UNDEFINED.
   26243 	(main): Use perror_msg_and_skip and tail_alloc.
   26244 
   26245 	tests/umovestr2.c: use libtests.
   26246 	* tests/umovestr2.c (main): Use get_page_size and tail_alloc.
   26247 
   26248 	tests/umovestr.c: use libtests.
   26249 	* tests/umovestr.c (main): Use perror_msg_and_skip and tail_alloc.
   26250 
   26251 	tests/time.c: use libtests.
   26252 	* tests/time.c: Use SKIP_MAIN_UNDEFINED.
   26253 	(main): Use perror_msg_and_skip and tail_alloc.
   26254 
   26255 	tests/sendfile64.c: use libtests.
   26256 	* tests/sendfile64.c: Use SKIP_MAIN_UNDEFINED.
   26257 	(main): Use assert, perror_msg_and_fail, perror_msg_and_skip,
   26258 	and tail_alloc.
   26259 
   26260 	tests/sendfile.c: use libtests.
   26261 	* tests/sendfile.c: Use SKIP_MAIN_UNDEFINED.
   26262 	(main): Use assert, perror_msg_and_fail, perror_msg_and_skip,
   26263 	and tail_alloc.
   26264 
   26265 2016-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   26266 
   26267 	tests: include tests.h instead of config.h.
   26268 	Automatically edit tests/*.c files using the following perl one-liner:
   26269 
   26270 	perl -0777 -pi -e \
   26271 	's/#ifdef HAVE_CONFIG_H\n# include "config\.h"\n#endif\n*/#include "tests.h"\n/' \
   26272 	tests/*.c
   26273 
   26274 2016-01-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   26275 
   26276 	tests: introduce libtests.
   26277 	Introduce tests/libtests.a with common functions for use in tests.
   26278 
   26279 	* tests/tests.h: New file.
   26280 	* tests/error_msg.c: Likewise.
   26281 	* tests/tail_alloc.c: Likewise.
   26282 	* tests/get_page_size.c: Likewise.
   26283 	* tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS,
   26284 	check_LIBRARIES, LDADD): New variables.
   26285 	(clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD,
   26286 	pc_LDADD, times_LDADD): Add $(LDADD).
   26287 	* tests/.gitignore: Add libtests.a.
   26288 
   26289 2016-01-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   26290 
   26291 	tests: enable strace-k.test only for --with-libunwind configurations.
   26292 	Also, since -k option does not support multiple personalities,
   26293 	add strace-k.test to XFAIL_TESTS when running mpers tests.
   26294 
   26295 	* tests/Makefile.am (MPERS_NAME, LIBUNWIND_TESTS, XFAIL_TESTS_,
   26296 	XFAIL_TESTS_m32, XFAIL_TESTS_mx32, XFAIL_TESTS): New variables.
   26297 	[USE_LIBUNWIND] (LIBUNWIND_TESTS): Add strace-k.test.
   26298 	(TESTS): Replace strace-k.test with $(LIBUNWIND_TESTS).
   26299 	* bootstrap: Substitute MPERS_NAME variable in tests-*/Makefile.am.
   26300 	* tests/strace-k.test: Do not check for -k option availability.
   26301 
   26302 2016-01-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   26303 
   26304 	Move gcc compat macros to gcc_compat.h.
   26305 	* defs.h: Include "gcc_compat.h".
   26306 	(GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT,
   26307 	ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC,
   26308 	ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ...
   26309 	* gcc_compat.h: ... here.
   26310 	* Makefile.am (strace_SOURCES): Add gcc_compat.h.
   26311 
   26312 2015-12-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   26313 
   26314 	Move defs.h from noinst_HEADERS to strace_SOURCES.
   26315 	* Makefile.am (noinst_HEADERS): Move defs.h ...
   26316 	(strace_SOURCES): ... here.
   26317 
   26318 2015-12-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   26319 
   26320 	test: remove fork.c and vfork.c.
   26321 	These manual tests are obsoleted by fork-f.test and vfork-f.test.
   26322 
   26323 	* test/fork.c: Remove.
   26324 	* test/vfork.c: Remove.
   26325 	* test/Makefile (PROGS): Remove fork and vfork.
   26326 	* test/.gitignore: Remove fork and vfork.
   26327 
   26328 2015-12-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   26329 
   26330 	tests: add fork-f.test and vfork-f.test.
   26331 	Check how strace -f follows fork and vfork syscalls.
   26332 
   26333 	* tests/fork-f.c: New file.
   26334 	* tests/fork-f.test: New test.
   26335 	* tests/vfork-f.c: New file.
   26336 	* tests/vfork-f.test: New test.
   26337 	* tests/Makefile.am (check_PROGRAMS): Add fork-f and vfork-f.
   26338 	(TESTS): Add fork-f.test and vfork-f.test.
   26339 	* tests/.gitignore: Add fork-f and vfork-f.
   26340 
   26341 2015-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   26342 
   26343 	Set SYSCALL_NEVER_FAILS flag for getpid, getppid and gettid syscall.
   26344 	* linux/*/syscallent*.h (getpid, getppid, gettid): Set NF flag.
   26345 
   26346 2015-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   26347 
   26348 	Set SYSCALL_NEVER_FAILS flag for umask syscall.
   26349 	Linux kernel always ANDs umask argument with 0700 and therefore
   26350 	this syscall never fails.
   26351 
   26352 	* linux/*/syscallent*.h (umask): Set NF flag.
   26353 
   26354 2015-12-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   26355 
   26356 	alpha, ia64, mips, nios2, powerpc, sparc: always check for syscall error
   26357 	On architectures that use dedicated registers to report syscall errors,
   26358 	check for syscall error condition regardless of SYSCALL_NEVER_FAILS flag
   26359 	in the syscall entry.  On architectures that use negated errno
   26360 	semantics, there is no way to distinguish a syscall error from a valid
   26361 	return code that looks like a syscall error, and the check for
   26362 	SYSCALL_NEVER_FAILS flag remains the only way to tell one case
   26363 	from another.
   26364 
   26365 	* linux/alpha/get_error.c (get_error): Ignore check_errno.
   26366 	* linux/ia64/get_error.c: Likewise.
   26367 	* linux/mips/get_error.c: Likewise.
   26368 	* linux/nios2/get_error.c: Likewise.
   26369 	* linux/powerpc/get_error.c: Likewise.
   26370 	* linux/sparc/get_error.c: Likewise.
   26371 	* linux/sparc64/get_error.c: Likewise.
   26372 
   26373 2015-12-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   26374 
   26375 	Handle unlikely errors from personality syscall.
   26376 	Despite being marked as SYSCALL_NEVER_FAILS, personality syscall still
   26377 	might report a failure on some architectures due to obscure kernel
   26378 	bugs.  Check for this unlikely case and let users know that their
   26379 	kernel has gone bananas.
   26380 
   26381 	* personality.c (SYS_FUNC(personality)): Do not parse syscall return
   26382 	value in case of syserror.
   26383 
   26384 2015-12-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   26385 
   26386 	Do not truncate return value of get{,e}[ug]id and setfs[ug]id syscalls.
   26387 	This should not be a user visible change unless the kernel does
   26388 	something completely unexpected.  In the latter case, let user see
   26389 	what is going on.
   26390 
   26391 	* uid.c (SYS_FUNC(getuid), SYS_FUNC(setfsuid)): Do not truncate
   26392 	tcp->u_rval to uid_t on exiting syscall, return RVAL_DECODED.
   26393 
   26394 2015-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   26395 
   26396 	Enhance personality syscall decoding.
   26397 	* xlat/personality_options.in: Split into ...
   26398 	* xlat/personality_types.in: ... personality types and ...
   26399 	* xlat/personality_flags.in: ... personality flags.
   26400 	* personality.c: Include "xlat/personality_types.h"
   26401 	and "xlat/personality_flags.h" instead of "xlat/personality_options.h".
   26402 	(SYS_FUNC(personality)): Print PER_MASK part of personality as
   26403 	a symbolic value, and the rest of personality as a set of flags.
   26404 	* tests/personality.c (main): Add more test cases.
   26405 	* tests/personality.test: Update.
   26406 
   26407 2015-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   26408 
   26409 	sh, sh64: fix syscall flags in several syscall entries.
   26410 	* linux/sh/syscallent.h (geteuid32, getegid32, setfsuid32, setfsgid32):
   26411 	Set SYSCALL_NEVER_FAILS flag.
   26412 	(fchown32): Set TRACE_DESC flag.
   26413 	* linux/sh64/syscallent.h: Likewise.
   26414 
   26415 2015-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   26416 
   26417 	Print personality value 0xffffffff properly.
   26418 	Value 0xffffffff of personality syscall first argument has a special
   26419 	meaning, it is not a set of personality flags.
   26420 
   26421 	* personality.c (SYS_FUNC(personality)): If personality equals
   26422 	to 0xffffffff, print it verbatim.
   26423 	* tests/personality.c (main): Test it.
   26424 
   26425 2015-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   26426 
   26427 	tests: add personality.test.
   26428 	* tests/personality.c: New file.
   26429 	* tests/personality.test: New test.
   26430 	* tests/Makefile.am (check_PROGRAMS): Add personality.
   26431 	(TESTS): Add personality.test.
   26432 	* tests/.gitignore: Add personality.
   26433 
   26434 	Enhance personality syscall decoding.
   26435 	* personality.c (SYS_FUNC(personality)): On entering syscall,
   26436 	print first argument not as a hex value but as a set of flags.
   26437 	On exiting syscall, print return code as a set of flags.
   26438 	* NEWS: Mention this enhancement.
   26439 
   26440 2015-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   26441 
   26442 	Set SYSCALL_NEVER_FAILS flag for personality syscall.
   26443 	Starting with commit
   26444 	v2.6.29-6609-g11d06b2a1e5658f448a308aa3beb97bacd64a940, personality
   26445 	syscall never fails to set the personality, but before commit
   26446 	v2.6.35-rc1-372-g485d527 it still could return an error.
   26447 	Starting with that commit, personality syscall never returns an error.
   26448 
   26449 	* linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag in personality
   26450 	syscall entries.
   26451 
   26452 2015-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   26453 
   26454 	Add personality emulation flags.
   26455 	* xlat/personality_options.in: Add UNAME26, ADDR_NO_RANDOMIZE,
   26456 	FDPIC_FUNCPTRS, MMAP_PAGE_ZERO, ADDR_COMPAT_LAYOUT, READ_IMPLIES_EXEC,
   26457 	ADDR_LIMIT_32BIT, SHORT_INODE, WHOLE_SECONDS, STICKY_TIMEOUTS,
   26458 	and ADDR_LIMIT_3GB.
   26459 
   26460 2015-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   26461 
   26462 	arc, metag, nios2, or1k, tile: fix build.
   26463 	Fix build regression introduced by commit
   26464 	34683e3926d8c2daa368afb805da422ee7043396.
   26465 
   26466 	* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
   26467 	* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
   26468 	* linux/nios2/syscallent.h: Likewise.
   26469 	* linux/or1k/syscallent.h: Likewise.
   26470 	* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff.
   26471 	* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
   26472 	* NEWS: Mention this build fix.
   26473 
   26474 	Reported-by: Alexey Brodkin <Alexey.Brodkin (a] synopsys.com>
   26475 
   26476 2015-12-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   26477 
   26478 	packages: remove acl development library from build dependencies.
   26479 	Starting with commit v4.9-46-g681452b that removed all references
   26480 	to acl.h, we no longer use acl development library.
   26481 
   26482 	* .travis.yml (addons.apt.packages): Remove libacl1-dev.
   26483 	* strace.spec (BuildRequires): Remove libacl-devel.
   26484 
   26485 2015-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   26486 
   26487 	packages/x86_64: enable experimental -k option.
   26488 	* debian/control (Build-Depends) [amd64]: Add libunwind-dev.
   26489 	* strace.spec (BuildRequires) [x86_64]: Add libunwind-devel.
   26490 
   26491 	maint: post-release administrivia.
   26492 	* NEWS: Add header line for the next release.
   26493 
   26494 2015-12-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   26495 
   26496 	Prepare for 4.11 release.
   26497 	* NEWS: Update for 4.11 release.
   26498 	* debian/changelog: 4.11-1.
   26499 	* strace.spec: 4.11-1.
   26500 
   26501 2015-12-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   26502 
   26503 	Sync strace.spec and debian/ with packages.
   26504 	* debian/changelog: Sync with 4.10-3.
   26505 	* debian/control: Likewise.
   26506 	* debian/rules: Likewise.
   26507 	* strace.spec: Sync with 4.10-3.
   26508 
   26509 	.mailmap: add addresses of Kirill A. Shutemov.
   26510 	* .mailmap: Add both addresses of Kirill A. Shutemov here
   26511 	to avoid duplications in CREDITS file.
   26512 
   26513 2015-12-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   26514 
   26515 	NEWS: Prepare for 4.11 release.
   26516 
   26517 2015-12-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   26518 
   26519 	ia64: wire up mlock2 syscall.
   26520 	* linux/ia64/syscallent.h [1346]: Add mlock2 entry.
   26521 
   26522 2015-12-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   26523 
   26524 	Add copyright headers to some files which lack them.
   26525 	Before this change, all files that exist since 20th century had
   26526 	copyright headers, while most files that appeared later didn't.  This
   26527 	change fixes the inconsistency by adding missing copyright headers.
   26528 
   26529 	It doesn't mean that copyright headers became maintained.  In my view,
   26530 	git history provides much better information on this subject and is much
   26531 	more accurate than copyright headers.
   26532 
   26533 2015-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   26534 
   26535 	tests/aio.c: include <time.h>
   26536 	* tests/aio.c: Include <time.h> for struct timespec.
   26537 
   26538 	Reported-by: Szabolcs Nagy <nsz (a] port70.net>
   26539 
   26540 2015-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   26541 
   26542 	mpers.sh: switch to DWARF version 2 format for better portability.
   26543 	* mpers.sh (CFLAGS): Replace -gdwarf-4 with -gdwarf-2.
   26544 
   26545 	mpers.awk: add support for DWARF version 2 format.
   26546 	* mpers.awk: Handle DW_AT_data_member_location in DWARF v2 format.
   26547 
   26548 2015-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   26549 
   26550 	Replace %Ld/%Lu printf format specifiers with %lld/%llu.
   26551 	As %Ld and %Lu printf format specifiers are not quite portable,
   26552 	replace them with %lld and %llu, respectively.
   26553 
   26554 	* desc.c (SYS_FUNC(pselect6)): Replace %Lu with %llu.
   26555 	* dirent.c (print_old_dirent, SYS_FUNC(getdents)): Likewise.
   26556 	* times.c (SYS_FUNC(times)): Likewise.
   26557 	* fcntl.c (print_struct_flock64): Replace %Ld with %lld.
   26558 	* tests/ftruncate.c (main): Replace %Lu with %llu.
   26559 	* tests/ftruncate64.c (main): Likewise.
   26560 	* tests/getdents.c (print_dirent): Likewise.
   26561 	* tests/llseek.c (main): Likewise.
   26562 	* tests/lseek.c (main): Likewise.
   26563 	* tests/truncate.c (main): Likewise.
   26564 	* tests/truncate64.c (main): Likewise.
   26565 	* tests/xstatx.c (main): Likewise.
   26566 	* tests/pselect6.c (main): Replace %Ld with %lld.
   26567 	* tests/xselect.c(main): Likewise.
   26568 
   26569 	Reported-by: Szabolcs Nagy <nsz (a] port70.net>
   26570 
   26571 2015-12-16  Szabolcs Nagy  <nsz (a] port70.net>
   26572 
   26573 	Fix SYS_FUNC and SEN macros for musl.
   26574 	The syscall_name argument was subject to macro expansion because
   26575 	it was passed down to other macros before it was prefixed.
   26576 
   26577 	musl libc defines lfs64 names as macros (e.g. fstat64 as fstat)
   26578 	so SYS_FUNC(fstat64) was expanded to sys_fstat.
   26579 
   26580 	This change adds the prefix before the name is passed to other macros,
   26581 	i.e. the argument of SYS_FUNC_NAME is already prefixed with sys_.
   26582 
   26583 	* defs.h (SYS_FUNC): Add sys_ prefix to SYS_FUNC_NAME's argument.
   26584 	(SYS_FUNC_NAME): Do not add sys_ prefix to MPERS_FUNC_NAME's argument.
   26585 	* linux/ia64/syscallent.h (SYS_FUNC_NAME): Do not add sys_ prefix
   26586 	to MPERS_FUNC_NAME's argument.
   26587 	* syscall.c (SEN_NAME): Remove.
   26588 	(SEN): Replace SEN_NAME call with its definition.  Add sys_ prefix
   26589 	to SYS_FUNC_NAME's argument.
   26590 
   26591 2015-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   26592 
   26593 	tests/times.test: workaround libc bug on x32.
   26594 	As glibc times wrapper on x32 is known to wrongly truncate and then sign
   26595 	extend the syscall return value, invoke the syscall directly on x32.
   26596 
   26597 	* tests/times.c (main) [__NR_times && __x86_64__ && __ILP32__]:
   26598 	Invoke times syscall using inline asm.
   26599 
   26600 2015-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   26601 
   26602 	mpers.awk: make fillers added to the output structure more predictable.
   26603 	* mpers.awk (array_seq): New function.
   26604 	(what_is): Use it for printing filler names.  Tweak return types.
   26605 	* mpers_test.sh: Use a more complicated sample type to test mpers
   26606 	machinery.
   26607 
   26608 2015-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   26609 
   26610 	Robustify mpers.awk against input containing index loops.
   26611 	Make mpers.awk check for potential index loops.  Such loops should not
   26612 	normally happen, but mpers.awk will not go into infinite recursion if
   26613 	they do.
   26614 
   26615 	* mpers.awk (enter, leave): New functions.
   26616 	(what_is): Use them.
   26617 
   26618 2015-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   26619 
   26620 	Robustify mpers.awk against invalid input.
   26621 	Make mpers.awk check that accessed elements of the main array that
   26622 	are expected to have non-empty values really meet this requirement.
   26623 
   26624 	* mpers.awk (array_get): New function.
   26625 	(what_is, END): Use it.
   26626 	* mpers_test.sh: Use a more complicated type to test mpers machinery.
   26627 
   26628 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   26629 
   26630 2015-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   26631 
   26632 	Replace HAVE_LITTLE_ENDIAN_LONG_LONG with WORDS_BIGENDIAN.
   26633 	* defs.h: Use WORDS_BIGENDIAN instead of HAVE_LITTLE_ENDIAN_LONG_LONG.
   26634 	* configure.ac (AC_LITTLE_ENDIAN_LONG_LONG): Remove.
   26635 	* m4/long_long.m4: Remove.
   26636 
   26637 2015-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   26638 
   26639 	Remove unused parser of xmknod syscall.
   26640 	The last reference to this parser was removed by commit
   26641 	v4.10-45-gdf4dd8b.
   26642 
   26643 	* mknod.c [SPARC || SPARC64] (SYS_FUNC(xmknod)): Remove.
   26644 
   26645 2015-12-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   26646 
   26647 	tests/restart_syscall: add a workaround for old arm kernels.
   26648 	As arm kernels used to overwrite ARM_r0 with -EINTR after
   26649 	ERESTART_RESTARTBLOCK, update regexp to workaround this.
   26650 
   26651 	* tests/restart_syscall.c (main) [__arm__]: Add 0xfffffffc as a valid
   26652 	alternative value for the first argument of restarted nanosleep syscall.
   26653 
   26654 2015-12-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   26655 
   26656 	tests/.gitignore: add ksysent.h.
   26657 	tests/ksysent.h is a generated file listed in CLEANFILES.
   26658 	This change complements commit v4.10-566-gbab4ef4.
   26659 
   26660 	* tests/.gitignore: Add ksysent.h.
   26661 
   26662 2015-12-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   26663 
   26664 	aarch64: make arm registers unsigned.
   26665 	Follow the x86_64 example and define registers in arm_pt_regs
   26666 	as unsigned, to avoid potential sign extension bugs.
   26667 
   26668 	This also fixes --enable-gcc-Werror build.
   26669 
   26670 	* linux/aarch64/arch_regs.c (arm_pt_regs): Change uregs's type
   26671 	from int to uint32_t.
   26672 
   26673 	Reported-by: Sergey Bolshakov <sbolshakov (a] altlinux.org>
   26674 
   26675 2015-12-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   26676 
   26677 	tests: add ksysent.test.
   26678 	Check that syscall names and numbers defined in syscallent files
   26679 	match kernel __NR_* constants defined by <asm/unistd.h>.
   26680 
   26681 	Tested on various platforms, including the following combinations
   26682 	of architectures and kernel headers:
   26683 
   26684 	x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
   26685 	3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
   26686 	i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
   26687 	3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
   26688 	aarch64: 4.4-rc
   26689 	alpha: 4.3
   26690 	arm eabi: 4.4-rc, 4.2, 4.1
   26691 	hppa: 3.18
   26692 	ia64: 3.18
   26693 	mips o32: 4.1
   26694 	ppc: 3.18
   26695 	ppc64: 3.10-rhel, 2.6.32-rhel
   26696 	s390: 3.18
   26697 	s390x: 3.18
   26698 	sparc: 4.1
   26699 	sparc: 3.18
   26700 	x32: 3.19
   26701 
   26702 	The only platform which is known at this moment to fail the test
   26703 	is CentOS-5 provided by OBS.  On x86_64 instance it fails with
   26704 	error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
   26705 	and on i586 it similarly fails with
   26706 	error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
   26707 	So this is a real platform bug that is not likely to be worked around
   26708 	on the strace side.
   26709 
   26710 	* tests/ksysent.c: New file.
   26711 	* tests/ksysent.sed: Likewise.
   26712 	* tests/ksysent.test: New test.
   26713 	* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
   26714 	(check_PROGRAMS): Add ksysent.
   26715 	(TESTS): Add ksysent.test.
   26716 	(EXTRA_DIST): Add ksysent.sed.
   26717 	(ksysent.h): New rule.
   26718 	(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
   26719 	* tests/.gitignore: Add ksysent.
   26720 
   26721 2015-12-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   26722 
   26723 	Document that syscall names match kernel __NR_* constants.
   26724 	* strace.1: Note syscall naming difference between architectures
   26725 	and the rule of choosing the right syscall name in each case.
   26726 
   26727 2015-12-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   26728 
   26729 	ia64: print all ia32 syscalls using printargs.
   26730 	Printing of ia32 syscalls on ia64 must have been broken for a long time.
   26731 	Do not pretend that it works, print ia32 syscalls using printargs
   26732 	instead.
   26733 
   26734 	* linux/ia64/syscallent.h: Remove all redefinitions of sys_* macros.
   26735 	Stop including"../dummy.h".  Include "../i386/syscallent.h" with
   26736 	SYS_FUNC_NAME macro temporarily redirected to printargs.
   26737 
   26738 2015-12-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   26739 
   26740 	Fix build on architectures for which arch_sigreturn is not implemented.
   26741 	This complements commit 527b42ff8da3f52fa7c48eb766b2b57fb0f0b977.
   26742 
   26743 	* linux/arch_sigreturn.c (arch_sigreturn): Define.
   26744 
   26745 2015-12-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   26746 
   26747 	aarch64: swap 64-bit and 32-bit personalities.
   26748 	Let native 64-bit personality be personality 0, and 32-bit personality
   26749 	be personality 1, to follow the traditional layout used for other
   26750 	architectures.
   26751 
   26752 	* defs.h [AARCH64]: Swap PERSONALITY0_WORDSIZE and
   26753 	PERSONALITY1_WORDSIZE, remove DEFAULT_PERSONALITY.
   26754 	[AARCH64 && HAVE_M32_MPERS]: Rename PERSONALITY1_* to PERSONALITY0_*.
   26755 	* file.c [AARCH64 || defined X86_64 || defined X32]: Define
   26756 	STAT32_PERSONALITY for AARCH64 as well.
   26757 	* syscall.c (update_personality) [AARCH64]: Adjust PERSONALITY_NAMES.
   26758 	* linux/aarch64/errnoent1.h: Adjust comment.
   26759 	* linux/aarch64/get_error.c (get_error): Adjust tcp->currpers check.
   26760 	* linux/aarch64/get_syscall_args.c (get_syscall_args): Likewise.
   26761 	* linux/arm/arch_sigreturn.c (arch_sigreturn) [AARCH64]: Likewise.
   26762 	* linux/aarch64/get_scno.c (arch_get_scno): Adjust update_personality
   26763 	invocations.
   26764 	* linux/aarch64/ioctls_arch0.h: Swap with ...
   26765 	* linux/aarch64/ioctls_arch1.h: ... this file.
   26766 	* linux/aarch64/ioctls_inc0.h: Swap with ...
   26767 	* linux/aarch64/ioctls_inc1.h: ... this file.
   26768 	* linux/aarch64/syscallent.h: Swap with ...
   26769 	* linux/aarch64/syscallent1.h: ... this file.
   26770 
   26771 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26772 
   26773 	mips: fix fadvise64 syscall entries.
   26774 	* linux/mips/syscallent-n32.h [6216]: Change syscall handler
   26775 	from fadvise64 to fadvise64_64.
   26776 	* linux/mips/syscallent-n64.h [5215]: Rename from "fadvise64_64"
   26777 	to "fadvise64"
   26778 	* linux/mips/syscallent-o32.h [4254]: Likewise.
   26779 
   26780 	xtensa: wire up syncfs syscall.
   26781 	* linux/xtensa/syscallent.h [179]: Add syncfs entry.
   26782 
   26783 	sh, sh64: fix syscall entries.
   26784 	* linux/sh/syscallent.h [322]: Fix timerfd_create entry.
   26785 	* linux/sh64/syscallent.h [350]: Likewise.
   26786 	[0]: Fix restart_syscall entry.
   26787 
   26788 	powerpc, powerpc64: wire up mlock2 syscall.
   26789 	* linux/powerpc/syscallent.h [378]: Add mlock2 entry.
   26790 	* linux/powerpc64/syscallent.h: Likewise.
   26791 
   26792 	hppa: fix syscall entries.
   26793 	* linux/hppa/syscallent.h: Swap [343] and [344] entries.
   26794 
   26795 	avr32: update syscall entries.
   26796 	* linux/avr32/syscallent.h [0]: Rename from setup to restart_syscall.
   26797 	[284 ... 320]: New entries.
   26798 
   26799 	m68k: fix syscall names.
   26800 	* linux/m68k/syscallent.h [335]: Rename "atomic_comxchg_32"
   26801 	to "atomic_cmpxchg_32".
   26802 
   26803 	sparc: update syscall names.
   26804 	* linux/sparc/syscallent.h [160]: Rename "sched_setaffinity"
   26805 	to "sched_set_affinity".
   26806 	[161]: Rename "sched_getaffinity" to "sched_get_affinity".
   26807 
   26808 	powerpc, powerpc64: update syscall names.
   26809 	* linux/powerpc/syscallent.h [201]: Rename "MOL" to "multiplexer".
   26810 	[225]: Rename "tux" to "tuxcall".
   26811 	[256]: Rename "debug_setcontext" to "sys_debug_setcontext".
   26812 	* linux/powerpc64/syscallent.h: Likewise.
   26813 
   26814 	alpha: update syscall entries.
   26815 	* linux/alpha/syscallent.h [224 ... 228]: Add stub entries.
   26816 	[100]: Rename "osf_getpriority" to "getpriority".
   26817 	[255]: Rename "osf_subsysinfo" to "osf_subsys_info".
   26818 	[303]: Rename "adjtimex32" to "old_adjtimex".
   26819 	[319]: Rename "sysctl" to "_sysctl".
   26820 	[320]: Remove.
   26821 
   26822 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26823 
   26824 	Fix mmap syscall entries.
   26825 	Change syscall names to match kernel __NR_* constants.
   26826 
   26827 	* linux/avr32/syscallent.h [90]: Rename "mmap" to "mmap2".
   26828 	* linux/bfin/syscallent.h [90]: Rename "old_mmap" to "mmap".
   26829 	* linux/i386/syscallent.h: Likewise.
   26830 	* linux/m68k/syscallent.h: Likewise.
   26831 	* linux/microblaze/syscallent.h: Likewise.
   26832 	* linux/sh/syscallent.h: Likewise.
   26833 	* linux/sh64/syscallent.h: Likewise.
   26834 	* tests/mmap.c (main): Remove old_mmap from expected output.
   26835 	* tests/mmap.test: Remove old_mmap from the list of mmap syscalls.
   26836 
   26837 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26838 
   26839 	Fix select and _newselect syscall entries.
   26840 	Change syscall names to match kernel __NR_* constants.
   26841 	This reverts commit ddcf54969d253582ab2cfdcab8ede9cdae3fb171.
   26842 
   26843 	* linux/arm/syscallent.h [82]: Rename "oldselect" to "select".
   26844 	[142]: Rename "select" to "_newselect".
   26845 	* linux/bfin/syscallent.h: Likewise.
   26846 	* linux/i386/syscallent.h: Likewise.
   26847 	* linux/m68k/syscallent.h: Likewise.
   26848 	* linux/microblaze/syscallent.h: Likewise.
   26849 	* linux/powerpc/syscallent.h [82]: Likewise.
   26850 	* linux/powerpc64/syscallent.h: Likewise.
   26851 	* linux/sh/syscallent.h: Likewise.
   26852 	* linux/sh64/syscallent.h: Likewise.
   26853 	* linux/hppa/syscallent.h [142]: Rename "select" to "_newselect".
   26854 	* linux/mips/syscallent-n32.h [6022]: Rename "select" to "_newselect".
   26855 	* linux/mips/syscallent-n64.h [5022]: Likewise.
   26856 	* linux/mips/syscallent-o32.h [4142]: Likewise.
   26857 	* linux/s390/syscallent.h [142]: Rename "select" to "_newselect".
   26858 	* linux/sparc/syscallent.h [230]: Rename "select" to "_newselect".
   26859 	* tests/oldselect.test: Rename oldselect to select.  Convert
   26860 	from match_grep to match_diff.
   26861 	* tests/oldselect.expected: Likewise.
   26862 	* xselect.c: New file, based on select.c.
   26863 	* tests/_newselect.c: New file.
   26864 	* tests/select.c: Replace with a wrapper around xselect.c.
   26865 	* tests/select.test: Parametrize.
   26866 	* tests/_newselect.test: New test.
   26867 	* tests/Makefile.am (check_PROGRAMS): Add _newselect.
   26868 	(TESTS): Add _newselect.test.
   26869 	(EXTRA_DIST): Add xselect.c.
   26870 	* tests/.gitignore: Add _newselect.
   26871 
   26872 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26873 
   26874 	Fix exit syscall entries.
   26875 	Change syscall names to match kernel __NR_* constants.
   26876 
   26877 	* linux/avr32/syscallent.h [1]: Rename "_exit" to "exit".
   26878 	* linux/bfin/syscallent.h: Likewise.
   26879 	* linux/i386/syscallent.h: Likewise.
   26880 	* linux/m68k/syscallent.h: Likewise.
   26881 	* linux/microblaze/syscallent.h: Likewise.
   26882 	* linux/sh/syscallent.h: Likewise.
   26883 	* linux/sh64/syscallent.h: Likewise.
   26884 	* linux/x32/syscallent.h [60]: Rename "_exit" to "exit".
   26885 	* linux/x86_64/syscallent.h: Likewise.
   26886 
   26887 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26888 
   26889 	Fix pread64 and pwrite64 syscall entries.
   26890 	Change syscall names to match kernel __NR_* constants.
   26891 
   26892 	* linux/alpha/syscallent.h [349]: Rename "pread" to "pread64".
   26893 	[350]: Rename "pwrite" to "pwrite64".
   26894 	* linux/ia64/syscallent.h [1148]: Rename "pread" to "pread64".
   26895 	[1149]: Rename "pwrite" to "pwrite64".
   26896 	* linux/sh/syscallent.h [180]: Rename "pread" to "pread64".
   26897 	[181]: Rename "pwrite" to "pwrite64".
   26898 	* linux/sh64/syscallent.h: Likewise.
   26899 	* linux/x32/syscallent.h [17]: Rename "pread" to "pread64".
   26900 	[18]: Rename "pwrite" to "pwrite64".
   26901 	* linux/x86_64/syscallent.h: Likewise.
   26902 
   26903 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26904 
   26905 	tests: sort the list of tests.
   26906 	* tests/Makefile.am (TESTS): Sort the list of regular tests.
   26907 	* tests/.gitignore: Sort.
   26908 
   26909 	ia64: fix remap_file_pages syscall entry.
   26910 	* linux/ia64/syscallent.h (1125): Set to remap_file_pages.
   26911 
   26912 	bfin, i386: remove sysentry for nonexistent security syscall.
   26913 	* linux/bfin/syscallent.h (223): Remove.
   26914 	* linux/i386/syscallent.h: Likewise.
   26915 
   26916 	build: add -D_FILE_OFFSET_BITS=64 to _CPPFLAGS instead of _CFLAGS.
   26917 	* tests/Makefile.am (fstat64_CFLAGS): Rename to fstat64_CPPFLAGS,
   26918 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26919 	(fstatat64_CFLAGS): Rename to fstatat64_CPPFLAGS,
   26920 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26921 	(ftruncate64_CFLAGS): Rename to ftruncate64_CPPFLAGS,
   26922 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26923 	(lstat64_CFLAGS): Rename to lstat64_CPPFLAGS,
   26924 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26925 	(mmap64_CFLAGS): Rename to mmap64_CPPFLAGS,
   26926 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26927 	(newfstatat_CFLAGS): Rename to newfstatat_CPPFLAGS,
   26928 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26929 	(stat64_CFLAGS): Rename to stat64_CPPFLAGS,
   26930 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26931 	(statfs_CFLAGS): Rename to statfs_CPPFLAGS,
   26932 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26933 	(truncate64_CFLAGS): Rename to truncate64_CPPFLAGS,
   26934 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26935 	(uio_CFLAGS): Rename to uio_CPPFLAGS,
   26936 	replace $(AM_CFLAGS) with $(AM_CPPFLAGS).
   26937 
   26938 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26939 
   26940 	Move x32 <asm/stat.h> replacement to x32 specific directory.
   26941 	As tests-m*32/Makefile.am files now refer to proper arch specific
   26942 	directories, it's possible to relocate x32 <asm/stat.h> replacement
   26943 	to its arch specific directory.
   26944 
   26945 	* linux/x86_64/asm_stat.h: Move ...
   26946 	* linux/x32/asm_stat.h: ... here, remove x32 guard.
   26947 	* Makefile.am (strace_SOURCES): Remove linux/x86_64/asm_stat.h.
   26948 
   26949 2015-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   26950 
   26951 	build: set arch specific -m switches in tests-m*32/Makefile.am files properly
   26952 	* tests/Makefile.am (ARCH_MFLAGS, AM_LDFLAGS): New variables.
   26953 	(AM_CPPFLAGS): Use ARCH_MFLAGS.
   26954 	* bootstrap: In tests-m32/Makefile.am and tests-mx32/Makefile.am,
   26955 	add -m32 and -mx32, respectively, to ARCH_MFLAGS instead of AM_CFLAGS.
   26956 
   26957 	build: initialize ARCH variable in tests-m*32/Makefile.am files properly
   26958 	* configure.ac (arch_m32): Set to sparc on sparc64, powerpc on
   26959 	powerpc64, arm on aarch64, i386 on x86_64 and x32, $arch in other cases.
   26960 	(arch_mx32): Set to x32 on x86_64, $arch in other cases.
   26961 	(AC_SUBST): Add arch_m32 and arch_mx32.
   26962 	* bootstrap: Substitute @arch@ with @arch_m32@ in tests-m32/Makefile.am.
   26963 	Substitute @arch@ with @arch_mx32@ in tests-mx32/Makefile.am.
   26964 
   26965 2015-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   26966 
   26967 	tests: add umount.test and umount2.test.
   26968 	* tests/umount.c: New file.
   26969 	* tests/umount2.c: Likewise.
   26970 	* tests/umount.test: New test.
   26971 	* tests/umount2.test: Likewise.
   26972 	* tests/Makefile.am (check_PROGRAMS): Add umount and umount2.
   26973 	(TESTS): Add umount.test and umount2.test.
   26974 	* tests/.gitignore: Add umount and umount2.
   26975 
   26976 	avr32: fix umount2 syscall entry.
   26977 	* linux/avr32/syscallent.h: Rename umount to umount2.
   26978 
   26979 	Update umount2 flags.
   26980 	* umount.c (MNT_FORCE, MNT_DETACH, MNT_EXPIRE): Move definitions ...
   26981 	* xlat/umount_flags.in: ... here.  Add UMOUNT_NOFOLLOW.
   26982 
   26983 2015-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   26984 
   26985 	Print the first argument of umount2 syscall as a path.
   26986 	* umount.c (SYS_FUNC(umount2)): Use printpath instead of printstr.
   26987 
   26988 	This fixes Debian bug #785050.
   26989 
   26990 2015-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   26991 
   26992 	prctl: add PR_CAP_AMBIENT parser.
   26993 	* xlat/pr_cap_ambient.in: New file.
   26994 	* prctl.c: Include "xlat/pr_cap_ambient.h".
   26995 	(SYS_FUNC(prctl)): Handle PR_CAP_AMBIENT.
   26996 
   26997 	prctl: finish decoding of several commands on entering syscall.
   26998 	* prctl.c (SYS_FUNC(prctl)): Return RVAL_DECODED after decoding of
   26999 	PR_GET_DUMPABLE, PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK,
   27000 	PR_GET_TIMING, and PR_CAPBSET_READ commands.
   27001 
   27002 	Fix build on systems that lack EM_FRV definition.
   27003 	* xlat/audit_arch.in: Guard AUDIT_ARCH_FRV with EM_FRV check.
   27004 
   27005 	times.test: workaround buggy libc.
   27006 	* tests/times.c: Include <sys/syscall.h>.
   27007 	(main): On systems where user's and kernel's long types are the same,
   27008 	prefer direct times syscall over libc's times function because
   27009 	the latter is more prone to return value truncation.
   27010 
   27011 	times.test: reduce cpu time consumption, increase struct tms diversity.
   27012 	* tests/times.c (main): Reduce cpu time consumption fourfold,
   27013 	make the parent process consume less cpu time than the child process
   27014 	so that members of the structure returned by times syscall would be
   27015 	more likely to contain different values.
   27016 
   27017 2015-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   27018 
   27019 	mips n32, x32: fix printing of times syscall return value.
   27020 	As times syscall returns kernel's long value, it has to be printed as
   27021 	RVAL_LUDECIMAL on systems where long type is less than kernel's long.
   27022 
   27023 	* times.c (SYS_FUNC(times)) [RVAL_LUDECIMAL && !IN_MPERS]:
   27024 	Return RVAL_LUDECIMAL instead of RVAL_UDECIMAL.
   27025 
   27026 2015-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   27027 
   27028 	unix-yy.test: fix portability issue.
   27029 	* tests/unix-yy-connect.awk (r_close_listen): Quote square brackets
   27030 	that are not part of a bracket expression.
   27031 
   27032 	inet-cmsg.test: skip the test when the network is not functional.
   27033 	* tests/inet-cmsg.c (main): Return 77 if inet datagram socket
   27034 	cannot be bound to INADDR_LOOPBACK.
   27035 
   27036 2015-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   27037 
   27038 	fcntl: skip F_GETLK64, F_SETLK64, and F_SETLKW64 in fcntl syscall parser
   27039 	As the kernel recognizes F_GETLK64, F_SETLK64, and F_SETLKW64 commands
   27040 	in fcntl64 syscall only, do not parse their structures in fcntl parser.
   27041 
   27042 	* xlat/fcntlcmds.in: Move F_GETLK64, F_SETLK64, and F_SETLKW64 ...
   27043 	* xlat/fcntl64cmds.in: ... here.
   27044 	* fcntl.c: Include "xlat/fcntl64cmds.h".
   27045 	(print_fcntl): Move printing of first two syscall arguments
   27046 	and handling of F_GETLK64, F_SETLK64, and F_SETLKW64 commands ...
   27047 	(SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): ... here.
   27048 	* tests/fcntl.c: New file, based on struct_flock.c.
   27049 	* tests/fcntl64.c: Likewise.
   27050 	* tests/struct_flock.c (test_flock_einval, create_sample): New functions.
   27051 	(test_flock): Use test_flock_einval.
   27052 	(test_flock64, main): Remove.
   27053 	* tests/fcntl.test: New test.
   27054 	* tests/fcntl64.test: Likewise.
   27055 	* tests/struct_flock.test: Remove.
   27056 	* tests/Makefile.am (check_PROGRAMS): Add fcntl and fcntl64,
   27057 	remove struct_flock.
   27058 	(TESTS): Add fcntl.test and fcntl64.test, remove struct_flock.test.
   27059 	(EXTRA_DIST) Add struct_flock.c.
   27060 	* tests/.gitignore: Add fcntl and fcntl64, remove struct_flock.
   27061 
   27062 2015-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   27063 
   27064 	print_fcntl: finish with unrecognized commands on entering syscall.
   27065 	* fcntl.c (print_fcntl): Merge two switch statements.
   27066 
   27067 2015-12-04  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   27068 
   27069 	fcntl: create a separate parser for fcntl64 syscall.
   27070 	* fcntl.c(print_fcntl): New function, made from SYS_FUNC(fcntl).
   27071 	(SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Use it.
   27072 	* linux/32/syscallent.h: Change parser of fcntl64 to SEN(fcntl64).
   27073 	* linux/arm/syscallent.h: Likewise.
   27074 	* linux/avr32/syscallent.h: Likewise.
   27075 	* linux/bfin/syscallent.h: Likewise.
   27076 	* linux/hppa/syscallent.h: Likewise.
   27077 	* linux/i386/syscallent.h: Likewise.
   27078 	* linux/m68k/syscallent.h: Likewise.
   27079 	* linux/microblaze/syscallent.h: Likewise.
   27080 	* linux/mips/syscallent-n32.h: Likewise.
   27081 	* linux/mips/syscallent-o32.h: Likewise.
   27082 	* linux/powerpc/syscallent.h: Likewise.
   27083 	* linux/s390/syscallent.h: Likewise.
   27084 	* linux/sh/syscallent.h: Likewise.
   27085 	* linux/sh64/syscallent.h: Likewise.
   27086 	* linux/sparc/syscallent.h: Likewise.
   27087 	* linux/xtensa/syscallent.h: Likewise.
   27088 
   27089 2015-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   27090 
   27091 	travis-ci: add build matrix.
   27092 
   27093 	tests: replace old stat tests with stat.test and stat64.test.
   27094 	* tests/stat.c: Replace with a wrapper around lstatx.c
   27095 	* tests/stat.test: Replace with a wrapper around statx.sh.
   27096 	* tests/stat32-v.test: Remove.
   27097 	* tests/stat32.c: Remove.
   27098 	* tests/stat64-v.test: Remove.
   27099 	* tests/stat64.c: New file.
   27100 	* tests/stat64.test: New test.
   27101 	* tests/Makefile.am (check_PROGRAMS): Replace stat32 with stat64.
   27102 	(stat_CFLAGS): Rename to stat64_CFLAGS.
   27103 	(TESTS): Replace stat32-v.test and stat64-v.test with stat64.test.
   27104 	* tests/.gitignore: Replace stat32 with stat64.
   27105 
   27106 	tests: add lstat.test and lstat64.test.
   27107 	* tests/lstat.c: New file.
   27108 	* tests/lstat64.c: Likewise.
   27109 	* tests/lstatx.c: Likewise.
   27110 	* tests/lstat.test: New test.
   27111 	* tests/lstat64.test: Likewise.
   27112 	* tests/Makefile.am (check_PROGRAMS): Add lstat and lstat64.
   27113 	(lstat64_CFLAGS): Define.
   27114 	(TESTS): Add lstat.test and lstat64.test.
   27115 	(EXTRA_DIST): Add lstatx.c.
   27116 	* tests/.gitignore: Add lstat and lstat64.
   27117 
   27118 	tests: add fstat.test and fstat64.test.
   27119 	* tests/fstat.c: New file.
   27120 	* tests/fstat64.c: Likewise.
   27121 	* tests/fstatx.c: Likewise.
   27122 	* tests/fstat.test: New test.
   27123 	* tests/fstat64.test: Likewise.
   27124 	* tests/Makefile.am (check_PROGRAMS): Add fstat and fstat64.
   27125 	(fstat64_CFLAGS): Define.
   27126 	(TESTS): Add fstat.test and fstat64.test.
   27127 	(EXTRA_DIST): Add fstatx.c.
   27128 	* tests/.gitignore: Add fstat and fstat64.
   27129 
   27130 2015-12-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   27131 
   27132 	tests: prepare for detailed testing of stat family syscalls.
   27133 	Parametrize code from fstatat.c to support <asm/stat.h>
   27134 	as an alternative to <sys/stat.h> and move it to a separate file.
   27135 
   27136 	* tests/statx.sh: New file, based on fstatat64.test.
   27137 	* tests/fstatat64.test: Use it.
   27138 	* tests/newfstatat.test: Likewise.
   27139 	* tests/xstatx.c: New file, based on fstatat.c.
   27140 	* tests/fstatat.c: Use it.
   27141 	* tests/Makefile.am (EXTRA_DIST): Add statx.sh and xstatx.c.
   27142 	* tests/fstatat64.c (FSTATAT_NAME): Change to TEST_SYSCALL_NAME.
   27143 	* tests/newfstatat.c: Likewise.
   27144 
   27145 2015-12-04  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   27146 
   27147 	ioctl: allow to stop decoding number.
   27148 	For some ioctls, like from drm, the identification of the correct ioctl
   27149 	is done by custom code.  Specifying IOCTL_NUMBER_STOP_LOOKUP on
   27150 	return of ioctl_decode_command_number() disables further calls to
   27151 	ioctl_lookup().
   27152 
   27153 	* defs.h (IOCTL_NUMBER_UNKNOWN, IOCTL_NUMBER_HANDLED,
   27154 	IOCTL_NUMBER_STOP_LOOKUP): Add macros representing ioctl number state
   27155 	decoding.
   27156 	* ioctl.c (SYS_FUNC(ioctl)): Skip ioctl_lookup() when
   27157 	ioctl_decode_command_number() returns a value with
   27158 	IOCTL_NUMBER_STOP_LOOKUP flag is set.
   27159 
   27160 	Suggested-by: Patrik Jakobsson <patrik.r.jakobsson (a] gmail.com>
   27161 
   27162 2015-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   27163 
   27164 	tests: skip restart_syscall.test on x32.
   27165 	The syscall number of restart_syscall returned by the kernel in case
   27166 	of ERESTART_RESTARTBLOCK is broken on x32 from the beginning, see
   27167 	https://lkml.org/lkml/2015/11/30/790
   27168 
   27169 	Until that improves, skip the test on x32.
   27170 
   27171 	* tests/restart_syscall.c (main) [__x86_64__ && __ILP32__]: Return 77.
   27172 
   27173 2015-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   27174 
   27175 	x32: fix decoding of i386 personality lseek syscall.
   27176 	On x32, tcp->ext_arg is not initialized for i386 personality,
   27177 	so tcp->u_arg has to be used instead.
   27178 
   27179 	* lseek.c (SYS_FUNC(lseek)) [X32]: Handle "current_personality == 1" case.
   27180 
   27181 2015-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   27182 
   27183 	x86_64, x32: add a replacement for <asm/stat.h>
   27184 	Some old kernel headers, Ubuntu 14.04 in particular, provide
   27185 	<asm/stat.h> editions that are completely wrong for x32.
   27186 	Workaround this issue by providing a replacement.
   27187 
   27188 	* linux/x86_64/asm_stat.h: New file.
   27189 	* linux/x32/asm_stat.h: Likewise.
   27190 	* Makefile.am (strace_SOURCES): Add them.
   27191 
   27192 2015-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   27193 
   27194 	Add a wrapper around <asm/stat.h>
   27195 	* linux/asm_stat.h: New file.
   27196 	* Makefile.am (strace_SOURCES): Add it.
   27197 	* file.c: Use it.
   27198 
   27199 	kernel_types.h: protect from double inclusion.
   27200 	* kernel_types.h: Add #include guard.
   27201 
   27202 2015-12-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   27203 
   27204 	fstatat64.test: lift /proc requirement.
   27205 	While -P option needs /proc to match descriptors, it does not use
   27206 	/proc to match pathnames.  As this test does not need descriptor
   27207 	match, the /proc requirement can be safely lifted.
   27208 
   27209 	* tests/fstatat64.test: Lift /proc/self/fd/ requirement.
   27210 
   27211 2015-12-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   27212 
   27213 	tests: add fstatat64.test and newfstatat.test.
   27214 	* configure.ac (AC_CHECK_FUNCS): Add fstatat, ftruncate, and futimens.
   27215 	* tests/fstatat.c: New file.
   27216 	* tests/fstatat64.c: Likewise.
   27217 	* tests/newfstatat.c: Likewise.
   27218 	* tests/fstatat64.test: New test.
   27219 	* tests/newfstatat.test: Likewise.
   27220 	* tests/Makefile.am (check_PROGRAMS): Add fstatat64 and newfstatat.
   27221 	(fstatat64_CFLAGS, newstatat_CFLAGS): Define.
   27222 	(TESTS): Add fstatat64.test and newfstatat.test.
   27223 	(EXTRA_DIST): Add fstatat.c.
   27224 	* tests/.gitignore: Add fstatat64 and newfstatat.
   27225 
   27226 2015-12-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   27227 
   27228 	alpha, ppc, sh, sh64: fix fstatat64 syscall entries.
   27229 	* linux/alpha/syscallent.h (newfstatat): Change sys_name to fstatat64.
   27230 	* linux/powerpc/syscallent.h: Likewise.
   27231 	* linux/sh/syscallent.h: Likewise.
   27232 	* linux/sh64/syscallent.h: Likewise.
   27233 
   27234 	ppc64: clone syscallent.h from ppc.
   27235 	* linux/powerpc64/syscallent.h: Clone from linux/powerpc/syscallent.h
   27236 	with entries for numbers 192..197, 204, 226, and 254 unassigned.
   27237 
   27238 	tests: add lseek.test and llseek.test.
   27239 	* tests/llseek.c: New file.
   27240 	* tests/lseek.c: Likewise.
   27241 	* tests/llseek.test: New test.
   27242 	* tests/lseek.test: Likewise.
   27243 	* tests/Makefile.am (check_PROGRAMS): Add llseek and lseek.
   27244 	(TESTS): Add llseek.test and lseek.test.
   27245 	* tests/.gitignore: Add llseek and lseek.
   27246 
   27247 	tests: add ftruncate64.test and truncate64.test.
   27248 	* tests/ftruncate64.c: New file.
   27249 	* tests/truncate64.c: Likewise.
   27250 	* tests/ftruncate64.test: New test.
   27251 	* tests/truncate64.test: Likewise.
   27252 	* tests/Makefile.am (check_PROGRAMS): Add ftruncate64 and truncate64.
   27253 	(ftruncate64_CFLAGS, truncate64_CFLAGS): Define.
   27254 	(TESTS): Add ftruncate64.test and truncate64.test.
   27255 	* tests/.gitignore: Add ftruncate64 and truncate64.
   27256 
   27257 	tests: add ftruncate.test and truncate.test.
   27258 	* tests/ftruncate.c: New file.
   27259 	* tests/truncate.c: Likewise.
   27260 	* tests/ftruncate.test: New test.
   27261 	* tests/truncate.test: Likewise.
   27262 	* tests/Makefile.am (check_PROGRAMS): Add ftruncate and truncate.
   27263 	(TESTS): Add ftruncate.test and truncate.test.
   27264 	* tests/.gitignore: Add ftruncate and truncate.
   27265 
   27266 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27267 
   27268 	build: robustify linux/fcntl.h check.
   27269 	* configure.ac (AC_CHECK_TYPES): Support older linux kernel headers
   27270 	by including <sys/types.h> before <linux/fcntl.h>.
   27271 
   27272 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27273 
   27274 	syscall.c: move inclusion of arch specific files to the end of file.
   27275 	Move inclusion of arch specific files that define static functions to
   27276 	the end of syscall.c.
   27277 
   27278 	* syscall.c (get_syscall_result_regs, get_error, getregs_old):
   27279 	New forward declarations.
   27280 	(arch_get_scno): Move forward.
   27281 	Move inclusion of "get_scno.c", "get_syscall_args.c",
   27282 	"get_syscall_result.c", "get_error.c", and "getregs_old.c"
   27283 	to the end of file.
   27284 
   27285 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27286 
   27287 	x86_64: change getregs_old to forward ptrace return code.
   27288 	* linux/x86_64/getregs_old.c (getregs_old): Change to return ptrace
   27289 	return code.
   27290 	* syscall.c (get_regs) [ARCH_REGS_FOR_GETREGSET && X86_64]: Use
   27291 	getregs_old return code.
   27292 
   27293 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27294 
   27295 	Cleanup print_pc.
   27296 	Apparently, there are only two types of instruction pointer printers
   27297 	depending on the architecture: those that print a register that was
   27298 	fetched earlier, and those that fetch a register themselves using upeek.
   27299 	With this change, architectures of the first type have ARCH_PC_REG
   27300 	defined in their arch_regs.c file, architectures of the first type
   27301 	have ARCH_PC_PEEK_ADDR defined there, and the common code in syscall.c
   27302 	uses these macros to print the instruction pointer.
   27303 
   27304 	* Makefile.am (EXTRA_DIST): Remove linux/*/print_pc.c.
   27305 	* linux/*/print_pc.c: Remove.
   27306 	* linux/aarch64/arch_regs.c(ARCH_PC_REG): Define macro.
   27307 	* linux/arc/arch_regs.c(ARCH_PC_REG): Likewise.
   27308 	* linux/arm/arch_regs.c(ARCH_PC_REG): Likewise.
   27309 	* linux/avr32/arch_regs.c(ARCH_PC_REG): Likewise.
   27310 	* linux/i386/arch_regs.c(ARCH_PC_REG): Likewise.
   27311 	* linux/ia64/arch_regs.c(ARCH_PC_REG): Likewise.
   27312 	* linux/metag/arch_regs.c(ARCH_PC_REG): Likewise.
   27313 	* linux/mips/arch_regs.c(ARCH_PC_REG): Likewise.
   27314 	* linux/nios2/arch_regs.c(ARCH_PC_REG): Likewise.
   27315 	* linux/or1k/arch_regs.c(ARCH_PC_REG): Likewise.
   27316 	* linux/powerpc64/arch_regs.c(ARCH_PC_REG): Likewise.
   27317 	* linux/powerpc/arch_regs.c(ARCH_PC_REG): Likewise.
   27318 	* linux/s390/arch_regs.c(ARCH_PC_REG): Likewise.
   27319 	* linux/s390x/arch_regs.c(ARCH_PC_REG): Likewise.
   27320 	* linux/sparc64/arch_regs.c(ARCH_PC_REG): Likewise.
   27321 	* linux/sparc/arch_regs.c(ARCH_PC_REG): Likewise.
   27322 	* linux/tile/arch_regs.c(ARCH_PC_REG): Likewise.
   27323 	* linux/x32/arch_regs.c(ARCH_PC_REG): Likewise.
   27324 	* linux/x86_64/arch_regs.c(ARCH_PC_REG): Likewise.
   27325 	* linux/alpha/arch_regs.c(ARCH_PC_PEEK_ADDR): Define macro.
   27326 	* linux/bfin/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27327 	* linux/crisv10/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27328 	* linux/crisv32/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27329 	* linux/hppa/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27330 	* linux/m68k/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27331 	* linux/microblaze/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27332 	* linux/sh64/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27333 	* linux/sh/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27334 	* linux/xtensa/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise.
   27335 	* syscall.c (print_pc): Stop including "print_pc.c".
   27336 	Use ARCH_PC_REG or ARCH_PC_PEEK_ADDR.
   27337 
   27338 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27339 
   27340 	cleanup: make get_scno.c files more readable.
   27341 	Make get_scno.c files more self-contained.  While they are still
   27342 	being included by syscall.c, the latter no longer provides
   27343 	a function framework for them.
   27344 
   27345 	* linux/aarch64/get_scno.c (arch_get_scno): Define.
   27346 	* linux/alpha/get_scno.c: Likewise.
   27347 	* linux/arc/get_scno.c: Likewise.
   27348 	* linux/arm/get_scno.c: Likewise.
   27349 	* linux/avr32/get_scno.c: Likewise.
   27350 	* linux/bfin/get_scno.c: Likewise.
   27351 	* linux/crisv10/get_scno.c: Likewise.
   27352 	* linux/hppa/get_scno.c: Likewise.
   27353 	* linux/i386/get_scno.c: Likewise.
   27354 	* linux/ia64/get_scno.c: Likewise.
   27355 	* linux/m68k/get_scno.c: Likewise.
   27356 	* linux/metag/get_scno.c: Likewise.
   27357 	* linux/microblaze/get_scno.c: Likewise.
   27358 	* linux/mips/get_scno.c: Likewise.
   27359 	* linux/nios2/get_scno.c: Likewise.
   27360 	* linux/or1k/get_scno.c: Likewise.
   27361 	* linux/powerpc/get_scno.c: Likewise.
   27362 	* linux/powerpc64/get_scno.c: Likewise.
   27363 	* linux/s390/get_scno.c: Likewise.
   27364 	* linux/sh/get_scno.c: Likewise.
   27365 	* linux/sh64/get_scno.c: Likewise.
   27366 	* linux/sparc/get_scno.c: Likewise.
   27367 	* linux/sparc64/get_scno.c: Likewise.
   27368 	* linux/tile/get_scno.c: Likewise.
   27369 	* linux/x86_64/get_scno.c: Likewise.
   27370 	* linux/xtensa/get_scno.c: Likewise.
   27371 	* syscall.c (arch_get_scno): New declaration.
   27372 	Include "get_scno.c" in file scope.
   27373 	(get_scno): Use arch_get_scno.
   27374 
   27375 	Requested-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   27376 
   27377 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27378 
   27379 	cleanup: make get_syscall_args.c files more readable.
   27380 	Make get_syscall_args.c files more self-contained.  While they are
   27381 	still being included by syscall.c, the latter no longer defines
   27382 	get_syscall_args function.
   27383 
   27384 	* linux/aarch64/get_syscall_args.c: Include "arm/get_syscall_args.c"
   27385 	with get_syscall_args temporarily defined to arm_get_syscall_args.
   27386 	(get_syscall_args): Define.
   27387 	* linux/alpha/get_syscall_args.c (get_syscall_args): Define.
   27388 	* linux/arc/get_syscall_args.c: Likewise.
   27389 	* linux/arm/get_syscall_args.c: Likewise.
   27390 	* linux/avr32/get_syscall_args.c: Likewise.
   27391 	* linux/bfin/get_syscall_args.c: Likewise.
   27392 	* linux/crisv10/get_syscall_args.c: Likewise.
   27393 	* linux/hppa/get_syscall_args.c: Likewise.
   27394 	* linux/i386/get_syscall_args.c: Likewise.
   27395 	* linux/ia64/get_syscall_args.c: Likewise.
   27396 	* linux/m68k/get_syscall_args.c: Likewise.
   27397 	* linux/metag/get_syscall_args.c: Likewise.
   27398 	* linux/microblaze/get_syscall_args.c: Likewise.
   27399 	* linux/mips/get_syscall_args.c: Likewise.
   27400 	* linux/nios2/get_syscall_args.c: Likewise.
   27401 	* linux/or1k/get_syscall_args.c: Likewise.
   27402 	* linux/powerpc/get_syscall_args.c: Likewise.
   27403 	* linux/s390/get_syscall_args.c: Likewise.
   27404 	* linux/sh/get_syscall_args.c: Likewise.
   27405 	* linux/sh64/get_syscall_args.c: Likewise.
   27406 	* linux/sparc/get_syscall_args.c: Likewise.
   27407 	* linux/tile/get_syscall_args.c: Likewise.
   27408 	* linux/x86_64/get_syscall_args.c: Likewise.
   27409 	* linux/xtensa/get_syscall_args.c: Likewise.
   27410 	* syscall.c (get_syscall_args): Remove.
   27411 	Include "get_syscall_args.c" in file scope.
   27412 
   27413 	Requested-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   27414 
   27415 2015-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   27416 
   27417 	cleanup: make get_syscall_result.c files more readable.
   27418 	Make get_syscall_result.c files more self-contained.  While they are
   27419 	still being included by syscall.c, the latter no longer provides
   27420 	a function framework for them.
   27421 
   27422 	* linux/alpha/get_syscall_result.c (get_syscall_result_regs): Define.
   27423 	* linux/bfin/get_syscall_result.c: Likewise.
   27424 	* linux/crisv10/get_syscall_result.c: Likewise.
   27425 	* linux/hppa/get_syscall_result.c: Likewise.
   27426 	* linux/m68k/get_syscall_result.c: Likewise.
   27427 	* linux/microblaze/get_syscall_result.c: Likewise.
   27428 	* linux/sh/get_syscall_result.c: Likewise.
   27429 	* linux/sh64/get_syscall_result.c: Likewise.
   27430 	* linux/xtensa/get_syscall_result.c: Likewise.
   27431 	* syscall.c [!ARCH_REGS_FOR_GETREGSET && !ARCH_REGS_FOR_GETREGS]:
   27432 	Define USE_GET_SYSCALL_RESULT_REGS macro.
   27433 	[USE_GET_SYSCALL_RESULT_REGS]: Include "get_syscall_result.c".
   27434 	(get_syscall_result) [USE_GET_SYSCALL_RESULT_REGS]: Stop including
   27435 	"get_syscall_result.c".  Call get_syscall_result_regs.
   27436 
   27437 	Requested-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   27438 
   27439 2015-11-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   27440 
   27441 	cleanup: make get_error.c files more readable.
   27442 	Make get_error.c files more self-sustained.  While they are still being
   27443 	included by syscall.c, the latter no longer defines get_error function.
   27444 
   27445 	* linux/aarch64/get_error.c: Include "arm/get_error.c" with get_error
   27446 	temporarily defined to arm_get_error.
   27447 	(get_error): Define.
   27448 	* linux/alpha/get_error.c (get_error): Define.
   27449 	* linux/arc/get_error.c: Likewise.
   27450 	* linux/arm/get_error.c: Likewise.
   27451 	* linux/avr32/get_error.c: Likewise.
   27452 	* linux/bfin/get_error.c: Likewise.
   27453 	* linux/crisv10/get_error.c: Likewise.
   27454 	* linux/hppa/get_error.c: Likewise.
   27455 	* linux/i386/get_error.c: Likewise.
   27456 	* linux/ia64/get_error.c: Likewise.
   27457 	* linux/m68k/get_error.c: Likewise.
   27458 	* linux/metag/get_error.c: Likewise.
   27459 	* linux/microblaze/get_error.c: Likewise.
   27460 	* linux/mips/get_error.c: Likewise.
   27461 	* linux/nios2/get_error.c: Likewise.
   27462 	* linux/or1k/get_error.c: Likewise.
   27463 	* linux/powerpc/get_error.c: Likewise.
   27464 	* linux/s390/get_error.c: Likewise.
   27465 	* linux/sh/get_error.c: Likewise.
   27466 	* linux/sh64/get_error.c: Likewise.
   27467 	* linux/sparc/get_error.c: Likewise.
   27468 	* linux/sparc64/get_error.c: Likewise.
   27469 	* linux/tile/get_error.c: Likewise.
   27470 	* linux/x86_64/get_error.c: Likewise.
   27471 	* linux/xtensa/get_error.c: Likewise.
   27472 	* syscall.c: Include "get_error.c" in file scope.
   27473 	(get_error): Remove.  Move arch independent code ...
   27474 	(get_syscall_result): ... here.  Update get_error invocation.
   27475 
   27476 	Requested-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   27477 
   27478 2015-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   27479 
   27480 	cleanup: make arch_sigreturn.c files more readable.
   27481 	Make arch_sigreturn.c files more self-sustained.  While they are
   27482 	still being included by sigreturn.c, the latter no longer defines
   27483 	arch_sigreturn function.
   27484 
   27485 	* linux/alpha/arch_sigreturn.c (arch_sigreturn): Define.
   27486 	* linux/arm/arch_sigreturn.c: Likewise.
   27487 	* linux/crisv10/arch_sigreturn.c: Likewise.
   27488 	* linux/i386/arch_sigreturn.c: Likewise.
   27489 	* linux/ia64/arch_sigreturn.c: Likewise.
   27490 	* linux/m68k/arch_sigreturn.c: Likewise.
   27491 	* linux/microblaze/arch_sigreturn.c: Likewise.
   27492 	* linux/mips/arch_sigreturn.c: Likewise.
   27493 	* linux/powerpc/arch_sigreturn.c: Likewise.
   27494 	* linux/s390/arch_sigreturn.c: Likewise.
   27495 	* linux/sparc/arch_sigreturn.c: Likewise.
   27496 	* linux/tile/arch_sigreturn.c: Likewise.
   27497 	* linux/x32/arch_sigreturn.c: Remove code.
   27498 	Include "x86_64/arch_sigreturn.c".
   27499 	* linux/x86_64/arch_sigreturn.c: Stop including "x32/arch_sigreturn.c".
   27500 	Include "i386/arch_sigreturn.c" with arch_sigreturn temporarily defined
   27501 	to i386_arch_sigreturn.
   27502 	(arch_sigreturn): Define.  Add x32 personality support there.
   27503 	* sigreturn.c: Remove arch_sigreturn header and footer.
   27504 
   27505 	Requested-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   27506 
   27507 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27508 
   27509 	Add initial Travis CI support.
   27510 	* .travis.yml: New file.
   27511 	* travis-ci.sh: Likewise.
   27512 
   27513 2015-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   27514 
   27515 	tests: remove temporary files left after two tests.
   27516 	* tests/net-yy.test: Remove "$LOG"-connect and "$LOG"-accept.
   27517 	* tests/unix-yy.test: Likewise.
   27518 
   27519 2015-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   27520 
   27521 	tests: skip stat32-v.test on x32.
   27522 	Explicitly skip 32-bit stat test on x32 even if libc pretends
   27523 	to support it.
   27524 
   27525 	* tests/stat.c (main) [__x86_64__ && __ILP32__]: Skip.
   27526 
   27527 2015-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   27528 
   27529 	tests: fix ipc_msgbuf.test on x32.
   27530 	* tests/ipc_msgbuf.c: Include "config.h" and "kernel_types.h".
   27531 	(main): Replace "long" with "kernel_long_t" in struct msgbuf.
   27532 
   27533 	x32: fix pselect6 decoding.
   27534 	* desc.c: Include "kernel_types.h".
   27535 	(umove_kulong_array_or_printaddr): New function.
   27536 	(SYS_FUNC(pselect6)): Use it.
   27537 
   27538 	x32: fix sigreturn decoding.
   27539 	* linux/x32/arch_sigreturn.c: Implement x32_rt_sigreturn decoding.
   27540 	* linux/x86_64/arch_sigreturn.c: Handle (current_personality == 0)
   27541 	case only.
   27542 	Include "x32/arch_sigreturn.c" instead of "i386/arch_sigreturn.c".
   27543 
   27544 	x32: fix struct dirent decoding.
   27545 	* kernel_types.h: New file.
   27546 	* Makefile.am (strace_SOURCES): Add it.
   27547 	* configure.ac (AC_CHECK_TYPES): Check for __kernel_long_t
   27548 	and __kernel_ulong_t in <asm/posix_types.h>.
   27549 	* dirent.c: Stop including <dirent.h>.
   27550 	(kernel_dirent): Remove.
   27551 	Include "kernel_types.h".
   27552 	(print_old_dirent, SYS_FUNC(getdents)): Print variables
   27553 	of kernel_ulong_t type using %Lu format.
   27554 	* syscall.c (kernel_long_t, kernel_ulong_t): Remove.
   27555 	Include "kernel_types.h".
   27556 	* tests/getdents.c (kernel_dirent): Remove.
   27557 	Include "kernel_types.h".
   27558 	(print_dirent): Print variables of kernel_ulong_t type using %Lu format.
   27559 
   27560 2015-11-26  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   27561 
   27562 	Refer to -h on incorrect usage.
   27563 	* defs.h (error_msg_and_help): New prototype.
   27564 	* strace.c (error_msg_and_help): New function.
   27565 	(error_opt_arg, init): Use it.
   27566 	(usage): Remove unnecessary arguments.
   27567 	* count.c: Use the new function.
   27568 
   27569 	Rearrange flags descriptions in the usage text.
   27570 	* strace.c (usage): Rearrange descriptions.
   27571 	* tests/strace-k.test: Change the option detecting regexp accordingly.
   27572 
   27573 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27574 
   27575 	tests: run in "set -x" mode if VERBOSE variable is non-null.
   27576 	* tests/init.sh: Enter "set -x" mode if $VERBOSE is non-null.
   27577 
   27578 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27579 
   27580 	tests: fix match_diff usage.
   27581 	Fix argument order in match_diff invocations:
   27582 	the first argument has to be actual output,
   27583 	the second argument has to be expected output.
   27584 
   27585 	* tests/aio.test: Swap match_diff arguments.
   27586 	* tests/clock_nanosleep.test: Likewise.
   27587 	* tests/clock_xettime.test: Likewise.
   27588 	* tests/file_handle.test: Likewise.
   27589 	* tests/getdents.test: Likewise.
   27590 	* tests/getdents64.test: Likewise.
   27591 	* tests/getrandom.test: Likewise.
   27592 	* tests/inet-cmsg.test: Likewise.
   27593 	* tests/ioctl.test: Likewise.
   27594 	* tests/membarrier.test: Likewise.
   27595 	* tests/mlock2.test: Likewise.
   27596 	* tests/nanosleep.test: Likewise.
   27597 	* tests/pselect6.test: Likewise.
   27598 	* tests/readdir.test: Likewise.
   27599 	* tests/readlink.test: Likewise.
   27600 	* tests/readlinkat.test: Likewise.
   27601 	* tests/rt_sigqueueinfo.test: Likewise.
   27602 	* tests/seccomp.test: Likewise.
   27603 	* tests/select.test: Likewise.
   27604 	* tests/sendfile.test: Likewise.
   27605 	* tests/sendfile64.test: Likewise.
   27606 	* tests/struct_flock.test: Likewise.
   27607 	* tests/sysinfo.test: Likewise.
   27608 	* tests/time.test: Likewise.
   27609 	* tests/timer_create.test: Likewise.
   27610 	* tests/timer_xettime.test: Likewise.
   27611 	* tests/timerfd_xettime.test: Likewise.
   27612 	* tests/times-fail.test: Likewise.
   27613 	* tests/times.test: Likewise.
   27614 	* tests/umovestr2.test: Likewise.
   27615 	* tests/userfaultfd.test: Likewise.
   27616 	* tests/utime.test: Likewise.
   27617 	* tests/utimensat.test: Likewise.
   27618 	* tests/xet_robust_list.test: Likewise.
   27619 	* tests/xetitimer.test: Likewise.
   27620 	* tests/xettimeofday.test: Likewise.
   27621 
   27622 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27623 
   27624 	x86_64: fix x32 personality support in print_llu_from_low_high_val.
   27625 	x86 is the only personality supported on x86_64
   27626 	that has 32-bit syscall arguments.
   27627 
   27628 	* io.c (print_llu_from_low_high_val) [X86_64]: Fix
   27629 	current_personality == 2 case.
   27630 
   27631 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27632 
   27633 	x86_64: fix x32 personality support in getllval.
   27634 	x86 is the only personality supported on x86_64
   27635 	that has 32-bit syscall arguments.
   27636 
   27637 	* util.c (getllval) [X86_64]: Fix current_personality == 2 case.
   27638 
   27639 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27640 
   27641 	tests/file_handle: fix expected output.
   27642 	* tests/file_handle.c (main): Parametrize handle_type
   27643 	in open_by_handle_at parser output.
   27644 
   27645 	startup_attach: fix compilation warning.
   27646 	* strace.c (startup_attach): Split single error_msg statement with
   27647 	variable number of arguments to silence a compilation warning.
   27648 
   27649 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27650 
   27651 	.gitignore: add mpers_xlat.h.
   27652 	Ignore mpers_xlat.h generated since commit v4.10-454-g5cb45b2.
   27653 
   27654 	* .gitignore: Add /mpers_xlat.h.
   27655 
   27656 	Reported-by: Elvira Khabirova <lineprinter0 (a] gmail.com>
   27657 
   27658 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27659 
   27660 	tests: add struct_flock.test.
   27661 	* tests/struct_flock.c: New file.
   27662 	* tests/struct_flock.test: New test.
   27663 	* tests/Makefile.am (check_PROGRAMS): Add struct_flock.
   27664 	(TESTS): Add struct_flock.test.
   27665 	* tests/.gitignore: Add struct_flock.
   27666 
   27667 	Convert parsers of flock structures to new mpers infrastructure.
   27668 	* fetch_struct_flock.c: New file.
   27669 	* Makefile.am (strace_SOURCES): Add it.
   27670 	* fcntl.c (print_struct_flock64): New function.
   27671 	(printflock64): Use fetch_struct_flock64 and print_struct_flock64.
   27672 	(printflock): Use fetch_struct_flock and print_struct_flock64.
   27673 
   27674 	fcntl.c: implement decoding for all known operations.
   27675 	* xlat/f_owner_types.in: New file.
   27676 	* xlat/f_seals.in: Likewise.
   27677 	* fcntl.c: Include "xlat/f_owner_types.h" and "xlat/f_seals.h".
   27678 	(print_f_owner_ex): New function.
   27679 	(SYS_FUNC(fcntl)): Use it.
   27680 	Handle F_SETPIPE_SZ, F_GETPIPE_SZ, F_OFD_SETLKW,
   27681 	F_OFD_SETLK, F_SETOWN_EX, F_ADD_SEALS, F_SETSIG,
   27682 	F_OFD_GETLK, F_GETOWN_EX, F_GET_SEALS, F_GETSIG.
   27683 
   27684 	fcntl.c: mark F_DUPFD and F_DUPFD_CLOEXEC return code with RVAL_FD flag.
   27685 	* fcntl.c (SYS_FUNC(fcntl)): Set RVAL_FD flag in the return code
   27686 	for F_DUPFD and F_DUPFD_CLOEXEC operations.
   27687 
   27688 	fcntl.c: remove redundant ifdefs.
   27689 	* fcntl.c (USE_PRINTFLOCK64): Remove macro.
   27690 	(printflock64): Define unconditionally.
   27691 	(SYS_FUNC(fcntl)): Do not check for USE_PRINTFLOCK64,
   27692 	F_DUPFD_CLOEXEC, F_NOTIFY, F_SETLEASE, and F_GETLEASE macros.
   27693 
   27694 	Update F_* constants.
   27695 	* xlat/fcntlcmds.in: Add F_SETOWN_EX, F_GETOWN_EX, F_GETOWNER_UIDS,
   27696 	F_OFD_GETLK, F_OFD_SETLK, F_OFD_SETLKW, and F_CANCELLK.
   27697 	Remove F_ALLOCSP, F_BLKSIZE, F_BLOCKS, F_CHKFL, F_CNVT, F_DUP2FD,
   27698 	F_ISSTREAM, F_NPRIV, F_PRIV, F_QUOTACL, F_REVOKE, F_RGETLK, F_RSETLK,
   27699 	F_RSETLKW, F_SHARE, and F_UNSHARE.
   27700 	Add default values.
   27701 
   27702 	Update LOCK_* constants.
   27703 	* xlat/flockcmds.in: Add LOCK_MAND, LOCK_READ, LOCK_WRITE, and LOCK_RW.
   27704 	Add default values.
   27705 
   27706 2015-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   27707 
   27708 	fcntl.c: use <linux/fcntl.h> instead of <fcntl.h>
   27709 	Include <linux/fcntl.h> for proper definitions of F_* constants
   27710 	and flock structures.
   27711 
   27712 	* configure.ac (AC_CHECK_TYPES): Check for struct flock, struct flock64,
   27713 	struct __kernel_flock, and struct __kernel_flock64 in <linux/fcntl.h>.
   27714 	* flock.h: New file.
   27715 	* Makefile.am (strace_SOURCES): Add it.
   27716 	* fcntl.c: Include it instead of <fcntl.h>.
   27717 	(struct flock64): Remove.
   27718 	(printflock): Use struct_kernel_flock instead of struct flock.
   27719 	(printflock64): Use struct_kernel_flock64 instead of struct flock64.
   27720 
   27721 2015-11-26  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   27722 
   27723 	mpers: fix compound types with arbitrary member alignments.
   27724 	* mpers.sh: Compound types are now represented as packed
   27725 	with character arrays as explicit fillers inbetween members
   27726 	and at the end.
   27727 
   27728 2015-11-26  Mike Frysinger  <vapier (a] gentoo.org>
   27729 
   27730 	Support C libraries without System V shared memory/ipc.
   27731 	Some systems (like Bionic) omit support for SysV related code.  That
   27732 	means no C library headers for strace to include.  Add configure tests
   27733 	to probe the headers from the kernel and use them when they are
   27734 	available.
   27735 
   27736 	It might make more sense to never rely on the C library's headers as
   27737 	there is no guarantee or requirement that the structure layout between
   27738 	apps and the C library match that what is passed to the kernel.
   27739 
   27740 	* configure.ac (AC_CHECK_HEADERS): Check for linux/ipc.h,
   27741 	linux/mqueue.h, linux/msg.h, linux/sem.h, linux/shm.h,
   27742 	sys/ipc.h, sys/msg.h, sys/sem.h, and sys/shm.h.
   27743 	* ipc_defs.h: Include <sys/ipc.h> or <linux/ipc.h> depending
   27744 	on what is available.
   27745 	* ipc_msg.c: Replace <sys/ipc.h> with "ipc_defs.h".
   27746 	Fallback to <linux/msg.h> when available.
   27747 	* ipc_msgctl.c: Include <sys/msg.h>, <asm/msgbuf.h>, or <linux/msg.h>
   27748 	based on what is available.  Note missing support for old ipc structs.
   27749 	* ipc_sem.c: Include <sys/sem.h> or <linux/sem.h> depending
   27750 	on what is available.  Only decode sembuf when available.
   27751 	* ipc_shm.c: Fallback to <linux/shm.h> when available.
   27752 	* ipc_shmctl.c: Include <sys/shm.h>, <asm/shmbuf.h>, or <linux/shm.h>
   27753 	based on what is available.  Note missing support for old ipc structs.
   27754 	* print_mq_attr.c: Fallback to <linux/mqueue.h> when available.
   27755 
   27756 2015-11-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   27757 
   27758 	CREDITS.in: add Jian Zhen.
   27759 	Thanks to Jian Zhen for donation of https://github.com/strace/ and
   27760 	strace.io.
   27761 
   27762 	* CREDITS.in: Add Jian Zhen.
   27763 
   27764 2015-11-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   27765 
   27766 	Fix syscall entries of unimplemented getpmsg and putpmsg syscalls.
   27767 	* linux/ia64/syscallent.h (getpmsg): Change SEN(printargs)
   27768 	to SEN(getpmsg).
   27769 	(putpmsg): Change SEN(printargs) to SEN(putpmsg).
   27770 	* linux/mips/syscallent-n32.h: Likewise.
   27771 	* linux/mips/syscallent-n64.h: Likewise.
   27772 	* linux/mips/syscallent-o32.h: Likewise.
   27773 	* linux/arm/syscallent.h (getpmsg, putpmsg): Set sys_flags to TN.
   27774 	* linux/bfin/syscallent.h (getpmsg, putpmsg): Likewise.
   27775 	* linux/hppa/syscallent.h (getpmsg, putpmsg): Likewise.
   27776 	* linux/i386/syscallent.h (getpmsg, putpmsg): Likewise.
   27777 	* linux/m68k/syscallent.h (getpmsg, putpmsg): Likewise.
   27778 	* linux/microblaze/syscallent.h (getpmsg, putpmsg): Likewise.
   27779 	* linux/powerpc/syscallent.h (getpmsg, putpmsg): Likewise.
   27780 	* linux/s390/syscallent.h (getpmsg, putpmsg): Likewise.
   27781 	* linux/s390x/syscallent.h (getpmsg, putpmsg): Likewise.
   27782 	* linux/x32/syscallent.h (getpmsg, putpmsg): Likewise.
   27783 	* linux/x86_64/syscallent.h (getpmsg, putpmsg): Likewise.
   27784 
   27785 2015-11-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   27786 
   27787 	Remove parsers of getpmsg and putpmsg syscalls.
   27788 	These system calls are not implemented in the Linux kernel.
   27789 
   27790 	* linux/dummy.h(getpmsg, putpmsg): Move to the list of deprecated
   27791 	syscalls.
   27792 	* Makefile.am (strace_SOURCES): Remove stream.c.
   27793 	* stream.c: Remove.
   27794 	* xlat/pmsgflags.in: Remove.
   27795 
   27796 2015-11-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   27797 
   27798 	Remove parser of query_module syscall.
   27799 	Since query_module syscall is present only in kernels before Linux 2.6
   27800 	and strace does not support those kernels, there is no use to keep this
   27801 	parser any longer.
   27802 
   27803 	* bjm.c: Do not include <sys/*>, "xlat/qm_which.h",
   27804 	and "xlat/modflags.h".
   27805 	(MOD_*, QM_*, module_symbol, module_info, SYS_FUNC(query_module)):
   27806 	Remove.
   27807 	* linux/dummy.h (sys_query_module): Add stub alias.
   27808 	* xlat/modflags.in: Remove.
   27809 	* xlat/qm_which.in: Remove.
   27810 
   27811 2015-11-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   27812 
   27813 	Fix syscall entries of deprecated sysfs syscall.
   27814 	* linux/alpha/syscallent.h (sysfs): Change nargs from 5 to 3.
   27815 	* linux/hppa/syscallent.h (sysfs): Likewise.
   27816 	* linux/mips/syscallent-n32.h (sysfs): Likewise.
   27817 	* linux/mips/syscallent-n64.h (sysfs): Likewise.
   27818 
   27819 	Move sysfs syscall to deprecated category.
   27820 	* linux/dummy.h (sys_sysfs): Move to the list of deprecated syscalls.
   27821 
   27822 	Fix syscall entries of deprecated bdflush syscall.
   27823 	* linux/alpha/syscallent.h (bdflush): Change nargs from 0 to 2.
   27824 	* linux/arm/syscallent.h (bdflush): Likewise.
   27825 	* linux/avr32/syscallent.h (bdflush): Likewise.
   27826 	* linux/bfin/syscallent.h (bdflush): Likewise.
   27827 	* linux/hppa/syscallent.h (bdflush): Likewise.
   27828 	* linux/i386/syscallent.h (bdflush): Likewise.
   27829 	* linux/ia64/syscallent.h (bdflush): Likewise.
   27830 	* linux/m68k/syscallent.h (bdflush): Likewise.
   27831 	* linux/microblaze/syscallent.h (bdflush): Likewise.
   27832 	* linux/powerpc/syscallent.h (bdflush): Likewise.
   27833 	* linux/s390/syscallent.h (bdflush): Likewise.
   27834 	* linux/s390x/syscallent.h (bdflush): Likewise.
   27835 	* linux/sh/syscallent.h (bdflush): Likewise.
   27836 	* linux/sh64/syscallent.h (bdflush): Likewise.
   27837 	* linux/sparc/syscallent.h (bdflush): Likewise.
   27838 
   27839 2015-11-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   27840 
   27841 	Implement name_to_handle_at and open_by_handle_at syscalls decoding.
   27842 	* file_handle.c: New file.
   27843 	* Makefile.am (strace_SOURCES): Add it.
   27844 	* linux/dummy.h (sys_name_to_handle_at, sys_open_by_handle_at):
   27845 	Remove stub aliases.
   27846 	* pathtrace.c (pathtrace_match): Add SEN_name_to_handle_at.
   27847 	* tests/file_handle.c: New file.
   27848 	* tests/file_handle.test: New test.
   27849 	* tests/Makefile.am (check_PROGRAMS): Add file_handle.
   27850 	(TESTS): Add file_handle.test.
   27851 	* tests/.gitignore: Add file_handle.
   27852 
   27853 	Implement lookup_dcookie syscall decoding.
   27854 	* lookup_dcookie.c: New file.
   27855 	* Makefile.am (strace_SOURCES): Add it.
   27856 	* linux/dummy.h (sys_lookup_dcookie): Remove stub alias.
   27857 
   27858 	Implement kexec_file_load syscall decoding.
   27859 	* xlat/kexec_file_load_flags.in: New file.
   27860 	* kexec.c: Include "xlat/kexec_file_load_flags.h".
   27861 	(SYS_FUNC(kexec_file_load)): New function.
   27862 	* linux/dummy.h (sys_kexec_file_load): Remove stub alias.
   27863 	* pathtrace.c (pathtrace_match): Add SEN_kexec_file_load.
   27864 
   27865 	Implement kcmp syscall decoding.
   27866 	* kcmp.c: New file.
   27867 	* Makefile.am (strace_SOURCES): Add it.
   27868 	* linux/dummy.h (sys_kcmp): Remove stub alias.
   27869 	* xlat/kcmp_types.in: New file.
   27870 
   27871 	Implement iopl syscall decoding.
   27872 	* iopl.c: New file.
   27873 	* Makefile.am (strace_SOURCES): Add it.
   27874 	* linux/dummy.h (sys_iopl): Remove stub alias.
   27875 
   27876 	Implement ioperm syscall decoding.
   27877 	* ioperm.c: New file.
   27878 	* Makefile.am (strace_SOURCES): Add it.
   27879 	* linux/dummy.h (sys_ioperm): Remove stub alias.
   27880 
   27881 	net: fix printing of IP_RECVOPTS/IP_RETOPTS cmsg options.
   27882 	* net.c (print_cmsg_ip_opts): Print each byte as unsigned char.
   27883 
   27884 	userfaultfd: fix pathtrace support.
   27885 	* pathtrace.c (pathtrace_match): Add SEN_userfaultfd.
   27886 
   27887 2015-11-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   27888 
   27889 	Implement IPPROTO_IP control messages decoding.
   27890 	* net.c: Include "xlat/ip_cmsg_types.h".
   27891 	(print_cmsg_ip_pktinfo, print_cmsg_ip_ttl, print_cmsg_ip_tos,
   27892 	print_cmsg_ip_opts, print_cmsg_ip_recverr, print_cmsg_ip_checksum,
   27893 	print_cmsg_ip_origdstaddr): New functions.
   27894 	(print_cmsg_type_data): Add generic SOL_IP level decoding.
   27895 	Use these functions for decoding of IP_PKTINFO, IP_TTL, IP_TOS,
   27896 	IP_RECVOPTS, IP_RETOPTS, IP_RECVERR, IP_ORIGDSTADDR, IP_CHECKSUM,
   27897 	and SCM_SECURITY type messages.
   27898 	* xlat/ip_cmsg_types.in: New file.
   27899 	* xlat/sockipoptions.in: Move IP_RETOPTS before IP_RECVRETOPTS.
   27900 	* tests/inet-cmsg.c: New file.
   27901 	* tests/inet-cmsg.test: New test.
   27902 	* tests/Makefile.am (check_PROGRAMS): Add inet-cmsg.
   27903 	(TESTS): Add inet-cmsg.test.
   27904 	* tests/.gitignore: Add inet-cmsg.
   27905 
   27906 	Suggested-by: Orion Poplawski <orion (a] cora.nwra.com>
   27907 
   27908 2015-11-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   27909 
   27910 	Simplify control messages printers.
   27911 	Do not pass sizeof(struct cmsghdr) to every cmsg printer.
   27912 
   27913 	* net.c (printcmsghdr): Pass pointer to cmsg_data and length
   27914 	of cmsg_data to print_cmsg_type_data.
   27915 	(print_cmsg_type_data): Update prototype.  Pass pointer to cmsg_data
   27916 	and length of cmsg_data to cmsg printers.
   27917 	(print_scm_rights, print_scm_creds, print_scm_security): Update.
   27918 
   27919 2015-11-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   27920 
   27921 	net: factor out address printing code to a separate function.
   27922 	* net.c (sockaddr_buf_t): New type.
   27923 	(print_sockaddr): New function.
   27924 	(printsock, print_group_req): Use it.
   27925 
   27926 2015-11-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   27927 
   27928 	mpers: skip xlat struct definitions in mpers mode.
   27929 	Avoid duplicate definitions of xlat structures in files
   27930 	compiled in mpers mode.
   27931 
   27932 	Each xlat file defines the corresponding xlat struct with
   27933 	either global or local visibility using the following rules:
   27934 
   27935 	- if xlat struct declaration is available in defs.h,
   27936 	  a global definition is provided in regular mode,
   27937 	  and nothing is provided in mpers mode;
   27938 	- otherwise, if xlat file is included by a mpers source file,
   27939 	  a global definition is provided in regular mode
   27940 	  (unless no mpers mode is supported on this architecture,
   27941 	  in that case, a local definition is provided instead),
   27942 	  and a declaration is provided in mpers mode;
   27943 	- otherwise, a local definition is provided in regular mode,
   27944 	  and an error message is printed in mpers mode.
   27945 
   27946 	Fallback definitions of constants provided by xlat files
   27947 	remain available in all modes.
   27948 
   27949 	* bootstrap: Invoke generate_mpers_am.sh before xlat/gen.sh.
   27950 	* defs.h (adjtimex_modes, adjtimex_status, sigev_value): Remove.
   27951 	* generate_mpers_am.sh: Generate mpers_xlat.h.
   27952 	* Makefile.am (EXTRA_DIST): Add mpers_xlat.h.
   27953 	* print_sigevent.c: Include "xlat/sigev_value.h" unconditionally.
   27954 	* print_timex.c: Include "xlat/adjtimex_modes.h" and
   27955 	"xlat/adjtimex_status.h" unconditionally.
   27956 	* xlat/gen.sh (cond_xlat): Move printing of fallback definitions ...
   27957 	(cond_def): ... here.
   27958 	(gen_header): Check also mpers_xlat.h for global declarations
   27959 	of xlat structures.
   27960 	Process input file twice, first time print directives
   27961 	only, second time print everything.
   27962 	Wrap struct xlat into #ifdef IN_MPERS ... #else ... #endif.
   27963 	* xlat/getrandom_flags.in: Cleanup.
   27964 
   27965 2015-11-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   27966 
   27967 	tests: rewrite getdents test in C for better coverage.
   27968 	* tests/getdents.awk: Remove.
   27969 	* tests/getdents.out: Remove.
   27970 	* tests/getdents.c: New file.
   27971 	* tests/getdents.test: Rewrite.
   27972 	* tests/getdents64.c: New file.
   27973 	* tests/getdents64.test: New test.
   27974 	* tests/Makefile.am (check_PROGRAMS): Add getdents and getdents64.
   27975 	(TESTS): Add getdents64.test.
   27976 	(EXTRA_DIST): Remove getdents.awk and getdents.out.
   27977 	* tests/.gitignore: Add getdents and getdents64.
   27978 
   27979 2015-11-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   27980 
   27981 	tests: add readdir.test.
   27982 	* tests/readdir.c: New file.
   27983 	* tests/readdir.test: New test.
   27984 	* tests/Makefile.am (check_PROGRAMS): Add readdir.
   27985 	(TESTS): Add readdir.test.
   27986 	* tests/.gitignore: Add readdir.
   27987 
   27988 	Mpersify parsers of readdir and getdents syscalls.
   27989 	* defs.h (dirent_types): New xlat prototype.
   27990 	* dirent.c: Stop including "xlat/direnttypes.h".
   27991 	(kernel_dirent): New typedef.  Mpersify it.
   27992 	(print_old_dirent): Use it instead of old_dirent_t.
   27993 	(SYS_FUNC(getdents)): Use it instead of struct kernel_dirent.
   27994 	Rename direnttypes to dirent_types.
   27995 	(SYS_FUNC(getdents64)): Move ...
   27996 	* dirent64.c: ... here.  Rename direnttypes to dirent_types.
   27997 	Include "xlat/dirent_types.h".
   27998 	* Makefile.am (strace_SOURCES): Add dirent64.c.
   27999 	* xlat/direnttypes.in: Rename to xlat/dirent_types.in.
   28000 
   28001 2015-11-19  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   28002 
   28003 	getdents: fix typos in array output.
   28004 	Array should be enclosed by square brakets, and elements should be
   28005 	separated by commas.
   28006 
   28007 	* dirent.c (SYS_FUNC(getdents), SYS_FUNC(getdents64)): Fix typos
   28008 	in array output.
   28009 	* tests/getdents.awk: Update regexps to match fixed output.
   28010 	* tests/getdents.out: Update output.
   28011 
   28012 2015-11-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   28013 
   28014 	printcmsghdr: move type and data decoders to a separate function.
   28015 	* net.c (print_scm_rights, print_scm_creds, print_scm_security): Change
   28016 	to return void.  Move printing of struct cmsghdr closing '}' ...
   28017 	(printcmsghdr): ... here.  Move type and data decoders to ...
   28018 	(print_cmsg_type_data): ... new function.
   28019 
   28020 2015-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   28021 
   28022 	Assume that libc provides sendmsg.
   28023 	Starting with commit v4.6-281-g7af9f35, we implicitly assume that
   28024 	HAVE_SENDMSG is always defined.  Therefore, the check for sendmsg
   28025 	availability is redundant and could be safely removed.
   28026 
   28027 	* configure.ac (AC_CHECK_FUNCS): Remove sendmsg.
   28028 	* linux/dummy.h [!HAVE_SENDMSG] (sys_recvmsg, sys_sendmsg): Remove
   28029 	stub aliases.
   28030 	* net.c [HAVE_SENDMSG]: Define unconditionally.
   28031 	* syscall.c (dumpio) [HAVE_SENDMSG]: Likewise.
   28032 
   28033 2015-11-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   28034 
   28035 	net.c: move fallback definition of SCM_SECURITY to xlat/
   28036 	* net.c: Move fallback definition of SCM_SECURITY ...
   28037 	* xlat/scmvals.in: ... here.
   28038 
   28039 2015-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   28040 
   28041 	Implement mlock2 syscall decoding.
   28042 	* mem.c: Include "xlat/mlock_flags.h".
   28043 	(SYS_FUNC(mlock2)): New function.
   28044 	* xlat/mlock_flags.in: New file.
   28045 	* xlat/mlockall_flags.in: Add MCL_ONFAULT, add default values.
   28046 	* linux/dummy.h (mlock2): Remove.
   28047 	* tests/mlock2.c: New file.
   28048 	* tests/mlock2.test: New test.
   28049 	* tests/Makefile.am (check_PROGRAMS): Add mlock2.
   28050 	(TESTS): Add mlock2.test.
   28051 	* tests/.gitignore Add mlock2.
   28052 
   28053 	Implement membarrier syscall decoding.
   28054 	* membarrier.c: New file.
   28055 	* Makefile.am (strace_SOURCES): Add it.
   28056 	* xlat/membarrier_cmds.in: New file.
   28057 	* linux/dummy.h (membarrier): Remove.
   28058 	* tests/membarrier.c: New file.
   28059 	* tests/membarrier.test: New test.
   28060 	* tests/Makefile.am (check_PROGRAMS): Add membarrier.
   28061 	(TESTS): Add membarrier.test.
   28062 	* tests/.gitignore: Add membarrier.
   28063 
   28064 	Implement userfaultfd syscall decoding.
   28065 	* userfaultfd.c: New file.
   28066 	* Makefile.am (strace_SOURCES): Add it.
   28067 	* xlat/uffd_flags.in: New file.
   28068 	* linux/dummy.h (userfaultfd): Remove.
   28069 	* tests/userfaultfd.c: New file.
   28070 	* tests/userfaultfd.test: New test.
   28071 	* tests/Makefile.am (check_PROGRAMS): Add userfaultfd.
   28072 	(TESTS): Add userfaultfd.test.
   28073 	* tests/.gitignore: Add userfaultfd.
   28074 
   28075 2015-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   28076 
   28077 	ia64: wire up kcmp syscall.
   28078 	ia64 has kcmp syscall starting with linux kernel commit
   28079 	v4.3-rc7-1-gd305c47.
   28080 
   28081 	* linux/ia64/syscallent.h (kcmp): New entry.
   28082 
   28083 2015-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   28084 
   28085 	powerpc: wire up direct sysv ipc syscalls.
   28086 	Starting with linux commit v4.3-rc3-33-ga342361, powerpc has
   28087 	direct sysv ipc syscalls in addition to traditional ipc syscall.
   28088 
   28089 	* linux/powerpc/syscallent.h (semop, semget, semctl, semtimedop, msgsnd,
   28090 	msgrcv, msgget, msgctl, shmat, shmdt, shmget, shmctl): New entries.
   28091 
   28092 2015-11-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   28093 
   28094 	Wire up userfaultfd, membarrier, and mlock2 syscalls.
   28095 	* linux/dummy.h (membarrier, mlock2, userfaultfd): New stub aliases.
   28096 	* linux/32/syscallent.h (userfaultfd, membarrier, mlock2): New entries.
   28097 	* linux/64/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28098 	* linux/arm/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28099 	* linux/hppa/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28100 	* linux/i386/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28101 	* linux/ia64/syscallent.h (userfaultfd, membarrier): Likewise.
   28102 	* linux/m68k/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28103 	* linux/microblaze/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28104 	* linux/mips/syscallent-n32.h (userfaultfd, membarrier, mlock2): Likewise.
   28105 	* linux/mips/syscallent-n64.h (userfaultfd, membarrier, mlock2): Likewise.
   28106 	* linux/mips/syscallent-o32.h (userfaultfd, membarrier, mlock2): Likewise.
   28107 	* linux/powerpc/syscallent.h (userfaultfd, membarrier): Likewise.
   28108 	* linux/s390/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28109 	* linux/s390x/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28110 	* linux/sparc/syscallent.h (membarrier, userfaultfd, mlock2): Likewise.
   28111 	* linux/x32/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28112 	* linux/x86_64/syscallent.h (userfaultfd, membarrier, mlock2): Likewise.
   28113 
   28114 2015-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   28115 
   28116 	sprintflags: skip zero flags.
   28117 	Tweak sprintflags behaviour to match printflags.
   28118 
   28119 	* util.c (sprintflags): Skip zero flags unless the value passed
   28120 	to sprintflags is also zero.
   28121 
   28122 2015-11-16  Mike Frysinger  <vapier (a] gentoo.org>
   28123 
   28124 	printflags: handle empty xlats.
   28125 	If the set of headers are unable to produce a valid list, printflags
   28126 	will try to pass NULL to tprints which crashes.  Add a sanity check
   28127 	for this edge case.
   28128 
   28129 	* util.c (printflags): Check xlat->str is not NULL.
   28130 
   28131 2015-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   28132 
   28133 	mpers: forward mpers_DEFS to mpers.sh.
   28134 	mpers_DEFS has to be forwarded to mpers.sh so that config.h would be
   28135 	properly included by defs.h at preprocessor stage.
   28136 
   28137 	* Makefile.am (mpers-m%.stamp): Add the whole $(mpers_sh_opts) set of
   28138 	options to mpers.sh's CPPFLAGS.
   28139 
   28140 2015-11-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   28141 
   28142 	tests/ioctl: workaround glibc ioctl wrapper on powerpc.
   28143 	* tests/ioctl.c (main) [POWERPC] Disable TCGETS test.
   28144 
   28145 2015-11-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   28146 
   28147 	powerpc: wire up switch_endian syscall.
   28148 	powerpc has switch_endian syscall starting with linux commit
   28149 	v4.0-rc4-67-g529d235.
   28150 
   28151 	* linux/powerpc/syscallent.h (switch_endian): New entry.
   28152 
   28153 2015-11-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   28154 
   28155 	sparc: reserve more space for new syscalls.
   28156 	Move socket subcalls further down the table to make room
   28157 	for new syscalls.
   28158 
   28159 	* linux/sparc/syscallent.h (SYS_socket_subcall): Raise from 353 to 400.
   28160 
   28161 2015-11-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   28162 
   28163 	m68k: wire up direct socket syscalls.
   28164 	Starting with linux commit v4.3-rc3-1-g5b3f33e, m68k has direct
   28165 	socket syscalls in addition to traditional socketcall syscall.
   28166 
   28167 	* linux/m68k/syscallent.h (socket, socketpair, bind, connect, listen,
   28168 	accept4, getsockopt, setsockopt, getsockname, getpeername, sendto,
   28169 	sendmsg, recvfrom, recvmsg, shutdown, recvmmsg, sendmmsg): New entries.
   28170 
   28171 2015-11-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   28172 
   28173 	i386: wire up direct socket syscalls.
   28174 	Starting with linux commit v4.2-rc1-64-g9dea5dc, x86 has direct
   28175 	socket syscalls in addition to traditional socketcall syscall.
   28176 
   28177 	* linux/i386/syscallent.h (socket, socketpair, bind, connect, listen,
   28178 	accept4, getsockopt, setsockopt, getsockname, getpeername, sendto,
   28179 	sendmsg, recvfrom, recvmsg, shutdown): New entries.
   28180 
   28181 2015-11-11  Heiko Carstens  <heiko.carstens (a] de.ibm.com>
   28182 
   28183 	s390, s390x: update syscall tables.
   28184 	* linux/s390/syscallent.h: Add new syscalls available with kernel 4.3.0.
   28185 	* linux/s390x/syscallent.h: Likewise.
   28186 
   28187 2015-11-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   28188 
   28189 	Fix *_printer_defs.h rules ambiguousness.
   28190 	There is an ambiguousness in *_printer_defs.h rules definition:
   28191 
   28192 	$ grep '^[^ ]*_defs\.h: ' Makefile.am
   28193 	m%_defs.h: $(srcdir_mpers_source_files)
   28194 	%_printer_defs.h: $(srcdir_mpers_source_files)
   28195 
   28196 	While it appears to work with GNU make, it has to be fixed nevertheless.
   28197 
   28198 	* Makefile.am (m%_defs.h): Rename to m%_type_defs.h.
   28199 	(mpers_m32_targets): Rename m32_defs.h to m32_type_defs.h.
   28200 	(mpers_mx32_targets): Rename mx32_defs.h to mx32_type_defs.h.
   28201 	* mpers_type.h: Rename m32_defs.h to m32_type_defs.h,
   28202 	mx32_defs.h to mx32_type_defs.h.
   28203 	* .gitignore: Likewise.
   28204 
   28205 	Reported-by: Elliott Hughes <enh (a] google.com>
   28206 
   28207 2015-10-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   28208 
   28209 	fcntl.c: make use of RVAL_DECODED.
   28210 	* fcntl.c (SYS_FUNC(fcntl)): Return RVAL_DECODED for write-only operations.
   28211 
   28212 2015-10-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   28213 
   28214 	desc.c: move parser of fcntl syscall to a separate file.
   28215 	* fcntl.c: New file.
   28216 	* Makefile.am (strace_SOURCES): Add it.
   28217 	* desc.c (printflock64, printflock, SYS_FUNC(fcntl)): Move to fcntl.c.
   28218 
   28219 	desc.c: move parser of flock syscall to a separate file.
   28220 	* flock.c: New file.
   28221 	* Makefile.am (strace_SOURCES): Add it.
   28222 	* desc.c (SYS_FUNC(flock)): Move to flock.c.
   28223 
   28224 2015-10-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   28225 
   28226 	tests: fix false uio.test failures.
   28227 	* tests/uio.c (main): Use descriptor number 0 in pread/pwrite
   28228 	and preadv/pwritev syscalls.
   28229 	* tests/uio.expected: Update regexps.
   28230 
   28231 	Reported-by: Lennart Sorensen <lsorense (a] csclub.uwaterloo.ca>
   28232 
   28233 2015-10-01  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   28234 
   28235 	Fix make -j builds.
   28236 	In files generated by mpers scripts, includes directives are taken from
   28237 	original files where the type definition was done.  This causes to
   28238 	include defs.h in multiple files.  defs.h includes printers.h header,
   28239 	which is a generated header.
   28240 
   28241 	This patch add an explicit dependency to printers.h for the mpers
   28242 	scripts.
   28243 
   28244 	* Makefile.am (mpers-m%.stamp): Add printers.h to order-only
   28245 	prerequisites.
   28246 
   28247 2015-09-29  Mike Frysinger  <vapier (a] gentoo.org>
   28248 
   28249 	mpers: fix shell code to conform better to POSIX.
   28250 	The `echo -n` behavior is non-portable, so use printf instead.
   28251 
   28252 	* generate_mpers_am.sh: Change `echo -n` to `printf`.
   28253 
   28254 2015-09-23  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   28255 
   28256 	ioctl: fix ioctl command number decoding in case of conflicts.
   28257 	When a command number was decoded through ioctl_decode_command_number(),
   28258 	there was no check for conflicts with other potential ioctls numbers.
   28259 
   28260 	For example:
   28261 		ioctl(fd, MCE_GET_RECORD_LEN, &i);
   28262 	output:
   28263 		ioctl(3, MIXER_READ(1), 0x7ffddce74a58) = 0
   28264 	instead of:
   28265 		ioctl(3, MIXER_READ(1) or MCE_GET_RECORD_LEN, 0x7ffee435ce08) = 0
   28266 
   28267 	* ioctl.c (SYS_FUNC(ioctl)): Fix ioctl command number decoding
   28268 	in case of conflicts.
   28269 	* tests/ioctl.c (main): Add a case for command number conflicts.
   28270 
   28271 2015-09-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   28272 
   28273 	tests: convert ioctl.test from match_grep to match_diff.
   28274 	* tests/ioctl.c (main): Print expected output.
   28275 	* tests/ioctl.test: Use match_diff instead of match_grep.
   28276 	* tests/ioctl.expected: Remove.
   28277 	* tests/Makefile.am (EXTRA_DIST): Remove ioctl.expected.
   28278 
   28279 2015-09-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   28280 
   28281 	Convert parser of seccomp filter program to new mpers infrastructure.
   28282 	* seccomp_fprog.h: New file.
   28283 	* fetch_seccomp_fprog.c: New file.
   28284 	* Makefile.am (strace_SOURCES): Add them.
   28285 	* seccomp.c: Include "seccomp_fprog.h".
   28286 	(print_seccomp_filter): Use fetch_seccomp_fprog.
   28287 
   28288 2015-09-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   28289 
   28290 	tests/init.sh: enhance match_grep error diagnostics.
   28291 	* tests/init.sh (match_grep): Check patterns one by one,
   28292 	output only those patterns that didn't match.
   28293 
   28294 	tests/init.sh: fix comment.
   28295 	* tests/init.sh (match_awk): Fix usage description.
   28296 
   28297 	tests: add one more case to select.test.
   28298 	* tests/select.c (main): Check how timeout is printed
   28299 	on exiting syscall.
   28300 
   28301 	tests: uncouple pselect6 from select.test.
   28302 	* tests/select.c Do not include <string.h>.
   28303 	Include <sys/syscall.h>.
   28304 	[!__NR_select]: Skip the test.
   28305 	(main): Remove pselect6 support, test just select syscall.
   28306 	* tests/select.test: Remove all pselect6 checks, test just
   28307 	select syscall.
   28308 
   28309 	tests: robustify select test.
   28310 	* tests/select.c: Do not include <assert.h>.
   28311 	(main): Skip the test instead of assertions.
   28312 	Add some padding to the timeval structure.
   28313 
   28314 	tests: add one more case to pselect6.test.
   28315 	* tests/pselect6.c (main): Check how timeout is printed
   28316 	on exiting syscall.
   28317 
   28318 	tests: robustify pselect6 test.
   28319 	* tests/pselect6.c: Do not include <assert.h> and <string.h>.
   28320 	Include <sys/syscall.h>.
   28321 	[!__NR_pselect6]: Skip the test.
   28322 	(main): Skip the test instead of assertions.
   28323 	Add some padding to the timespec structure.
   28324 
   28325 	Convert another parser of struct timeval to new mpers infrastructure.
   28326 	* print_time.c (sprint_timeval): New mpers printer.
   28327 	[ALPHA] (sprint_timeval32): New function.
   28328 	* defs.h [ALPHA] (sprint_timeval32): New prototype.
   28329 	(bitness_t, TIMEVAL_TEXT_BUFSIZE, printtv_bitness, sprinttv): Remove.
   28330 	* desc.c (decode_select): Replace bitness parameter with two printers.
   28331 	Use them instead of printtv_bitness and sprinttv.
   28332 	(sys_oldselect, sys_select): Pass print_timeval and sprint_timeval
   28333 	to decode_select.
   28334 	[ALPHA] (sys_osf_select): Pass print_timeval32 and sprint_timeval32
   28335 	to decode_select.
   28336 	(pselect6): Pass print_timespec and sprint_timespec to decode_select.
   28337 	* time.c (UTIME_NOW, UTIME_OMIT, current_time_t_is_compat,
   28338 	struct timeval32, printtv_bitness, do_sprinttv, sprinttv): Remove.
   28339 
   28340 	Convert another parser of struct timespec to new mpers infrastructure.
   28341 	* print_time.c (sprint_timespec): New mpers printer.
   28342 	* defs.h (TIMESPEC_TEXT_BUFSIZE): Update.
   28343 	(sprint_timespec): Remove.
   28344 	* time.c (sprint_timespec): Remove.
   28345 	* net.c (sys_recvmmsg): Update callers.
   28346 	* poll.c (decode_poll_exiting): Likewise.
   28347 
   28348 	tests: add another case to pselect6 test.
   28349 	* tests/pselect6.c: Include <sys/time.h>.
   28350 	(handler): New function.
   28351 	(main): Install an interval timer.
   28352 	Use it to check how ERESTARTNOHAND is printed.
   28353 
   28354 	Fix decoding of gettimeofday and settimeofday.
   28355 	* time.c (print_timezone): new function.
   28356 	(sys_gettimeofday, sys_settimeofday): Use it instead of print_timeval
   28357 	to print struct timezone.
   28358 	[ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday): Use it
   28359 	instead of print_timeval32 to print struct timezone.
   28360 	* tests/xettimeofday.c: New file.
   28361 	* tests/xettimeofday.test: New test.
   28362 	* tests/Makefile.am (check_PROGRAMS): Add xettimeofday.
   28363 	(TESTS): Add xettimeofday.
   28364 	* tests/.gitignore: Add xettimeofday.
   28365 
   28366 	Convert parser of struct timeval to new mpers infrastructure.
   28367 	* defs.h (printtv, printtv_special): Remove.
   28368 	[ALPHA] (print_timeval32, print_timeval32_pair): New prototypes.
   28369 	* print_time.c (print_timeval): New mpers printer.
   28370 	[ALPHA] (print_timeval32, print_timeval32_pair): New functions.
   28371 	* time.c (sys_gettimeofday, sys_settimeofday): Use print_timeval
   28372 	instead of printtv.
   28373 	[ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday):
   28374 	Use print_timeval32 instead of printtv_bitness.
   28375 	* utimes.c [ALPHA] (sys_osf_utimes): Use print_timeval32_pair
   28376 	instead of printtv_bitness.
   28377 
   28378 	Convert parser of struct timespec to new mpers infrastructure.
   28379 	* defs.h (print_timespec): Remove.
   28380 	* print_time.c (print_timespec): New mpers printer.
   28381 	* futex.c (sys_futex): Use print_timespec instead of printtv.
   28382 	* ipc_sem.c (sys_semtimedop): Likewise.
   28383 	* mq.c (sys_mq_timedsend, sys_mq_timedreceive): Likewise.
   28384 	* time.c (clock_settime, clock_gettime, clock_nanosleep): Likewise.
   28385 	(print_timespec): Remove.
   28386 
   28387 	Remove unused parser of adjtime syscall.
   28388 	* time.c (sys_adjtime): Remove.
   28389 
   28390 	Fix decoding of clock_nanosleep.
   28391 	* time.c (sys_clock_nanosleep): Use is_erestart,
   28392 	temporarily_clear_syserror, and restore_cleared_syserror.
   28393 	* tests/clock_nanosleep.c: New file.
   28394 	* tests/clock_nanosleep.test: New test.
   28395 	* tests/Makefile.am (check_PROGRAMS): Add clock_nanosleep.
   28396 	(TESTS): Add clock_nanosleep.test.
   28397 	* tests/.gitignore: Add clock_nanosleep.
   28398 
   28399 	Add is_erestart helper function.
   28400 	* defs.h (is_erestart): New prototype.
   28401 	* syscall.c (is_erestart): New function.
   28402 	* time.c (sys_nanosleep): Use is_erestart,
   28403 	temporarily_clear_syserror, and restore_cleared_syserror.
   28404 
   28405 	Add helper functions to clear/restore syserror.
   28406 	* defs.h (temporarily_clear_syserror, restore_cleared_syserror):
   28407 	New prototypes.
   28408 	* syscall.c (saved_u_error): New variable.
   28409 	(temporarily_clear_syserror, restore_cleared_syserror): New functions.
   28410 	* aio.c (sys_io_getevents): Use temporarily_clear_syserror
   28411 	and restore_cleared_syserror.
   28412 	* mq.c (sys_mq_timedreceive): Likewise.
   28413 	* signal.c (sys_rt_sigtimedwait): Likewise.
   28414 
   28415 	tests: add nanosleep.test.
   28416 	* tests/nanosleep.c: New file.
   28417 	* tests/nanosleep.test: New test.
   28418 	* tests/Makefile.am (check_PROGRAMS): Add nanosleep.
   28419 	(TESTS): Add nanosleep.test.
   28420 	* tests/.gitignore: Add nanosleep.
   28421 
   28422 	tests: rewrite restart_syscall in C.
   28423 	* tests/restart_syscall.c: New file.
   28424 	* tests/restart_syscall.expected: Remove.
   28425 	* tests/restart_syscall_unknown.expected: Remove.
   28426 	* tests/restart_syscall.test: Update to use restart_syscall.
   28427 	* tests/Makefile.am (check_PROGRAMS): Add restart_syscall.
   28428 	(EXTRA_DIST): Remove restart_syscall.expected
   28429 	and restart_syscall_unknown.expected.
   28430 	* tests/.gitignore: Add restart_syscall.
   28431 
   28432 	Properly initialize siginfo_t object passed to print_stopped function.
   28433 	* strace.c (trace): Clear the whole siginfo_t variable before passing it
   28434 	to ptrace(PTRACE_GETSIGINFO) because the latter may initialize only a
   28435 	part of the structure.
   28436 
   28437 	tests: add clock_xettime.test.
   28438 	* tests/clock_xettime.c: New file.
   28439 	* tests/clock_xettime.test: New test.
   28440 	* tests/Makefile.am (check_PROGRAMS): Add clock_xettime.
   28441 	(TESTS): Add clock_xettime.test.
   28442 	* tests/.gitignore: Add clock_xettime.
   28443 
   28444 	Convert parser of struct itimerval to new mpers infrastructure.
   28445 	* defs.h [ALPHA] (print_itimerval32): New prototype.
   28446 	* print_time.c (print_itimerval): New mpers printer.
   28447 	[ALPHA] (timeval32_t): New typedef.
   28448 	[ALPHA] (print_timeval32_t, print_itimerval32): New functions.
   28449 	* time.c (sys_getitimer, sys_setitimer): Use print_itimerval instead
   28450 	of printitv.
   28451 	[ALPHA] (sys_osf_getitimer, sys_osf_setitimer): Use print_itimerval32
   28452 	instead of printitv_bitness.
   28453 	(tprint_timeval32, tprint_timeval, printitv_bitness, printitv): Remove.
   28454 
   28455 	tests: add xetitimer.test.
   28456 	* tests/xetitimer.c: New file.
   28457 	* tests/xetitimer.test: New test.
   28458 	* tests/Makefile.am (check_PROGRAMS): Add xetitimer.
   28459 	(TESTS): Add xetitimer.test.
   28460 	* tests/.gitignore: Add xetitimer.
   28461 
   28462 	Convert parser of struct itimerspec to new mpers infrastructure.
   28463 	* print_time.c (print_itimerspec): New mpers printer.
   28464 	* time.c (sys_timer_settime, sys_timer_gettime, sys_timerfd,
   28465 	sys_timerfd_settime, sys_timerfd_gettime): Use it instead of printitv.
   28466 
   28467 2015-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   28468 
   28469 	print_time.c: introduce print_timespec_t helper.
   28470 	* print_time.c (time_fmt): New constant string.
   28471 	(print_timeval_t): Use it.
   28472 	(print_timespec_t): New function.
   28473 	(print_timespec_t_utime): Use it.
   28474 
   28475 	tests: add timerfd_xettime.test.
   28476 	* tests/timerfd_xettime.c: New file.
   28477 	* tests/timerfd_xettime.test: New test.
   28478 	* tests/Makefile.am (check_PROGRAMS): Add timerfd_xettime.
   28479 	(TESTS): Add timerfd_xettime.test.
   28480 	* tests/.gitignore: Add timerfd_xettime.
   28481 
   28482 	tests: add timer_xettime.test.
   28483 	* tests/timer_xettime.c: New file.
   28484 	* tests/timer_xettime.test: New test.
   28485 	* tests/Makefile.am (check_PROGRAMS): Add timer_xettime.
   28486 	(TESTS): Add timer_xettime.test.
   28487 	* tests/.gitignore: Add timer_xettime.
   28488 
   28489 	time.c: move parser of time syscall to print_time.c.
   28490 	* time.c (current_time_t_is_int32): Remove.
   28491 	(sys_time): Move ...
   28492 	* print_time.c: ... here.  Mpersify time_t.
   28493 
   28494 	print_time.c: remove unused function parameters.
   28495 	* print_time.c (print_timespec_t_utime, print_timeval_t): Remove
   28496 	"struct tcb *" parameter.
   28497 	(print_timespec_utime_pair, print_timeval_pair): Update callers.
   28498 
   28499 	Add struct timex.tai support.
   28500 	* configure.ac (AC_CHECK_MEMBERS): Add struct timex.tai.
   28501 	* print_timex.c (print_timex) [HAVE_STRUCT_TIMEX_TAI]: Print tai field.
   28502 	* tests/adjtimex.c (main) [HAVE_STRUCT_TIMEX_TAI]: Likewise.
   28503 
   28504 	Convert parser of struct timex to new mpers infrastructure.
   28505 	* defs.h (adjtimex_modes, adjtimex_status): New xlat prototypes.
   28506 	* print_timex.c (struct_timex): New typedef.  Mpersify it.
   28507 	[IN_MPERS]: Do not include "xlat/adjtimex_modes.h"
   28508 	and "xlat/adjtimex_status.h".
   28509 	[SUPPORTED_PERSONALITIES > 1]: Remove.
   28510 	(tprint_timeval): Remove.
   28511 	(tprint_timex): Rename to print_timex.  Mpersify it.
   28512 	* time.c (do_adjtimex): Rename tprint_timex to print_timex.
   28513 	* tests/adjtimex.c: New file.
   28514 	* tests/adjtimex.test: New test.
   28515 	* tests/Makefile.am (check_PROGRAMS): Add adjtimex.
   28516 	(TESTS): Add adjtimex.test.
   28517 	* tests/.gitignore: Add adjtimex.
   28518 
   28519 	Move parser of struct timex to a separate file.
   28520 	* print_timex.c: New file.
   28521 	* Makefile.am (strace_SOURCES): Add it.
   28522 	* time.c (tprint_timex32, tprint_timex): Move to print_timex.c.
   28523 
   28524 	Enhance parser of struct sigevent.
   28525 	* print_sigevent.c (print_sigevent): Always print names
   28526 	of struct_sigevent fields along with their values.
   28527 	Print signal name of sigev_signo for those sigev_notify values
   28528 	that require valid signal numbers.
   28529 	* tests/timer_create.c: New file.
   28530 	* tests/timer_create.test: New test.
   28531 	* tests/Makefile.am (check_PROGRAMS): Add timer_create.
   28532 	(TESTS): Add timer_create.test.
   28533 	* tests/.gitignore: Add timer_create.
   28534 
   28535 2015-09-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   28536 
   28537 	Convert parser of struct sigevent to new mpers infrastructure.
   28538 	* defs.h (sigev_value): New prototype.
   28539 	(printsigevent): Remove.
   28540 	* print_sigevent.c (struct_sigevent): New typedef.  Mpersify it.
   28541 	[IN_MPERS]: Do not include "xlat/sigev_value.h".
   28542 	(printsigevent32): Remove.
   28543 	(printsigevent): Rename to print_sigevent.  Mpersify it.
   28544 	* mq.c (sys_mq_notify): Rename printsigevent to print_sigevent.
   28545 	* time.c (sys_timer_create): Likewise.
   28546 
   28547 	Move parser of struct sigevent to a separate file.
   28548 	* print_sigevent.c: New file.
   28549 	* Makefile.am (strace_SOURCES): Add it.
   28550 	* time.c (printsigevent32, printsigevent): Move to print_sigevent.c.
   28551 
   28552 	time.c: move fallback definitions of SIGEV_* values to xlat/
   28553 	* time.c: Move fallback definitions of SIGEV_* values ...
   28554 	* xlat/sigev_value.in: ... here.
   28555 
   28556 	Simplify use of mpers printers.
   28557 	* native_defs.h: New file.
   28558 	* syscall.c: Include it.
   28559 	* mpers_type.h [!IN_MPERS] (MPERS_DEFS): Change to "native_defs.h".
   28560 	* defs.h (MPERS_PRINTER_NAME): Remove.
   28561 	[SUPPORTED_PERSONALITIES > 1] (MPERS_PRINTER_NAME, printers): Move ...
   28562 	* Makefile.am (printers.h): ... here.
   28563 	Add macro definitions for mpers printers.
   28564 	(m%_defs.h): Add redefinition of MPERS_PRINTER_NAME and inclusion
   28565 	of "$(mpers_PREFIX)printer_decls.h".
   28566 	(strace_SOURCES): Add native_defs.h.
   28567 	* README-mpers: Update instructions for using mpers printers.
   28568 	* ipc_msg.c (tprint_msgsnd, tprint_msgrcv): Call tprint_msgbuf directly.
   28569 	* mq.c (sys_mq_open, mq_getsetattr): Call printmqattr directly.
   28570 	* process.c (sys_ptrace): Call printsiginfo_at directly.
   28571 	* signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Likewise.
   28572 	* resource.c (sys_getrusage): Call printrusage directly.
   28573 	* utimes.c (sys_utimensat): Call print_timespec_utime_pair directly.
   28574 	(sys_utimes, sys_futimesat): Call print_timeval_pair directly.
   28575 	* wait.c (printwaitn): Call printrusage directly.
   28576 	(sys_waitid): Call printrusage and printsiginfo_at directly.
   28577 
   28578 2015-09-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   28579 
   28580 	Add a new helper function umove_ulong_array_or_printaddr.
   28581 	* defs.h (umove_ulong_array_or_printaddr): New prototype.
   28582 	* util.c (umove_ulong_array_or_printaddr): New function.
   28583 	* desc.c (sys_pselect6): Use it instead of open-coding
   28584 	a proxy struct parser for different personalities.
   28585 	* io.c (tprint_iov_upto): Use it instead of open-coding
   28586 	a struct iovec parser for different personalities.
   28587 	* kexec.c (print_kexec_segments): Use it instead of open-coding
   28588 	a struct kexec_segment parser for different personalities.
   28589 	(print_seg): Pass arguments using an array.
   28590 
   28591 	tests: add pselect6.test.
   28592 	* tests/pselect6.c: New file.
   28593 	* tests/pselect6.test: New test.
   28594 	* tests/Makefile.am (check_PROGRAMS): Add pselect6.
   28595 	(TESTS): Add pselect6.test.
   28596 	* tests/.gitignore: Add pselect6.
   28597 
   28598 2015-09-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   28599 
   28600 	Rename umove_long_or_printaddr to umove_ulong_or_printaddr.
   28601 	Rename the recently added function to reflect what kind of data type
   28602 	it actually deals with: unsigned long int, without sign extension.
   28603 
   28604 	* defs.h (umove_long_or_printaddr): Rename to umove_ulong_or_printaddr,
   28605 	chage 3rd argument to unsigned long *.
   28606 	* util.c (umove_long_or_printaddr): Likewise.
   28607 	* aio.c (sys_io_submit): Update callers.
   28608 
   28609 2015-09-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   28610 
   28611 	aarch64, ppc64, sparc64, tile: hook up mpers printers.
   28612 	* defs.h [AARCH64 && HAVE_M32_MPERS]: Define PERSONALITY0_INCLUDE_FUNCS,
   28613 	PERSONALITY0_INCLUDE_PRINTERS_DECLS,
   28614 	and PERSONALITY0_INCLUDE_PRINTERS_DEFS.
   28615 	[POWERPC64 && HAVE_M32_MPERS]: Define PERSONALITY1_INCLUDE_FUNCS,
   28616 	PERSONALITY1_INCLUDE_PRINTERS_DECLS,
   28617 	and PERSONALITY1_INCLUDE_PRINTERS_DEFS.
   28618 	[SPARC64 && HAVE_M32_MPERS]: Likewise.
   28619 	[TILE && HAVE_M32_MPERS]: Likewise.
   28620 
   28621 2015-09-14  Anton Blanchard  <anton (a] samba.org>
   28622 
   28623 	Add PowerPC specific ptrace constants.
   28624 	* xlat/ptrace_cmds.in: Add PowerPC specific ptrace constants.
   28625 
   28626 2015-09-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   28627 
   28628 	Update SCTP_* constants.
   28629 	* xlat/socksctpoptions.in: Add SCTP_GET_ASSOC_ID_LIST, SCTP_AUTO_ASCONF,
   28630 	SCTP_PEER_ADDR_THLDS, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO,
   28631 	SCTP_DEFAULT_SNDINFO, SCTP_SOCKOPT_CONNECTX, SCTP_SOCKOPT_CONNECTX3,
   28632 	and SCTP_GET_ASSOC_STATS.
   28633 
   28634 	Update F_* constants.
   28635 	* xlat/fcntlcmds.in: Add F_SETPIPE_SZ, F_GETPIPE_SZ, F_ADD_SEALS,
   28636 	and F_GET_SEALS.
   28637 
   28638 	Update RENAME_* constants.
   28639 	* xlat/rename_flags.in: Add RENAME_WHITEOUT.
   28640 
   28641 	Update SO_* constants.
   28642 	* xlat/sockoptions.in: Add SO_ATTACH_BPF, SO_BPF_EXTENSIONS,
   28643 	SO_BUSY_POLL, SO_DETACH_BPF, SO_GET_FILTER, SO_INCOMING_CPU,
   28644 	SO_LOCK_FILTER, SO_MAX_PACING_RATE, SO_PEEK_OFF, SO_RXQ_OVFL,
   28645 	SO_SELECT_ERR_QUEUE, and SO_WIFI_STATUS.
   28646 
   28647 	Update INPUT_PROP_* constants.
   28648 	* xlat/evdev_prop.in: Add INPUT_PROP_ACCELEROMETER.
   28649 
   28650 	Update KEY_* constants.
   28651 	* xlat/evdev_keycode.in: Add KEY_ROTATE_DISPLAY, KEY_NUMERIC_A,
   28652 	KEY_NUMERIC_B, KEY_NUMERIC_C, and KEY_NUMERIC_D.
   28653 
   28654 	Update FALLOC_FL_* constants.
   28655 	* xlat/falloc_flags.in: Add FALLOC_FL_INSERT_RANGE.
   28656 
   28657 	Update AF_* and PF_* constants.
   28658 	* xlat/addrfams.in: Add AF_IB and AF_MPLS.
   28659 	* xlat/domains.in: Add PF_IB and PF_MPLS.
   28660 
   28661 	Update TCP_* constants.
   28662 	* xlat/socktcpoptions.in: Add TCP_NOTSENT_LOWAT, TCP_CC_INFO,
   28663 	TCP_SAVE_SYN, and TCP_SAVED_SYN.
   28664 
   28665 	Update PACKET_* constants.
   28666 	* xlat/sockpacketoptions.in: Add PACKET_VNET_HDR, PACKET_TX_TIMESTAMP,
   28667 	PACKET_TIMESTAMP, PACKET_FANOUT, PACKET_TX_HAS_OFF, PACKET_QDISC_BYPASS,
   28668 	PACKET_ROLLOVER_STATS, and PACKET_FANOUT_DATA.
   28669 
   28670 	Update BPF_MAP_TYPE_* constants.
   28671 	* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_PERF_EVENT_ARRAY.
   28672 
   28673 	Update IPPROTO_* constants.
   28674 	* xlat/inet_protocols.in: Add IPPROTO_MPLS.
   28675 
   28676 	Update IP_* constants.
   28677 	* xlat/sockipoptions.in: Add IP_CHECKSUM and IP_BIND_ADDRESS_NO_PORT.
   28678 
   28679 	Update PTRACE_O_* constants.
   28680 	* ptrace.h: Define PTRACE_O_SUSPEND_SECCOMP.
   28681 	* xlat/ptrace_setoptions_flags.in: Add it.
   28682 
   28683 	Update PR_* constants.
   28684 	* xlat/prctl_options.in: Add PR_SET_FP_MODE, PR_GET_FP_MODE,
   28685 	and PR_CAP_AMBIENT.
   28686 
   28687 	Update SECBIT_* constants.
   28688 	* xlat/secbits.in: Add SECBIT_NO_CAP_AMBIENT_RAISE
   28689 	and SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED.
   28690 
   28691 2015-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   28692 
   28693 	mpers.m4: workaround missing gnu/stubs-*.h files.
   28694 	On some systems missing gnu/stubs-*.h files make -m32/-mx32 compilation
   28695 	checks fail.  As we want to support multiple personalities despite of
   28696 	this limitation, workaround the check by creating empty gnu stub files
   28697 	if necessary.
   28698 
   28699 	* m4/mpers.m4 (st_MPERS): Check for the gnu stub file.  Create an empty
   28700 	gnu stub file if the system one is missing.
   28701 	* Makefile.am (DISTCLEANFILES): Add gnu/stubs-32.h and gnu/stubs-x32.h.
   28702 
   28703 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28704 
   28705 	tests: add times-fail.test.
   28706 	* tests/times-fail.c: New file.
   28707 	* tests/times-fail.test: New test.
   28708 	* tests/Makefile.am (check_PROGRAMS): Add times-fail.
   28709 	(TESTS): Add times-fail.test.
   28710 	* tests/.gitignore: Add times-fail.
   28711 
   28712 2015-08-28  Eugene Syromyatnikov  <evgsyr (a] gmail.com>
   28713 
   28714 	tests: add times.test.
   28715 	* tests/times.c: New file.
   28716 	* tests/times.test: New test.
   28717 	* tests/Makefile.am (check_PROGRAMS): Add times.
   28718 	(TESTS): Add times.test.
   28719 	(times_LDADD): Define.
   28720 	* tests/.gitignore: Add times.
   28721 
   28722 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28723 
   28724 	Mpersify parser of times syscall.
   28725 	Fix multiple personalities support in parser of times syscall by
   28726 	mpersifying struct tms.
   28727 
   28728 	* times.c (tms_t): New typedef.  Mpersify it.
   28729 	(sys_times): Use it instead of struct tms.
   28730 
   28731 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28732 
   28733 	tests: add sysinfo.test.
   28734 	* tests/sysinfo.c: New file.
   28735 	* tests/sysinfo.test: New test.
   28736 	* tests/Makefile.am (check_PROGRAMS): Add sysinfo.
   28737 	(TESTS): Add sysinfo.test.
   28738 	* tests/.gitignore: Add sysinfo.
   28739 
   28740 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28741 
   28742 	Mpersify parser of sysinfo syscall.
   28743 	Fix multiple personalities support in parser of sysinfo syscall by
   28744 	mpersifying struct sysinfo.
   28745 
   28746 	* sysinfo.c (sysinfo_t): New typedef.  Mpersify it.
   28747 	(sys_sysinfo): Use it instead of struct sysinfo.
   28748 
   28749 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28750 
   28751 	Enhance msgctl syscall decoding.
   28752 	Make parser of msgctl syscall print struct msqid_ds.
   28753 
   28754 	* ipc_msgctl.c (msqid_ds_t): New typedef.  Mpersify it.
   28755 	(print_msqid_ds): New function.  Use msqid_ds_t.
   28756 	(sys_msgctl): Use print_msqid_ds.
   28757 	* tests/ipc_msg.c: Update for struct msqid_ds support.
   28758 
   28759 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28760 
   28761 	Enhance shmctl syscall decoding.
   28762 	Make parser of shmctl syscall print struct shmid_ds.
   28763 
   28764 	* ipc_shmctl.c (shmid_ds_t): New typedef.  Mpersify it.
   28765 	(print_shmid_ds): New function.  Use shmid_ds_t.
   28766 	(sys_shmctl): Use print_shmid_ds.
   28767 	* tests/ipc_shm.c: Update for struct shmid_ds support.
   28768 
   28769 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28770 
   28771 	tests: add ipc_msgbuf.test.
   28772 	* tests/ipc_msgbuf.c: New file.
   28773 	* tests/ipc_msgbuf.expected: Likewise.
   28774 	* tests/ipc_msgbuf.test: New test.
   28775 	* tests/Makefile.am (check_PROGRAMS): Add ipc_msgbuf.
   28776 	(TESTS): Add ipc_msgbuf.test.
   28777 	(EXTRA_DIST): Add ipc_msgbuf.expected.
   28778 	* tests/.gitignore: Add ipc_msgbuf.
   28779 
   28780 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28781 
   28782 	Mpersify tprint_msgsnd and tprint_msgrcv.
   28783 	Fix multiple personalities support in tprint_msgsnd and tprint_msgrcv
   28784 	by converting tprint_msgbuf into a mpersified printer.
   28785 
   28786 	* print_msgbuf.c (msgbuf_t): New typedef.  Mpersify it.
   28787 	(tprint_msgbuf): Use it instead of long.
   28788 	Wrap function name into MPERS_PRINTER_DECL.
   28789 	* ipc_msg.c (tprint_msgsnd, tprint_msgrcv): Use mpersified
   28790 	tprint_msgbuf.
   28791 
   28792 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28793 
   28794 	tests: add mq.test.
   28795 	* tests/mq.c: New file.
   28796 	* tests/mq.expected: Likewise.
   28797 	* tests/mq.test: New test.
   28798 	* tests/Makefile.am (check_PROGRAMS): Add mq.
   28799 	(TESTS): Add mq.test.
   28800 	(EXTRA_DIST): Add mq.expected.
   28801 	(mq_LDADD): Add -lrt.
   28802 	* tests/.gitignore: Add mq.
   28803 
   28804 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28805 
   28806 	Mpersify parsers of mq_open and mq_getsetattr syscalls.
   28807 	Fix multiple personalities support in parsers of mq_open and
   28808 	mq_getsetattr by converting printmqattr into a mpersified printer.
   28809 
   28810 	* print_mq_attr.c (mq_attr_t): New typedef.  Mpersify it.
   28811 	(printmqattr): Use it instead of struct mq_attr.  Wrap function name
   28812 	into MPERS_PRINTER_DECL.
   28813 	* mq.c (mq_open, mq_getsetattr): Use mpersified printmqattr.
   28814 
   28815 2015-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   28816 
   28817 	tests: add wait.test.
   28818 	* tests/wait.c: New file.
   28819 	* tests/wait.expected: Likewise.
   28820 	* tests/wait.test: New test.
   28821 	* tests/Makefile.am (check_PROGRAMS): Add wait.
   28822 	(TESTS): Add wait.test.
   28823 	(EXTRA_DIST): Add wait.expected.
   28824 	* tests/.gitignore: Add wait.
   28825 
   28826 2015-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   28827 
   28828 	Mpersify parsers of getrusage, waitpid, wait4, and waitid syscalls.
   28829 	Fix multiple personalities support in parsers of getrusage, waitpid,
   28830 	wait4, and waitid syscalls by converting printrusage into a mpersified
   28831 	printer.
   28832 
   28833 	* defs.h (printrusage): Remove.
   28834 	* printrusage.c (rusage_t): New typedef.  Mpersify it.
   28835 	(printrusage): Use it instead of struct rusage.
   28836 	Wrap function name into MPERS_PRINTER_DECL.
   28837 	* resource.c (sys_getrusage): Use mpersified printrusage.
   28838 	* wait.c (printwaitn, sys_waitid): Likewise.
   28839 
   28840 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28841 
   28842 	tests: add rt_sigqueueinfo.test.
   28843 	* tests/rt_sigqueueinfo.c: New file.
   28844 	* tests/rt_sigqueueinfo.test: New test.
   28845 	* tests/Makefile.am (check_PROGRAMS): Add rt_sigqueueinfo.
   28846 	(TESTS): Add rt_sigqueueinfo.test.
   28847 	* tests/.gitignore: Add rt_sigqueueinfo.
   28848 
   28849 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28850 
   28851 	Mpersify printsiginfo_at printer.
   28852 	Fix multiple personalities support in parsers of ptrace,
   28853 	rt_sigqueueinfo, rt_tgsigqueueinfo, rt_sigtimedwait and waitid syscalls
   28854 	by converting printsiginfo_at into a mpersified printer.
   28855 
   28856 	* printsiginfo.c (siginfo_t): Mpersify.
   28857 	(printsiginfo_at): Wrap function name into MPERS_PRINTER_DECL.
   28858 	* defs.h (printsiginfo_at): Remove.
   28859 	* signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Use mpersified
   28860 	printsiginfo_at.
   28861 	* process.c (sys_ptrace): Likewise.
   28862 	* wait.c (sys_waitid): Likewise.
   28863 
   28864 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28865 
   28866 	Mpersify parser of sigaltstack syscall.
   28867 	Fix multiple personalities support in parser of sigaltstack syscall by
   28868 	mpersifying stack_t typedef.
   28869 
   28870 	* sigaltstack.c (stack_t): Mpersify.
   28871 	(print_stack_t): Use it.
   28872 
   28873 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28874 
   28875 	Mpersify parser of utime syscall.
   28876 	Fix multiple personalities support in parser of utime syscall by using
   28877 	mpersified utimbuf_t typedef.
   28878 
   28879 	* utime.c (utimbuf_t): New typedef.  Mpersify it.
   28880 	(sys_utime): Use it instead of a locally defined union.
   28881 
   28882 2015-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   28883 
   28884 	tests: add utimensat.test.
   28885 	* tests/utimensat.c: New file.
   28886 	* tests/utimensat.test: New test.
   28887 	* tests/Makefile.am (check_PROGRAMS): Add utimensat.
   28888 	(TESTS): Add utimensat.test.
   28889 	* configure.ac (AC_CHECK_FUNCS): Add utimensat.
   28890 	* tests/.gitignore: Add utimensat.
   28891 
   28892 2015-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   28893 
   28894 	Mpersify parsers of utimes, futimesat, and utimensat syscalls.
   28895 	Fix multiple personalities support in parsers of utimes, futimesat,
   28896 	and utimensat syscalls by introducing two mpersified printers:
   28897 	print_timeval_pair and print_timespec_utime_pair.
   28898 
   28899 	* print_time.c: New file.
   28900 	* Makefile.am (strace_SOURCES): Add it.
   28901 	* utimes.c (decode_utimes): Remove.
   28902 	(sys_utimes, sys_futimesat): Use print_timeval_pair instead
   28903 	of decode_utimes.
   28904 	(sys_utimensat): Use print_timespec_utime_pair instead of decode_utimes.
   28905 
   28906 2015-08-28  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   28907 
   28908 	Add mpers support.
   28909 	Add a subsystem for semi-automatical definition of how parsers should
   28910 	work with personality-dependent (mpers) types of tracee's data.  Create
   28911 	auxiliary libraries containing mpers syscall parsers and printer
   28912 	functions, one library for each possible nonnative target personality.
   28913 
   28914 	Currently some parsers do not handle differences in definitions of data
   28915 	types between personalities, namely LP64 and ILP32.  When
   28916 	this is the case, long integers, pointers, and all compound
   28917 	types containing long and pointer members may be printed incorrectly,
   28918 	because of differences in sizes, offsets and alignments.
   28919 
   28920 	Since in most cases these are the only differences in desired behaviour
   28921 	of parsers and printers for different personalities, a correct way
   28922 	would be to compile one source code into multiple parsers, differing
   28923 	only in definitions of mpers types.
   28924 
   28925 	To get a definition of a given type for nonnative personality
   28926 	a very basic .c file containing a declaration of a variable of this type
   28927 	is being compiled for this personality (using -m32 or -mx32 compiler
   28928 	flag).  Information about the type is then being extracted from
   28929 	this binary's DWARF debug info with an awk script and put
   28930 	into a corresponding header file.  Resulting headers are being used to
   28931 	compile mpers variations of syscall parsers and printer functions.
   28932 
   28933 	In addition to syscall parsers, there can occur a need to create mpers
   28934 	printing functions, which then can be called from many places
   28935 	in the code (for example, printsiginfo_at).  Such functions (printers)
   28936 	are marked in a special manner.
   28937 
   28938 	For each possible nonnative target personality a library is being
   28939 	created, containing mpers variations of syscall parsers and printers.
   28940 	Only syscall parsers from files marked in a special manner and specially
   28941 	marked functions from such files are being recompiled and included
   28942 	in these libraries.
   28943 
   28944 	generate_mpers_am.sh is called by bootstrap to find the files
   28945 	from strace_SOURCES which include MPERS_DEFS.  During compilation,
   28946 	these files are being inspected for inclusions of DEF_MPERS_TYPE,
   28947 	and nonnative variations of each included type are being generated
   28948 	by an awk script.
   28949 
   28950 	Mpers parser names are being modified during inclusions of syscallent
   28951 	headers for nonnative personalities.  Pointers to printers are
   28952 	being stored in structs struct_printers, and a master
   28953 	pointer printers is being updated on every set_personality.
   28954 
   28955 	* README-mpers: New README explaining how to use mpers support.
   28956 	* empty.h: New empty file.
   28957 	* generate_mpers_am.sh: New file.
   28958 	* mpers.awk: Likewise.
   28959 	* mpers.sh: Likewise.
   28960 	* mpers_test.sh: Likewise.
   28961 	* mpers_type.h: Likewise.
   28962 	* Makefile.am (strace_SOURCES): Add empty.h and mpers_type.h.
   28963 	(strace_CPPFLAGS, strace_LDFLAGS, strace_LDADD): Move to the beginning
   28964 	of the file.
   28965 	(strace_LDADD, noinst_LIBRARIES): Add libmpers-%.a.
   28966 	(EXTRA_DIST): Add mpers.awk, mpers.sh, mpers_test.sh.
   28967 	(BUILT_SOURCES, CLEANFILES): Add new generated files:
   28968 	native_printer_decls.h, native_printer_defs.h, printers.h,
   28969 	[HAVE_M32_MPERS] $(mpers_m32_targets), and [HAVE_MX32_MPERS]
   28970 	$(mpers_mx32_targets).
   28971 	(mpers_NAME, mpers_PREFIX, mpers_DEFS, mpers_INCLUDES, mpers_CPPFLAGS,
   28972 	mpers_sh_opts, libmpers_CPPFLAGS, libmpers_m[x]32_a_SOURCES,
   28973 	libmpers_m[x]32_a_CPPFLAGS, mpers_m[x]32_targets): New variables.
   28974 	(mpers-m[x]32.stamp, m[x]32_defs.h, m[x]32_funcs.h, printers.h,
   28975 	%_printer_decls.h, %_printer_defs.h, clean-local,
   28976 	native_printer_decls.h, native_printer_defs.h, $mpers_m[x]32_targets):
   28977 	New targets.
   28978 	* bootstrap: Add generate_mpers_am.sh.
   28979 	* configure.ac: Add AC_PROG_RANLIB.
   28980 	* m4/mpers.m4: Add HAVE_MPERS variable.  Add $st_cv_mpers checks.
   28981 	* defs.h: Include mpers_type.h.
   28982 	Include printers.h, native_printer_decls.h, define MPERS_PRINTER_NAME.
   28983 	Redefine SYS_FUNC_NAME.  Define MPERS_PRINTER_DECL.
   28984 	[HAVE_M32_MPERS]: define PERSONALITY1_INCLUDE_FUNCS,
   28985 	PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS
   28986 	for X86_64, X32.
   28987 	[HAVE_MX32_MPERS]: define PERSONALITY2_INCLUDE_FUNCS,
   28988 	PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS
   28989 	for X86_64.
   28990 	Add fallback definitions of
   28991 	PERSONALITY1_INCLUDE_FUNCS, PERSONALITY2_INCLUDE_FUNCS,
   28992 	PERSONALITY0_INCLUDE_PRINTERS_DECLS, PERSONALITY0_INCLUDE_PRINTERS_DEFS,
   28993 	PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS,
   28994 	PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS.
   28995 	* syscall.c: Include PERSONALITY1_INCLUDE_FUNCS,
   28996 	PERSONALITY2_INCLUDE_FUNCS,
   28997 	PERSONALITY0_INCLUDE_PRINTERS_DECLS, PERSONALITY0_INCLUDE_PRINTERS_DEFS,
   28998 	PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS,
   28999 	PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS.
   29000 	(printers): New struct.  Update it when needed.
   29001 	* .gitignore: Add libmpers-m32.a, libmpers-mx32.a, m32_defs.h,
   29002 	m32_funcs.h, m32_printer_decls.h, m32_printer_defs.h, mpers-m32,
   29003 	mpers-m32.stamp, mpers-mx32, mpers-mx32.stamp, mpers.am, mx32_defs.h,
   29004 	mx32_funcs.h, mx32_printer_decls.h, mx32_printer_defs.h,
   29005 	native_printer_decls.h, native_printer_defs.h, and printers.h.
   29006 
   29007 2015-08-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   29008 
   29009 	tests: convert readlink.test and readlinkat.test from match_awk to match_diff
   29010 	* tests/readlink.c (main): Print expected output.
   29011 	* tests/readlinkat.c (main): Likewise.
   29012 	* tests/readlink.test: Use match_diff instead of match_awk.
   29013 	* tests/readlinkat.test: Likewise.
   29014 	* tests/readlink.awk: Remove.
   29015 	* tests/readlinkat.awk: Likewise.
   29016 	* tests/Makefile.am (EXTRA_DIST): Remove readlink.awk and readlinkat.awk.
   29017 
   29018 	tests: convert getrandom.test from match_awk to match_diff.
   29019 	* tests/getrandom.c (main): Print expected output.
   29020 	* tests/getrandom.test: Use match_diff instead of match_awk.
   29021 	* tests/getrandom.awk: Remove.
   29022 	* tests/Makefile.am (EXTRA_DIST): Remove getrandom.awk.
   29023 
   29024 2015-08-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   29025 
   29026 	tests: convert select.test from match_awk to match_diff.
   29027 	* tests/select.c (main): Print expected output.
   29028 	* tests/select.test: Use match_diff instead of match_awk.
   29029 	* tests/select.awk: Remove.
   29030 	* tests/Makefile.am (EXTRA_DIST): Remove select.awk.
   29031 
   29032 	tests: convert several tests from match_grep to match_diff.
   29033 	* tests/sendfile.test: Use match_diff instead of match_grep.
   29034 	* tests/sendfile64.test: Likewise.
   29035 	* tests/time.test: Likewise.
   29036 	* tests/utime.test: Likewise.
   29037 	* tests/xet_robust_list.test: Likewise.
   29038 	* tests/sendfile.c (main): Update match patterns for match_diff.
   29039 	* tests/sendfile64.c (main): Likewise.
   29040 	* tests/time.c (main): Likewise.
   29041 	* tests/utime.c (main): Likewise.
   29042 	* tests/xet_robust_list.c (main): Likewise.
   29043 
   29044 2015-08-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   29045 
   29046 	tests: fix match_diff usage.
   29047 	The first argument of match_diff should be the file with expected
   29048 	output, the second argument - the file with actual output.
   29049 
   29050 	* tests/aio.test: Swap match_diff arguments.
   29051 	* tests/restart_syscall.test: Likewise.
   29052 	* tests/seccomp.test: Likewise.
   29053 	* tests/umovestr2.test: Likewise.
   29054 
   29055 2015-08-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   29056 
   29057 	build: fix -I options.
   29058 	* configure.ac (AM_INIT_AUTOMAKE): Add nostdinc.
   29059 	* Makefile.am (AM_CPPFLAGS): Append -I$(builddir) and -I$(srcdir).
   29060 	* tests/Makefile.am (AM_CPPFLAGS): Likewise.
   29061 
   29062 2015-08-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   29063 
   29064 	aio: rewrite from libaio.h to linux/aio_abi.h.
   29065 	* configure.ac (AC_CHECK_HEADERS): Remove libaio.h.
   29066 	* aio.c: Assume that <linux/aio_abi.h> is available,
   29067 	include it instead of <libaio.h>.
   29068 	[!IOCB_RESFD]: Remove.
   29069 	(enum iocb_sub): Remove SUB_POLL.
   29070 	(tprint_lio_opcode): Update.
   29071 	(print_common_flags): Use IOCB_FLAG_RESFD instead of IOCB_RESFD,
   29072 	rename fields of struct iocb.
   29073 	(iocb_is_valid, print_iocb_header, print_iocb): New functions.
   29074 	(sys_io_submit): Use print_iocb.
   29075 	(print_io_event): Fix struct io_event decoding.
   29076 	(sys_io_cancel): Use print_iocb_header.
   29077 	* strace.spec (BuildRequires): Remove libaio-devel.
   29078 	* tests/aio.c (main): Test IOCB_CMD_PREADV, io_cancel,
   29079 	and struct io_event decoding.
   29080 	* tests/aio.test (syscalls): Add io_cancel.
   29081 
   29082 2015-08-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   29083 
   29084 	Fix multiple personalities support in parser of io_submit syscall.
   29085 	Introduce a new helper function to fetch tracee's long integers
   29086 	and use it to fix multiple personalities support in io_submit parser.
   29087 
   29088 	* defs.h (umove_long_or_printaddr): New prototype.
   29089 	* util.c (umove_long_or_printaddr): New function.
   29090 	* aio.c (sys_io_submit): Use it to fetch tracee's pointers.
   29091 	* tests/aio.c: New file.
   29092 	* tests/aio.test: New test.
   29093 	* tests/Makefile.am (check_PROGRAMS): Add aio.
   29094 	(TESTS): Add aio.test.
   29095 	* tests/.gitignore: Add aio.
   29096 
   29097 2015-08-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   29098 
   29099 	tests: fix build on systems that lack O_CLOEXEC definition.
   29100 	* tests/epoll_create1.c (main): Check that O_CLOEXEC is defined.
   29101 	* tests/eventfd.c (main): Likewise.
   29102 	* tests/signalfd.c (main): Likewise.
   29103 
   29104 	tests: fix build on systems that lack AT_FDCWD definition.
   29105 	* tests/readlinkat.c: Stop including <fcntl.h>.
   29106 	(main): Replace AT_FDCWD with -100.
   29107 
   29108 	Fix printing of io_getevents first argument.
   29109 	* aio.c (sys_io_getevents): Print first argument using "%lu" format.
   29110 
   29111 2015-08-26  Mike Frysinger  <vapier (a] gentoo.org>
   29112 
   29113 	decode extend getsockopt/setsockopt options.
   29114 	Currently the code assumes the set of valid options between getsockopt
   29115 	and setsockopt are exactly the same and thus maintains one list.  The
   29116 	kernel unfortunately does not do this -- it allows for different opts
   29117 	between the get and set functions.  See the {g,s}et_opt{min,max} fields
   29118 	in the various netfilter subcores.
   29119 
   29120 	To support this, extend the printxval function to take multiple sets of
   29121 	xlats as varargs.  Then we add the new get/set lists, and pass them down
   29122 	in the net code when decoding things.
   29123 
   29124 	A simple example is iptables; before:
   29125 		getsockopt(4, SOL_IP, 0x40 /* IP_??? */, ...) = 0
   29126 		getsockopt(4, SOL_IP, 0x41 /* IP_??? */, ...) = 0
   29127 	after:
   29128 		getsockopt(4, SOL_IP, IPT_SO_GET_INFO, ...) = 0
   29129 		getsockopt(4, SOL_IP, IPT_SO_GET_ENTRIES, ...) = 0
   29130 
   29131 	If these were setsockopt calls, then 0x40 & 0x41 would be
   29132 	IPT_SO_SET_REPLACE & IPT_SO_SET_ADD_COUNTERS.
   29133 
   29134 	* configure.ac: Check for netfilter headers.
   29135 	* defs.h (printxvals): New prototype.
   29136 	(printxval): Change to a define.
   29137 	* net.c: Include netfilter headers and new sockopts headers.
   29138 	(print_sockopt_fd_level_name): Add a is_getsockopt argument.  Change SOL_IP
   29139 	and SOL_IPV6 decoding to use printxvals, and use is_getsockopt to pass more
   29140 	xlats down.
   29141 	(getsockopt): Call print_sockopt_fd_level_name with is_getsockopt as true.
   29142 	(setsockopt): Call print_sockopt_fd_level_name with is_getsockopt as false.
   29143 	* util.c (printxval): Rename to ...
   29144 	(printxvals): ... this.  Rewrite to be varargs based.
   29145 	* xlat/getsockipoptions.in: New xlat list.
   29146 	* xlat/getsockipv6options.in, xlat/setsockipoptions.in,
   29147 	xlat/setsockipv6options.in: Likewise.
   29148 
   29149 2015-08-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   29150 
   29151 	Fix build on systems that lack VIDIOC_CREATE_BUFS definition.
   29152 	* v4l2.c (v4l2_ioctl): Check that v4l2_ioctl is defined.
   29153 
   29154 	Fix build on systems that lack EM_ARM/EM_OPENRISC definitions.
   29155 	* xlat/audit_arch.in: Guard AUDIT_ARCH_ARM and AUDIT_ARCH_ARMEB
   29156 	with EM_ARM check.  Guard AUDIT_ARCH_OPENRISC with EM_OPENRISC check.
   29157 
   29158 2015-08-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   29159 
   29160 	Fix build on systems that lack UBI_IOCVOLCRBLK/UBI_IOCVOLRMBLK definitions
   29161 	* mtd.c (ubi_ioctl): Check that UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK
   29162 	are defined.
   29163 
   29164 	Fix build on systems that lack O_CLOEXEC definition.
   29165 	* xlat/efd_flags.in: Check that O_CLOEXEC is defined.
   29166 	* xlat/epollflags.in: Likewise.
   29167 	* xlat/sfd_flags.in: Likewise.
   29168 	* xlat/timerfdflags.in: Fix O_CLOEXEC check.
   29169 
   29170 2015-08-21  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29171 
   29172 	printsiginfo.c: fix integer conversions.
   29173 	* printsiginfo.c (printsigsource): Print si_pid and si_uid as unsigned
   29174 	integers.
   29175 	(printsigval): Print si_int as signed int.
   29176 
   29177 2015-08-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   29178 
   29179 	Fix decoding of times syscall return value.
   29180 	Always print return value of successful times syscall
   29181 	as unsigned long integer.
   29182 
   29183 	* times.c (sys_times): Return RVAL_UDECIMAL unless syserror.
   29184 
   29185 2015-08-20  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29186 
   29187 	mq.c: remove repeated code.
   29188 	* mq.c (sys_mq_open): Use printmqattr instead of implementing it again.
   29189 	[HAVE_MQUEUE_H]: Remove.
   29190 
   29191 2015-08-20  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29192 
   29193 	ipc_msg.c: fix multiple personalities support in msgrcv ipc subcall.
   29194 	When msgrcv syscall is an ipc subcall, msgp (pointer to struct msgbuf)
   29195 	and msgtyp (message type) syscall arguments are passed via proxy
   29196 	structure which definition significantly depends on tracee's
   29197 	wordsize.
   29198 
   29199 	* ipc_msg.c (fetch_msgrcv_args): New function.
   29200 	(sys_msgrcv): Use it.
   29201 
   29202 2015-08-20  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29203 
   29204 	ipc.c: split into separate files.
   29205 	In preparation for upcoming mpers-related changes,
   29206 	split ipc.c into independent groups of parsers.
   29207 
   29208 	* ipc_defs.h: New file.
   29209 	* ipc_msg.c: Likewise.
   29210 	* ipc_msgctl.c: Likewise.
   29211 	* ipc_sem.c: Likewise.
   29212 	* ipc_shm.c: Likewise.
   29213 	* ipc_shmctl.c: Likewise.
   29214 	* mq.c: Likewise.
   29215 	* print_mq_attr.c: Likewise.
   29216 	* print_msgbuf.c: Likewise.
   29217 	* ipc.c: Remove.
   29218 	(sys_mq_open, sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify,
   29219 	sys_mq_getsetattr): Move to mq.c.
   29220 	(sys_msgget, tprint_msgsnd, sys_msgsnd, tprint_msgrcv, sys_msgrcv): Move
   29221 	to ipc_msg.c.
   29222 	(sys_msgctl): Move to ipc_msgctl.c.
   29223 	(tprint_sembuf, tprint_sembuf_array, sys_semop, sys_semtimedop,
   29224 	sys_semget, syssemctl): Move to ipc_sem.c.
   29225 	(sys_shmget, sys_shmat, sys_shmdt): Move to ipc_shm.c.
   29226 	(sys_shmctl): Move to ipc_shmctl.c.
   29227 	(printmqattr): Move to print_mq_attr.c.
   29228 	(tprint_msgbuf): Move to print_msgbuf.c.
   29229 	(IPC_64, PRINTCTL): Move to ipc_defs.h.
   29230 	* defs.h (struct xlat resource_flags): New prototype.
   29231 	* Makefile.am (strace_SOURCES): Remove ipc.c.  Add ipc_defs.h, mq.c,
   29232 	ipc_msg.c, ipc_msgctl.c, ipc_sem.c, ipc_shm.c, ipc_shmctl.c,
   29233 	print_mq_attr.c, and print_msgbuf.c.
   29234 
   29235 2015-08-20  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29236 
   29237 	.gitignore: add sen.h and sys_func.h.
   29238 
   29239 2015-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   29240 
   29241 	tests: add sendfile.test and sendfile64.test.
   29242 	* tests/sendfile.c: New file.
   29243 	* tests/sendfile64.c: New file.
   29244 	* tests/sendfile.test: New test.
   29245 	* tests/sendfile64.test: New test.
   29246 	* tests/Makefile.am (check_PROGRAMS): Add sendfile and sendfile64.
   29247 	(TESTS): Add sendfile.test and sendfile64.test.
   29248 	* tests/.gitignore: Add sendfile and sendfile64.
   29249 
   29250 2015-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   29251 
   29252 	sendfile: decode file offset both on entering and exiting syscall.
   29253 	When sendfile is called with a valid pointer to a file offset variable,
   29254 	kernel updates this variable on successfull exit from syscall.
   29255 
   29256 	* sendfile.c (sys_sendfile, sys_sendfile64): Print tcp->u_arg[2]
   29257 	on exiting syscall as well as on entering.
   29258 
   29259 2015-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   29260 
   29261 	io.c: move sendfile parsers to a separate file.
   29262 	* sendfile.c: New file.
   29263 	* Makefile.am (strace_SOURCES): Add it.
   29264 	* io.c (sys_sendfile, sys_sendfile64): Move to sendfile.c
   29265 
   29266 2015-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   29267 
   29268 	Make printnum_* functions return boolean status.
   29269 	With this change, printnum_* functions return true iff they
   29270 	successfully fetched necessary data from tracee's memory.
   29271 
   29272 	* defs.h (printnum_short, printnum_int, printnum_int64,
   29273 	printnum_long_int, printpair_int, printpair_int64): Return bool.
   29274 	* util.c (DEF_PRINTNUM, DEF_PRINTPAIR, printnum_long_int): Likewise.
   29275 
   29276 2015-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   29277 
   29278 	mips: print _MIPS_SIM in configure.ac for debug purposes.
   29279 	* configure.ac [MIPS]: Print _MIPS_SIM.
   29280 
   29281 	xtensa: fix several syscall entries.
   29282 	* linux/xtensa/syscallent.h: Fix nargs in splice, tee, vmsplice,
   29283 	pselect6, ppoll, epoll_pwait, and set_robust_list syscall entries.
   29284 
   29285 	ia64: fix syscall numbers for set_robust_list, get_robust_list, and splice syscalls
   29286 	* linux/ia64/syscallent.h: Place syscall entries for set_robust_list,
   29287 	get_robust_list, and splice in correct order.
   29288 
   29289 2015-08-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   29290 
   29291 	tests: add a test for get_robust_list and set_robust_list decoding.
   29292 	* tests/xet_robust_list.c: New file.
   29293 	* tests/xet_robust_list.test: New test.
   29294 	* tests/Makefile.am (check_PROGRAMS): Add xet_robust_list.
   29295 	(TESTS): Add xet_robust_list.test.
   29296 	* tests/.gitignore: Add xet_robust_list.
   29297 
   29298 	Simplify printing of get_robust_list first argument.
   29299 	* get_robust_list.c (sys_get_robust_list): Print first argument
   29300 	using "%d" format.
   29301 
   29302 2015-08-18  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29303 
   29304 	Fix io_setup first argument printing.
   29305 	* aio.c (sys_io_setup): Print first argument using "%u" format.
   29306 
   29307 2015-08-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   29308 
   29309 	Fix printing tracee's long integers.
   29310 	Replace ambiguous printnum_long that used to fetch native long integers
   29311 	from tracee's memory with printnum_ptr, printnum_slong, and printnum_ulong
   29312 	that fetch tracee's pointer, signed long, and unsigned long integers.
   29313 
   29314 	* defs.h (printnum_long, printpair_long): Remove prototypes.
   29315 	(printnum_int64, printpair_int64): Remove macros, declare functions
   29316 	unconditionally.
   29317 	[SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (printnum_long_int):
   29318 	New prototype.
   29319 	(printnum_ptr, printnum_slong, printnum_ulong): New macros.
   29320 	* aio.c (sys_io_setup): Use printnum_ulong.
   29321 	* block.c (block_ioctl): Use printnum_slong and printnum_ulong.
   29322 	* get_robust_list.c (sys_get_robust_list): Use printnum_ptr
   29323 	and printnum_ulong.
   29324 	* io.c (print_off_t): Remove.
   29325 	(sys_sendfile): Use printnum_ulong.
   29326 	* ipc.c (sys_semctl): Use printnum_ptr.
   29327 	* prctl.c (sys_prctl): Likewise.
   29328 	* process.c (sys_ptrace): Likewise.
   29329 	* rtc.c (rtc_ioctl): Use printnum_ulong.
   29330 	* util.c (printnum_long, printpair_long): Remove.
   29331 	(printnum_int64, printpair_int64): Define unconditionally.
   29332 	[SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (printnum_long_int):
   29333 	New function.
   29334 
   29335 2015-08-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   29336 
   29337 	Fix time syscall decoding for some personalities.
   29338 	* time.c (current_time_t_is_int32): Define.
   29339 	(sys_time): Use it, printnum_int, and printnum_int64 instead
   29340 	of printnum_long.
   29341 	* tests/time.c: New file.
   29342 	* tests/time.test: New test.
   29343 	* tests/Makefile.am (check_PROGRAMS): Add time.
   29344 	(TESTS): Add time.test.
   29345 	* tests/.gitignore: Add time.
   29346 
   29347 2015-08-18  Mike Frysinger  <vapier (a] gentoo.org>
   29348 
   29349 	signal: SIGSYS: decode si_syscall & si_arch fields.
   29350 	When receiving SIGSYS, the si_syscall & si_arch fields are set to known
   29351 	values, so make sure we decode their values into the symbol settings.
   29352 	This makes stracing seccomp failures much easier.
   29353 
   29354 	* defs.h (syscall_name): New prototype.
   29355 	* printsiginfo.c: Include linux/audit.h and xlat/audit_arch.h.
   29356 	(print_si_info): Decode si_syscall & si_arch for SIGSYS.
   29357 	* syscall.c (undefined_scno_name): Delete.
   29358 	(syscall_name): New function.
   29359 	(trace_syscall_entering): Change undefined_scno_name to syscall_name.
   29360 	(trace_syscall_exiting): Likewise.
   29361 	* xlat/audit_arch.in: New file.
   29362 
   29363 2015-08-18  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29364 
   29365 	ipc.c: remove unnecesarry #ifdef IPC_64.
   29366 	* ipc.c (PRINTCTL): Remove #ifdef IPC_64 check as IPC_64 is always
   29367 	defined at this point.
   29368 
   29369 2015-08-16  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29370 
   29371 	resource.c: move times parser to a separate file.
   29372 	* times.c: New file.
   29373 	* Makefile.am (strace_SOURCES): Add it.
   29374 	* resource.c (sys_times): Move to times.c.
   29375 
   29376 2015-08-16  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29377 
   29378 	sysctl.c: remove KERN_JAVA_* defines handling.
   29379 	This has been obsoleted by binfmt_misc since Linux 2.1.43.
   29380 
   29381 	* sysctl.c (sys_sysctl): Remove KERN_JAVA_INTERPRETER
   29382 	and KERN_JAVA_APPLETVIEWER.
   29383 
   29384 2015-08-16  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29385 
   29386 	sysinfo.c: remove obsolete code.
   29387 	struct sysinfo members totalhigh, freehigh and mem_unit are present
   29388 	since Linux 2.3.48.
   29389 
   29390 	* configure.ac (AC_CHECK_MEMBERS): Remove struct sysinfo checks.
   29391 	* sysinfo.c (sys_sysinfo): Remove HAVE_STRUCT_SYSINFO_* checks.
   29392 
   29393 2015-08-15  Gleb Fotengauer-Malinovskiy  <glebfm (a] altlinux.org>
   29394 
   29395 	tests: add readlink.test and readlinkat.test.
   29396 	* tests/readlink.c: New file.
   29397 	* tests/readlink.awk: Likewise.
   29398 	* tests/readlinkat.c: Likewise.
   29399 	* tests/readlinkat.awk: Likewise.
   29400 	* tests/readlink.test: New test.
   29401 	* tests/readlinkat.test: Likewise.
   29402 	* tests/Makefile.am (check_PROGRAMS): Add readlink and readlinkat.
   29403 	(TESTS): Add readlink.test and readlinkat.test.
   29404 	(EXTRA_DIST): Add readlink.awk and readlinkat.awk.
   29405 	* tests/.gitignore: Add readlink and readlinkat.
   29406 
   29407 2015-08-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   29408 
   29409 	Print nanoseconds along with seconds in stat family syscalls.
   29410 	* configure.ac (AC_CHECK_MEMBERS): Add stat.st_atim.tv_nsec,
   29411 	stat.st_ctim.tv_nsec, stat.st_mtim.tv_nsec, stat.st_atime_nsec,
   29412 	stat.st_atime_csec, and stat.st_mtime_nsec.
   29413 	* file.c: Explicitly define HAVE_STRUCT_STAT_ST_ATIME_NSEC,
   29414 	HAVE_STRUCT_STAT_ST_CTIME_NSEC and HAVE_STRUCT_STAT_ST_MTIME_NSEC
   29415 	for locally defined types.
   29416 	* printstat.h (DO_PRINTSTAT): Print st_atime_nsec, st_ctime_nsec,
   29417 	and st_mtime_nsec members.
   29418 	* tests/stat.c [_FILE_OFFSET_BITS == 64]: Use st_atime_nsec,
   29419 	st_ctime_nsec, and st_mtime_nsec via st_atim.tv_nsec, st_ctim.tv_nsec,
   29420 	and st_mtim.tv_nsec.
   29421 	(main): Print st_atime_nsec, st_ctime_nsec, and st_mtime_nsec members.
   29422 
   29423 	This fixes Fedora bug #1251176.
   29424 
   29425 2015-08-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   29426 
   29427 	signalfd4: fix flags decoding.
   29428 	* configure.ac (AC_CHECK_FUNCS): Add eventfd.
   29429 	(AC_CHECK_HEADERS): Add sys/signalfd.h.
   29430 	* signalfd.c: Include <fcntl.h>.
   29431 	[HAVE_SYS_SIGNALFD_H] Include <sys/signalfd.h>.
   29432 	Include "xlat/sfd_flags.h".
   29433 	(do_signalfd): Use sfd_flags for flags decoding.
   29434 	* xlat/sfd_flags.in: New file.
   29435 	* tests/signalfd.c: Likewise.
   29436 	* tests/signalfd.expected: Likewise.
   29437 	* tests/signalfd.test: New test.
   29438 	* tests/Makefile.am (check_PROGRAMS): Add signalfd.
   29439 	(TESTS): Add signalfd.test.
   29440 	(EXTRA_DIST): Add signalfd.expected.
   29441 	* tests/.gitignore: Add signalfd.
   29442 
   29443 	signalfd, signalfd4: mark return code with RVAL_FD flag.
   29444 	* signalfd.c (do_signalfd): Set RVAL_FD flag in the return code.
   29445 
   29446 	signal.c: move signalfd parsers to a separate file.
   29447 	* signalfd.c: New file.
   29448 	* Makefile.am (strace_SOURCES): Add it.
   29449 	* signal.c (do_signalfd, sys_signalfd, sys_signalfd4): Move to signalfd.c
   29450 
   29451 	perf_event_open: mark return code with RVAL_FD flag.
   29452 	* perf.c (sys_perf_event_open): Set RVAL_FD flag in the return code.
   29453 
   29454 	pipe, pipe2, socketpair: print returned descriptors using printfd.
   29455 	* net.c (printpair_fd, decode_pair_fd): New functions.
   29456 	(do_pipe, sys_socketpair): Use them.
   29457 
   29458 	socket: mark return code with RVAL_FD flag.
   29459 	* net.c (sys_socket): Set RVAL_FD flag in the return code.
   29460 	* tests/net-yy-accept.awk: Update socket and bind regexps.
   29461 	* tests/unix-yy-accept.awk: Likewise.
   29462 	* tests/net-yy-connect.awk: Update socket and connect regexps.
   29463 	* tests/unix-yy-connect.awk: Likewise.
   29464 
   29465 	timerfd, timerfd_create: mark return code with RVAL_FD flag.
   29466 	* time.c (sys_timerfd, sys_timerfd_create): Set RVAL_FD flag
   29467 	in the return code.
   29468 
   29469 2015-08-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   29470 
   29471 	inotify_init1: mark return code with RVAL_FD flag.
   29472 	* inotify.c (sys_inotify_init1): Set RVAL_FD flag in the return code.
   29473 
   29474 	fanotify_init: mark return code with RVAL_FD flag.
   29475 	* fanotify.c (sys_fanotify_init): Set RVAL_FD flag in the return code.
   29476 
   29477 	Fix epoll_create syscall decoding.
   29478 	* epoll.c (sys_epoll_create): New function.
   29479 	* linux/dummy.h (sys_epoll_create): Remove.
   29480 
   29481 	epoll_create1: mark return code with RVAL_FD flag.
   29482 	* epoll.c (sys_epoll_create1): Set RVAL_FD flag in the return code.
   29483 
   29484 	epoll_create1: fix pathtrace support.
   29485 	* pathtrace.c (pathtrace_match): Add SEN_epoll_create1.
   29486 
   29487 	epoll_create1: fix flags decoding.
   29488 	* xlat/epollflags.in: Remove EPOLL_NONBLOCK, provide fallback definition
   29489 	for EPOLL_CLOEXEC.
   29490 	* tests/epoll_create1.c: New file.
   29491 	* tests/epoll_create1.expected: Likewise.
   29492 	* tests/epoll_create1.test: New test.
   29493 	* tests/Makefile.am (check_PROGRAMS): Add epoll_create1.
   29494 	(TESTS): Add epoll_create1.test.
   29495 	(EXTRA_DIST): Add epoll_create1.expected.
   29496 	* tests/.gitignore: Add epoll_create1.
   29497 
   29498 2015-08-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   29499 
   29500 	desc.c: move epoll parsers to a separate file.
   29501 	* epoll.c: New file.
   29502 	* Makefile.am (strace_SOURCES): Add it.
   29503 	* desc.c (sys_epoll_create1, print_epoll_event, sys_epoll_ctl,
   29504 	print_epoll_event_array, epoll_wait_common, epoll_wait, epoll_pwait):
   29505 	Move to epoll.c.
   29506 
   29507 	eventfd2: fix flags decoding.
   29508 	* configure.ac (AC_CHECK_HEADERS): Add sys/eventfd.h.
   29509 	* eventfd.c: Include <fcntl.h>.
   29510 	[HAVE_SYS_EVENTFD_H] Include <sys/eventfd.h>.
   29511 	Include "xlat/efd_flags.h".
   29512 	(do_eventfd): Use efd_flags for flags decoding.
   29513 	* xlat/efd_flags.in: New file.
   29514 	* tests/eventfd.c: New file.
   29515 	* tests/eventfd.expected: Likewise.
   29516 	* tests/eventfd.test: New test.
   29517 	* tests/Makefile.am (check_PROGRAMS): Add eventfd.
   29518 	(TESTS): Add eventfd.test.
   29519 	(EXTRA_DIST): Add eventfd.expected.
   29520 	* tests/.gitignore: Add eventfd.
   29521 
   29522 	eventfd: print first argument as unsigned int.
   29523 	* eventfd.c (do_eventfd): Explicitly cast initial value to unsigned int.
   29524 
   29525 	Mark eventfd return code with RVAL_FD flag.
   29526 	* eventfd.c (do_eventfd): Set RVAL_FD flag in the return code.
   29527 
   29528 	desc.c: move eventfd parsers to a separate file.
   29529 	* eventfd.c: New file.
   29530 	* Makefile.am (strace_SOURCES): Add it.
   29531 	* desc.c (do_eventfd, sys_eventfd, sys_eventfd2): Move to eventfd.c.
   29532 
   29533 	Update PERF_FLAG_* constants.
   29534 	* xlat/perf_event_open_flags.in: Add PERF_FLAG_FD_CLOEXEC,
   29535 	provide fallback definitions.
   29536 
   29537 	desc.c: move perf_event_open parser to a separate file.
   29538 	* perf.c: New file.
   29539 	* Makefile.am (strace_SOURCES): Add it.
   29540 	* desc.c (sys_perf_event_open): Move to perf.c.
   29541 
   29542 2015-08-01  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29543 
   29544 	time.c: remove obsolete code from adjtimex parser.
   29545 	Linux versions 1.3.28 and below are not supported.
   29546 
   29547 	* time.c (tprint_timex) [LINUX_VERSION_CODE < 66332]: Remove.
   29548 
   29549 2015-08-01  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29550 
   29551 	ipc.c: move fallback definitions of msg, sem, and shm constants to xlat/
   29552 	* ipc.c: Move MSG_STAT and MSG_INFO definitions to xlat/msgctl_flags.in.
   29553 	Move SHM_STAT and SHM_INFO definitions to xlat/shmctl_flags.in.
   29554 	Move SEM_STAT and SEM_INFO definitions to xlat/semctl_flags.in.
   29555 
   29556 2015-08-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   29557 
   29558 	tests/ppoll: replace SIGABRT with SIGHUP.
   29559 	Use SIGHUP instead of SIGABRT, the number of the former
   29560 	is more portable across architectures.
   29561 
   29562 	* tests/ppoll.c (test2): Replace SIGABRT with SIGHUP.
   29563 	* tests/ppoll.expected: Update regexp.
   29564 	* tests/ppoll-v.expected: Likewise.
   29565 
   29566 2015-08-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   29567 
   29568 	decode_poll_exiting: reserve more space in output buffer.
   29569 	* poll.c (decode_poll_exiting): Reserve more space in output buffer.
   29570 
   29571 2015-07-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   29572 
   29573 	Cleanup poll/ppoll decoders.
   29574 	* poll.c (decode_poll): Split into print_pollfd, decode_poll_entering,
   29575 	and decode_poll_exiting.
   29576 	(sys_poll, sys_ppoll): Update callers.
   29577 	* tests/ppoll.c: New file.
   29578 	* tests/ppoll.expected: Likewise.
   29579 	* tests/ppoll-v.expected: Likewise.
   29580 	* tests/ppoll.test: New test.
   29581 	* tests/Makefile.am (check_PROGRAMS): Add ppoll.
   29582 	(TESTS): Add ppoll.test.
   29583 	(EXTRA_DIST): Add ppoll.expected and ppoll-v.expected.
   29584 	* tests/.gitignore: Add ppoll.
   29585 
   29586 	poll: print timeout argument as int.
   29587 	* poll.c (sys_poll): Explicitly cast timeout argument to int.
   29588 
   29589 	stream.c: move poll and ppoll parsers to a separate file.
   29590 	* poll.c: New file.
   29591 	* Makefile.am (strace_SOURCES): Add it.
   29592 	* stream.c (decode_poll, sys_poll, sys_ppoll): Move to poll.c.
   29593 
   29594 	Assume that <poll.h> is available.
   29595 	* configure.ac (AC_CHECK_HEADERS): Remove poll.h and sys/poll.h.
   29596 	* pathtrace.c: Include <poll.h> unconditionally.
   29597 	* stream.c: Likewise.
   29598 	[HAVE_SYS_POLL_H]: Compile unconditionally.
   29599 	[!HAVE_SYS_POLL_H]: Remove.
   29600 
   29601 	tests: add oldselect.test.
   29602 	* tests/oldselect.c: New file.
   29603 	* tests/oldselect.expected: Likewise.
   29604 	* tests/oldselect.test: New test.
   29605 	* tests/Makefile.am (check_PROGRAMS): Add oldselect.
   29606 	(TESTS): Add oldselect.test.
   29607 	(EXTRA_DIST): Add oldselect.expected.
   29608 	* tests/.gitignore: Add oldselect.
   29609 
   29610 2015-07-30  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   29611 
   29612 	Fix oldselect decoding on 64-bit architectures.
   29613 	As struct sel_arg_struct is an array of 32-bit values,
   29614 	fetch it using an intermediate array on 64-bit architectures.
   29615 
   29616 	* desc.c (sys_oldselect): Rename args to long_args.
   29617 	[SIZEOF_LONG == 4] Alias oldselect_args to long_args.
   29618 	[SIZEOF_LONG != 4] Introduce oldselect_args to fetch oldselect args.
   29619 	* linux/sh64/syscallent.h (oldselect): Remove.
   29620 
   29621 2015-07-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   29622 
   29623 	net.c: use printaddr.
   29624 	* net.c (printsock, sys_recvfrom): Use printaddr.
   29625 
   29626 2015-07-30  Denys Vlasenko  <dvlasenk (a] redhat.com>
   29627 
   29628 	net.c: recvfrom fixes.
   29629 	This change fixes these three problems (before/after is shown):
   29630 
   29631 	On interrupted syscall, flags are not decoded:
   29632 
   29633 	    -recvfrom(3, 0x7fff0a41e306, 10, 2, 0, 0) = ? ERESTARTSYS
   29634 	    +recvfrom(3, 0x7fff0a41e306, 10, MSG_PEEK, 0, 0) = ? ERESTARTSYS
   29635 
   29636 	If peer address is unavalable (example: anon sockets from socketpair()),
   29637 	kernel returns socklen of 0, but we ignore that and show bogus sockaddr data:
   29638 
   29639 	    -recvfrom(3, "123456789\0", 10, MSG_PEEK, {sa_family=0x7777 /* AF_??? */, sa_data="wwwwwwwwwwwwww"}, [0]) = 10
   29640 	    +recvfrom(3, "123456789\0", 10, MSG_PEEK, 0x7ffde6edf760, [0]) = 10
   29641 
   29642 	SYS_FUNC(recvfrom) passes address of fromlen, not fromlen, to printsock():
   29643 
   29644 	    -               printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
   29645 	    +               printsock(tcp, tcp->u_arg[4], fromlen);
   29646 
   29647 2015-07-29  Elliott Hughes  <enh (a] google.com>
   29648 
   29649 	prctl: decode Android-specific PR_SET_VMA.
   29650 	Android kernels have a prctl to name VMAs.
   29651 
   29652 	* prctl.c (sys_prctl) [__ANDROID__]: Decode PR_SET_VMA.
   29653 
   29654 2015-07-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   29655 
   29656 	mips: fix stub files.
   29657 	This complements commit 140ecf876686d49085c6eb3a2306e2ea6ea641bc.
   29658 
   29659 	* linux/mips/genstub.sh: Output SEN(printargs) instead of printargs.
   29660 
   29661 	Reported-by: Elliott Hughes <enh (a] google.com>
   29662 
   29663 2015-07-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   29664 
   29665 	tests/bpf: fix build with incompatibly old linux/bpf.h and/or gcc.
   29666 	* configure.ac: Check how union bpf_attr.log_buf initialization works.
   29667 	* tests/bpf.c: Check for HAVE_UNION_BPF_ATTR_LOG_BUF.
   29668 
   29669 	Implement sched_getattr and sched_setattr syscalls decoding.
   29670 	* xlat/sched_flags.in: New file.
   29671 	* sched.c: Include "xlat/sched_flags.h".
   29672 	(print_sched_attr, sys_sched_setattr, sys_sched_getattr): New functions.
   29673 	* linux/dummy.h (sys_sched_getattr, sys_sched_setattr): Remove.
   29674 	* tests/sched_xetattr.c: New file.
   29675 	* tests/sched_xetattr.test: New test.
   29676 	* tests/Makefile.am (check_PROGRAMS): Add sched_xetattr.
   29677 	(TESTS): Add sched_xetattr.test.
   29678 	* tests/.gitignore: Add sched_xetattr.
   29679 
   29680 	Implement memfd_create syscall decoding.
   29681 	* memfd_create.c: New file.
   29682 	* Makefile.am (strace_SOURCES): Add it.
   29683 	* linux/dummy.h (sys_memfd_create): Remove.
   29684 	* pathtrace.c (pathtrace_match): Add SEN_memfd_create.
   29685 	* xlat/memfd_create_flags.in: New file.
   29686 	* tests/memfd_create.c: New file.
   29687 	* tests/memfd_create.expected: Likewise.
   29688 	* tests/memfd_create.test: New test.
   29689 	* tests/Makefile.am: (check_PROGRAMS): Add memfd_create.
   29690 	(TESTS): Add memfd_create.test.
   29691 	(EXTRA_DIST): Add memfd_create.expected.
   29692 	* tests/.gitignore: Add memfd_create.
   29693 
   29694 2015-07-28  Elliott Hughes  <enh (a] google.com>
   29695 
   29696 	Fix builds where HAVE_MQUEUE_H isn't defined.
   29697 	Android doesn't have <mqueue.h>.
   29698 
   29699 	* ipc.c (sys_mq_open) [!HAVE_MQUEUE_H]: Fix printaddr invocation.
   29700 
   29701 2015-07-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   29702 
   29703 	tests/restart_syscall: skip if nanosleep looks uninterrupted.
   29704 	* tests/restart_syscall.test: Skip if restart_syscall is not detected
   29705 	and nanosleep syscall looks uninterrupted.
   29706 
   29707 	Implement execveat syscall decoding.
   29708 	* execve.c (decode_execve): New function.
   29709 	(sys_execve): Use it.
   29710 	(sys_execveat): New function.
   29711 	* linux/dummy.h (sys_execveat): Remove.
   29712 	* tests/execveat.c: New file.
   29713 	* tests/execveat.expected: Likewise.
   29714 	* tests/execveat-v.expected: Likewise.
   29715 	* tests/execveat.test: New test.
   29716 	* tests/Makefile.am (check_PROGRAMS): Add execveat.
   29717 	(TESTS): Add execveat.test.
   29718 	(EXTRA_DIST): Add execveat.expected and execveat-v.expected.
   29719 	* tests/.gitignore: Add execveat.
   29720 
   29721 	execve: fix support of personalities with different word size.
   29722 	* execve.c (printargc): Do not assume that host and target pointers have
   29723 	the same size.
   29724 	* tests/execve.c: New file.
   29725 	* tests/execve.expected: Likewise.
   29726 	* tests/execve-v.expected: Likewise.
   29727 	* tests/execve.test: New test.
   29728 	* tests/Makefile.am (check_PROGRAMS): Add execve.
   29729 	(TESTS): Add execve.test.
   29730 	(EXTRA_DIST): Add execve.expected and execve-v.expected.
   29731 	* tests/.gitignore: Add execve.
   29732 
   29733 	Implement bpf syscall decoding.
   29734 	* bpf.c: New file.
   29735 	* Makefile.am (strace_SOURCES): Add it.
   29736 	* configure.ac (AC_CHECK_HEADERS): Add linux/bpf.h.
   29737 	* linux/dummy.h (sys_bpf): Remove.
   29738 	* pathtrace.c (pathtrace_match): Add SEN_bpf.
   29739 	* xlat/bpf_commands.in: New file.
   29740 	* xlat/bpf_map_types.in: New file.
   29741 	* xlat/bpf_map_update_elem_flags.in: New file.
   29742 	* xlat/bpf_prog_types.in: New file.
   29743 	* tests/bpf.c: New file.
   29744 	* tests/bpf.test: New test.
   29745 	* tests/Makefile.am (check_PROGRAMS): Add bpf.
   29746 	(TESTS): Add bpf.test.
   29747 	* tests/.gitignore: Add bpf.
   29748 
   29749 2015-07-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   29750 
   29751 	prctl: fix decoding of unrecognized commands.
   29752 	The use of printargs introduced by commit v4.10-179-g210a6b6 is wrong:
   29753 	when the first argument is already printed, printargs cannot be called.
   29754 
   29755 	* prctl.c (print_prctl_args): New function.
   29756 	(sys_prctl): Use it.
   29757 
   29758 2015-07-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   29759 
   29760 	Macroize -m32/-mx32 configure checks.
   29761 	Prepare for additional configure checks that would be needed
   29762 	for new multiple personalities support.
   29763 
   29764 	* m4/mpers.m4: New file.
   29765 	* configure.ac: Use it.
   29766 
   29767 2015-07-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   29768 
   29769 	tests/uid: import uid overflow check from tests/uid16.
   29770 	* tests/uid.c (main): Skip if the uid returned by getuid matches
   29771 	/proc/sys/kernel/overflowuid.
   29772 
   29773 2015-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   29774 
   29775 	sh64: fix inotify_{add,rm}_watch syscall entries.
   29776 	* linux/sh64/syscallent.h (inotify_add_watch, inotify_rm_watch):
   29777 	Set sys_func.
   29778 
   29779 	microblaze: fix several syscall entries.
   29780 	* linux/microblaze/syscallent.h (signalfd4, eventfd2, epoll_create1,
   29781 	dup3, pipe2, inotify_init1, recvmmsg): Set sys_func.
   29782 
   29783 	hppa: fix several syscall entries.
   29784 	* linux/hppa/syscallent.h (remap_file_pages, mq_open, mq_unlink,
   29785 	mq_timedsend, mq_timedreceive, mq_notify, mq_getsetattr,
   29786 	clock_nanosleep, signalfd, timerfd): Set sys_func.
   29787 
   29788 	ia64: fix getpagesize syscall entry.
   29789 	* linux/ia64/syscallent.h (getpagesize): Fux nargs.
   29790 
   29791 	avr32: fix fstatat64 syscall entry.
   29792 	* linux/avr32/syscallent.h (fstatat64): Set sys_func.
   29793 
   29794 	alpha: fix 2 dummy osf syscall entries.
   29795 	* linux/alpha/syscallent.h (osf_set_program_attributes): Fix nargs.
   29796 	(osf_sigstack): Fix nargs and sys_name.
   29797 
   29798 	alpha, arm, ia64, mips, sh64: fix semop syscall entries.
   29799 	* linux/alpha/syscallent.h (semop): Fix nargs, set sys_func.
   29800 	* linux/ia64/syscallent.h (semop): Set sys_func.
   29801 	* linux/mips/syscallent-n32.h (semop): Likewise.
   29802 	* linux/mips/syscallent-n64.h (semop): Likewise.
   29803 	* linux/arm/syscallent.h (semop): Fix nargs.
   29804 	* linux/sh64/syscallent.h (semop): Likewise.
   29805 
   29806 	m68k: fix getpagesize decoding.
   29807 	* linux/m68k/syscallent.h (getpagesize): Set sys_func.
   29808 	* mem.c [M68K] (sys_getpagesize): Define.
   29809 
   29810 	tests/ip_mreq: skip if basic setsockopt operations fail.
   29811 	* tests/ip_mreq.c (main): Return 77 if basic
   29812 	IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP options cannot be set.
   29813 
   29814 2015-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   29815 
   29816 	tests: use -lpthread instead of -pthread.
   29817 	On some obscure systems, -lpthread is more likely to work than -pthread.
   29818 
   29819 	* tests/Makefile.am (filter_unavailable_LDFLAGS): Rename to
   29820 	filter_unavailable_LDADD and change to -lpthread.
   29821 
   29822 2015-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   29823 
   29824 	mips o32: fix utimensat syscall entry.
   29825 	* linux/mips/syscallent-o32.h (utimensat): set sys_flags and sys_func.
   29826 
   29827 2015-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   29828 
   29829 	linux/mips/syscallent-compat.h: use designated initializers.
   29830 	Change linux/mips/syscallent-compat.h to use designated initializers
   29831 	like normal syscallent.h files.
   29832 
   29833 	* linux/mips/syscallent-compat.h: Use designated initializers.
   29834 
   29835 2015-07-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   29836 
   29837 	linux/mips/syscallent-compat.h: fix initalization of empty entries.
   29838 	This complements commit 140ecf876686d49085c6eb3a2306e2ea6ea641bc.
   29839 
   29840 	* linux/mips/syscallent-compat.h: Fix initalization of empty entries.
   29841 
   29842 2015-07-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   29843 
   29844 	Remove unused parsers of getmsg and putmsg.
   29845 	* stream.c [SPARC || SPARC64] (sys_putmsg, sys_getmsg): Remove.
   29846 	Stop including "xlat/msgflags.h".
   29847 	* xlat/msgflags.in: Remove.
   29848 
   29849 	sigreturn: make use of RVAL_DECODED.
   29850 	* sigreturn.c (arch_sigreturn): New function.
   29851 	(sys_sigreturn): Use it.  Return RVAL_DECODED.
   29852 	* linux/alpha/arch_sigreturn.c: Update.
   29853 	* linux/crisv10/arch_sigreturn.c: Likewise.
   29854 	* linux/m68k/arch_sigreturn.c: Likewise.
   29855 	* linux/microblaze/arch_sigreturn.c: Likewise.
   29856 	* linux/x86_64/arch_sigreturn.c: Likewise.
   29857 
   29858 	or1k_atomic.c: make use of RVAL_DECODED.
   29859 	* or1k_atomic.c (sys_or1k_atomic): Update for RVAL_DECODED.
   29860 
   29861 	Update openat parser for the RVAL_DECODED change.
   29862 	* open.c (sys_openat): Update for RVAL_DECODED.
   29863 
   29864 	bjm.c: make use of RVAL_DECODED.
   29865 	* bjm.c (sys_create_module, sys_delete_module, sys_init_module,
   29866 	sys_finit_module): Update for RVAL_DECODED.
   29867 
   29868 	access.c: make use of RVAL_DECODED.
   29869 	* access.c (decode_access, sys_faccessat): Update for RVAL_DECODED.
   29870 
   29871 	affinity.c: make use of RVAL_DECODED.
   29872 	* affinity.c (sys_sched_setaffinity): Update for RVAL_DECODED.
   29873 
   29874 	affinity.c: use printaddr and umove_or_printaddr.
   29875 	* affinity.c (print_affinitylist): Use printaddr and umove_or_printaddr.
   29876 	(sys_sched_getaffinity): Remove redundant u_rval check.
   29877 
   29878 	aio.c: enhance io_* syscalls decoding.
   29879 	* aio.c (sys_io_setup): Use printnum_int64 and printnum_long.
   29880 	(sys_io_destroy, sys_io_submit): Update for RVAL_DECODED.
   29881 	(sys_io_submit): Use umove_or_printaddr and printaddr.
   29882 	Enclose iocb array in square brackets.
   29883 	Change to traditional structure output format.
   29884 	(print_io_event): New function.
   29885 	(sys_io_cancel, sys_io_getevents): Use it.
   29886 	(sys_io_cancel): Use umove_or_printaddr and printaddr.
   29887 	(sys_io_getevents): Use printaddr.
   29888 
   29889 	cacheflush.c: make use of RVAL_DECODED.
   29890 	* cacheflush.c (sys_cacheflush): Update for RVAL_DECODED.
   29891 
   29892 	cacheflush.c: use printaddr.
   29893 	* cacheflush.c (sys_cacheflush): Use printaddr.
   29894 
   29895 	capability.c: make use of RVAL_DECODED.
   29896 	* capability.c (sys_capset): Update for RVAL_DECODED.
   29897 
   29898 	capability.c: use printaddr and umove_or_printaddr.
   29899 	* capability.c (get_cap_header): Use printaddr.
   29900 	(print_cap_data): Use printaddr and umove_or_printaddr.
   29901 
   29902 	chdir.c: make use of RVAL_DECODED.
   29903 	* chdir.c (sys_chdir): Update for RVAL_DECODED.
   29904 
   29905 	chmod.c: make use of RVAL_DECODED.
   29906 	* chmod.c (decode_chmod): Change to return void.
   29907 	(sys_chmod, sys_fchmodat): Update callers.  Update for RVAL_DECODED.
   29908 	(sys_fchmod): Update for RVAL_DECODED.
   29909 
   29910 	clone.c: make use of RVAL_DECODED.
   29911 	* clone.c (sys_setns, sys_unshare, sys_fork): Update for RVAL_DECODED.
   29912 
   29913 	Alias sys_epoll_create to printargs_ld.
   29914 	* desc.c (sys_epoll_create): Remove.
   29915 	* linux/dummy.h (sys_epoll_create): Alias to printargs_ld.
   29916 
   29917 	desc.c: make use of RVAL_DECODED.
   29918 	* desc.c (sys_flock, sys_close, sys_dup, do_dup2, sys_epoll_create1,
   29919 	sys_epoll_ctl, do_eventfd, sys_perf_event_open): Update
   29920 	for RVAL_DECODED.
   29921 
   29922 	desc.c: do not use xmalloc, use umove_or_printaddr and printaddr.
   29923 	* desc.c (printflock64, printflock): Use umove_or_printaddr.
   29924 	(decode_select): Do not use xmalloc.  Use umoven_or_printaddr
   29925 	and printaddr.
   29926 	(sys_oldselect): Use printaddr.
   29927 	(sys_epoll_ctl): Use umoven_or_printaddr and printaddr.
   29928 	(print_epoll_event_array): New function.
   29929 	(sys_epoll_wait_common): Use it.
   29930 	(sys_pselect6): Use umove_or_printaddr.
   29931 	(sys_eventfd2): Use printaddr.
   29932 
   29933 	xlat/epollctls.in: add default values.
   29934 	* xlat/epollctls.in (EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD): Add
   29935 	default values.
   29936 
   29937 	dirent.c: do not use xmalloc.
   29938 	* dirent.c (print_old_dirent): Use umove_or_printaddr.
   29939 	(sys_readdir): Use printaddr.
   29940 	(sys_getdents, sys_getdents64): Do not use xmalloc for dirents,
   29941 	treat malloc failure the same way as umoven failure.  Use printaddr.
   29942 
   29943 	execve.c: make use of RVAL_DECODED.
   29944 	* execve.c (sys_execve, sys_execv): Update for RVAL_DECODED.
   29945 
   29946 	execve.c: use printaddr and umove_or_printaddr.
   29947 	* execve.c (printargv): Use umoven_or_printaddr.
   29948 	(sys_execve, sys_execv): Use printaddr.
   29949 
   29950 	fadvise.c: make use of RVAL_DECODED.
   29951 	* fadvise.c (sys_fadvise64, sys_fadvise64_64): Update for RVAL_DECODED.
   29952 
   29953 	fallocate.c: make use of RVAL_DECODED.
   29954 	* fallocate.c (sys_fallocate): Update for RVAL_DECODED.
   29955 
   29956 	fanotify.c: make use of RVAL_DECODED.
   29957 	* fanotify.c (sys_fanotify_init, sys_fanotify_mark): Update
   29958 	for RVAL_DECODED.
   29959 
   29960 	fchownat.c: make use of RVAL_DECODED.
   29961 	* fchownat.c (sys_fchownat): Update for RVAL_DECODED.
   29962 
   29963 	file.c: use umove_or_printaddr.
   29964 	* file.c (printstat32, printstatsol): Remove.
   29965 	(printstat, printstat64, printoldstat): Use umove_or_printaddr.
   29966 
   29967 	futex.c: enhance futex syscall decoding.
   29968 	* futex.c (sys_futex): Use switch statement.  Use printaddr.
   29969 	Print uint32_t syscall arguments using %u format.
   29970 	Update for RVAL_DECODED.
   29971 
   29972 	get_robust_list.c: use printnum_long.
   29973 	* get_robust_list.c (sys_get_robust_list): Use printnum_long.
   29974 
   29975 	getcpu.c: use printnum_int and printaddr.
   29976 	* getcpu.c (sys_getcpu): Use printnum_int and printaddr.
   29977 
   29978 	getcwd.c: use printaddr.
   29979 	* getcwd.c (sys_getcwd): Use printaddr.
   29980 
   29981 	getrandom.c: use printaddr.
   29982 	* getrandom.c (sys_getrandom): Use printaddr.
   29983 
   29984 	hostname.c: make use of RVAL_DECODED.
   29985 	* hostname.c (sys_sethostname): Update for RVAL_DECODED.
   29986 
   29987 	hostname.c: use printaddr.
   29988 	* hostname.c (sys_gethostname): Use printaddr.
   29989 
   29990 	inotify.c: make use of RVAL_DECODED.
   29991 	* inotify.c (sys_inotify_add_watch, sys_inotify_rm_watch,
   29992 	sys_inotify_init1): Update for RVAL_DECODED.
   29993 
   29994 	io.c: make use of RVAL_DECODED.
   29995 	* io.c (sys_write, sys_writev, sys_pwrite, sys_pwritev, sys_sendfile,
   29996 	sys_sendfile64, sys_tee, sys_splice, sys_vmsplice): Update
   29997 	for RVAL_DECODED.
   29998 
   29999 	Use printnum_int64 instead of print_loff_t.
   30000 	* defs.h (print_loff_t): Remove.
   30001 	* io.c (print_loff_t): Remove.
   30002 	(sys_sendfile64, sys_splice): Use printnum_int64 instead of print_loff_t.
   30003 	* mtd.c (mtd_ioctl): Likewise.
   30004 
   30005 	io.c: use printaddr and umove_or_printaddr.
   30006 	* io.c (sys_read, sys_pread): Use printaddr.
   30007 	(tprint_iov_upto): Do not fetch data in case of syserror.
   30008 	Use printaddr.
   30009 	(sys_readv, sys_preadv): Remove redundant check for syserror.
   30010 	(print_off_t): Use printnum_int and printnum_long.
   30011 	(print_loff_t): Use umove_or_printaddr.
   30012 
   30013 	ioprio.c: make use of RVAL_DECODED.
   30014 	* ioprio.c (sys_ioprio_set): Update for RVAL_DECODED.
   30015 
   30016 	ipc.c: use printaddr and umove_or_printaddr.
   30017 	* ipc.c (sys_msgctl): Use printaddr.
   30018 	(tprint_msgbuf): New function.
   30019 	(tprint_msgsnd, tprint_msgrcv): Use it.
   30020 	(sys_msgrcv): Use umove_or_printaddr.
   30021 	(tprint_sembuf): Rename to tprint_sembuf_array.
   30022 	(tprint_sembuf): New function.
   30023 	(tprint_sembuf_array): Use it.
   30024 	(sys_semop, sys_semtimedop): Update callers.
   30025 	(sys_shmctl, sys_shmat, sys_shmdt): Use printaddr.
   30026 	(sys_mq_open, printmqattr): Use printaddr and umove_or_printaddr.
   30027 	* tests/ipc_msg.c (main): Update msgctl IPC_RMID regexp.
   30028 	* tests/ipc_shm.c (main): Update shmctl IPC_RMID regexp.
   30029 
   30030 	kexec.c: use printaddr and umove_or_printaddr.
   30031 	* kexec.c (print_seg): New function.
   30032 	(print_kexec_segments): Use it.  Use printaddr and umove_or_printaddr.
   30033 	(kexec_load): Use printaddr.  Update for RVAL_DECODED.
   30034 
   30035 	keyctl.c: make use of RVAL_DECODED.
   30036 	* keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED.
   30037 	(keyctl_join_session_keyring, keyctl_handle_key,
   30038 	keyctl_set_reqkey_keyring): Remove.
   30039 	(keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key,
   30040 	keyctl_read_key, keyctl_keyring_search, keyctl_chown_key,
   30041 	keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key,
   30042 	keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent,
   30043 	keyctl_setperm_key): Change to return void.
   30044 	Update for RVAL_DECODED.
   30045 	(sys_keyctl): Update callers.  Update for RVAL_DECODED.
   30046 
   30047 	keyctl.c: use printaddr.
   30048 	* keyctl.c (keyctl_read_key): Use printaddr.
   30049 
   30050 	ldt.c: make use of RVAL_DECODED.
   30051 	* ldt.c (sys_modify_ldt, sys_set_thread_area, sys_get_thread_area):
   30052 	Update for RVAL_DECODED.
   30053 
   30054 	ldt.c: use printaddr and umove_or_printaddr.
   30055 	* ldt.c [I386 || X86_64 || X32] (print_user_desc):
   30056 	Use umove_or_printaddr.
   30057 	[I386 || X86_64 || X32] (sys_modify_ldt): Use printaddr.
   30058 	[(M68K || MIPS] (set_thread_area): Likewise.
   30059 	[I386 || X86_64 || X32] (set_thread_area): Do not fetch data
   30060 	if !verbose.
   30061 	[I386 || X86_64 || X32] (get_thread_area): Remove redundant check
   30062 	for syserror.
   30063 
   30064 	link.c: make use of RVAL_DECODED.
   30065 	* link.c (sys_link, sys_linkat, sys_unlinkat, sys_symlinkat): Update
   30066 	for RVAL_DECODED.
   30067 
   30068 	lseek.c: make use of RVAL_DECODED.
   30069 	* lseek.c (sys_lseek): Update for RVAL_DECODED.
   30070 
   30071 	lseek.c: use printnum_int64.
   30072 	* lseek.c (sys_llseek): Use printnum_int64.
   30073 
   30074 	mem.c: make use of RVAL_DECODED.
   30075 	* mem.c (print_mmap): Change to return void.
   30076 	Update for RVAL_DECODED.
   30077 	(sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff,
   30078 	sys_mmap_4koff): Update callers.  Update for RVAL_DECODED.
   30079 	(sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise,
   30080 	sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind,
   30081 	sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot):
   30082 	Update for RVAL_DECODED.
   30083 
   30084 	mem.c: use printaddr and umove_or_printaddr.
   30085 	* mem.c (sys_brk, print_mmap, sys_munmap, sys_mprotect, sys_mremap,
   30086 	sys_madvise, sys_msync, sys_mincore, sys_remap_file_pages, get_nodes,
   30087 	sys_mbind, [POWERPC] sys_subpage_prot): Use printaddr.
   30088 	(sys_get_mempolicy): Use printaddr and umove_or_printaddr.
   30089 
   30090 	mknod.c: make use of RVAL_DECODED.
   30091 	* mknod.c (decode_mknod): Change to return void.
   30092 	Update for RVAL_DECODED.
   30093 	(sys_mknod, sys_mknodat): Update callers.  Update for RVAL_DECODED.
   30094 	[SPARC || SPARC64] (xmknod): Update for RVAL_DECODED.
   30095 
   30096 	mount.c: make use of RVAL_DECODED.
   30097 	* mount.c (sys_mount): Update for RVAL_DECODED.
   30098 
   30099 	mount.c: use printaddr.
   30100 	* mount.c (sys_mount): Use printaddr.
   30101 
   30102 	Alias sys_connect to sys_bind.
   30103 	* linux/dummy.h (sys_connect): Alias to sys_bind.
   30104 	* net.c (sys_connect): Remove.
   30105 
   30106 	net.c: make use of RVAL_DECODED.
   30107 	* net.c (sys_socket, sys_bind, sys_listen, sys_send, sys_sendto,
   30108 	sys_sendmsg, sys_shutdown, sys_setsockopt): Update for RVAL_DECODED.
   30109 
   30110 	net.c: use printaddr and umove_or_printaddr.
   30111 	* net.c (printsock): Use printaddr and umove_or_printaddr.
   30112 	(printcmsghdr, printmsghdr, printmmsghdr, decode_mmsg, do_sockname,
   30113 	sys_recv, sys_recvfrom, sys_recvmsg, do_pipe, print_linger, print_ucred,
   30114 	print_tpacket_stats, print_icmp_filter, print_getsockopt,
   30115 	print_group_req, print_tpacket_req, print_packet_mreq,
   30116 	print_setsockopt): Use printaddr.
   30117 	(print_mreq, print_mreq6): Use umove_or_printaddr.
   30118 
   30119 2015-07-18  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   30120 
   30121 	tests: add sigaltstack.test.
   30122 	* tests/sigaltstack.c: New file.
   30123 	* tests/sigaltstack.expected: Likewise.
   30124 	* tests/sigaltstack.test: New test.
   30125 	* tests/Makefile.am (check_PROGRAMS): Add sigaltstack.
   30126 	(TESTS): Add sigaltstack.test.
   30127 	(EXTRA_DIST): sigaltstack.expected.
   30128 	* tests/.gitignore: Add sigaltstack.
   30129 
   30130 	bootstrap: delete personality test directories beforehand.
   30131 	* bootstrap: Delete tests-m32 and tests-mx32 directories
   30132 	before creating them.
   30133 
   30134 2015-07-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   30135 
   30136 	defs.h: do not include <signal.h>
   30137 	* printsiginfo.h: New file.
   30138 	* Makefile.am (strace_SOURCES): Add it.
   30139 	* defs.h: Do not include <signal.h>.
   30140 	(printsiginfo): Remove.
   30141 	* printsiginfo.c: Include <signal.h> and "printsiginfo.h".
   30142 	* strace.c: Likewise.
   30143 	* sigaltstack.c: Include <signal.h>.
   30144 	* signal.c: Likewise.
   30145 	* sigreturn.c: Likewise.
   30146 	* time.c: Likewise.
   30147 
   30148 	resource.c: move printrusage and printrusage32 to a separate file.
   30149 	* printrusage.c: New file.
   30150 	* Makefile.am (strace_SOURCES): Add it.
   30151 	* resource.c (printrusage, [ALPHA] printrusage32): Move
   30152 	to printrusage.c.
   30153 
   30154 	open.c: make use of RVAL_DECODED.
   30155 	* open.c (decode_open, sys_creat): Update for RVAL_DECODED.
   30156 
   30157 	personality.c: make use of RVAL_DECODED.
   30158 	* personality.c (sys_personality): Update for RVAL_DECODED.
   30159 
   30160 	printsiginfo.c: use umove_or_printaddr.
   30161 	* printsiginfo.c (printsiginfo_at): Use umove_or_printaddr.
   30162 
   30163 	prctl.c: make use of RVAL_DECODED.
   30164 	* prctl.c (prctl_enter, prctl_exit): Merge into sys_prctl.
   30165 	(sys_prctl, sys_arch_prctl): Update for RVAL_DECODED.
   30166 
   30167 	prctl.c: use printaddr and umove_or_printaddr.
   30168 	* prctl.c (prctl_exit): Use printaddr and umove_or_printaddr.
   30169 
   30170 	process.c: use printaddr.
   30171 	* process.c (sys_ptrace): Use printaddr.
   30172 
   30173 	process_vm.c: make use of RVAL_DECODED.
   30174 	* process_vm.c (sys_process_vm_writev): Update for RVAL_DECODED.
   30175 
   30176 	process_vm.c: use printaddr.
   30177 	* process_vm.c (sys_process_vm_readv): Use printaddr.
   30178 
   30179 	reboot.c: make use of RVAL_DECODED.
   30180 	* reboot.c (sys_reboot): Update for RVAL_DECODED.
   30181 
   30182 	Enhance quotactl decoding.
   30183 	* quota.c (decode_cmd_data): Use umove_or_printaddr.
   30184 	(sys_quotactl): Do not disable the parser in verbose mode.
   30185 	Decode all "set" commands on entering syscall.
   30186 
   30187 	readahead.c: make use of RVAL_DECODED.
   30188 	* readahead.c (sys_readahead.c): Update for RVAL_DECODED.
   30189 
   30190 	readlink.c: use printaddr.
   30191 	* readlink.c (decode_readlink): Use printaddr.
   30192 
   30193 	renameat.c: make use of RVAL_DECODED.
   30194 	* renameat.c (sys_renameat, sys_renameat2): Update for RVAL_DECODED.
   30195 
   30196 	resource.c: make use of RVAL_DECODED.
   30197 	* resource.c (sys_setrlimit, sys_getpriority, sys_setpriority):
   30198 	Update for RVAL_DECODED.
   30199 
   30200 	resource.c: use umove_or_printaddr.
   30201 	* resource.c (print_rlimit64, print_rlimit32, printrusage32,
   30202 	printrusage, sys_times): Use umove_or_printaddr.
   30203 	(decode_rlimit64): Remove.
   30204 	(decode_rlimit): Remove redundant checks.
   30205 	[defined(current_wordsize) && current_wordsize != 4] (decode_rlimit):
   30206 	Define to print_rlimit64.
   30207 	(sys_prlimit64): Replace decode_rlimit64 with print_rlimit64.
   30208 
   30209 	sched.c: make use of RVAL_DECODED.
   30210 	* sched.c (sys_sched_setscheduler, sys_sched_setparam,
   30211 	sys_sched_get_priority_min): Update for RVAL_DECODED.
   30212 
   30213 	sched.c: use printnum_int and printaddr.
   30214 	* sched.c (sys_sched_setscheduler, sys_sched_getparam,
   30215 	sys_sched_setparam): Use printnum_int for sched_param decoding.
   30216 	(sched_rr_get_interval): Use printaddr.
   30217 
   30218 	scsi.c: use printaddr.
   30219 	* scsi.c (print_sg_io_buffer): Use printaddr.
   30220 
   30221 2015-07-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   30222 
   30223 	seccomp.c: make use of RVAL_DECODED.
   30224 	* seccomp.c (sys_seccomp): Update for RVAL_DECODED.
   30225 
   30226 	seccomp.c: use printaddr and umove_or_printaddr.
   30227 	* seccomp.c (decode_fprog, decode_seccomp_set_mode_strict):
   30228 	Use printaddr.
   30229 	(print_seccomp_filter): Use umove_or_printaddr.
   30230 
   30231 	sigaltstack.c: use printaddr and umove_or_printaddr.
   30232 	* sigaltstack.c (print_stack_t): Use umove_or_printaddr and printaddr.
   30233 
   30234 	signal.c: make use of RVAL_DECODED.
   30235 	* signal.c (sys_sigsuspend, sys_kill, sys_tgkill, sys_rt_sigsuspend,
   30236 	sys_rt_sigqueueinfo, sys_rt_tgsigqueueinfo, sys_restart_syscall,
   30237 	do_signalfd): Update for RVAL_DECODED.
   30238 
   30239 	signal.c: use printaddr and umove_or_printaddr.
   30240 	* signal.c (print_sigset_addr_len, decode_old_sigaction):
   30241 	Use printaddr and umove_or_printaddr.
   30242 	(sys_signal): Use printaddr.
   30243 	(sys_sigprocmask, sys_sigpending, sys_rt_sigprocmask,
   30244 	sys_rt_sigpending): Remove redundant checks for syserror.
   30245 	(decode_new_sigaction): Use umove_or_printaddr.
   30246 
   30247 2015-07-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   30248 
   30249 	sram_alloc.c: make use of RVAL_DECODED.
   30250 	* sram_alloc.c [BFIN] (sys_sram_alloc): Update for RVAL_DECODED.
   30251 
   30252 	statfs.c: use umove_or_printaddr.
   30253 	* statfs.c (printstatfs, printstatfs64, printcompat_statfs64):
   30254 	Use umove_or_printaddr.
   30255 
   30256 	swapon.c: make use of RVAL_DECODED.
   30257 	* swapon.c (sys_swapon): Update for RVAL_DECODED.
   30258 
   30259 	swapon.c: move fallback definitions of swap options to xlat/
   30260 	* swapon.c: Move definitions of SWAP_FLAG_* flags ...
   30261 	* xlat/swap_flags.in: ... here.
   30262 
   30263 	sync_file_range2: fix typo in flags decoding.
   30264 	* sync_file_range.c (sys_sync_file_range2): Fix typo in flags decoding.
   30265 
   30266 	sync_file_range.c: make use of RVAL_DECODED.
   30267 	* sync_file_range.c (sys_sync_file_range, sys_sync_file_range2): Update
   30268 	for RVAL_DECODED.
   30269 
   30270 	syslog.c: use umove_or_printaddr and RVAL_DECODED.
   30271 	* sysctl.c (sys_sysctl): Use umove_or_printaddr and RVAL_DECODED.
   30272 
   30273 	sysinfo.c: use umove_or_printaddr.
   30274 	* sysinfo.c (sys_sysinfo): Use umove_or_printaddr.
   30275 
   30276 	syslog.c: make use of RVAL_DECODED.
   30277 	* syslog.c (sys_syslog): Update for RVAL_DECODED.
   30278 
   30279 	syslog.c: use printaddr.
   30280 	* syslog.c (sys_syslog): Use printaddr.
   30281 
   30282 	sysmips.c: cleanup.
   30283 	* sysmips.c [MIPS] (sys_sysmips): Use switch statement.  Use printaddr.
   30284 	Fix misprinted ", " delimiter.
   30285 
   30286 	sysmips.c: make use of RVAL_DECODED.
   30287 	* sysmips.c [MIPS] (sys_sysmips): Update for RVAL_DECODED.
   30288 
   30289 	time.c: make use of RVAL_DECODED.
   30290 	* time.c (sys_settimeofday, sys_osf_settimeofday, sys_clock_settime,
   30291 	sys_timerfd, sys_timerfd_create, sys_timerfd_settime): Update
   30292 	for RVAL_DECODED.
   30293 	(timerfd_gettime): Decode struct itimerspec argument on exiting syscall.
   30294 
   30295 	time.c: use printaddr, printnum_int, and umoven_or_printaddr.
   30296 	* time.c (sys_nanosleep): Use printaddr.
   30297 	(printitv_bitness, tprint_timex32, tprint_timex, printsigevent32,
   30298 	printsigevent): Use umoven_or_printaddr.
   30299 	(sys_timer_create): Use printnum_int.
   30300 	(sys_getitimer, sys_osf_getitimer, sys_setitimer, sys_osf_setitimer,
   30301 	do_adjtimex, sys_timer_settime, sys_timer_gettime): Remove
   30302 	redundant checks for syserror.
   30303 
   30304 	sprinttv: do not fetch data in case of syserror.
   30305 	* time.c (sprinttv): Do not fetch data in case syserror.
   30306 	Print address instead of {...} in case of umove failure.
   30307 	(sys_gettimeofday, sys_osf_gettimeofday, sys_adjtime, sys_clock_gettime,
   30308 	clock_nanosleep): Remove now redundant checks for syserror.
   30309 
   30310 	truncate.c: make use of RVAL_DECODED.
   30311 	* truncate.c (sys_truncate, sys_truncate64, sys_ftruncate,
   30312 	sys_ftruncate64): Update for RVAL_DECODED.
   30313 
   30314 	umask.c: make use of RVAL_DECODED.
   30315 	* umask.c (sys_umask): Update for RVAL_DECODED.
   30316 
   30317 	umount.c: make use of RVAL_DECODED.
   30318 	* umount.c (sys_umount2): Update for RVAL_DECODED.
   30319 
   30320 	utimes.c: make use of RVAL_DECODED.
   30321 	* utimes.c (decode_utimes): Change to return void.
   30322 	Update for RVAL_DECODED.
   30323 	(sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes):
   30324 	Update callers.  Update for RVAL_DECODED.
   30325 
   30326 2015-07-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   30327 
   30328 	tests/uid.test: adopt for alpha.
   30329 	Make the test work on alpha that has getxuid syscall instead of getuid.
   30330 
   30331 	* tests/uid.awk (BEGIN): Update getuid regexp to match both getuid
   30332 	and getxuid syscalls.
   30333 	* tests/uid.c (main): Allow __NR_getxuid as an alternative
   30334 	to __NR_getuid.
   30335 	* tests/uid.test: If getuid syscall is not available, probe for
   30336 	getxuid syscall.
   30337 
   30338 2015-07-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   30339 
   30340 	uid.c: make use of RVAL_DECODED.
   30341 	* uid.c (sys_setuid, sys_setreuid, sys_setresuid, sys_chown, sys_fchown,
   30342 	sys_setgroups): Update for RVAL_DECODED.
   30343 
   30344 	uid.c: use printaddr and umoven_or_printaddr.
   30345 	* uid.c (get_print_uid): Use umoven_or_printaddr.
   30346 	(sys_getresuid): Do not check for syserror, get_print_uid now does
   30347 	the right thing.
   30348 	(sys_setgroups, sys_getgroups): Add const qualifier to local variables
   30349 	that are assigned once.  Use printaddr.
   30350 
   30351 	ia64: wire up utimensat syscall.
   30352 	* linux/ia64/syscallent.h (utimensat): New entry.
   30353 
   30354 	decode_utimes: enclose timespec array in square brackets.
   30355 	* utimes.c (decode_utimes): enclose timespec array in square brackets
   30356 	instead of curly brackets.
   30357 
   30358 	uname.c: use umove_or_printaddr.
   30359 	* uname.c (sys_uname): Use umove_or_printaddr.
   30360 
   30361 	tests: add utime.test.
   30362 	* tests/utime.c: New file.
   30363 	* tests/utime.test: New test.
   30364 	* tests/Makefile.am (check_PROGRAMS): Add utime.
   30365 	(TESTS): Add utime.test.
   30366 	* tests/.gitignore: Add utime.
   30367 
   30368 	utime.c: make use of RVAL_DECODED.
   30369 	* utime.c (sys_utime): Update for RVAL_DECODED.
   30370 
   30371 	utime.c: use umoven_or_printaddr.
   30372 	* utime.c (sys_utime): Use umoven_or_printaddr.
   30373 
   30374 2015-07-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   30375 
   30376 	wait.c: use printaddr and umove_or_printaddr.
   30377 	* wait.c (waitid): Do not check for NULL the address passed
   30378 	to printrusage.
   30379 	(printwaitn): Likewise.
   30380 	Use printaddr and umove_or_printaddr for fetching wait status.
   30381 
   30382 	wait: move fallback definitions of wait options to xlat/
   30383 	* wait.c: Move definitions of __W* flags ...
   30384 	* xlat/wait4_options.in: ... here.
   30385 
   30386 	tests: add xattr.test.
   30387 	* tests/xattr.c: New file.
   30388 	* tests/xattr.expected: Likewise.
   30389 	* tests/xattr.test: New test.
   30390 	* tests/Makefile.am (check_PROGRAMS): Add xattr.
   30391 	(TESTS): Add xattr.test.
   30392 	(EXTRA_DIST): Add xattr.expected.
   30393 	* tests/.gitignore: Add xattr.
   30394 
   30395 2015-07-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   30396 
   30397 	xattr.c: make use of RVAL_DECODED.
   30398 	* xattr.c (sys_setxattr, sys_fsetxattr, sys_removexattr,
   30399 	sys_fremovexattr): Update for RVAL_DECODED.
   30400 
   30401 	print_xattr_val: do not fetch data in case of !verbose || syserror.
   30402 	* xattr.c (print_xattr_val): Do not fetch data in case
   30403 	of !verbose || syserror.   Use printaddr.
   30404 
   30405 	print_xattr_list: use printaddr.
   30406 	* xattr.c (print_xattr_list): Use printaddr.
   30407 
   30408 	print_xattr_val: remove unused argument.
   30409 	* xattr.c (print_xattr_val): Remove unused "failed" argument.
   30410 	(sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Update
   30411 	all callers.
   30412 
   30413 	print_xattr_list: remove redundant address check.
   30414 	* xattr.c (print_xattr_list): Do not check for NULL the address passed
   30415 	to printstr.
   30416 
   30417 	ipc.c: make use of RVAL_DECODED.
   30418 	* ipc.c (sys_mq_notify, sys_mq_open, sys_mq_timedreceive,
   30419 	sys_mq_timedsend, sys_msgctl, sys_msgget, sys_msgsnd, sys_semctl,
   30420 	sys_semget, sys_semop, sys_semtimedop, sys_shmctl, sys_shmdt,
   30421 	sys_shmget): Update for RVAL_DECODED.
   30422 	(sys_shmat): Decode all arguments on entering syscall.
   30423 
   30424 2015-07-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   30425 
   30426 	umoven_or_printaddr: do not fetch data if not in verbose mode.
   30427 	After this change, umoven_or_printaddr and its callers, including
   30428 	printnum_* and printpair_*, will not fetch data in !verbose mode.
   30429 
   30430 	* util.c (umoven_or_printaddr): Do not call umoven if !verbose.
   30431 
   30432 2015-07-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   30433 
   30434 	Change printnum_* printers to honor syserror.
   30435 	With this change, printnum_* printers will not attempt to fetch data
   30436 	in case of exiting(tcp) && syserror(tcp).
   30437 	All "at exiting" decoders that call these printers have been made
   30438 	ready for this change in previous commits.
   30439 
   30440 	* util.c (DEF_PRINTNUM, DEF_PRINTPAIR): Use umove_or_printaddr.
   30441 	* prctl.c (prctl_exit): Use printnum_int and printnum_long.
   30442 	(sys_arch_prctl): Do not check for syserror.
   30443 
   30444 2015-07-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   30445 
   30446 	term.c: enhance tty ioctl parser.
   30447 	Decode as much data on entering syscall as possible.
   30448 
   30449 	* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
   30450 	decode_modem_flags): New functions.
   30451 	(term_ioctl): Use them.  Update for RVAL_DECODED.
   30452 
   30453 2015-07-12  Elvira Khabirova  <lineprinter0 (a] gmail.com>
   30454 
   30455 	Change comparisons with function pointers to comparisons with SENs.
   30456 	* pathtrace.c (pathtrace_match): Change all comparisons with function
   30457 	pointers to a single SEN based switch.
   30458 	* syscall.c (dumpio, trace_syscall_entering): Change all comparisons
   30459 	with function pointers to comparisons with SENs.
   30460 	* ipc.c (sys_ipc): Remove.
   30461 	* sock.c (sys_socketcall): Likewise.
   30462 	* linux/dummy.h (sys_ipc, sys_socketcall): New aliases.
   30463 
   30464 	Add unique syscall entry numbers (SENs)
   30465 	* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sen.h.
   30466 	(syscallent_names, syscallent_patterns, syscallent_files): New variables.
   30467 	(sen.h): New rule.
   30468 	* defs.h (struct sysent): Add sen field.
   30469 	* generate_sen.sh: New file.
   30470 	* linux/syscall.h: Include "sen.h".
   30471 	* syscall.c (SEN_NAME): New temporary macro.
   30472 	(SEN): Use it to prepend syscall entry number.
   30473 
   30474 	Introduce SEN macro.
   30475 	* syscall.c (SEN): New temporary macro.
   30476 	* linux/dummy.h (sys_printargs): New macro.
   30477 	* linux/subcall.h: Wrap all sys_func entries using SEN.
   30478 	* linux/*/syscallent*.h: Likewise.
   30479 
   30480 2015-07-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   30481 
   30482 	scsi.c: enhance SG_IO ioctl parser.
   30483 	Fix SG_IO ioctl output in case of failed umove
   30484 
   30485 	* scsi.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
   30486 	Update for RVAL_DECODED.
   30487 	(print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
   30488 	print_sg_io_v4_res): Do not print address in case of failed umove.
   30489 	(scsi_ioctl): Use printaddr.
   30490 
   30491 2015-07-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   30492 
   30493 	ptp.c: enhance ptp ioctl parser.
   30494 	* ptp.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
   30495 	Update for RVAL_DECODED.
   30496 	(ptp_ioctl): Use umove_or_printaddr.
   30497 
   30498 2015-07-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   30499 
   30500 	mtd.c: enhance mtd and ubi ioctl parsers.
   30501 	Decode as much data on entering syscall as possible.
   30502 
   30503 	* xlat/mtd_file_mode_options.in: New file.
   30504 	* mtd.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
   30505 	Include "xlat/mtd_file_mode_options.h".
   30506 	Update for RVAL_DECODED.
   30507 	(mtd_ioctl, ubi_ioctl): Use printnum_int and umove_or_printaddr.
   30508 
   30509 2015-07-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   30510 
   30511 	sock.c: enhance socket ioctl parser.
   30512 	Decode as much data on entering syscall as possible.
   30513 
   30514 	* sock.c: Update for RVAL_DECODED.
   30515 	(print_addr): Remove.
   30516 	(print_ifreq_addr, print_ifreq, print_ifc_len, decode_ifconf): New
   30517 	functions.
   30518 	(sock_ioctl) Use them.  Use umove_or_printaddr.
   30519 
   30520 2015-07-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   30521 
   30522 	block.c: enhance block ioctl parser.
   30523 	* block.c: Update for RVAL_DECODED.
   30524 	Define BLKROTATIONAL and BLKZEROOUT.
   30525 	(block_ioctl): Decode them.  Use printnum_short, printnum_int,
   30526 	printnum_long, printpair_int64, and umove_or_printaddr.
   30527 	(print_blkpg_req, block_ioctl): Use umove_or_printaddr.
   30528 
   30529 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30530 
   30531 	blkpg_ops: add BLKPG_RESIZE_PARTITION constant.
   30532 	* xlat/blkpg_ops.in: Add BLKPG_RESIZE_PARTITION.
   30533 
   30534 	Reported-by: Christian Neukirchen <chneukirchen (a] gmail.com>
   30535 
   30536 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30537 
   30538 	loop.c: enhance loop ioctl parser.
   30539 	Decode as much data on entering syscall as possible.
   30540 
   30541 	* loop.c: Include <linux/ioctl.h> instead of <sys/ioctl.h>.
   30542 	Update for RVAL_DECODED.
   30543 	(decode_loop_info, decode_loop_info64): New functions.
   30544 	(loop_ioctl): Use them.  Decode LOOP_SET_STATUS, LOOP_SET_STATUS64,
   30545 	LOOP_SET_FD, LOOP_CHANGE_FD, LOOP_CTL_ADD and LOOP_CTL_REMOVE on
   30546 	entering syscall.
   30547 	Print LOOP_SET_FD and LOOP_CHANGE_FD arguments using printfd.
   30548 
   30549 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30550 
   30551 	rtc.c: enhance rtc ioctl parser.
   30552 	* rtc.c: Update for RVAL_DECODED.
   30553 	(print_rtc): Rename to print_rtc_time.
   30554 	(decode_rtc_time, decode_rtc_wkalrm): New functions.
   30555 	(rtc_ioctl): Use them.
   30556 	[RTC_VL_READ]: Decode RTC_VL_READ.
   30557 	Use printnum_long for RTC_IRQP_READ and RTC_EPOCH_READ decoding.
   30558 
   30559 	Use printpair_int.
   30560 	* evdev.c (repeat_ioctl): Use printpair_int.
   30561 	* net.c (do_pipe, sys_socketpair): Likewise.
   30562 
   30563 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30564 
   30565 	Add several generic integer pairs printing functions.
   30566 	Add functions to fetch and print pairs of integer types.
   30567 	Note that these printers do not attempt to fetch data
   30568 	in case of exiting(tcp) && syserror(tcp).
   30569 
   30570 	printnum_* printers will follow as soon as all callers are made ready
   30571 	for this change.
   30572 
   30573 	* defs.h (printpair_int, printpair_long, printpair_int64): New
   30574 	prototypes.
   30575 	* util.c (DEF_PRINTPAIR): New macro.
   30576 	(printpair_int, printpair_long, printpair_int64): New functions.
   30577 
   30578 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30579 
   30580 	Add two generic integer printing functions.
   30581 	Add printnum_short and printnum_int64 in addition to already existing
   30582 	printnum_int and printnum_long.
   30583 
   30584 	* defs.h (printnum_short, printnum_int64): New prototypes.
   30585 	* util.c (DEF_PRINTNUM): New macro.
   30586 	(printnum_int, printnum_long): Use DEF_PRINTNUM.
   30587 	(printnum_short, printnum_int64): New functions.
   30588 
   30589 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30590 
   30591 	Add address printing functions.
   30592 	printaddr is a simple function implementing "print NULL or address"
   30593 	idiom.
   30594 	umoven_or_printaddr is a wrapper around umoven that has the same return
   30595 	value semantics as umoven but also prints the address when the data
   30596 	is not going to be fetched (in case of exiting(tcp) && syserror(tcp))
   30597 	or cannot be fetched (umoven fails).
   30598 	umove_or_printaddr is a macro wrapper around umoven_or_printaddr that
   30599 	mirrors umove wrapper around umoven.
   30600 
   30601 	* defs.h (printaddr, umoven_or_printaddr): New prototypes.
   30602 	(umove_or_printaddr): New macro.
   30603 	* util.c (printaddr, umoven_or_printaddr): New functions.
   30604 
   30605 2015-07-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   30606 
   30607 	Implement RVAL_DECODED flag.
   30608 	Implement a method for "on entering" parsers to return
   30609 	"done with decoding" information to their callers.
   30610 
   30611 	If a syscall parser called from trace_syscall_entering returns a value
   30612 	with RVAL_DECODED bit set, record this value in tcp->sys_func_rval
   30613 	and use it in trace_syscall_exiting instead of calling the parser on
   30614 	exiting syscall.
   30615 
   30616 	If an ioctl parser returned RVAL_DECODED, this would tell
   30617 	SYS_FUNC(ioctl) that the decoding is finished but fallback printing of
   30618 	the ioctl command argument is needed, while e.g. RVAL_DONE+1 would mean
   30619 	that the decoding is finished and no fallback decoding is needed.
   30620 
   30621 	* defs.h (struct tcb): Add sys_func_rval.
   30622 	(RVAL_DECODED): New macro.
   30623 	* syscall.c (trace_syscall_entering): Initialize tcp->sys_func_rval
   30624 	along with setting TCB_INSYSCALL flag.
   30625 	(trace_syscall_exiting): Use tcp->sys_func_rval instead of calling
   30626 	tcp->s_ent->sys_func when the former has RVAL_DECODED flag set.
   30627 	Reset tcp->sys_func_rval along with clearing TCB_INSYSCALL flag.
   30628 	* ioctl.c (sys_ioctl): Set RVAL_DECODED flag on exiting.
   30629 	Print ioctl argument iff RVAL_DECODED is set and fallback decoding
   30630 	is requested.
   30631 
   30632 2015-07-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   30633 
   30634 	time.c: move rtc ioctl parser to a separate file.
   30635 	* rtc.c: new file
   30636 	* Makefile.am (strace_SOURCES): Add it.
   30637 	* time.c (print_rtc, rtc_ioctl): Move to rtc.c.
   30638 
   30639 	term.c: fix typo.
   30640 	* term.c: Rename TCLFLSH to TCFLSH.
   30641 
   30642 	Do not include sys/filio.h.
   30643 	* configure.ac (AC_CHECK_HEADERS): Remove sys/filio.h.
   30644 	* term.c: Do not include <sys/filio.h>.
   30645 
   30646 2015-07-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   30647 
   30648 	ioctl: prepare ioctl_decode_command_number for future changes.
   30649 	* ioctl.c (ioctl_decode_command_number): Change 1st arg to struct tcb*.
   30650 	(sys_ioctl): Update callers.
   30651 
   30652 	ioctl: simplify ioctl_decode signature.
   30653 	* ioctl.c (ioctl_decode): Remove 2nd and 3rd parameters.
   30654 	(sys_ioctl): Update callers.
   30655 
   30656 	ioctl: consistently use name "code" for ioctl request code.
   30657 	* ioctl.c (evdev_decode_number, hiddev_decode_number,
   30658 	ioctl_decode_command_number): Rename "arg" to "code".
   30659 
   30660 	Move ioctl syscall parser to ioctl.c.
   30661 	* io.c (sys_ioctl): Move ...
   30662 	* ioctl.c: ... here.
   30663 	(ioctl_lookup, ioctl_next_match, ioctl_print_code, ioctl_decode,
   30664 	ioctl_decode_command_number): Declare as static.
   30665 	* defs.h (ioctl_lookup, ioctl_next_match, ioctl_print_code,
   30666 	ioctl_decode, ioctl_decode_command_number): Remove.
   30667 
   30668 	ioctl: remove obsolete registry of ioctl characters.
   30669 	* ioctl.c: Remove registry of ioctl characters.
   30670 
   30671 2015-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   30672 
   30673 	Fix filtering of <unavailable> syscalls.
   30674 	* syscall.c (trace_syscall_exiting): Skip filtered syscalls also in case
   30675 	of get_regs or get_syscall_result failure.
   30676 	* tests/filter-unavailable.c: New file.
   30677 	* tests/filter-unavailable.expected: Likewise.
   30678 	* tests/filter-unavailable.test: New test.
   30679 	* tests/Makefile.am (check_PROGRAMS): Add filter-unavailable.
   30680 	(filter_unavailable_LDFLAGS): Add -pthread.
   30681 	(TESTS): Add filter-unavailable.test.
   30682 	(EXTRA_DIST): Add filter-unavailable.expected.
   30683 	* tests/.gitignore: Add filter-unavailable.
   30684 
   30685 	Reported-by: Bryan Matsuo <bryan.matsuo (a] gmail.com>
   30686 
   30687 2015-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   30688 
   30689 	Fix -qq option in conjunction with -o option.
   30690 	This change makes -qq option work in conjunction with -o option,
   30691 	thus complementing commit v4.7-222-g01997cf.
   30692 
   30693 	* strace.c (init): Do not reset qflag.
   30694 
   30695 2015-06-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   30696 
   30697 	xtensa: wire up new syscalls.
   30698 	* linux/xtensa/syscallent.h (bpf, execveat): New entries.
   30699 
   30700 	bfin: wire up new syscalls.
   30701 	* linux/bfin/syscallent.h (kcmp, finit_module, sched_setattr,
   30702 	sched_getattr, renameat2, seccomp, getrandom, memfd_create,
   30703 	bpf, execveat): New entries.
   30704 
   30705 	alpha: wire up new syscalls.
   30706 	* linux/alpha/syscallent.h (getrandom, memfd_create, execveat):
   30707 	New entries.
   30708 
   30709 2015-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   30710 
   30711 	tests: skip stat32 test if struct stat is defined incorrectly.
   30712 	If stat.st_mode returned by syscall is 0, it means that the definition
   30713 	of struct stat in <asm/stat.h> is incorrect.  This is the case e.g. on
   30714 	mips n32 where the only available stat syscall is 64-bit but at the same
   30715 	time struct stat defined by <asm/stat.h> is 32-bit.
   30716 
   30717 	* tests/stat.c (main) [NR_stat]: Return 77 if st_mode is 0.
   30718 
   30719 2015-06-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   30720 
   30721 	Consistenly use #ifdef to check for AC_DEFINE'd macros.
   30722 	* aio.c (print_common_flags): Use #ifdef in the check for
   30723 	HAVE_STRUCT_IOCB_U_C_FLAGS.
   30724 	* defs.h: Use #ifdef in the check for HAVE_LITTLE_ENDIAN_LONG_LONG.
   30725 	* net.c: Use #ifdef in the check for HAVE_SENDMSG.
   30726 	* syscall.c (dumpio): Likewise.
   30727 	* printstat.h (DO_PRINTSTAT): Use #ifdef in checks for
   30728 	HAVE_STRUCT_STAT_ST_* macros.
   30729 	* util.c: Use #ifdef in checks for HAVE_SYS_XATTR_H.
   30730 
   30731 	xattr: move fallback definitions of xattr flags to xlat/
   30732 	* xattr.c: Include <sys/xattr.h> insread of <linux/xattr.h>.
   30733 	Move definitions of XATTR_* flags ...
   30734 	* xlat/xattrflags.in: ... here.
   30735 
   30736 	link: move fallback definitions of AT_* constants to xlat/
   30737 	* link.c: Move definitions of AT_* constants ...
   30738 	* xlat/at_flags.in: ... here.
   30739 
   30740 	net: move fallback definitions of SOL_* constants to xlat/
   30741 	* net.c: Move definitions of SOL_* constants ...
   30742 	* xlat/socketlayers.in: ... here.
   30743 
   30744 	futex: move fallback definitions of futex constants to xlat/
   30745 	* futex.c: Move definitions of FUTEX_OP_CMP_* constants ...
   30746 	* xlat/futexwakecmps.in: ... here.
   30747 	* futex.c: Move definitions of other FUTEX_OP_* constants ...
   30748 	* xlat/futexwakeops.in: ... here.
   30749 	* futex.c: Move definitions of remaining FUTEX_* constants except
   30750 	FUTEX_PRIVATE_FLAG and FUTEX_CLOCK_REALTIME flags ...
   30751 	* xlat/futexops.in: ... here.
   30752 
   30753 	clone: move definitions of cloning flags to xlat/
   30754 	* clone.c: Include <sched.h>.  Move definitions of CLONE_* flags ...
   30755 	* xlat/clone_flags.in: ... here.
   30756 
   30757 2015-06-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   30758 
   30759 	Update mount flags constants.
   30760 	* mount.c: Remove definitions of mount flags constants.
   30761 	* xlat/mount_flags.in: Update from linux v4.0, add default values.
   30762 
   30763 	mount: update parser to match kernel behaviour.
   30764 	* mount.c (sys_mount): Do not decode type and data strings for
   30765 	MS_SHARED, MS_PRIVATE, MS_SLAVE, and MS_UNBINDABLE mount flags
   30766 	that do not imply valid strings.
   30767 
   30768 	mount: robustify MS_MGC_VAL decoding.
   30769 	* mount.c (sys_mount): When printing mount flags, do not assume that
   30770 	(flags & MS_MGC_MSK) == MS_MGC_VAL.
   30771 
   30772 2015-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   30773 
   30774 	net: decode setsockopt() multicast arguments.
   30775 	* configure.ac (AC_CHECK_FUNCS): Add inet_pton.
   30776 	* net.c (print_mreq, print_mreq6): New functions.
   30777 	(print_setsockopt): Use them to decode IP_ADD_MEMBERSHIP,
   30778 	IP_DROP_MEMBERSHIP, IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP,
   30779 	IPV6_JOIN_ANYCAST, and IPV6_LEAVE_ANYCAST.
   30780 	* tests/ip_mreq.c: New file.
   30781 	* tests/ip_mreq.expected: Likewise.
   30782 	* tests/ip_mreq.test: New test.
   30783 	* tests/Makefile.am (check_PROGRAMS): Add ip_mreq.
   30784 	(TESTS): Add ip_mreq.test.
   30785 	(EXTRA_DIST): ip_mreq.expected.
   30786 	* tests/.gitignore: Add ip_mreq.
   30787 
   30788 	Based on patch by Ben Noordhuis <info (a] bnoordhuis.nl>.
   30789 
   30790 2015-06-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   30791 
   30792 	Update IPV6 socket options constants.
   30793 	* xlat/sockipv6options.in: Update from linux v4.0.
   30794 
   30795 2015-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   30796 
   30797 	net: factor out interface index printing code.
   30798 	* net.c (print_ifindex): New function.
   30799 	(printsock) [HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID]: Use it.
   30800 
   30801 2015-05-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   30802 
   30803 	Consistently use error_msg instead of fprintf(stderr)
   30804 	* linux/alpha/get_scno.c: Use error_msg.
   30805 	* linux/arm/get_scno.c: Likewise.
   30806 	* linux/mips/get_scno.c: Likewise.
   30807 	* linux/sh/get_scno.c: Likewise.
   30808 	* linux/x86_64/get_scno.c: Likewise.
   30809 	* exit.c (sys_exit): Likewise.
   30810 	* pathtrace.c (pathtrace_select, pathtrace_match): Likewise.
   30811 	* strace.c (alloctcb, droptcb, detach, startup_attach,
   30812 	test_ptrace_seize, init, cleanup, print_debug_info,
   30813 	maybe_allocate_tcb, startup_tcb, trace): Likewise.
   30814 	* syscall.c (update_personality, trace_syscall_exiting,
   30815 	get_scno): Likewise.
   30816 	* unwind.c (DPRINTF): Likewise.
   30817 	* tests/bexecve.test: Update patterns.
   30818 	* tests/detach-stopped.test: Likewise.
   30819 
   30820 	Consistently print OOM diagnostic messages.
   30821 	* bjm.c (sys_query_module): Use error_msg to print OOM diagnostics.
   30822 	* util.c (dumpiov, dumpstr): Likewise.
   30823 
   30824 2015-05-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   30825 
   30826 	Introduce memory allocation wrappers.
   30827 	Introduce wrappers to the following functions that do memory allocation:
   30828 	malloc, calloc, realloc, strdup.
   30829 
   30830 	This commit is a follow-up to the related discussions in strace-devel ML:
   30831 	http://sourceforge.net/p/strace/mailman/message/33618180/
   30832 	http://sourceforge.net/p/strace/mailman/message/33733470/
   30833 
   30834 	* defs.h (xmalloc, xcalloc, xreallocarray, xstrdup): New prototypes.
   30835 	* xmalloc.c: New file.
   30836 	* Makefile.am (strace_SOURCES): Add it.
   30837 	* count.c (count_syscall, call_summary_pers): Use xcalloc.
   30838 	* desc.c (decode_select): Use xmalloc.
   30839 	* dirent.c (sys_getdents, sys_getdents64): Likewise.
   30840 	* net.c (sys_recvmmsg): Use xstrdup.
   30841 	* pathtrace.c (storepath): Use xreallocarray.
   30842 	(pathtrace_match): Use xmalloc.
   30843 	* strace.c (die_out_of_memory): Move to xmalloc.c.
   30844 	(expand_tcbtab): Use xcalloc and xreallocarray.
   30845 	(startup_child): Use xstrdup.
   30846 	(init): Use xmalloc, xcalloc, and xstrdup.
   30847 	* syscall.c (reallocate_qual): Use xreallocarray.
   30848 	(qualify): Use xstrdup.
   30849 	* unwind.c (unwind_tcb_init): Use xmalloc.
   30850 	(build_mmap_cache): Use xcalloc, xreallocarray, and xstrdup.
   30851 	(get_symbol_name): Use xreallocarray.
   30852 	(stacktrace_walk, queue_put): Use xmalloc.
   30853 	* util.c (printstr): Use xmalloc.
   30854 	* vsprintf.c (strace_vfprintf): Likewise.
   30855 
   30856 2015-05-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   30857 
   30858 	Fix ioctl entries on 32-bit architectures with 64-bit aligned structures
   30859 	Some ioctl constants are defined to different values on those 32-bit
   30860 	architectures where structures containing a 64-bit field are aligned on
   30861 	a 8-byte boundary and have a size multiple of 8 bytes, and on other
   30862 	32-bit architectures.
   30863 
   30864 	* configure.ac: Check the size of a structure containing a 64-bit field.
   30865 	* linux/32/ioctls_inc.h: Rename to ...
   30866 	* linux/32/ioctls_inc_align32.h: ... this.
   30867 	* linux/32/ioctls_inc_align64.h: New file.
   30868 	* linux/32/ioctls_inc.h: Include either 32/ioctls_inc_align32.h
   30869 	or ioctls_inc_align64.h depending on SIZEOF_STRUCT_I64_I32.
   30870 	* Makefile.am (EXTRA_DIST): Add linux/32/ioctls_inc_align32.h and
   30871 	* linux/32/ioctls_inc_align64.h.
   30872 	* tests/ioctl.c (main): Test for VIDIOC_ENUMINPUT.
   30873 	* tests/ioctl.expected: Check VIDIOC_ENUMINPUT decoding.
   30874 
   30875 	Reported-by: Philippe De Muyter <phdm (a] macqel.be>
   30876 
   30877 2015-05-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   30878 
   30879 	maint: make linux/kvm.h parseable on arm.
   30880 	* maint/ioctls_sym.sh [AARCH64 || ARM]: Add missing definitions for
   30881 	structures referenced from linux/kvm.h.
   30882 
   30883 2015-05-21  Philippe De Muyter  <phdm (a] macqel.be>
   30884 
   30885 	v4l2: add decoding for VIDIOC_S_CROP's arg.
   30886 	* v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_S_CROP's arg.
   30887 
   30888 2015-05-19  Ezequiel Garcia  <ezequiel (a] vanguardiasur.com.ar>
   30889 
   30890 	Add support for Altera's Nios-II softcore architecture.
   30891 	This commit adds strace support for Altera's Nios-II.  The architecture
   30892 	is supported by Linux since v3.19, and it implements the generic syscall
   30893 	ABI.
   30894 
   30895 	* configure.ac: Add nios2 support.
   30896 	* cacheflush.c [NIOS2] (sys_cacheflush): New function.
   30897 	* linux/nios2/*: New Nios-II specific files.
   30898 	* Makefile.am (EXTRA_DIST): Add them.
   30899 
   30900 2015-05-19  Philippe De Muyter  <phdm (a] macqel.be>
   30901 
   30902 	v4l2: VIDIOC_CROPCAP: add missing braces around arg printout.
   30903 	* v4l2.c (v4l2_ioctl): case VIDIOC_CROPCAP: add missing braces around arg
   30904 	printout.
   30905 
   30906 2015-05-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   30907 
   30908 	maint: avoid effects of locale when sorting files.
   30909 	* maint/ioctls_gen.sh: Invoke sort with LC_COLLATE=C.
   30910 	* maint/ioctls_hex.sh: Likewise.
   30911 	* maint/ioctls_sym.sh: Likewise.
   30912 
   30913 	Reported-by: Philippe De Muyter <phdm (a] macqel.be>
   30914 
   30915 2015-04-18  Philippe De Muyter  <phdm (a] macqel.be>
   30916 
   30917 	v4l2: add decoding for VIDIOC_CREATE_BUFS's arg.
   30918 	* v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_CREATE_BUFS's arg.
   30919 
   30920 2015-04-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   30921 
   30922 	mips o32: decode indirect syscall.
   30923 	Implement decoding of MIPS O32 specific indirect syscall.
   30924 
   30925 	* syscall.c [LINUX_MIPSO32] (decode_mips_subcall, sys_syscall):
   30926 	New functions.
   30927 	(trace_syscall_entering) [LINUX_MIPSO32]: Use decode_mips_subcall.
   30928 	* linux/mips/syscallent-o32.h (4000): Change sys_func to sys_syscall.
   30929 
   30930 	Reported-and-tested-by: Arturo Borrero Gonzalez <arturo.borrero.glez (a] gmail.com>
   30931 
   30932 2015-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   30933 
   30934 	debian: add gawk to Build-Depends.
   30935 	* debian/control (Build-Depends): Add gawk.
   30936 	Patch by Reiner Herrmann <reiner (a] reiner-h.de>.
   30937 
   30938 	This fixes Debian bug #780992.
   30939 
   30940 2015-04-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   30941 
   30942 	tests: fix bexecve.test for the case of mixed personalities.
   30943 	Fix bexecve.test when the executable being run does not match the
   30944 	native architecture.
   30945 
   30946 	* tests/bexecve.test: Use "set_ptracer_any" instead of "sh".
   30947 	Allow for a personality switch notification in the strace output.
   30948 
   30949 2015-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   30950 
   30951 	tests: add a test for "resuming interrupted nanosleep"
   30952 	* tests/restart_syscall.test: New test.
   30953 	* tests/restart_syscall.expected: New file.
   30954 	* tests/restart_syscall_unknown.expected: Likewise.
   30955 	* tests/Makefile.am (TESTS): Add restart_syscall.test.
   30956 	(EXTRA_DIST): Add restart_syscall.expected
   30957 	(TEST_LOG_COMPILER): Change to "env".
   30958 	(OS, ARCH, AM_TEST_LOG_FLAGS): Define.
   30959 	and restart_syscall_unknown.expected.
   30960 
   30961 	tests: strip executable bit from *.expected files.
   30962 
   30963 2015-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   30964 
   30965 	Declare syscall parsers using SYS_FUNC macro.
   30966 	Introduce SYS_FUNC macro to declare and define all syscall parsers.
   30967 
   30968 	* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
   30969 	(sys_func.h): New rule.
   30970 	* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
   30971 	* linux/syscall.h: Include "sys_func.h".
   30972 	[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
   30973 	Remove other declarations.
   30974 	* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
   30975 	and osf_fstatfs syscall parsers.
   30976 	* *.c: Use SYS_FUNC to define syscall parsers.
   30977 
   30978 2015-04-07  Denys Vlasenko  <dvlasenk (a] redhat.com>
   30979 
   30980 	Fix confusing "resuming interrupted unknown" message.
   30981 	Dmitry reported seeing the following:
   30982 
   30983 	    $ sleep 2 & sleep 1; ./strace -erestart_syscall -p $!
   30984 	    [1] 12345
   30985 	    Process 12345 attached
   30986 	    restart_syscall(<... resuming interrupted unknown ...>) = 0
   30987 
   30988 	Fixing it by replacing "unknown" with "system call".
   30989 
   30990 2015-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   30991 
   30992 	tests: workaround old gawk versions that do not provide @include support
   30993 	Some of our tests use GNU awk @include extension, but not all currently
   30994 	used versions of GNU awk support it.  Skip these tests if gawk does not
   30995 	provide @include support.
   30996 
   30997 	* tests/init.sh (check_gawk): New function.
   30998 	(match_awk): Use it.
   30999 
   31000 2015-04-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   31001 
   31002 	tests: rewrite umovestr2.test without using grep.
   31003 	The regular expression generated by umovestr2.c on systems with large
   31004 	page size is too big for GNU grep.  Rewrite the test to use diff
   31005 	instead of grep.
   31006 
   31007 	* tests/umovestr2.test: Use match_diff instead of match_grep.
   31008 	* tests/umovestr2.c (main): Convert output from regexp to plain text.
   31009 
   31010 2015-03-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   31011 
   31012 	Cleanup process_vm_writev syscall decoding.
   31013 	* process_vm.c (sys_process_vm_writev): Do not check for syserror,
   31014 	it is not applicable on entering syscall.
   31015 
   31016 	umovestr: read chunks of memory up to pagesize at a time.
   31017 	* defs.h (get_pagesize): New prototype.
   31018 	* mem.c (get_pagesize) Make global.
   31019 	* util.c (PAGMASK): Remove.
   31020 	(vm_read_mem): New process_vm_readv proxy function.
   31021 	(umoven, umovestr): Use it.
   31022 	(umovestr): Read chunks up to pagesize at a time.
   31023 
   31024 2015-03-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   31025 
   31026 	umovestr: fix short read bug.
   31027 	* util.c (umovestr): Check the right address.
   31028 	* tests/umovestr.c: New file.
   31029 	* tests/umovestr2.c: Likewise.
   31030 	* tests/umovestr.expected: Likewise.
   31031 	* tests/umovestr.test: New test.
   31032 	* tests/umovestr2.test: Likewise.
   31033 	* tests/Makefile.am (check_PROGRAMS): Add umovestr and umovestr2.
   31034 	(TESTS): Add umovestr.test and umovestr2.test.
   31035 	(EXTRA_DIST): Add umovestr.expected.
   31036 	* tests/.gitignore: Add umovestr and umovestr2.
   31037 
   31038 	Reported-by: Josef T. Burger <bolo (a] cs.wisc.edu>
   31039 
   31040 2015-03-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   31041 
   31042 	When process_vm_readv fails with EPERM, try PTRACE_PEEKDATA.
   31043 	process_vm_readv() and ptrace(PTRACE_PEEKDATA) have inconsistent access
   31044 	control rules wrt traced processes: process_vm_readv() is more likely to
   31045 	fail with EPERM than ptrace(PTRACE_PEEKDATA) when tracing a process that
   31046 	has execve'd a privileged executable.
   31047 
   31048 	* util.c (umoven, umovestr): If process_vm_readv returned EPERM,
   31049 	fall back to ptrace(PTRACE_PEEKDATA).
   31050 
   31051 	Reported-by: Andrew Guertin <lists (a] dolphinling.net>
   31052 
   31053 2015-03-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   31054 
   31055 	Use macros for gcc attributes.
   31056 	* defs.h (error_msg, perror_msg, error_msg_and_die, perror_msg_and_die,
   31057 	die_out_of_memory, printllval, printnum_int, printnum_long, tprintf):
   31058 	Use ATTRIBUTE_* macros for gcc attributes.
   31059 	* file.c (struct stat64): Likewise.
   31060 	* statfs.c (struct compat_statfs64): Likewise.
   31061 	* strace.c (die, exec_or_die, init): Likewise.
   31062 	* linux/sparc/arch_sigreturn.c: Likewise.
   31063 	* linux/ubi-user.h: Likewise.
   31064 
   31065 2015-03-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   31066 
   31067 	Introduce macros for gcc attributes.
   31068 	Define macros for gcc attributes that are already in use
   31069 	or going to be used soon.
   31070 
   31071 	* defs.h (GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT,
   31072 	ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC,
   31073 	ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): New macros.
   31074 
   31075 2015-03-28  Felix Janda  <felix.janda (a] posteo.de>
   31076 
   31077 	Include <linux/ioctl.h> for _IOC_* macros.
   31078 	Fix a compilation failure with musl libc.
   31079 
   31080 	* evdev.c: Include <linux/ioctl.h>.
   31081 	* ioctl.c: Include <linux/ioctl.h> instead of <asm/ioctl.h>.
   31082 	* ioctlsort.c: Likewise.
   31083 
   31084 	Reported-by: Dima Krasner <dima (a] dimakrasner.com>
   31085 	Acked-by: Mike Frysinger <vapier (a] gentoo.org>
   31086 
   31087 2015-03-28  Felix Janda  <felix.janda (a] posteo.de>
   31088 
   31089 	Include <sys/stat.h> for S_I* macros.
   31090 	Fix a compilation failure with musl libc.
   31091 
   31092 	* mknod.c: Include <sys/stat.h>.
   31093 	* printmode.c: Likewise.
   31094 
   31095 	Reported-by: Dima Krasner <dima (a] dimakrasner.com>
   31096 	Acked-by: Mike Frysinger <vapier (a] gentoo.org>
   31097 
   31098 2015-03-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   31099 
   31100 	signal.c: move siginfo_t parsers to a separate file.
   31101 	* printsiginfo.c: New file.
   31102 	* Makefile.am (strace_SOURCES): Add it.
   31103 	* defs.h (printsiginfo): Change second argument's type from int to bool.
   31104 	* signal.c: Stop defining siginfo_t related constants.
   31105 	Move inclusion of xlat/sig*_codes.h files to printsiginfo.c
   31106 	(printsigsource, printsigval, printsiginfo_at): Move to printsiginfo.c.
   31107 	(printsiginfo): Change second argument's type from int to bool,
   31108 	split, and move to printsiginfo.c.
   31109 
   31110 	Update siginfo_t constants.
   31111 	* xlat/sigbus_codes.in: Add BUS_MCEERR_AR and BUS_MCEERR_AO,
   31112 	add default values.
   31113 	* xlat/sigtrap_codes.in: Add TRAP_BRANCH and TRAP_HWBKPT,
   31114 	add default values.
   31115 	* xlat/sigsegv_codes.in: Add SEGV_BNDERR, add default values.
   31116 	* xlat/sigchld_codes.in: Add default values.
   31117 	* xlat/sigemt_codes.in: Likewise.
   31118 	* xlat/sigfpe_codes.in: Likewise.
   31119 	* xlat/sigill_codes.in: Likewise.
   31120 	* xlat/siginfo_codes.in: Likewise.
   31121 	* xlat/sigpoll_codes.in: Likewise.
   31122 	* xlat/sigsys_codes.in: Likewise.
   31123 
   31124 2015-03-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   31125 
   31126 	signal.c: move sigaltstack parser to a separate file.
   31127 	* sigaltstack.c: New file.
   31128 	* Makefile.am (strace_SOURCES): Add it.
   31129 	* signal.c (print_stack_t, sys_sigaltstack): Move to sigaltstack.c.
   31130 	* xlat/sigaltstack_flags.in: Add default values.
   31131 
   31132 2015-03-25  Denys Vlasenko  <dvlasenk (a] redhat.com>
   31133 
   31134 	Move sparc64 get_scno() code where it belongs.
   31135 
   31136 	sparc: rename personality 2 files to personality 1.
   31137 	Run-tested in qemu 32-bit sparc.
   31138 
   31139 2015-03-25  Denys Vlasenko  <dvlasenk (a] redhat.com>
   31140 
   31141 	sparc: delete personality 1.
   31142 	Personality 1 for sparc and sparc64 appears to be an old attempt
   31143 	to support stracing Solaris binaries.
   31144 
   31145 	It stalled after the only syscall, solaris_open, was covered:
   31146 	all other solaris_foo's are printargs.
   31147 
   31148 	This change deletes personality 1. Now sparc is an one-personality
   31149 	arch, and sparc64 is a two-personality one.
   31150 
   31151 	For clarity, pure renaming of personality 2 files to personality 1 for sparc64
   31152 	is performed in the next commit - this prevents a state where syscallent1.h
   31153 	seems to indergo a lot of changes, where in fact in is deleted, and then
   31154 	replaced by syscallent2.h
   31155 
   31156 	Therefore, tree at this commit will not build.
   31157 
   31158 2015-03-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   31159 
   31160 	qemu_multiarch_testing/*: make it easier to do debug in sandboxes.
   31161 
   31162 2015-03-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   31163 
   31164 	sparc: fix v4.10-25-g8497b62 fallout.
   31165 	Before:
   31166 
   31167 	$ sleep 3 & ./strace -p $!
   31168 	Process 8703 attached
   31169 	syscall: unknown syscall trap 1a800003 00025d58
   31170 	syscall_516(0, 0x40080000, 0, 0xfc000f00, 0x28, 0xefc03b18) = 0
   31171 	exit_group(0)                           = ?
   31172 	+++ exited with 0 +++
   31173 
   31174 	After:
   31175 
   31176 	$ sleep 3 & ./strace -p $!
   31177 	Process 8725 attached
   31178 	restart_syscall(<... resuming interrupted nanosleep ...>) = 0
   31179 	exit_group(0)                           = ?
   31180 	+++ exited with 0 +++
   31181 
   31182 2015-03-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   31183 
   31184 	get_scno: add diagnostics for invalid syscall numbers.
   31185 	* syscall.c (get_scno): Print a debug level message
   31186 	for !SCNO_IS_VALID syscall numbers.
   31187 
   31188 2015-03-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   31189 
   31190 	arm: fix v4.10-25-g8497b62 fallout.
   31191 	Starting with commit v4.10-25-g8497b62,
   31192 
   31193 	arm$ ./strace true
   31194 	pid 1234 stray syscall exit
   31195 	Segmentation fault
   31196 
   31197 	Fix this by updating ARM syscall sanity check.
   31198 	In particular, get_scno() should not set TCB_INSYSCALL flag because
   31199 	other code assumes that s_ent is properly initialized when this flag
   31200 	is set.
   31201 
   31202 	* linux/arm/get_scno.c: Check syscall number after fetching.
   31203 	Do not apply the check to SCNO_IN_RANGE syscalls.
   31204 	Do not set TCB_INSYSCALL flag.
   31205 	Extend diagnostics and move it to debug level.
   31206 
   31207 2015-03-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   31208 
   31209 	mips: fix pipe syscall decoding.
   31210 	* linux/mips/arch_getrval2.c: New file.
   31211 	* Makefile.am (EXTRA_DIST): Add it.
   31212 	* defs.h [MIPS] (HAVE_GETRVAL2): Define.
   31213 
   31214 2015-03-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   31215 
   31216 	sigreturn.c: split arch specific code into separate arch files.
   31217 	Split code that use arch-specific registers to separate arch files.
   31218 
   31219 	* sigreturn.c (sys_sigreturn): Move arch-specific code
   31220 	to linux/*/arch_sigreturn.c, include "arch_sigreturn.c".
   31221 	* linux/arch_sigreturn.c: New file.
   31222 	* Makefile.am (EXTRA_DIST): Add linux/arch_sigreturn.c
   31223 	and linux/*/arch_sigreturn.c files.
   31224 
   31225 2015-03-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   31226 
   31227 	syscall.c: split arch specific code into separate arch files.
   31228 	Split code that use arch-specific registers to separate arch files.
   31229 
   31230 	* syscall.c: Move definitions of variables containing fetched registers
   31231 	to linux/*/arch_regs.c files.
   31232 	[HAVE_GETRVAL2] (getrval2): Move arch-specific code
   31233 	to linux/*/arch_getrval2.c, include "arch_getrval2.c".
   31234 	(print_pc): Move arch-specific code to linux/*/print_pc.c files,
   31235 	include "print_pc.c".
   31236 	[X86_64] (x86_64_getregs_old): Rename to getregs_old, move to
   31237 	linux/x86_64/getregs_old.c, include "getregs_old.c".
   31238 	[POWERPC] (powerpc_getregs_old): Rename to getregs_old, move to
   31239 	linux/powerpc/getregs_old.c, include "getregs_old.c".
   31240 	(get_regs) [X86_64, POWERPC]: Update callers.
   31241 	(get_scno): Move arch-specific code to linux/*/get_scno.c,
   31242 	include "get_scno.c".
   31243 	(get_syscall_args): Move arch-specific code
   31244 	to linux/*/get_syscall_args.c, include "get_syscall_args.c".
   31245 	(get_error): Move arch-specific code to linux/*/get_error.c,
   31246 	include "get_error.c".
   31247 	(get_syscall_result): Move arch-specific code
   31248 	to linux/*/get_syscall_result.c, include "get_syscall_result.c".
   31249 	* Makefile.am (EXTRA_DIST): Add new linux/*/*.c files.
   31250 
   31251 2015-03-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   31252 
   31253 	syscall.c: prepare for the split.
   31254 	Move functions that use arch-specific registers to the end of file.
   31255 
   31256 2015-03-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   31257 
   31258 	Move get_regs error check from trace_syscall_entering to get_scno.
   31259 	Starting with commit v4.10-25-g8497b62, get_scno() can be called outside
   31260 	trace_syscall_entering(), so move the get_regs_error check from
   31261 	trace_syscall_entering() to get_scno().
   31262 
   31263 	* syscall.c (trace_syscall_entering): Move get_regs_error check ...
   31264 	(get_scno): ... here.
   31265 
   31266 2015-03-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   31267 
   31268 	alpha, ia64, sh, sparc, sparc64: fix pipe and pipe2 syscalls decoding.
   31269 	Fix pipe syscall decoding on alpha.
   31270 	Fix pipe2 syscall decoding on ia64, sh, sparc, and sparc64.
   31271 
   31272 	* configure.ac (AC_CHECK_FUNCS): Add pipe2.
   31273 	* defs.h [ALPHA || IA64 || SH || SPARC || SPARC64] (HAVE_GETRVAL2):
   31274 	Define.
   31275 	* net.c (do_pipe): Check HAVE_GETRVAL2 instead of architecture macros.
   31276 	Do not use getrval2 for pipe2 decoding.
   31277 	Print address if umove call fails.
   31278 	* syscall.c (getrval2): Check HAVE_GETRVAL2 instead of architecture
   31279 	macros.  Implement for [ALPHA].
   31280 	* tests/pipe.c: New file.
   31281 	* tests/pipe.expected: New file.
   31282 	* tests/pipe.test: New test.
   31283 	* tests/Makefile.am (check_PROGRAMS): Add pipe.
   31284 	(TESTS): Add pipe.test.
   31285 	(EXTRA_DIST): Add pipe.expected.
   31286 	* tests/.gitignore: Add pipe.
   31287 
   31288 2015-03-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   31289 
   31290 	decode_socket_subcall: fetch all arguments with a single umoven call.
   31291 	* syscall.c (decode_socket_subcall): Replace umoven fetch loop
   31292 	with a single umoven call.
   31293 
   31294 2015-03-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   31295 
   31296 	New test: test/many_looping_threads.c.
   31297 
   31298 	test/.gitignore: add missing test targets.
   31299 
   31300 	Trivial optimization in sys_sigreturn()
   31301 
   31302 	Change last parameter of umoven() from char* to void*
   31303 	Saves tons of casts.
   31304 
   31305 	Remove unused struct tcb::inst field.
   31306 	It is unused since we dropped support for kernels without PTRACE_SETOPTIONS.
   31307 
   31308 	test/Makefile: add missing test targets.
   31309 
   31310 	Move the comment about termination logic where it belongs.
   31311 
   31312 	startup_tcb() never fails, remove code which checks for failures.
   31313 
   31314 2015-03-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   31315 
   31316 	Show the syscall name in "resuming interrupted call" message.
   31317 	When signal is received, or if we have attached to a process,
   31318 	current syscall (if process is in one) gets restarted.
   31319 
   31320 	Some syscalls are restarted via "restart_syscall()" mechanism.
   31321 	On such sycalls, we don't show _which_ syscall gets restarted.
   31322 
   31323 	IOW: users want to see "resuming interrupted nanosleep"
   31324 	instead of "resuming interrupted call" when they attach to "sleep 999".
   31325 
   31326 	Kernel does expose this information. The only thing we need is
   31327 	to fetch syscall# on attach, and save it.
   31328 
   31329 	This patch does this. It adds tcp->s_prev_ent, which is
   31330 	a pointer to struct_sysent of the previous syscall of this tracee.
   31331 	It can be NULL.
   31332 
   31333 	sys_restart_syscall() is made to use it when the message is generated.
   31334 
   31335 	To similarly handle restart_syscall() *after signals*, not just
   31336 	on attach, on each syscall exit patch saves exited syscall's data
   31337 	in the same member (tcp->s_prev_ent).
   31338 
   31339 	Example:
   31340 
   31341 	    $ sleep 3 & strace -p $!
   31342 	    Process 8728 attached
   31343 	    restart_syscall(<... resuming interrupted nanosleep ...>) = 0
   31344 	    _exit(0)                                = ?
   31345 	    +++ exited with 0 +++
   31346 
   31347 2015-03-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   31348 
   31349 	tests: add a test for mmap/mprotect/munmap decoding.
   31350 	* tests/mmap.c: New file.
   31351 	* tests/mmap64.c: New file.
   31352 	* tests/mmap.test: New test.
   31353 	* tests/mmap64.test: New test.
   31354 	* tests/Makefile.am (check_PROGRAMS): Add mmap and mmap64.
   31355 	(mmap64_CFLAGS): Define.
   31356 	(TESTS): Add mmap.test and mmap64.test.
   31357 	* tests/.gitignore: Add mmap and mmap64.
   31358 
   31359 	sparc, sparc64: fix decoding of mmap2.
   31360 	* linux/sparc/syscallent.h (mmap2): Decode with sys_mmap_4koff,
   31361 	not sys_mmap.
   31362 	* linux/sparc64/syscallent2.h (mmap2): Decode with sys_mmap_pgoff,
   31363 	not sys_mmap.
   31364 
   31365 2015-03-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   31366 
   31367 	tests: add a test for SECCOMP_MODE_FILTER decoding.
   31368 	* tests/seccomp.c: New file.
   31369 	* tests/seccomp.test: New test.
   31370 	* tests/Makefile.am (check_PROGRAMS): Add seccomp.
   31371 	(TESTS): Add seccomp.test.
   31372 	* tests/.gitignore: Add seccomp.
   31373 
   31374 2015-03-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   31375 
   31376 	tests: factor out common awk code.
   31377 	Factor out awk code used in several tests to match.awk.
   31378 
   31379 	* tests/match.awk: New file.
   31380 	* tests/Makefile.am (EXTRA_DIST): Add it.
   31381 	* tests/caps.awk: Use it.
   31382 	* tests/getdents.awk: Likewise.
   31383 	* tests/getrandom.awk: Likewise.
   31384 	* tests/select.awk: Likewise.
   31385 	* tests/sigaction.awk: Likewise.
   31386 	* tests/init.sh (match_awk): Use gawk not awk.  Define AWKPATH.
   31387 	* tests/getdents.test: Likewise.
   31388 
   31389 2015-03-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   31390 
   31391 	tests: skip netlink based tests when resources are not available.
   31392 	* tests/netlink_inet_diag.c (main): Return 77 if socket, bind,
   31393 	or listen syscall fail.
   31394 	* tests/netlink_unix_diag.c (main): Likewise.
   31395 
   31396 2015-03-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   31397 
   31398 	aarch64, arm: decode extra padded compat struct statfs64.
   31399 	According to arch/arm/kernel/sys_oabi-compat.c,
   31400 	struct statfs64 has extra padding with EABI.
   31401 
   31402 	* statfs.c [AARCH64 || defined ARM] (COMPAT_STATFS64_PADDED_SIZE):
   31403 	Define.
   31404 	(do_statfs64_fstatfs64): New function, factored out from sys_statfs64.
   31405 	[COMPAT_STATFS64_PADDED_SIZE]: Check it in addition to
   31406 	sizeof(struct compat_statfs64).
   31407 	(sys_statfs64, sys_fstatfs64): Use do_statfs64_fstatfs64.
   31408 
   31409 	Reported-and-tested-by: Elliott Hughes <enh (a] google.com>
   31410 
   31411 2015-03-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   31412 
   31413 	tests: factor out common shell code to functions.
   31414 	Factor out shell code used in several tests to common functions.
   31415 
   31416 	* tests/fanotify_mark.expected: New file.
   31417 	* tests/ioctl.expected: New file.
   31418 	* tests/net-fd.expected: New file.
   31419 	* tests/net.expected: New file.
   31420 	* tests/statfs.expected: New file.
   31421 	* tests/sun_path.expected: New file.
   31422 	* tests/uio.expected: New file.
   31423 	* tests/ipc.sh: New file.
   31424 	* tests/Makefile.am (EXTRA_DIST): Add them.
   31425 	* tests/init.sh (dump_log_and_fail_with, run_prog,
   31426 	run_prog_skip_if_failed, run_strace, run_strace_merge,
   31427 	match_awk, match_diff, match_grep): New functions.
   31428 	* tests/*.test: Use them.
   31429 
   31430 2015-03-18  Elliott Hughes  <enh (a] google.com>
   31431 
   31432 	Show f_flags field in printstatfs.
   31433 	printstatfs64 was right, but printstatfs was missing f_flags.
   31434 	Noticed on aarch64.
   31435 
   31436 	* statfs.c (printstatfs) [_STATFS_F_FLAGS]: Print statfs.f_flags.
   31437 
   31438 2015-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   31439 
   31440 	tests/uid*: use fchown* instead of chown*
   31441 	Newer architectures have no chown syscall, so use fchown* syscalls
   31442 	for testing printuid.
   31443 
   31444 	* tests/uid.test: Use fchown instead of chown.
   31445 	* tests/uid.c: Test __NR_fchown instead of __NR_chown.
   31446 	(main): Use __NR_fchown instead of __NR_chown.
   31447 	* tests/uid32.c: Test __NR_fchown32 instead of __NR_chown32.
   31448 	(main): Use __NR_fchown32 instead of __NR_chown32.
   31449 	* tests/uid16.c: Test __NR_fchown and __NR_fchown32 instead
   31450 	of __NR_chown and __NR_chown32.
   31451 	(main): Use __NR_fchown instead of __NR_chown.
   31452 	* tests/uid.awk: Update regexp.
   31453 
   31454 2015-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   31455 
   31456 	stat64-v.test: add newfstatat syscall support.
   31457 	Newer architectures have no stat syscall, so stat() is implemented there
   31458 	using newfstatat syscall.
   31459 
   31460 	* tests/stat.c (STAT_FNAME): Rename to STAT_PREFIX.  Update callers.
   31461 	[_FILE_OFFSET_BITS == 64] (STAT_PREFIX): Add newfstatat support.
   31462 	(main) [!NR_stat]: Add newfstatat support.
   31463 
   31464 	Reported-by: Andreas Schwab <schwab (a] suse.de>
   31465 
   31466 2015-03-16  Andreas Schwab  <schwab (a] suse.de>
   31467 
   31468 	aarch64: properly decode generic syscalls.
   31469 	* linux/aarch64/syscallent1.h: Don't override entries 277 to 1023.
   31470 
   31471 	tests: verify that all patterns match.
   31472 	* tests/ipc_msg.test: Count matches to verify that all patterns match.
   31473 	* tests/ipc_sem.test: Likewise.
   31474 	* tests/ipc_shm.test: Likewise.
   31475 	* tests/stat32-v.test: Likewise.
   31476 	* tests/stat64-v.test: Likewise.
   31477 
   31478 2015-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   31479 
   31480 	Fix stat64 st_[acm]time decoding for personalities with 32-bit time_t.
   31481 	STRUCT_STAT.st_[acm]time are declared as unsigned int for some
   31482 	personalities, while time_t is signed.
   31483 
   31484 	* printstat.h (DO_PRINTSTAT): If st_[acm]time have the same size as int,
   31485 	explicitly cast them to int.
   31486 	* tests/stat64-v.test: Test that negative time_t is decoded properly.
   31487 
   31488 	Reported-by: Andreas Schwab <schwab (a] suse.de>
   31489 
   31490 2015-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   31491 
   31492 	semctl: fix indirect syscall decoding.
   31493 	On architectures where the semctl call is implemented by the ipc syscall
   31494 	the 4th argument is passed by reference.
   31495 
   31496 	* ipc.c (sys_semctl): Handle the indirect ipc subcall case.
   31497 	* tests/ipc_sem.c (main): Optionally match indirection
   31498 	in the 4th argument of semctl calls.
   31499 
   31500 	Reported-by: Andreas Schwab <schwab (a] suse.de>
   31501 
   31502 2015-03-16  Andreas Schwab  <schwab (a] suse.de>
   31503 
   31504 	tests/ipc_*: match IPC_64 flag.
   31505 	* tests/ipc_msg.c (main): Optionally match "IPC_64|" in the third
   31506 	argument of the ipc call.
   31507 	* tests/ipc_sem.c (main): Likewise.
   31508 	* tests/ipc_shm.c (main): Likewise.
   31509 
   31510 2015-03-16  Andreas Schwab  <schwab (a] suse.de>
   31511 
   31512 	Fix crash in ipc_sem test.
   31513 	Properly use union semun as argument of semctl.
   31514 
   31515 	* tests/ipc_sem.c (main): Properly use union semun as argument of
   31516 	semctl.  Don't handle EFAULT specially.
   31517 	* tests/ipc_sem.test: Revert last change.
   31518 
   31519 2015-03-16  Andreas Schwab  <schwab (a] suse.de>
   31520 
   31521 	m68k: fix sigreturn decoding.
   31522 	* sigreturn.c (sys_sigreturn) [M68K]: Fetch the words of the
   31523 	signal mask from the proper place.
   31524 
   31525 	aarch64: fix ioctl decoding.
   31526 	* linux/aarch64/ioctls_inc0.h: Rename from ioctls_inc1.h.
   31527 	* linux/aarch64/ioctls_inc1.h: Rename from ioctls_inc0.h.
   31528 	* linux/aarch64/ioctls_arch0.h: Rename from ioctls_arch1.h.
   31529 	* linux/aarch64/ioctls_arch1.h: Rename from ioctls_arch0.h.
   31530 
   31531 2015-03-12  Andreas Schwab  <schwab (a] suse.de>
   31532 
   31533 	tests/select.test: handle architectures using pselect6 syscall.
   31534 	* tests/select.awk (BEGIN): Update regexps to match both select
   31535 	and pselect6 syscalls.
   31536 	* tests/select.test: Probe for both select and pselect6 syscall.
   31537 
   31538 	Distribute linux/aarch64/arch_regs.h.
   31539 	* Makefile.am (EXTRA_DIST): Add linux/aarch64/arch_regs.h.
   31540 
   31541 	Fix decoding of mmap2 for arm.
   31542 	* syscallent.h (mmap2): Decode with sys_mmap_4koff, not
   31543 	sys_mmap_pgoff.
   31544 
   31545 2015-03-12  Andreas Schwab  <schwab (a] suse.de>
   31546 
   31547 	m68k: define HAVE_SA_RESTORER.
   31548 	On m68k the kernel sigaction structure has the sa_restorer member for
   31549 	historical reasons.
   31550 
   31551 	* signal.c (HAVE_SA_RESTORER): Define for M68K.
   31552 
   31553 2015-03-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   31554 
   31555 	aarch64: fix rt_sigreturn decoding.
   31556 	* sigreturn.c (sys_sigreturn) [AARCH64]: Fix personality check.
   31557 
   31558 2015-03-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   31559 
   31560 	maint: post-release administrivia.
   31561 	* NEWS: Add header line for next release.
   31562 
   31563 2015-03-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   31564 
   31565 	Prepare for 4.10 release.
   31566 	* NEWS: Update for 4.10 release.
   31567 	* debian/changelog: 4.10-1.
   31568 	* strace.spec: 4.10-1.
   31569 
   31570 	Move sigreturn/rt_sigreturn parser to a separate file.
   31571 	* sigreturn.c: New file.
   31572 	* Makefile.am (strace_SOURCES): Add it.
   31573 	* defs.h (sprintsigmask_n): New prototype.
   31574 	(tprintsigmask_addr): New macro.
   31575 	* signal.c (sprintsigmask_n): Make global.
   31576 	(tprintsigmask_addr): Remove.
   31577 	(sys_sigreturn): Move to sigreturn.c.
   31578 
   31579 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31580 
   31581 	ia64: use PTRACE_GETREGS to fetch registers.
   31582 	* linux/ia64/arch_regs.h: Stop including <asm/rse.h>.
   31583 	(ia64_frame_ptr): New declaration.
   31584 	* signal.c (sys_sigreturn) [IA64]: Use ia64_frame_ptr.
   31585 	* syscall.c [IA64]: Include <asm/rse.h>.
   31586 	[IA64] (ia64_regs, ia64_frame_ptr): New variable.
   31587 	[IA64] (ARCH_REGS_FOR_GETREGS): New macro.
   31588 	[IA64] (ia64_ia32mode): Convert to macro.
   31589 	[IA64] (ia64_r8, ia64_r10): Remove.
   31590 	(getrval2, print_pc, get_scno, get_syscall_args, get_error) [IA64]:
   31591 	Use ia64_regs.
   31592 	(get_syscall_result) [IA64]: Remove.
   31593 
   31594 	s390, s390x: use PTRACE_GETREGSET to fetch registers.
   31595 	* linux/s390/arch_regs.h: New file.
   31596 	* linux/s390x/arch_regs.h: New file.
   31597 	* Makefile.am (EXTRA_DIST): Add them.
   31598 	* signal.c (sys_sigreturn) [S390 || S390X]: Use s390_frame_ptr.
   31599 	* syscall.c [S390 || S390X] (s390_regset, s390_frame_ptr): New variable.
   31600 	[S390 || S390X] (ARCH_REGS_FOR_GETREGSET): New macro.
   31601 	(print_pc) [S390 || S390X]: Use s390_regset.
   31602 	(get_scno) [S390 || S390X]: Likewise.
   31603 	(get_syscall_args) [S390 || S390X]: Likewise.
   31604 	(get_error) [S390 || S390X]: Likewise.
   31605 	(get_syscall_result) [S390 || S390X]: Remove.
   31606 
   31607 	qemu_multiarch_testing: update.
   31608 	* qemu_multiarch_testing/README: Update statistics.
   31609 
   31610 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31611 
   31612 	tests: robustify unix-yy.test.
   31613 	Implement additional synchronization between parent and child processes
   31614 	to guarantee that the child starts closing connected socket only after
   31615 	exiting of the parent's accept() syscall.
   31616 	This guarantee seems to be necessary to reliably receive UNIX_DIAG_PEER
   31617 	messages from NETLINK_SOCK_DIAG interface.
   31618 
   31619 	* tests/net-accept-connect.c: Implement additional synchronization
   31620 	between parent and child processes.
   31621 	* tests/unix-yy-connect.awk: Update.
   31622 
   31623 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31624 
   31625 	Use SIGRTMIN from kernel headers.
   31626 	* configure.ac (ASM_SIGRTMIN): Define to SIGRTMIN from <asm/signal.h>.
   31627 	* signal.c: Use ASM_SIGRTMIN instead of constants provided by libc.
   31628 	* tests/sigreturn.c: Use ASM_SIGRTMIN instead of hardcoded value.
   31629 	Use lower RT_* numbers to support pre-3.18 hppa kernels.
   31630 	* tests/sigreturn.test: Update regexp.
   31631 
   31632 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31633 
   31634 	ppc64: fix compilation warning.
   31635 	Fix compilation warning introduced by commit
   31636 	577be2593d4895ef941e1c4e5e1608f7dd13610d
   31637 
   31638 	* signal.c (sys_sigreturn) [POWERPC64]: Fix initialization of signal
   31639 	mask on 32bit personality.
   31640 
   31641 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31642 
   31643 	aarch64: fix compilation warnings.
   31644 	Fix compilation warnings introduced by commit
   31645 	5b9b7e1d347eb4556084cdccad75e8247c535ed5:
   31646 
   31647 	signal.c:702:45: warning: signed and unsigned type in conditional expression [-Wsign-compare]
   31648 	syscall.c:746:34: warning: initialization from incompatible pointer type [enabled by default]
   31649 
   31650 	* syscall.c [AARCH64] (aarch64_sp_ptr): Add explicit cast.
   31651 	[AARCH64] (arm_sp_ptr): Change pointer type to unsigned.
   31652 	* linux/aarch64/arch_regs.h (arm_sp_ptr): Update.
   31653 
   31654 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   31655 
   31656 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31657 
   31658 	i386: simplify sigreturn decoding.
   31659 	* signal.c (sys_sigreturn) [X86_64 || X32 || I386]: Do not define
   31660 	i386_sigcontext_struct and i386_fpstate structures.
   31661 
   31662 2015-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   31663 
   31664 	tests: add a test for sigreturn/rt_sigreturn decoding.
   31665 	Convert test/sigreturn.c into a regular test.
   31666 
   31667 	* test/Makefile (PROGS): Remove sigreturn.
   31668 	* test/.gitignore: Likewise.
   31669 	* test/sigreturn.c: Rewrite to ...
   31670 	* tests/sigreturn.c: ... new file.
   31671 	* tests/sigreturn.test: New test.
   31672 	* tests/Makefile.am (check_PROGRAMS): Add sigreturn.
   31673 	(TESTS): Add sigreturn.test.
   31674 	* tests/.gitignore: Add sigreturn.
   31675 
   31676 2015-03-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   31677 
   31678 	sigreturn: print signal mask as a syscall argument.
   31679 	Although sigreturn takes signal mask via frame pointer,
   31680 	it's more convenient to display signal mask as a syscall argument
   31681 	rather than an outstanding object of unknown nature:
   31682 
   31683 	Before this change:
   31684 	    sigreturn() (mask [USR2 CHLD RT_2 RT_3 RT_4 RT_31 RT_32]) = 0
   31685 
   31686 	After this change:
   31687 	    sigreturn({mask=[USR2 CHLD RT_2 RT_3 RT_4 RT_31 RT_32]}) = 0
   31688 
   31689 	* signal.c (sys_sigreturn): Display signal mask as a syscall argument.
   31690 
   31691 2015-03-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   31692 
   31693 	aarch64: implement rt_sigreturn decoding.
   31694 	* linux/64/syscallent.h (139): Use sys_sigreturn for rt_sigreturn
   31695 	decoding.
   31696 	* syscall.c [ARM] (arm_regs): Make static.
   31697 	[ARM] (arm_sp_ptr): New variable.
   31698 	[AARCH64] (aarch64_sp_ptr, arm_sp_ptr): New variables.
   31699 	* linux/aarch64/arch_regs.h: New file.
   31700 	* linux/arm/arch_regs.h (arm_regs): Remove.
   31701 	(arm_sp_ptr): New declaration.
   31702 	* signal.c (sys_sigreturn) [ARM]: Use arm_sp_ptr.
   31703 	[AARCH64]: Print signal mask.
   31704 
   31705 	arm: simplify sigreturn decoding.
   31706 	* signal.c (sys_sigreturn) [ARM]: Do not define sigcontext and ucontext
   31707 	structures, fetch signal mask only, use print_sigset_addr_len.
   31708 
   31709 	s390: fix sigreturn decoding.
   31710 	* signal.c (sys_sigreturn) [S390]: Fix signal mask decoding.
   31711 
   31712 	mips o32: fix sigreturn decoding.
   31713 	* signal.c (sys_sigreturn) [LINUX_MIPSO32]: Fix the address of signal mask.
   31714 	[MIPS] Use print_sigset_addr_len to print signal mask.
   31715 
   31716 	x86_64, x32: implement rt_sigreturn decoding.
   31717 	* syscall.c [X86_64 || X32] (x86_64_rsp_ptr): New variable.
   31718 	* linux/x86_64/arch_regs.h (x86_64_rsp_ptr): New declaration.
   31719 	* linux/x86_64/syscallent.h (15): Use sys_sigreturn for rt_sigreturn
   31720 	decoding.
   31721 	* linux/x32/syscallent.h (513): Likewise.
   31722 	* signal.c (sys_sigreturn) [X86_64 || X32]: Print signal mask
   31723 	for non-i386 personalities.
   31724 
   31725 	sparc, sparc64: fix sigreturn decoding.
   31726 	* linux/sparc/arch_regs.h (U_REG_FP): New macro.
   31727 	* signal.c (sys_sigreturn) [SPARC || SPARC64]: Fix decoding
   31728 	of upper 32 bits of the sigmask.
   31729 
   31730 	ppc, ppc64: fix sigreturn decoding.
   31731 	* signal.c (sys_sigreturn) [POWERPC]: Fix decoding of upper 32 bits
   31732 	of the sigmask.
   31733 
   31734 	sigreturn: issue a less innocuous warning.
   31735 	* signal.c (sys_sigreturn): Issue a less innocuous warning on
   31736 	architectures for which signal mask decoding is not implemented yet.
   31737 
   31738 2015-03-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   31739 
   31740 	bootstrap: do not link Makefile* files.
   31741 	* bootstrap: Do not symlink any Makefile* files, not just Makefile.am
   31742 	and Makefile.in.
   31743 
   31744 	Reported-by: Christopher Covington <cov (a] codeaurora.org>
   31745 
   31746 2015-03-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   31747 
   31748 	ia64: fix sigreturn decoding.
   31749 	* signal.c (sys_sigreturn) [IA64]: Fix the address of signal mask.
   31750 	Use print_sigset_addr_len to print signal mask.
   31751 
   31752 2015-03-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   31753 
   31754 	ia64: use generic signalent.
   31755 	This complements commit v4.9-321-gfcf7f8d.
   31756 
   31757 	* linux/ia64/signalent.h: Remove.
   31758 	* Makefile.am (EXTRA_DIST): Remove it.
   31759 
   31760 2015-03-04  Giedrius Statkeviius  <giedrius.statkevicius (a] gmail.com>
   31761 
   31762 	Document that -k is available only with libunwind.
   31763 	Without this users might get confused why `man strace` describes
   31764 	an option that doesn't work.
   31765 
   31766 	* strace.1: Note that -k is available only if strace is built
   31767 	with libunwind.
   31768 
   31769 2015-03-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   31770 
   31771 	debian: update control file.
   31772 	* debian/control (strace, strace-udeb): Add mips64 and mips64el
   31773 	to architecture list.
   31774 	Patch by James Cowgill <james410 (a] cowgill.org.uk>
   31775 
   31776 	This fixes Debian bug #773375.
   31777 
   31778 2015-03-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   31779 
   31780 	debian: sync with 4.9-2 package.
   31781 	* debian/changelog: Sync with 4.9-2.
   31782 	* debian/control: Likewise.
   31783 
   31784 2015-03-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   31785 
   31786 	Add arch-specific PTRACE_* constants.
   31787 	* xlat/ptrace_cmds.in: Add arch-specific ptrace commands.
   31788 	* xlat/ptrace_events.in: Add PTRACE_EVENT_MIGRATE for tile.
   31789 	* xlat/ptrace_setoptions_flags.in: Add PTRACE_O_TRACEMIGRATE for tile.
   31790 
   31791 	This fixes Debian bug #734554.
   31792 
   31793 2015-03-03  Mike Frysinger  <vapier (a] gentoo.org>
   31794 
   31795 	Clarify bootstrap-vs-autoreconf usage.
   31796 	* README-hacking: Tell people to run ./bootstrap.
   31797 
   31798 2015-03-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   31799 
   31800 	mips n32: fix preadv/pwritev offset decoding.
   31801 	In mips n32 abi, like in most of 32-bit architectures, offset
   31802 	is passed to preadv/pwritev syscalls using two syscall arguments.
   31803 
   31804 	* io.c (print_llu_from_low_high_val) [LINUX_MIPSN32]: Remove.
   31805 
   31806 2015-03-03  Mike Frysinger  <vapier (a] gentoo.org>
   31807 
   31808 	tests: skip ipc_sem.test on broken kernels.
   31809 	Rather than trigger an ERROR which fails `make check`, go with SKIP
   31810 	instead.  We don't want the testsuite failing due to kernel bugs.
   31811 
   31812 	* tests/ipc_sem.c (main): Change 99 to 77.
   31813 
   31814 2015-03-03  Mike Frysinger  <vapier (a] gentoo.org>
   31815 
   31816 	tests: skip pc.test on s390.
   31817 	The s390 hardware can't support an exact si_addr, and the current kernels
   31818 	don't handle text addresses correctly at all.  Until that improves, skip
   31819 	the test on s390.
   31820 
   31821 	* tests/pc.c (main): Return 77 on s390 systems.
   31822 
   31823 2015-03-03  Mike Frysinger  <vapier (a] gentoo.org>
   31824 
   31825 	tests: note the kernel configs for -yy options.
   31826 	* tests/net-yy.test: Note CONFIG_INET_TCP_DIAG.
   31827 	* tests/unix-yy.test: Note CONFIG_UNIX_DIAG.
   31828 
   31829 2015-03-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   31830 
   31831 	alpha: fix -yy decoding.
   31832 	* socketutils.c (receive_responses): Align buffer on a sizeof(long) boundary.
   31833 
   31834 	Reported-and-tested-by: Mike Frysinger <vapier (a] gentoo.org>
   31835 
   31836 2015-03-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   31837 
   31838 	aarch64, x32: fix decoding of compat personality statfs64/fstatfs64.
   31839 	* statfs.c (struct compat_statfs64) [AARCH64 || X32]: Apply the same
   31840 	attributes as on X86_64.
   31841 
   31842 	mips: fix compilation warning.
   31843 	* syscall.c (get_scno) [MIPS]: Fix harmless compilation warning
   31844 	about comparison between signed and unsigned integer expressions.
   31845 
   31846 	x32: fix compilation warnings.
   31847 	* sysinfo.c (sys_sysinfo): Use ll length format modifier
   31848 	instead of l and cast kernel ulong types to unsigned long long.
   31849 
   31850 	aarch64: add -i option support.
   31851 	* syscall.c (print_pc): Add aarch64 support.
   31852 
   31853 2015-03-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   31854 
   31855 	ioctl: use x32 specific ioctl entries on x32 personality.
   31856 	As ioctls_inc.h generated natively on x32 differs both from 32/ioctls_inc.h
   31857 	(by 45 entries) and from linux/64/ioctls_inc.h (by 322 entries), use x32
   31858 	specific ioctl entries on x32 personality.
   31859 
   31860 	* linux/x32/ioctls_inc0.h: Generate from linux v3.19 using ioctls_gen.sh.
   31861 	* linux/x86_64/ioctlent2.h: Remove.
   31862 	* linux/x86_64/ioctls_arch2.h: New file.
   31863 	* linux/x86_64/ioctls_inc2.h: New file.
   31864 	* Makefile.am (EXTRA_DIST): Remove linux/x86_64/ioctlent2.h, add
   31865 	linux/x86_64/ioctls_arch2.h and linux/x86_64/ioctls_inc2.h.
   31866 
   31867 2015-03-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   31868 
   31869 	tests/uid16: skip if real uid is larger than 16bit.
   31870 	* tests/uid16.c (main): Skip if the uid returned by getuid matches
   31871 	/proc/sys/kernel/overflowuid.
   31872 
   31873 2015-03-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   31874 
   31875 	tests: fix uid tests on big endian architectures.
   31876 	* tests/uid.c (main): Ignore uids returned by getresuid to avoid
   31877 	16bit vs 32bit issues on big endian architectures.
   31878 	Change real UID instead of effective UID in setresuid test.
   31879 	* tests/uid16.c (main): Likewise.
   31880 	* tests/uid32.c (main): Change real UID instead of effective UID
   31881 	in setresuid test to match uid.c
   31882 	* tests/uid.awk: Update setresuid regexp.
   31883 
   31884 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   31885 
   31886 2015-03-01  Mike Frysinger  <vapier (a] gentoo.org>
   31887 
   31888 	tests/getdents: handle older getdents calls.
   31889 	If the tools we use call older getdents syscalls where d_type isn't
   31890 	passed back, or the arch is old (like Alpha) and can't pass back in
   31891 	either version, make sure we don't fail.
   31892 
   31893 	* tests/getdents.awk (d_type_dir, d_type_reg): Accept DT_UNKNOWN.
   31894 
   31895 2015-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   31896 
   31897 	Fix multiple personalities support in decoding syscall return values.
   31898 	* syscall.c (trace_syscall_exiting): When current personality is 32bit,
   31899 	print 32bit return code.
   31900 
   31901 	Update generic 64-bit ioctlent from linux v3.19.
   31902 	* linux/64/ioctls_inc.h: Update from linux v3.19 using ioctls_gen.sh.
   31903 
   31904 2015-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   31905 
   31906 	sparc, sparc64: fix rt_sigaction decoding.
   31907 	Fix regression introduced by commit v4.9-9-gc3a5c01.
   31908 
   31909 	* signal.c (HAVE_SA_RESTORER): New macro.
   31910 	[HPPA || IA64]: Do not undefine SA_RESTORER.
   31911 	(old_sigaction, old_sigaction32, new_sigaction): Use HAVE_SA_RESTORER
   31912 	instead of SA_RESTORER to check whether to define sa_restorer.
   31913 	(decode_old_sigaction, decode_new_sigaction): Use HAVE_SA_RESTORER in
   31914 	addition to SA_RESTORER to check whether to use sa_restorer.
   31915 
   31916 2015-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   31917 
   31918 	Fix stack buffer overflow when specified command is too long.
   31919 	* strace.c (startup_child): Check that the length of the command strace
   31920 	is going to execute does not exceed PATH_MAX limit.
   31921 
   31922 	Reported-by: Cheolung Lee <chpie (a] grayhash.com>
   31923 
   31924 2015-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   31925 
   31926 	build: include ptrace.h after regs.h.
   31927 	Restore the order of including <sys/reg.h> and <linux/ptrace.h>
   31928 	headers that was inadvertently changed by commit v4.9-280-g5503dd2.
   31929 
   31930 	This should fix build on platforms like m68k where some constants
   31931 	are defined simultaneously as enums by <sys/reg.h> and as macros
   31932 	by <asm/ptrace.h>.
   31933 
   31934 	* process.c: Include "ptrace.h" after "regs.h".
   31935 	* signal.c: Likewise.
   31936 	* syscall.c: Likewise.
   31937 	* util.c: Likewise.
   31938 
   31939 2015-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   31940 
   31941 	x32: fix decoding of timeval, timespec, and timex structures.
   31942 	As time_t is a 64-bit type in x32 personality, it is not correct to
   31943 	treat it as a long int type.
   31944 
   31945 	* time.c (current_time_t_is_compat): New macro.
   31946 	(sprinttv, sprint_timespec, printitv_bitness, tprint_timex): Use it.
   31947 	(tprint_timeval, do_sprinttv, sprint_timespec): Use j and uintmax_t
   31948 	when printing tv_sec/tv_usec.
   31949 	(tprint_timex): Use j and intmax_t/uintmax_t when printing struct timex
   31950 	members of type kernel_long_t.
   31951 
   31952 2015-02-28  Mike Frysinger  <vapier (a] gentoo.org>
   31953 
   31954 	tests/ipc_sem: detect broken kernels.
   31955 	When running 32bit ipc tests on ppc/sparc with a 64bit kernel, the ipc
   31956 	logic wrongly returns errors.  Detect that and throw an error.
   31957 
   31958 	* tests/ipc_sem.c: Return 99 when errno is EFAULT.
   31959 	* tests/ipc_sem.test: Save output to $OUT and show it when failing.
   31960 	Handle exit status 99 to throw an ERROR.
   31961 
   31962 2015-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   31963 
   31964 	build: do not link strace with -ldl.
   31965 	* configure.ac: Fix dladdr check.
   31966 
   31967 2015-02-27  Mike Frysinger  <vapier (a] gentoo.org>
   31968 
   31969 	Handle broken PTRACE_EVENT_STOP values.
   31970 	For a few linux releases (3.1 through 3.3), this define in the exported
   31971 	headers were broken.  Redefine if that's the case.
   31972 
   31973 	* ptrace.h [PTRACE_EVENT_STOP]: Redefine if PTRACE_EVENT_STOP is 7.
   31974 
   31975 2015-02-27  Mike Frysinger  <vapier (a] gentoo.org>
   31976 
   31977 	bootstrap: always set up test dirs.
   31978 	When files get updated, the bootstrap script should make sure the
   31979 	parallel dirs are kept in sync.
   31980 
   31981 	* bootstrap: Always generate the test$m.  Clean up symlinks first.
   31982 	Don't link in Makefile.in files.
   31983 
   31984 2015-02-27  Mike Frysinger  <vapier (a] gentoo.org>
   31985 
   31986 	Fix cross-compiling of ioctlsort.
   31987 	Use the AX_PROG_CC_FOR_BUILD helper to set up build settings when cross
   31988 	compiling.  This way ioctlsort uses the build tools all the time.
   31989 
   31990 	* configure.ac: Call AX_PROG_CC_FOR_BUILD.
   31991 	* Makefile.am (ioctlsort_CC): Set to CC_FOR_BUILD.
   31992 	(ioctlsort_CPPFLAGS): Change CPPFLAGS to CPPFLAGS_FOR_BUILD.
   31993 	(ioctlsort_CFLAGS): Change CFLAGS to CFLAGS_FOR_BUILD.
   31994 	(ioctlsort_LDFLAGS): Change LDFLAGS to LDFLAGS_FOR_BUILD.
   31995 	(ioctlsort_LD): Delete.
   31996 	(ioctlsort%): Change to ioctlsort%$(BUILD_EXEEXT).  Use ioctlsort_CFLAGS.
   31997 	* m4/ax_prog_cc_for_build.m4: Import from the autoconf-archive package.
   31998 
   31999 2015-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   32000 
   32001 	tests: robustify pc.test.
   32002 	* configure.ac: Check for dladdr in -ldl.
   32003 	* tests/Makefile.am (pc_LDADD): Adde $(dl_LIBS).
   32004 	* tests/pc.c: Include "config.h" and <dlfcn.h>.
   32005 	(main): Use dladdr to find the address to unmap.
   32006 
   32007 2015-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   32008 
   32009 	tests: drop support for alternative names of select syscall.
   32010 	This mostly reverts commit 4a00fc4867bde7a4c333f238851e5cb03f02c824.
   32011 
   32012 	* tests/select.awk: Drop _newselect support.
   32013 	* tests/select.test: Skip if select syscall is not supported.
   32014 
   32015 2015-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   32016 
   32017 	Rename _newselect to select.
   32018 	As an exception to the general rules that syscall names should match
   32019 	__NR_* constants defined in kernel headers, show select as "select"
   32020 	and old select as "oldselect".
   32021 
   32022 	* linux/arm/syscallent.h (82): Change name to oldselect.
   32023 	* linux/hppa/syscallent.h (142): Change name to select.
   32024 	* linux/mips/syscallent-n32.h (6022): Likewise.
   32025 	* linux/mips/syscallent-n64.h (5022): Likewise.
   32026 	* linux/mips/syscallent-o32.h (4142): Likewise.
   32027 	* linux/sparc/syscallent.h (230): Likewise.
   32028 
   32029 2015-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   32030 
   32031 	sparc: sync syscall entries with kernel headers.
   32032 	* linux/sparc/syscallent.h: Fix syscall entries for vmsplice,
   32033 	inotify_init, inotify_add_watch, inotify_rm_watch, inotify_rm_watch,
   32034 	ioprio_set, ioprio_get, splice, sync_file_range, sched_getaffinity, and
   32035 	sched_setaffinity.
   32036 	(67, 68, 202, 230): Change syscall names to match __NR_* constants
   32037 	defined in arch/sparc/include/uapi/asm/unistd.h.
   32038 
   32039 2015-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   32040 
   32041 	s390, s390x: sync syscall entry names with kernel headers.
   32042 	* linux/s390/syscallent.h (1, 180, 181): Change syscall names to match
   32043 	__NR_* constants defined in arch/s390/include/uapi/asm/unistd.h.
   32044 	* linux/s390x/syscallent.h: Likewise.
   32045 
   32046 2015-02-26  Mike Frysinger  <vapier (a] gentoo.org>
   32047 
   32048 	xlat: avoid fork bombing the build system.
   32049 	When there were fewer xlat headers, this didn't matter as much.
   32050 	But now with >200, trying to run them all in parallel can easily
   32051 	fork bomb smaller systems.
   32052 
   32053 	* xlat/gen.sh (main): Do not more jobs than # of cpus.
   32054 
   32055 2015-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   32056 
   32057 	arm: sync syscall entry names with kernel.
   32058 	* linux/arm/syscallent.h (82, 90, 180, 181, 327):
   32059 	Change syscall names to match __NR_* constants defined
   32060 	in arch/arm/include/uapi/asm/unistd.h.
   32061 
   32062 	arm: fix get_mempolicy, set_mempolicy, and timerfd_create syscall entries
   32063 	* linux/arm/syscallent.h (320, 321, 350): Fix names and handlers.
   32064 
   32065 	hppa: sync syscall entry names with kernel.
   32066 	* linux/hppa/syscallent.h (18, 28, 59, 84, 108, 109, 280):
   32067 	Change syscall names to match __NR_* constants defined in
   32068 	arch/parisc/include/uapi/asm/unistd.h.
   32069 
   32070 	subcall.h: add sendmmsg entry.
   32071 	* linux/subcall.h: Add sys_sendmmsg entry.
   32072 	(SYS_socket_nsubcalls): Update.
   32073 
   32074 	arm: simplify ARM_FIRST_SHUFFLED_SYSCALL definition.
   32075 	* linux/arm/syscallent.h (ARM_FIRST_SHUFFLED_SYSCALL): Use SYS_ipc_subcall.
   32076 
   32077 	ia64: parametrize i386 syscallent size check.
   32078 	* linux/ia64/syscallent.h: Use (SYS_ipc_subcall + SYS_ipc_nsubcalls)
   32079 	instead of numeric constant.
   32080 
   32081 	Cleanup linux/subcall.h.
   32082 	* linux/subcall.h: Use SYS_ipc_subcall.
   32083 
   32084 	alpha: fix statfs decoding.
   32085 	* statfs.c (printstatfs) [ALPHA]: Remove faulty code.
   32086 
   32087 	x32: fix build regression.
   32088 	* linux/x32/arch_regs.h: New file.
   32089 	* Makefile.am (EXTRA_DIST): Add it.
   32090 
   32091 2015-02-26  Mike Frysinger  <vapier (a] gentoo.org>
   32092 
   32093 	hppa: fix fanotify_mark decoding.
   32094 	The parisc kernel has some legacy baggage here and decodes the 64bit
   32095 	field in the reverse order.  Handle it in strace too.
   32096 
   32097 	* fanotify.c [HPPA] (sys_fanotify_mark): Reverse the mask bits.
   32098 
   32099 2015-02-26  Mike Frysinger  <vapier (a] gentoo.org>
   32100 
   32101 	ia64: fix decoding of getresuid/getresgid/setresgid.
   32102 	Looks like the similarity of these names caused confusion when generating
   32103 	the syscall table.  getresgid was wired to the wrong output while the other
   32104 	two were wired up to printargs instead of the real printer.
   32105 
   32106 	* linux/ia64/syscallent.h: Connect getresuid to sys_getresuid, getresgid to
   32107 	sys_getresgid, and setresgid to sys_setresgid.
   32108 
   32109 2015-02-26  Mike Frysinger  <vapier (a] gentoo.org>
   32110 
   32111 	ia64: fix up builds after 16bit uid support.
   32112 	The ia64 port pulls in the i386 syscall table so it can decode
   32113 	32bit apps, so we need to enable the 16bit uid parsers for it.
   32114 
   32115 	* defs.h (NEED_UID16_PARSERS): Define to 1 for IA64.
   32116 	* linux/ia64/syscallent.h: Undefine sys_stime to avoid redefine warnings.
   32117 
   32118 2015-02-26  Mike Frysinger  <vapier (a] gentoo.org>
   32119 
   32120 	v4l2: use uintmax_t for times.
   32121 	There is no guarantee that the backing value for the various time fields
   32122 	are ints or longs which makes printfs annoying.  Lets cast them to the
   32123 	uintmax_t type so we can use the j flag and not worry about truncation.
   32124 
   32125 	* v4l2.c (v4l2_ioctl): Use j and uintmax_t when printing tv_sec/tv_usec.
   32126 
   32127 2015-02-26  Mike Frysinger  <vapier (a] gentoo.org>
   32128 
   32129 	ignore core/compile files.
   32130 	Newer autotools includes a compile helper script.
   32131 
   32132 	* .gitignore: Add /compile and core.
   32133 
   32134 2015-02-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   32135 
   32136 	NEWS: Prepare for 4.10 release.
   32137 
   32138 2015-02-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   32139 
   32140 	Remove support for systems without PTRACE_SETOPTIONS.
   32141 	Assume that the kernel is v2.5.46 or newer, i.e. PTRACE_SETOPTIONS
   32142 	and PTRACE_O_TRACESYSGOOD|PTRACE_O_TRACEEXEC|PTRACE_O_TRACECLONE
   32143 	are universally available.
   32144 
   32145 	This change removes all code that implemented post-execve SIGTRAP
   32146 	handling and fork/vfork/clone->CLONE_PTRACE substitution.
   32147 
   32148 	* defs.h (TCB_BPTSET, TCB_WAITEXECVE): Remove macros.
   32149 	(need_fork_exec_workarounds, setbpt, clearbpt): Remove declarations.
   32150 	* strace.c (need_fork_exec_workarounds,
   32151 	test_ptrace_setoptions_followfork, test_ptrace_setoptions_for_all):
   32152 	Remove.
   32153 	(syscall_trap_sig): Set to (SIGTRAP | 0x80).
   32154 	(ptrace_setoptions): Set to (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC).
   32155 	(detach): Do not test for TCB_BPTSET.
   32156 	(init): Do not call test_ptrace_setoptions_followfork and
   32157 	test_ptrace_setoptions_for_all.  Do not test for TCB_BPTSET.
   32158 	* syscall.c (syscall_fixup_on_sysenter, internal_fork, internal_exec,
   32159 	syscall_fixup_for_fork_exec, syscall_fixup_on_sysexit): Remove.
   32160 	(trace_syscall_entering): Do not test for TCB_WAITEXECVE.  Do not call
   32161 	syscall_fixup_on_sysenter and syscall_fixup_for_fork_exec.
   32162 	(trace_syscall_exiting): Do not call syscall_fixup_on_sysexit and
   32163 	syscall_fixup_for_fork_exec.
   32164 	[IA64] (ia64_ia32mode): Make static.
   32165 	* linux/ia64/arch_regs.h (ia64_ia32mode): Remove declaration.
   32166 	* util.c: Do not include "syscall.h".
   32167 	(arg_setup, get_arg0, get_arg1, set_arg0, set_arg1, restore_arg0,
   32168 	restore_arg1, arg_finish_change, change_syscall, setbpt, clearbpt):
   32169 	Remove.
   32170 	* tests/ptrace_setoptions.test: Remove.
   32171 	* tests/Makefile.am (TESTS): Remove it.
   32172 
   32173 2015-02-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   32174 
   32175 	tests: robustify pc.test.
   32176 	* tests/pc.c (main): Unmap larger memory region.
   32177 	Dump process map for debug purposes.
   32178 	* tests/pc.test: Update regexps to take CLD_DUMPED child process
   32179 	into account.
   32180 
   32181 2015-02-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   32182 
   32183 	tests: fix "make dist" regression.
   32184 	* tests/Makefile.am (EXTRA_DIST): Add getrandom.awk.
   32185 
   32186 	tests: workaround broken awk.
   32187 	* tests/getdents.out: New file.
   32188 	* tests/Makefile.am (EXTRA_DIST): Add it.
   32189 	* tests/getdents.test: Check whether awk is capable of matching long
   32190 	regular expressions.
   32191 
   32192 2015-02-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   32193 
   32194 	Fix compilation warnings about incompatible print formats.
   32195 	On some platforms printing of __s64 types with "%lld" format,
   32196 	or __u64 types with "%llu" or "%llx" formats causes a warning
   32197 	that __s64/__u64 type is not compatible with long long format.
   32198 	From my PoV, this is nonsense, but the workaround costs nothing.
   32199 
   32200 	* scsi.c (print_sg_io_v4_req, print_sg_io_v4_res): Cast __u64 types
   32201 	to (unsigned long long).
   32202 	* v4l2.c (v4l2_ioctl): Likewise.  Cast __s64 type to (long long).
   32203 
   32204 2015-02-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   32205 
   32206 	powerpc64: fix build regression.
   32207 	* linux/powerpc64/arch_regs.h: New file.
   32208 	* Makefile.am (EXTRA_DIST): Add it.
   32209 
   32210 	signalent: update from linux v3.19.
   32211 	* linux/alpha/signalent.h: Update from linux v3.19 signalent.sh.
   32212 	* linux/hppa/signalent.h: Likewise.
   32213 	* linux/mips/signalent.h: Likewise.
   32214 	* linux/sparc/signalent.h: Likewise.
   32215 
   32216 	Cleanup auxiliary signalent files.
   32217 	* linux/aarch64/signalent1.h: Include "signalent.h".
   32218 	* linux/powerpc64/signalent1.h: Likewise.
   32219 	* linux/sparc64/signalent2.h: Likewise.
   32220 	* linux/tile/signalent1.h: Likewise.
   32221 	* linux/x32/signalent1.h: Likewise.
   32222 	* linux/x86_64/signalent1.h: Likewise.
   32223 	* linux/x86_64/signalent2.h: Likewise.
   32224 	* linux/sparc64/signalent.h: Include "sparc/signalent.h".
   32225 	* linux/sparc64/signalent1.h: Include "sparc/signalent1.h".
   32226 	* linux/x32/signalent.h: Remove.
   32227 	* Makefile.am (EXTRA_DIST): Remove linux/x32/signalent.h.
   32228 
   32229 2015-02-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   32230 
   32231 	x86_64, x32: fix sys_sigreturn.
   32232 	On x86_64/x32, sys_sigreturn is defined only for i386 personality.
   32233 
   32234 	* signal.c (sys_sigreturn): Define for X32.
   32235 	(sys_sigreturn) [X86_64 || X32]: Implement for i386 personality only.
   32236 
   32237 2015-02-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   32238 
   32239 	sparc, x32: fix build regression.
   32240 	* syscall.c (print_pc): Use current_wordsize iff it is defined.
   32241 
   32242 	Change errnoent.h files to use designated initializers.
   32243 	* signal.c (printsiginfo): Allow elements of errnoent array to be zero.
   32244 	* syscall.c (trace_syscall_exiting): Likewise.
   32245 	* errnoent.sh: Output designated initializers.
   32246 	* linux/errnoent.h: Regenerated.
   32247 	* linux/alpha/errnoent.h: Regenerated.
   32248 	* linux/hppa/errnoent.h: Regenerated.
   32249 	* linux/mips/errnoent.h: Regenerated.
   32250 	* linux/sparc/errnoent.h: Regenerated.
   32251 	* linux/sparc/errnoent1.h: Regenerated.
   32252 	* linux/powerpc/errnoent.h: New file.
   32253 	* linux/powerpc64/errnoent.h: Include "powerpc/errnoent.h".
   32254 	* Makefile.am (EXTRA_DIST): Add linux/powerpc/errnoent.h
   32255 	and linux/powerpc64/errnoent.h.
   32256 
   32257 	errnoent: update from linux v3.19.
   32258 	* linux/errnoent.h: Update from linux v3.19 using errnoent.sh.
   32259 	* linux/alpha/errnoent.h: Likewise.
   32260 	* linux/hppa/errnoent.h: Likewise.
   32261 	* linux/mips/errnoent.h: Likewise.
   32262 	* linux/sparc/errnoent.h: Likewise.
   32263 
   32264 	Cleanup auxiliary errnoent files.
   32265 	* linux/aarch64/errnoent1.h: Include "errnoent.h".
   32266 	* linux/powerpc64/errnoent1.h: Likewise.
   32267 	* linux/sparc64/errnoent2.h: Likewise.
   32268 	* linux/tile/errnoent1.h: Likewise.
   32269 	* linux/x32/errnoent1.h: Likewise.
   32270 	* linux/x86_64/errnoent1.h: Likewise.
   32271 	* linux/x86_64/errnoent2.h: Likewise.
   32272 	* linux/sparc64/errnoent.h: Include "sparc/errnoent.h".
   32273 	* linux/sparc64/errnoent1.h: Include "sparc/errnoent1.h".
   32274 	* linux/x32/errnoent.h: Remove.
   32275 	* Makefile.am (EXTRA_DIST): Remove linux/x32/errnoent.h.
   32276 
   32277 2015-02-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   32278 
   32279 	evdev: update constants from linux v3.19.
   32280 	* xlat/evdev_keycode.in: Update from linux v3.19.
   32281 	* xlat/evdev_prop.in: Likewise.
   32282 
   32283 	evdev: decode keycode value in EVIOC[GS]KEYCODE_V2 commands.
   32284 	* evdev.c (keycode_V2_ioctl): Use evdev_keycode to print
   32285 	input_keymap_entry.keycode.
   32286 
   32287 	evdev: fix build with old kernel headers.
   32288 	* configure.ac: Check whether struct input_absinfo.resolution is defined
   32289 	in <linux/input.h>.
   32290 	* evdev.c (SYN_MAX): Add fallback definition.
   32291 	(abs_ioctl): Wrap use of struct input_absinfo.resolution in #ifdef check.
   32292 	(keycode_V2_ioctl, mtslots_ioctl, repeat_ioctl): Wrap in #ifdef checks.
   32293 	(evdev_read_ioctl): Wrap in #ifdef checks the code that uses EV_SW,
   32294 	EVIOCGREP, EVIOCGKEYCODE_V2, EVIOCGMTSLOTS, EVIOCGPROP, and EVIOCGSW.
   32295 	(evdev_write_ioctl): Wrap in #ifdef checks the code that uses EVIOCSREP,
   32296 	EVIOCSKEYCODE_V2, EVIOCSCLOCKID, and EVIOCREVOKE.
   32297 
   32298 2015-02-22  Etienne Gemsa  <etienne.gemsa (a] lse.epita.fr>
   32299 
   32300 	Add decoding for evdev ioctls.
   32301 	This patch introduces decoding for evdev ioctls.  For EVIOCSFF the five
   32302 	first members are decoded, the union is not.  The code was compiled and
   32303 	tested on x86_64 with Linux 3.13.
   32304 
   32305 	* evdev.c: New file.
   32306 	* Makefile.am (strace_SOURCES): Add it.
   32307 	* defs.h (evdev_ioctl): New prototype.
   32308 	* ioctl.c (ioctl_decode): Call evdev_ioctl for 'E' ioctl commands.
   32309 	* xlat/evdev_autorepeat.in: New file.
   32310 	* xlat/evdev_ff_status.in: New file.
   32311 	* xlat/evdev_ff_types.in: New file.
   32312 	* xlat/evdev_keycode.in: New file.
   32313 	* xlat/evdev_leds.in: New file.
   32314 	* xlat/evdev_misc.in: New file.
   32315 	* xlat/evdev_mtslots.in: New file.
   32316 	* xlat/evdev_prop.in: New file.
   32317 	* xlat/evdev_relative_axes.in: New file.
   32318 	* xlat/evdev_snd.in: New file.
   32319 	* xlat/evdev_switch.in: New file.
   32320 	* xlat/evdev_sync.in: New file.
   32321 
   32322 2015-02-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   32323 
   32324 	Fix build with old kernel headers.
   32325 	* strace.c (print_debug_info, maybe_allocate_tcb, print_signalled,
   32326 	print_exited): Remove "const" qualifier from status variable to
   32327 	workaround some old implementations of WIFSIGNALED/WIFSTOPPED/WIFEXITED
   32328 	macros.
   32329 	* v4l2.c: Include <linux/types.h>.
   32330 	(v4l2_ioctl): Check that V4L2_CTRL_FLAG_NEXT_CTRL and VIDIOC_S_EXT_CTRLS
   32331 	macros are defined.
   32332 	* tests/Makefile.am (AM_CPPFLAGS): Define.
   32333 
   32334 	Fix "make dist" regression.
   32335 	* Makefile.am (EXTRA_DIST): Remove README-linux.
   32336 
   32337 2015-02-20  Elliott Hughes  <enh (a] google.com>
   32338 
   32339 	test/sfd.c: add missing includes.
   32340 
   32341 2015-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   32342 
   32343 	Remove linux/fanotify.h.
   32344 	* linux/fanotify.h: Remove.
   32345 	* Makefile.am (EXTRA_DIST): Remove it.
   32346 	* fanotify.c: Do not include <linux/fanotify.h>.
   32347 	* xlat/fan_classes.in: Add default values.
   32348 	* xlat/fan_event_flags.in: Likewise.
   32349 	* xlat/fan_init_flags.in: Likewise.
   32350 	* xlat/fan_mark_flags.in: Likewise.
   32351 
   32352 	Remove linux/keyctl.h.
   32353 	* linux/keyctl.h: Remove.
   32354 	* Makefile.am (EXTRA_DIST): Remove it.
   32355 	* keyctl.c: Do not include <linux/keyctl.h>.
   32356 	* xlat/key_perms.in: Add default values.
   32357 	* xlat/key_reqkeys.in: Likewise.
   32358 	* xlat/key_spec.in: Likewise.
   32359 	* xlat/keyctl_commands.in: Likewise.
   32360 
   32361 	Remove linux/kexec.h.
   32362 	* linux/kexec.h: Remove.
   32363 	* Makefile.am (EXTRA_DIST): Remove it.
   32364 	* kexec.c: Do not include <linux/kexec.h>.
   32365 	* xlat/kexec_arch_values.in: Add default values.
   32366 	* xlat/kexec_flags.in: Rename to kexec_load_flags.in, add default
   32367 	values.
   32368 
   32369 	Remove linux/inotify.h.
   32370 	* linux/inotify.h: Remove.
   32371 	* Makefile.am (EXTRA_DIST): Remove it.
   32372 	* inotify.c: Do not include <linux/inotify.h>.
   32373 	* xlat/inotify_flags.in: Add default values.
   32374 
   32375 	Remove linux/reboot.h.
   32376 	* linux/reboot.h: Remove.
   32377 	* Makefile.am (EXTRA_DIST): Remove it.
   32378 	* reboot.c: Do not include <linux/reboot.h>.
   32379 	* xlat/bootflags1.in: Add default values.
   32380 	* xlat/bootflags2.in: Likewise.
   32381 	* xlat/bootflags3.in: Likewise.
   32382 
   32383 	seccomp: fix fallback definitions of some SECCOMP_* constants.
   32384 	* seccomp.c (SECCOMP_SET_MODE_STRICT, SECCOMP_SET_MODE_FILTER,
   32385 	SECCOMP_FILTER_FLAG_TSYNC): Remove fallback definitions.
   32386 	* xlat/seccomp_filter_flags.in: Add default value.
   32387 	* xlat/seccomp_ops.in: Add default values.
   32388 
   32389 2015-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   32390 
   32391 	is_negated_errno: sync MAX_ERRNO with the kernel.
   32392 	Linux kernel used to guarantee that the largest errno value will not
   32393 	exceed 4095, but SECCOMP_RET_ERRNO support introduced by kernel commit
   32394 	v3.4-rc2-13-gacf3b2c71ed20c53dc69826683417703c2a88059 inadvertently
   32395 	broke it.  The guarantee is back with kernel commit
   32396 	v3.19-8275-g580c57f1076872ebc2427f898b927944ce170f2d.
   32397 
   32398 	* syscall.c (is_negated_errno): Set maximum errno value to 4095.
   32399 
   32400 2015-02-19  Mike Frysinger  <vapier (a] gentoo.org>
   32401 
   32402 	README-linux: punt.
   32403 	Considering we're requiring linux-2.6 era kernels, the discussion of
   32404 	header troubles that plagued 2.2 and 2.4 are no longer relevant.
   32405 
   32406 	* README-linux: Delete.
   32407 
   32408 2015-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   32409 
   32410 	Improve prctl decoding.
   32411 	* configure.ac (AC_CHECK_HEADERS): Add linux/securebits.h.
   32412 	* prctl.c (sys_prctl): Implement full decoding of all PR_* constants
   32413 	as defined in linux v3.19.
   32414 	(sys_arch_prctl): Fix decoding of unknown commands.
   32415 	* xlat/cap.in: New file.
   32416 	* xlat/pr_mce_kill.in: New file.
   32417 	* xlat/pr_mce_kill_policy.in: New file.
   32418 	* xlat/pr_set_mm.in: New file.
   32419 	* xlat/pr_tsc.in: New file.
   32420 	* xlat/pr_unalign_flags.in: New file.
   32421 	* xlat/secbits.in: New file.
   32422 	* xlat/prctl_options.in: Remove non-linux constants, add fallback
   32423 	definitions.
   32424 	* xlat/seccomp_mode.in: Add fallback definitions.
   32425 
   32426 	xlat: extend syntax.
   32427 	* xlat/gen.sh (gen_header): If the name of constant is specified with a
   32428 	value, generate a default definition for the constant using this value.
   32429 	* xlat/timerfdflags.in: Use extended syntax.
   32430 
   32431 	Move CAP_* definitions out to header files.
   32432 	* Makefile.am (strace_SOURCES): Add caps0.h and caps1.h.
   32433 	* caps0.h: New file.
   32434 	* caps1.h: New file.
   32435 	* capability.c: Remove CAP_* definitions, include "caps0.h"
   32436 	and "caps1.h" instead.
   32437 	Include "xlat/cap_mask0.h" instead of "xlat/capabilities.h".
   32438 	Include "xlat/cap_mask1.h" instead of "xlat/capabilities1.h".
   32439 	(print_cap_bits): Update callers.
   32440 	* xlat/capabilities.in: Rename to xlat/cap_mask0.in.
   32441 	* xlat/capabilities1.in: Rename to xlat/cap_mask1.in.
   32442 
   32443 2015-02-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   32444 
   32445 	Declare all format printers with printf format attribute.
   32446 	* defs.h (printllval, printnum_int, printnum_long): Mark with
   32447 	format(printf) attribute.
   32448 	* sock.c (sock_ioctl): Fix format string.
   32449 
   32450 2015-02-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   32451 
   32452 	Rename printnum to printnum_long to avoid confusion.
   32453 	* defs.h (printnum): Rename to printnum_long.
   32454 	* util.c (printnum): Likewise.
   32455 	* process.c (sys_ptrace): Likewise.
   32456 	* time.c (sys_time): Likewise.
   32457 
   32458 	Use printnum_int consistently.
   32459 	* sock.c (sock_ioctl): Use printnum_int instead of printnum to print
   32460 	integer type.
   32461 	* stream.c (sys_getpmsg): Likewise.
   32462 
   32463 2015-02-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   32464 
   32465 	print_pc: fix multiple personalities support.
   32466 	* syscall.c (print_pc): Choose instruction pointer format depending
   32467 	on current_wordsize, not the size of long integer type.
   32468 	* tests/pc.c: New file.
   32469 	* tests/pc.test: New test.
   32470 	* tests/Makefile.am (check_PROGRAMS): Add pc.
   32471 	(TESTS): Add pc.test.
   32472 	* tests/.gitignore: Add pc.
   32473 
   32474 	mips: use PTRACE_GETREGS to fetch all registers.
   32475 	* linux/mips/arch_regs.h (struct mips_regs): New structure.
   32476 	(mips_REG_*): New macros.
   32477 	* signal.c (sys_sigreturn) [MIPS]: Use mips_REG_SP.
   32478 	* syscall.c [MIPS] (struct mips_regs): New variable.
   32479 	[MIPS] (ARCH_REGS_FOR_GETREGS): New macro.
   32480 	(mips_a3, mips_r2): Remove.
   32481 	(print_pc) [MIPS]: Use mips_REG_EPC.
   32482 	(get_scno) [MIPS]: Use mips_REG_V0 and mips_REG_A3.
   32483 	(get_syscall_args) [MIPS]: Use mips_REG_A[0-5].
   32484 	(get_syscall_result) [MIPS]: Remove.
   32485 	(get_error) [MIPS]: Use mips_REG_A3 and mips_REG_V0.
   32486 
   32487 	mips: move ABI check to configure.ac.
   32488 	* configure.ac [MIPS]: Check for MIPS ABI.
   32489 	* defs.h [MIPS]: Remove MIPS ABI check.
   32490 	* ioctlsort.c: Likewise.
   32491 
   32492 	tests: support alternative names of select syscall.
   32493 	* tests/select.awk: Recognize "_newselect" as another name of "select".
   32494 	* tests/select.test: Try alternative names of select syscall.
   32495 
   32496 2015-02-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   32497 
   32498 	i386: fix compilation warning.
   32499 	Some gcc versions complain about assigning long* to uint32_t* on i386.
   32500 
   32501 	* syscall.c [I386] (i386_esp_ptr): Change type from uint32_t* to long*.
   32502 	* linux/i386/arch_regs.h (i386_esp_ptr): Likewise.
   32503 	* linux/x86_64/arch_regs.h: Do not include "i386/arch_regs.h".
   32504 	(i386_esp_ptr): New prototype.
   32505 
   32506 2015-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   32507 
   32508 	Do not reset get_regs_error unnecessarily.
   32509 	As get_regs() is now guaranteed to set get_regs_error,
   32510 	there is no need to reset get_regs_error before get_regs() call.
   32511 
   32512 	* strace.c (trace): Call clear_regs() iff !WIFSTOPPED.
   32513 
   32514 2015-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   32515 
   32516 	get_syscall_result: remove redundant ifdefs.
   32517 	As get_regs() is now guaranteed to fetch registers when either
   32518 	ARCH_REGS_FOR_GETREGSET or ARCH_REGS_FOR_GETREGS is defined, we can
   32519 	safely replace all checks for architectures where these macros are defined
   32520 	with a single check for these macros.
   32521 
   32522 	* syscall.c (get_syscall_result): Check for [ARCH_REGS_FOR_GETREGSET ||
   32523 	ARCH_REGS_FOR_GETREGS].  Remove all checks for architectures where
   32524 	nothing has to be done after get_regs().
   32525 
   32526 2015-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   32527 
   32528 	get_regs: define for all architectures.
   32529 	* defs.h (get_regs_error): Remove.
   32530 	(clear_regs): Update prototype, declare unconditionally.
   32531 	(get_regs): Declare unconditionally.
   32532 	* syscall.c (clear_regs): New function.
   32533 	(get_regs): Define unconditionally.
   32534 	(get_regs_error): Define unconditionally, change scope to static.
   32535 
   32536 	get_regs: unify code for architectures that use PTRACE_GETREGS.
   32537 	* syscall.c [I386, POWERPC, ARM, AVR32, SPARC, SPARC64, TILE]
   32538 	(ARCH_REGS_FOR_GETREGS): New macro.
   32539 	(get_regs): Unify code for ARCH_REGS_FOR_GETREGS architectures.
   32540 
   32541 	get_regset: define iff PTRACE_GETREGSET is used.
   32542 	* syscall.c [AARCH64, X86_64, X32] (ARCH_REGS_FOR_GETREGSET,
   32543 	ARCH_IOVEC_FOR_GETREGSET): New macros.
   32544 	(get_regset): Define iff ARCH_REGS_FOR_GETREGSET is defined; change
   32545 	return type to long, return ptrace() return code instead of assigning it
   32546 	to get_regs_error; do not list individual architectures, implement
   32547 	constant and variable iovec cases depending on ARCH_IOVEC_FOR_GETREGSET.
   32548 	(get_regs): Assign get_regset() return code to get_regs_error.
   32549 
   32550 2015-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   32551 
   32552 	arm, i386: switch back to use PTRACE_GETREGS.
   32553 	PTRACE_GETREGSET and PTRACE_GETREGS methods are equally good on arm and
   32554 	i386 architectures, but PTRACE_GETREGSET with fallback to PTRACE_GETREGS
   32555 	is a bit more costly, so choose the method that costs less.
   32556 	This partially reverts commit v4.7-149-gfaa177e.
   32557 
   32558 	* syscall.c [ARM, I386] (ARCH_REGS_FOR_GETREGSET): Remove.
   32559 	(get_regset) [ARM || I386]: Remove.
   32560 	(get_regs) [ARM || I386]: Use PTRACE_GETREGS unconditionally.
   32561 
   32562 2015-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   32563 
   32564 	syscall.c: remove obsolete ifdefs.
   32565 	* syscall.c (get_regset, get_regs): Do not check for availability
   32566 	of PTRACE_GETREGSET and NT_PRSTATUS macros.
   32567 
   32568 	syscall.c: ensure that NT_PRSTATUS is defined.
   32569 	* syscall.c: Do not include <elf.h>.
   32570 	(NT_PRSTATUS): New macro.
   32571 
   32572 2015-02-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   32573 
   32574 	Move regs-related macros and declarations from defs.h to regs.h.
   32575 	* regs.h: New file.
   32576 	* Makefile.am (strace_SOURCES): Add it.
   32577 	* linux/arch_regs.h: New file.
   32578 	* linux/alpha/arch_regs.h: Likewise.
   32579 	* linux/arm/arch_regs.h: Likewise.
   32580 	* linux/hppa/arch_regs.h: Likewise.
   32581 	* linux/i386/arch_regs.h: Likewise.
   32582 	* linux/ia64/arch_regs.h: Likewise.
   32583 	* linux/mips/arch_regs.h: Likewise.
   32584 	* linux/powerpc/arch_regs.h: Likewise.
   32585 	* linux/sh64/arch_regs.h: Likewise.
   32586 	* linux/sparc/arch_regs.h: Likewise.
   32587 	* linux/sparc64/arch_regs.h: Likewise.
   32588 	* linux/tile/arch_regs.h: Likewise.
   32589 	* linux/x86_64/arch_regs.h: Likewise.
   32590 	* Makefile.am (EXTRA_DIST): Add them.
   32591 	* defs.h: Remove definitions of PTRACE_*, REG_*, PT_*, U_REG_*,
   32592 	and ARM_* macros.
   32593 	Remove declarations of struct pt_regs variables.
   32594 	[SPARC]: Do not include <asm/psr.h>.
   32595 	[SPARC64]: Do not include <asm/psrcompat.h>.
   32596 	* bjm.c: Do not include <sys/user.h>.
   32597 	* process.c: Include "regs.h".
   32598 	Do not include <sys/user.h> and <sys/reg.h>.
   32599 	[IA64]: Do not include <asm/ptrace_offsets.h> and <asm/rse.h>.
   32600 	* util.c: Likewise.
   32601 	* syscall.c: Likewise.
   32602 	[AARCH64]: Define struct arm_pt_regs and ARM_* macros.
   32603 	[SPARC]: Include <asm/psr.h>.
   32604 	[SPARC64]: Include <asm/psrcompat.h>.
   32605 	* signal.c: Include "regs.h".
   32606 	Do not include <sys/user.h> and <sys/reg.h>.
   32607 	[IA64]: Do not include <asm/ptrace_offsets.h>.
   32608 	* strace.c [IA64]: Do not include <asm/ptrace_offsets.h>.
   32609 
   32610 	Move all ptrace-related macros and declarations from defs.h to ptrace.h.
   32611 	* ptrace.h: New file.
   32612 	* Makefile.am (strace_SOURCES): Add it.
   32613 	* configure.ac (AC_CHECK_HEADERS): Remove linux/ptrace.h and sys/ptrace.h.
   32614 	* defs.h: Do not include <sys/ptrace.h> and <asm/ptrace.h>.
   32615 	Remove definitions of PTRACE_* macros.
   32616 	* process.c: Remove <linux/ptrace.h> workarounds, include "ptrace.h".
   32617 	* signal.c: Likewise.
   32618 	* syscall.c: Likewise.
   32619 	* util.c: Likewise.
   32620 	* strace.c: Include "ptrace.h".
   32621 	* wait.c: Likewise.
   32622 
   32623 2015-02-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   32624 
   32625 	Enhance wait status decoding.
   32626 	* xlat/ptrace_events.in: New file.
   32627 	* wait.c: Include "xlat/ptrace_events.h".
   32628 	(printstatus): In case of WIFSTOPPED, print 0x80 flag separately from
   32629 	the stop signal name.
   32630 	[WIFCONTINUED]: Add WIFCONTINUED support.
   32631 	Decode PTRACE_EVENT_* events.
   32632 
   32633 2015-02-08  Bart Van Assche  <bart.vanassche (a] sandisk.com>
   32634 
   32635 	scsi: add bsg support.
   32636 	The Linux kernel supports two different versions of the SG_IO API,
   32637 	namely v3 and v4. This patch adds support for version 4 of this API.
   32638 	At least the sg3_utils package supports version 4 of this API.  Version
   32639 	4 of this API is used if /dev/bsg/H:C:I:L is used as device name.
   32640 
   32641 	This patch has been tested by inspecting the output of the following
   32642 	commands:
   32643 
   32644 	modprobe scsi_debug dev_size_mb=16 delay=0
   32645 	dev=$(lsscsi | sed -n '/ scsi_debug /s,^[^/]*,,p')
   32646 	./strace -eioctl -s256 sg_inq $dev
   32647 	echo 'Test XDWRITEREAD(10)'
   32648 	bsg=/dev/bsg/$(lsscsi | sed -n '/ scsi_debug /s,^\[\([^]]\+\)\].*,\1,p')
   32649 	dd if=/dev/zero bs=512 count=1 |
   32650 	  ./strace -eioctl -s256 sg_raw -s 512 -r 1024 $bsg 53 00 00 00 00 01 00 00 01 00
   32651 
   32652 	* configure.ac (AC_CHECK_HEADERS): Add linux/bsg.h.
   32653 	* xlat/bsg_protocol.in: New file.
   32654 	* xlat/bsg_subprotocol.in: Likewise.
   32655 	* scsi.c: Include them and <linux/bsg.h>.
   32656 	(print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
   32657 	print_sg_io_v4_res): New functions.
   32658 	(print_sg_io_req, print_sg_io_res): Use them.
   32659 	(scsi_ioctl): Update callers.
   32660 
   32661 2015-02-08  Bart Van Assche  <bart.vanassche (a] sandisk.com>
   32662 
   32663 	scsi: Add iovec support.
   32664 	* scsi.c (print_sg_io_req, print_sg_io_res): Add support for decoding
   32665 	iovecs passed via the SG I/O v3 interface.  Decode the "data in" and
   32666 	"data out" buffers in hex instead of in ASCII.
   32667 
   32668 	scsi: on exit, print only initialized part of the buffer.
   32669 	* scsi.c (print_sg_io_res): Only print that part of the data in buffer
   32670 	that has been initialized by the SCSI LLD driver.
   32671 
   32672 	scsi: make print_sg_io_buffer() print square brackets instead of its callers
   32673 	* scsi.c (print_sg_io_buffer): Print square brackets in this function.
   32674 	(print_sg_io_req, print_sg_io_res): Update callers.
   32675 
   32676 2015-02-08  Bart Van Assche  <bart.vanassche (a] sandisk.com>
   32677 
   32678 	scsi: improve consistency with other decoding functions.
   32679 	Pass pointers to tracee's memory as integers instead of pointers.
   32680 
   32681 	* scsi.c (print_sg_io_buffer): Change second argument's type to
   32682 	unsigned long.
   32683 	(print_sg_io_req, print_sg_io_res): Update callers.
   32684 
   32685 2015-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   32686 
   32687 	tests: extend getdents to support all filesystems regardless of file order
   32688 	* tests/getdents.awk: Include all 6 possible permutations of 3
   32689 	direntries to regexps.
   32690 
   32691 2015-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   32692 
   32693 	print_setsockopt: fix fall-through bug in SOL_IP switch case.
   32694 	This fixes the bug introduced by commit v4.9-250-ga0a4909.
   32695 
   32696 	* net.c (print_setsockopt): Separate SOL_IP case from SOL_PACKET.
   32697 
   32698 	Reported-by: Ben Noordhuis <info (a] bnoordhuis.nl>
   32699 
   32700 2015-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   32701 
   32702 	Do not watch for post-execve SIGTRAP if PTRACE_O_TRACEEXEC is enabled.
   32703 	If PTRACE_O_TRACEEXEC option is enabled, then post-execve SIGTRAPs are
   32704 	suppressed and we can safely skip -ENOSYS heuristics.  This partially
   32705 	reverts commits v4.9-258-g8e398b6 and v4.9-261-gd70c41d.
   32706 
   32707 	* syscall.c (syscall_fixup_on_sysenter): Skip if PTRACE_O_TRACEEXEC
   32708 	flag is set in ptrace_setoptions.  Remove all SECCOMP_RET_ERRNO
   32709 	workarounds as they are not needed when PTRACE_O_TRACEEXEC is not
   32710 	supported by the kernel.
   32711 
   32712 2015-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   32713 
   32714 	When the process stared by strace exits/terminates, forget its pid.
   32715 	The process stared by strace can exit/terminate only once.  When this
   32716 	happens, forget its pid, so that any other event or action related to a
   32717 	process with the same pid as the pid of that first process would not be
   32718 	confused with that first process.
   32719 
   32720 	* strace.c (print_signalled, print_exited): Clear strace_child when it
   32721 	equals to the given pid.
   32722 
   32723 2015-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   32724 
   32725 	-b execve: avoid misleading warning about unknown pid.
   32726 	* strace.c (maybe_allocate_tcb): If detach_on_execve is set, do not warn
   32727 	about !WIFSTOPPED process with pid == strace_child.
   32728 	* tests/bexecve.test: New test.
   32729 	* tests/Makefile.am (TESTS): Add it.
   32730 
   32731 	-b execve: do not use struct tcb after detach.
   32732 	* strace.c (trace): Do not proceed after detach.
   32733 
   32734 2015-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   32735 
   32736 	trace: split into several functions.
   32737 	This change moves the main loop back to main() and splits trace()
   32738 	into several functions.  There are no algorithmic changes.
   32739 
   32740 	* strace.c (print_debug_info, maybe_allocate_tcb, maybe_switch_tcbs,
   32741 	print_signalled, print_exited, print_stopped, startup_tcb): New
   32742 	functions.
   32743 	(trace) Use them.  Move the main loop ...
   32744 	(main): ... here.
   32745 
   32746 2015-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   32747 
   32748 	printsiginfo: constify the first argument.
   32749 	* signal.c (printsiginfo): Make the first argument a pointer to a const type.
   32750 	* defs.h (printsiginfo): Likewise.
   32751 	(printsiginfo, printsiginfo_at): Always define these prototypes.
   32752 	* configure.ac (AC_CHECK_TYPES): Remove siginfo_t, as HAVE_SIGINFO_T
   32753 	is no longer used.
   32754 
   32755 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32756 
   32757 	test: add a manual test for seccomp decoding.
   32758 	* test/.gitignore: Add seccomp.
   32759 	* test/Makefile (PROGS): Likewise.
   32760 	* test/seccomp.c: New file.
   32761 	* test/README: Mention ../tests/.
   32762 
   32763 	Implement seccomp decoding.
   32764 	* configure.ac (AC_CHECK_HEADERS): Add linux/filter.h
   32765 	and linux/seccomp.h.
   32766 	* defs.h (print_seccomp_filter): New prototype.
   32767 	* linux/dummy.h (sys_seccomp): Remove.
   32768 	* linux/syscall.h (sys_seccomp): New prototype.
   32769 	* prctl.c: Include <linux/seccomp.h>.
   32770 	(sys_prctl): Decode PR_SET_SECCOMP.
   32771 	* seccomp.c: New file.
   32772 	* Makefile.am (strace_SOURCES): Add it.
   32773 	* xlat/bpf_class.in: New file.
   32774 	* xlat/bpf_miscop.in: Likewise.
   32775 	* xlat/bpf_mode.in: Likewise.
   32776 	* xlat/bpf_op_alu.in: Likewise.
   32777 	* xlat/bpf_op_jmp.in: Likewise.
   32778 	* xlat/bpf_rval.in: Likewise.
   32779 	* xlat/bpf_size.in: Likewise.
   32780 	* xlat/bpf_src.in: Likewise.
   32781 	* xlat/seccomp_filter_flags.in: Likewise.
   32782 	* xlat/seccomp_mode.in: Likewise.
   32783 	* xlat/seccomp_ops.in: Likewise.
   32784 	* xlat/seccomp_ret_action.in: Likewise.
   32785 
   32786 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32787 
   32788 	is_negated_errno: support large errno values.
   32789 	Thanks to SECCOMP_RET_DATA == 0xffff, abnormally large errno
   32790 	values could be easily seen when a seccomp filter is used, e.g.
   32791 	BPF_STMT(BPF_RET, SECCOMP_RET_ERRNO | SECCOMP_RET_DATA)
   32792 
   32793 	* syscall.c (is_negated_errno): Allow errno values as large as 0xffff.
   32794 
   32795 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32796 
   32797 	x86, x32, x86_64: print SECCOMP_RET_ERRNO filtered syscalls.
   32798 	This is required to process SECCOMP_RET_ERRNO filtered syscalls on
   32799 	systems where linux kernel does not change the syscall number to -1.
   32800 
   32801 	* syscall.c (is_negated_errno): Move before syscall_fixup_on_sysenter.
   32802 	(syscall_fixup_on_sysenter) [I386 || X32 || X86_64] : Use it to check
   32803 	AX register.
   32804 
   32805 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32806 
   32807 	is_negated_errno: merge x86_64 and x32 definitions.
   32808 	* syscall.c (kernel_long_t, kernel_ulong_t): New types.
   32809 	(is_negated_errno): Merge [X32] and [!X32] definitions.
   32810 	(get_error): Merge [X86_64] and [X32] code.
   32811 
   32812 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32813 
   32814 	x32: rename is_negated_errno_x32 to is_negated_errno.
   32815 	Use the same function name on all architectures.
   32816 
   32817 	* syscall.c [X32] (is_negated_errno_x32): Rename to is_negated_errno.
   32818 	(get_error) [X32]: Update callers.
   32819 
   32820 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32821 
   32822 	x86, x32, x86_64: do not skip syscall number -1.
   32823 	Syscall number -1 might be a side effect of SECCOMP_RET_ERRNO filtering.
   32824 
   32825 	* syscall.c (syscall_fixup_on_sysenter) [I386 || X32 || X86_64]:
   32826 	Do not skip syscalls that have number -1.
   32827 
   32828 2015-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   32829 
   32830 	x86_64: do not interpet syscall number -1 as a x32 personality syscall.
   32831 	Syscall number -1 might be a side effect of SECCOMP_RET_ERRNO filtering.
   32832 
   32833 	* syscall.c (get_scno) [X86_64]: Handle the case of scno == -1.
   32834 
   32835 2015-02-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   32836 
   32837 	Implement getrandom syscall decoding.
   32838 	* getrandom.c: New file.
   32839 	* Makefile.am (strace_SOURCES): Add it.
   32840 	* linux/dummy.h (sys_getrandom): Remove.
   32841 	* linux/syscall.h (sys_getrandom): New prototype.
   32842 	* xlat/getrandom_flags.in: New file.
   32843 	* tests/getrandom.c: New file.
   32844 	* tests/getrandom.awk: New file.
   32845 	* tests/getrandom.test: New test.
   32846 	* tests/Makefile.am (check_PROGRAMS): Add getrandom.
   32847 	(TESTS): Add getrandom.test.
   32848 	(EXTRA_DIST): Add getrandom.awk.
   32849 	* tests/.gitignore: Add getrandom.
   32850 
   32851 2015-02-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   32852 
   32853 	tests: add a test for select syscall decoding.
   32854 	Convert test/select.c into a regular test.
   32855 
   32856 	* test/Makefile (PROGS): Remove select.
   32857 	* test/.gitignore: Likewise.
   32858 	* test/select.c: Rewrite to ...
   32859 	* tests/select.c: ... new file.
   32860 	* tests/select.awk: New file.
   32861 	* tests/select.test: New test.
   32862 	* tests/Makefile.am (check_PROGRAMS): Add select.
   32863 	(TESTS): Add select.test.
   32864 	(EXTRA_DIST): Add select.awk.
   32865 	* tests/.gitignore: Add select.
   32866 
   32867 2015-02-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   32868 
   32869 	tests: add a test for the latest dumpio fix.
   32870 	* tests/dumpio.expected: New file.
   32871 	* tests/unix-pair-send-recv.c: New file.
   32872 	* tests/dumpio.test: New test.
   32873 	* tests/Makefile.am (check_PROGRAMS): Add unix-pair-send-recv.
   32874 	(TESTS): Add dumpio.test.
   32875 	(EXTRA_DIST): Add dumpio.expected.
   32876 	* tests/.gitignore: Add unix-pair-send-recv.
   32877 
   32878 2015-02-01  Aurelien Jacobs  <aurel (a] gnuage.org>
   32879 
   32880 	Fix simultaneous -e read and -e write usage.
   32881 	This allows using both -e read=FD and -e write=FD at the same time
   32882 	with the same FD.
   32883 	Without this patch, the -e write=FD is ignored if -e read=FD is used
   32884 	at the same time.
   32885 
   32886 2015-01-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   32887 
   32888 	net.c: remove unused HAVE_SIN6_SCOPE_ID_LINUX-based code.
   32889 	The AC_SIN6_SCOPE_ID autoconf macro that was able to define
   32890 	HAVE_SIN6_SCOPE_ID_LINUX was removed by commit v4.4-98-g64f793a.
   32891 
   32892 	* net.c [HAVE_SIN6_SCOPE_ID_LINUX]: Remove.
   32893 
   32894 2015-01-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   32895 
   32896 	printsock: do not fetch sockaddr.sa_data twice.
   32897 	* net.c (printsock): Print addrbuf.sa.sa_data using print_quoted_string.
   32898 
   32899 	setsockopt: add decoding of MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
   32900 	* net.c (print_group_req): New function.
   32901 	(print_setsockopt): Use it.
   32902 
   32903 2015-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   32904 
   32905 	tests: add a test for sockaddr_un.sun_path decoding.
   32906 	* tests/net-accept-connect.c: Allow long socket addresses.
   32907 	* tests/sun_path.test: New test.
   32908 	* tests/Makefile.am (TESTS): Add it.
   32909 
   32910 	printsock: print the whole sockaddr_un.sun_path.
   32911 	* net.c (printsock): If sockaddr_un.sun_path is not NUL-terminated,
   32912 	do not omit the last byte of sockaddr_un.sun_path array.
   32913 
   32914 	printsock: do not fetch sockaddr_un.sun_path twice.
   32915 	* net.c (printsock): Print addrbuf.sau.sun_path using
   32916 	print_quoted_string.
   32917 
   32918 2015-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   32919 
   32920 	net: define all SOL_* constants.
   32921 	Ensure that all known SOL_* constants are defined.
   32922 	Sync the list of known SOL_* constants with linux/socket.h.
   32923 
   32924 	* net.c: Provide definitions for all SOL_* constants.
   32925 	Remove all SOL_* preprocessor conditionals.
   32926 	(socketlayers): Disconnect from inet_protocols.
   32927 	* xlat/socketlayers.in: Remove SOL_ICMP, add SOL_ALG and SOL_NFC.
   32928 
   32929 2015-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   32930 
   32931 	setsockopt: decode PACKET_ADD_MEMBERSHIP.
   32932 	* xlat/packet_mreq_type.in: New file.
   32933 	* net.c: Include "xlat/packet_mreq_type.h".
   32934 	(print_packet_mreq): New function.
   32935 	(print_setsockopt): Use it.
   32936 
   32937 2015-01-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   32938 
   32939 	getsockopt, setsockopt: do not decode structures in non-verbose mode.
   32940 	Move the code that is common between getsockopt and setsockopt parsers
   32941 	to a separate function.
   32942 	Move printers specific to getsockopt and setsockopt to separate
   32943 	functions, choose appropriate parsers depending on verbose mode.
   32944 	Move parsers of specific socket options to separate functions.
   32945 
   32946 	* net.c (printicmpfilter): Rename to print_icmp_filter.
   32947 	(printsockopt): Remove.
   32948 	(print_sockopt_fd_level_name, print_linger, print_ucred,
   32949 	print_tpacket_stats, print_getsockopt, print_tpacket_req,
   32950 	print_packet_mreq, print_setsockopt): New functions.
   32951 	(sys_getsockopt, sys_setsockopt): Use them.
   32952 
   32953 2015-01-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   32954 
   32955 	sendmsg: do not decode msghdr in non-verbose mode.
   32956 	* net.c (printmsghdr): Do not decode struct msghdr in non-verbose mode.
   32957 
   32958 	decode_select: do not allocate unused memory.
   32959 	* desc.c (decode_select): On entering syscall, do not allocate memory
   32960 	in non-verbose mode.
   32961 
   32962 2015-01-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   32963 
   32964 	xattr: quote using print_quoted_string.
   32965 	* xattr.c (print_xattr_val): Drop local quoting code, use
   32966 	print_quoted_string.
   32967 
   32968 	v4l2: quote pixelformat.
   32969 	* v4l2.c (print_pixelformat): Output in quoted v4l2_fourcc() format.
   32970 
   32971 	v4l2: quote strings.
   32972 	* v4l2.c (v4l2_ioctl): Print strings using print_quoted_string.
   32973 
   32974 	mips: quote sysmips nodename.
   32975 	* sysmips.c (sys_sysmips): Print nodename using print_quoted_string.
   32976 
   32977 	block_ioctl: quote strings.
   32978 	* block.c (print_blkpg_req): Print blkpg_partition.devname and
   32979 	blkpg_partition.volname using print_quoted_string.
   32980 	(block_ioctl): Print blk_user_trace_setup.name using print_quoted_string.
   32981 
   32982 	sys_uname: quote struct utsname members.
   32983 	* uname.c (PRINT_UTS_MEMBER): New macro.
   32984 	(sys_uname): Use them.
   32985 
   32986 	sock_ioctl: quote network interface names.
   32987 	* sock.c (print_ifname): New function.
   32988 	(sock_ioctl): Use it to quote ifr_name, ifru_newname, and ifru_slave.
   32989 
   32990 	printsock: quote network interface names.
   32991 	* net.c (printsock): Print network interface names returned by
   32992 	if_indextoname() using print_quoted_string.
   32993 
   32994 	getdents, getdents64: quote filenames.
   32995 	* dirent.c (print_old_dirent): Fix quoting.
   32996 	(sys_getdents): Print d_name using print_quoted_string.
   32997 	(sys_getdents64): Likewise.
   32998 	* tests/getdents.test: Test it.
   32999 	* tests/getdents.awk: Update.
   33000 
   33001 2015-01-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   33002 
   33003 	printfd: quote pathnames.
   33004 	Change printfd() behaviour in show_fd_path mode to quote pathnames
   33005 	the same way printpathn() does.
   33006 
   33007 	* util.c (printfd): Print non-socket paths using print_quoted_string.
   33008 	* tests/scm_rights-fd.test: Test it.
   33009 	* tests/scm_rights.c: Update.
   33010 
   33011 2015-01-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   33012 
   33013 	Rework string_quote API.
   33014 	string_quote() has proven to be too hard to use, replace it with
   33015 	print_quoted_string() that does memory allocation and prints the result.
   33016 
   33017 	* defs.h (string_quote): Remove.
   33018 	(QUOTE_0_TERMINATED, QUOTE_OMIT_LEADING_TRAILING_QUOTES): New macros.
   33019 	(print_quoted_string): New prototype.
   33020 	* util.c (string_quote): Make static; take "style" flags instead
   33021 	of "len", treat QUOTE_0_TERMINATED style flag as former (len == -1);
   33022 	add QUOTE_OMIT_LEADING_TRAILING_QUOTES style flag support.
   33023 	(ALLOCA_CUTOFF, use_alloca): New macros.
   33024 	(print_quoted_string): New function.
   33025 	(printpathn, printstr): Update to new API.
   33026 	* loop.c (loop_ioctl): Likewise.
   33027 	* mtd.c (ubi_ioctl): Likewise.
   33028 	* net.c (print_scm_security): Likewise.
   33029 	* socketutils.c (unix_parse_response): Likewise.
   33030 
   33031 2015-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   33032 
   33033 	avr32: fix typo in sys_timerfd syscall entry.
   33034 	* linux/avr32/syscallent.h (timerfd): Change sys_name to "timerfd".
   33035 
   33036 	hppa: fix typos in getresuid and getresgid syscall entries.
   33037 	* linux/hppa/syscallent.h (getresuid): Change sys_func to sys_getresuid.
   33038 	(getresgid): Change sys_func to sys_getresgid.
   33039 
   33040 2015-01-24  Helge Deller  <deller (a] gmx.de>
   33041 
   33042 	hppa: fix typo in getpeername syscall entry.
   33043 	This fixes an obvious typo which prints "lock" instead of "getpeername"
   33044 	for the getpeername syscall.
   33045 
   33046 	* linux/hppa/syscallent.h (getpeername): Change sys_name to "getpeername".
   33047 
   33048 2015-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   33049 
   33050 	Impove struct cmsghdr decoding.
   33051 	Print all cmsghdr structures in msg_control array,
   33052 	not just the first one.
   33053 	Change output format to be consistent with other parts of strace
   33054 	where structures and arrays are printed.
   33055 	Implement decoder for SCM_SECURITY message type.
   33056 
   33057 	* net.c (print_scm_rights, print_scm_creds, print_scm_security):
   33058 	New functions.
   33059 	(printcmsghdr): Use them.  Iterate over all members of the array.
   33060 	* xlat/scmvals.in: Add SCM_SECURITY.
   33061 	* tests/scm_rights.c (main): Pass one more descriptor to the receiver.
   33062 	Set SO_PASSCRED on the receiver part.  Reserve enough space to receive
   33063 	SCM_CREDENTIALS and SCM_RIGHTS.
   33064 	* tests/scm_rights-fd.test: Update.
   33065 
   33066 2015-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   33067 
   33068 	Update SO_* constants.
   33069 	* xlat/sockoptions.in: Add SO_DOMAIN, SO_MARK, SO_NOFCS, SO_PASSSEC,
   33070 	SO_PROTOCOL, SO_RCVBUFFORCE, SO_SNDBUFFORCE, SO_TIMESTAMPING,
   33071 	and SO_TIMESTAMPNS.
   33072 
   33073 2015-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   33074 
   33075 	tests: run tests for each supported personality.
   33076 	When strace supports more than one personality, run test suite
   33077 	for each personality supported by the host system.
   33078 
   33079 	* bootstrap: Create tests-m32 and tests-mx32 subtrees from tests.
   33080 	* configure.ac: Check for -m32 and -mx32 runtime support.
   33081 	(AC_CONFIG_FILES): Add tests-m32/Makefile and tests-mx32/Makefile.
   33082 	* Makefile.am [HAVE_M32_RUNTIME] (TESTS_M32): Define.
   33083 	[HAVE_MX32_RUNTIME] (TESTS_MX32): Define.
   33084 	(SUBDIRS): Add $(TESTS_M32) $(TESTS_MX32).
   33085 	* .gitignore: Add /tests-m32 and /tests-mx32.
   33086 
   33087 2015-01-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   33088 
   33089 	Fix ILP32 personality struct cmsghdr decoding on LP64 architectures.
   33090 	* net.c (union_cmsghdr): New union.
   33091 	[SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (cmsghdr32): New structure.
   33092 	(printcmsghdr): Properly handle the case of current_wordsize < sizeof(long).
   33093 
   33094 	Fix ILP32 personality preadv/pwritev offset decoding on LP64 architectures
   33095 	* io.c (print_llu_from_low_high_val) [SIZEOF_LONG == SIZEOF_LONG_LONG
   33096 	&& SUPPORTED_PERSONALITIES > 1]: Properly handle the case of
   33097 	current_wordsize < sizeof(long).
   33098 
   33099 2015-01-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   33100 
   33101 	ioctl: take all 32 bits of ioctl commands into account.
   33102 	Historically, only 16 bits (8-bit number and 8-bit type) of 32-bit ioctl
   33103 	commands were used for decoding, which was the source for numerous
   33104 	annoying collisions like this:
   33105 
   33106 		ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
   33107 		ioctl(0, MGSL_IOCGPARAMS or MMTIMER_GETRES or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0x7fffd47f7338) = -1 ENOTTY (Inappropriate ioctl for device)
   33108 
   33109 	The solution is to use all 32 bits for decoding, not just "number" and
   33110 	"type", but also "size" and "direction".
   33111 
   33112 	As some architectures override defaults that come from asm-generic/ and
   33113 	provide alternative definitions for some ioctl commands, we support
   33114 	per-architecture ioctl definitions and merge them with common
   33115 	definitions at build time.  During the merge, we used to keep both
   33116 	generic and architecture-specific definitions, now architecture-specific
   33117 	definitions have precedence over generic ones -- ioctlsort omits
   33118 	definitions from asm-generic/ for those ioctl names that have different
   33119 	definitions in asm/.
   33120 
   33121 	Additional bits of "direction" are architecture specific -- the number
   33122 	of bits and their values differ between architectures.  To reduce
   33123 	architecture differences in the source code, we keep "direction" in
   33124 	symbolic form and compile it in ioctlsort.
   33125 
   33126 	Additional bits of "size" are also architecture specific -- not only the
   33127 	number of bits differ between architectures, but sizes of many types
   33128 	depend on sizeof(long).  To reduce architecture differences in the
   33129 	source code, we keep 32-bit and 64-bit versions of common ioctl
   33130 	definitions, and use the appropriate version for each architecture and
   33131 	personality.
   33132 
   33133 	To implement this, the tools for generating ioctl definitions from
   33134 	kernel headers have been rewritten, and the source format of ioctl
   33135 	definitions has been extended.   The final ioctlent*.h files that are
   33136 	included by syscall.c are now generated from source ioctls_inc*.h and
   33137 	ioctls_arch*.h files at build time with ioctlsort.
   33138 
   33139 	* ioctl.c (ioctl_lookup): Use all 32 bits of ioctl command code.
   33140 	* ioctlsort.c: Rewritten.
   33141 	* linux/32/ioctls_inc.h: New file.
   33142 	* linux/64/ioctls_inc.h: New file.
   33143 	* linux/aarch64/ioctls_arch0.h: New file.
   33144 	* linux/aarch64/ioctls_arch1.h: New file.
   33145 	* linux/aarch64/ioctls_inc0.h: New file.
   33146 	* linux/aarch64/ioctls_inc1.h: New file.
   33147 	* linux/alpha/ioctls_arch0.h: New file.
   33148 	* linux/alpha/ioctls_inc0.h: New file.
   33149 	* linux/arc/ioctls_arch0.h: New file.
   33150 	* linux/arc/ioctls_inc0.h: New file.
   33151 	* linux/arm/ioctls_arch0.h: New file.
   33152 	* linux/arm/ioctls_inc0.h: New file.
   33153 	* linux/avr32/ioctls_arch0.h: New file.
   33154 	* linux/avr32/ioctls_inc0.h: New file.
   33155 	* linux/bfin/ioctls_arch0.h: New file.
   33156 	* linux/bfin/ioctls_inc0.h: New file.
   33157 	* linux/hppa/ioctls_arch0.h: New file.
   33158 	* linux/hppa/ioctls_inc0.h: New file.
   33159 	* linux/i386/ioctls_arch0.h: New file.
   33160 	* linux/i386/ioctls_inc0.h: New file.
   33161 	* linux/ia64/ioctls_arch0.h: New file.
   33162 	* linux/ia64/ioctls_inc0.h: New file.
   33163 	* linux/m68k/ioctls_arch0.h: New file.
   33164 	* linux/m68k/ioctls_inc0.h: New file.
   33165 	* linux/metag/ioctls_arch0.h: New file.
   33166 	* linux/metag/ioctls_inc0.h: New file.
   33167 	* linux/microblaze/ioctls_arch0.h: New file.
   33168 	* linux/microblaze/ioctls_inc0.h: New file.
   33169 	* linux/mips/ioctls_arch0.h: New file.
   33170 	* linux/mips/ioctls_inc0.h: New file.
   33171 	* linux/or1k/ioctls_arch0.h: New file.
   33172 	* linux/or1k/ioctls_inc0.h: New file.
   33173 	* linux/powerpc/ioctls_arch0.h: New file.
   33174 	* linux/powerpc/ioctls_inc0.h: New file.
   33175 	* linux/powerpc64/ioctls_arch0.h: New file.
   33176 	* linux/powerpc64/ioctls_arch1.h: New file.
   33177 	* linux/powerpc64/ioctls_inc0.h: New file.
   33178 	* linux/powerpc64/ioctls_inc1.h: New file.
   33179 	* linux/s390/ioctls_arch0.h: New file.
   33180 	* linux/s390/ioctls_inc0.h: New file.
   33181 	* linux/s390x/ioctls_arch0.h: New file.
   33182 	* linux/s390x/ioctls_inc0.h: New file.
   33183 	* linux/sh/ioctls_arch0.h: New file.
   33184 	* linux/sh/ioctls_inc0.h: New file.
   33185 	* linux/sh64/ioctls_arch0.h: New file.
   33186 	* linux/sh64/ioctls_inc0.h: New file.
   33187 	* linux/sparc/ioctls_arch0.h: New file.
   33188 	* linux/sparc/ioctls_inc0.h: New file.
   33189 	* linux/sparc64/ioctls_arch0.h: New file.
   33190 	* linux/sparc64/ioctls_arch2.h: New file.
   33191 	* linux/sparc64/ioctls_inc0.h: New file.
   33192 	* linux/sparc64/ioctls_inc2.h: New file.
   33193 	* linux/tile/ioctls_arch0.h: New file.
   33194 	* linux/tile/ioctls_arch1.h: New file.
   33195 	* linux/tile/ioctls_inc0.h: New file.
   33196 	* linux/tile/ioctls_inc1.h: New file.
   33197 	* linux/x32/ioctls_arch0.h: New file.
   33198 	* linux/x32/ioctls_arch1.h: New file.
   33199 	* linux/x32/ioctls_inc0.h: New file.
   33200 	* linux/x32/ioctls_inc1.h: New file.
   33201 	* linux/x86_64/ioctls_arch0.h: New file.
   33202 	* linux/x86_64/ioctls_arch1.h: New file.
   33203 	* linux/x86_64/ioctls_inc0.h: New file.
   33204 	* linux/x86_64/ioctls_inc1.h: New file.
   33205 	* linux/xtensa/ioctls_arch0.h: New file.
   33206 	* linux/xtensa/ioctls_inc0.h: New file.
   33207 	* linux/aarch64/ioctlent.h.in: Remove.
   33208 	* linux/aarch64/ioctlent1.h: Remove.
   33209 	* linux/alpha/ioctlent.h.in: Remove.
   33210 	* linux/arc/ioctlent.h.in: Remove.
   33211 	* linux/arm/ioctlent.h.in: Remove.
   33212 	* linux/avr32/ioctlent.h.in: Remove.
   33213 	* linux/bfin/ioctlent.h.in: Remove.
   33214 	* linux/hppa/ioctlent.h.in: Remove.
   33215 	* linux/i386/ioctlent.h.in: Remove.
   33216 	* linux/ia64/ioctlent.h.in: Remove.
   33217 	* linux/ioctlent.h.in: Remove.
   33218 	* linux/ioctlent.sh: Remove.
   33219 	* linux/m68k/ioctlent.h.in: Remove.
   33220 	* linux/metag/ioctlent.h.in: Remove.
   33221 	* linux/microblaze/ioctlent.h.in: Remove.
   33222 	* linux/mips/ioctlent.h.in: Remove.
   33223 	* linux/mips/ioctlent.sh: Remove.
   33224 	* linux/or1k/ioctlent.h.in: Remove.
   33225 	* linux/powerpc/ioctlent.h.in: Remove.
   33226 	* linux/powerpc64/ioctlent.h: Remove.
   33227 	* linux/powerpc64/ioctlent1.h: Remove.
   33228 	* linux/s390/ioctlent.h.in: Remove.
   33229 	* linux/s390x/ioctlent.h.in: Remove.
   33230 	* linux/sh/ioctlent.h.in: Remove.
   33231 	* linux/sh64/ioctlent.h.in: Remove.
   33232 	* linux/sparc/ioctlent.h.in: Remove.
   33233 	* linux/sparc64/ioctlent.h.in: Remove.
   33234 	* linux/sparc64/ioctlent2.h: Remove.
   33235 	* linux/tile/ioctlent.h.in: Remove.
   33236 	* linux/tile/ioctlent1.h: Remove.
   33237 	* linux/x32/ioctlent.h.in: Remove.
   33238 	* linux/x32/ioctlent1.h: Remove.
   33239 	* linux/x86_64/ioctlent.h.in: Remove.
   33240 	* linux/x86_64/ioctlent1.h: Remove.
   33241 	* linux/xtensa/ioctlent.h.in: Remove.
   33242 	* linux/x86_64/ioctlent2.h: Include ioctlent0.h instead of ioctlent.h.
   33243 	* syscall.c (struct_ioctlent ioctlent0): Likewise.
   33244 	* Makefile.am: Remove all ioctlent-related definitions.
   33245 	Define the list of ioctlent*.h files that have to be generated by
   33246 	presence of $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h files.
   33247 	Add rules for ioctlent*.h files generation.
   33248 	(EXTRA_DIST): Update.
   33249 	* maint/ioctls_gen.sh: New file.
   33250 	* maint/ioctls_hex.sh: New file.
   33251 	* maint/ioctls_sym.sh: New file.
   33252 	* maint/print_ioctlent.c: New file.
   33253 	* HACKING-scripts: Update for ioctlent.sh -> ioctls_gen.sh migration.
   33254 	* .gitignore: Add ioctlent[012].h and ioctls_all[012].h.
   33255 	* configure.ac (AC_CHECK_HEADERS): Add linux/hiddev.h
   33256 	and linux/mmtimer.h for tests.
   33257 	* tests/ioctl.c: New file.
   33258 	* tests/ioctl.test: New test.
   33259 	* tests/Makefile.am (check_PROGRAMS): Add ioctl.
   33260 	(TESTS): Add ioctl.test.
   33261 	* tests/.gitignore: Add ioctl.
   33262 
   33263 2015-01-21  Gabriel Laskar  <gabriel (a] lse.epita.fr>
   33264 
   33265 	ioctl: add decoding for parametrized command names.
   33266 	Some ioctl commands from evdev, hiddev, mixer, uinput, spi, and joystick
   33267 	are parametrized by a size or a number that are variable.  This change
   33268 	implements printing of these parametrized ioctl command names.
   33269 
   33270 	* configure.ac (AC_CHECK_HEADERS): Add linux/input.h.
   33271 	* defs.h (ioctl_decode_number): New prototype.
   33272 	* io.c (sys_ioctl): Use ioctl_decode_number.
   33273 	* ioctl.c (ioctl_decode_number): New function.
   33274 	* xlat/evdev_abs.in: New file.
   33275 	* xlat/evdev_ev.in: New file.
   33276 
   33277 2015-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   33278 
   33279 	Update auxiliary maintainer mode build tools.
   33280 	* git-set-file-times: Update from rsync.
   33281 	* git-version-gen: Update from gnulib.
   33282 	* gitlog-to-changelog: Likewise.
   33283 
   33284 	Update warnings.m4.
   33285 	* m4/warnings.m4: Update from gnulib.
   33286 
   33287 2015-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   33288 
   33289 	powerpc64: maintain own linux/powerpc64 subdirectory.
   33290 	Most architectures supported by strace have their own subdirectory in
   33291 	linux directory, but powerpc64 didn't, causing inconveniences.
   33292 
   33293 	* configure.ac (arch): Define to "powerpc64" on powerpc64.
   33294 	* linux/powerpc/errnoent1.h: Move to linux/powerpc64/.
   33295 	* linux/powerpc/ioctlent1.h: Likewise.
   33296 	* linux/powerpc/signalent1.h: Likewise.
   33297 	* linux/powerpc/syscallent1.h: Likewise.
   33298 	* linux/powerpc64/ioctlent.h: New file.
   33299 	* linux/powerpc64/syscallent.h: Likewise.
   33300 	* linux/powerpc64/userent.h: Likewise.
   33301 	* Makefile.am (EXTRA_DIST): Remove linux/powerpc/ioctlent1.h,
   33302 	linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h, and
   33303 	linux/powerpc/signalent1.h; added linux/powerpc64/errnoent1.h,
   33304 	linux/powerpc64/ioctlent.h, linux/powerpc64/ioctlent1.h,
   33305 	linux/powerpc64/signalent1.h, linux/powerpc64/syscallent.h,
   33306 	linux/powerpc64/syscallent1.h, and linux/powerpc64/userent.h.
   33307 
   33308 2015-01-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   33309 
   33310 	configure.ac: remove unused AC_INCLUDEDIR.
   33311 	* configure.ac (AC_INCLUDEDIR): Remove.
   33312 	* m4/includedir.m4: Remove.
   33313 
   33314 	ioctl: print unrecognized ioctl codes in _IOC(dir,type,nr,size) format.
   33315 	* defs.h (ioctl_print_code): New prototype.
   33316 	* ioctl.c: Include xlat/ioctl_dirs.h.
   33317 	(ioctl_print_code): New function.
   33318 	* io.c (sys_ioctl): Use it.
   33319 	* xlat/ioctl_dirs.in: New file.
   33320 
   33321 2015-01-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   33322 
   33323 	ioctl: assume that all ioctl commands have unsigned int type.
   33324 	In linux, ioctl command number has a 32-bit unsigned integer type:
   33325 		fs/ioctl.c:SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg)
   33326 	If the kernel completely ignores other bits on 64-bit architectures,
   33327 	why should strace care?
   33328 	Let's follow the kernel and treat it as unsigned int.
   33329 
   33330 	* defs.h (struct_ioctlent): Change "code" type to "unsigned int".
   33331 	(ioctl_decode, ioctl_lookup, block_ioctl, loop_ioctl, mtd_ioctl,
   33332 	ubi_ioctl, ptp_ioctl, scsi_ioctl, sock_ioctl, term_ioctl, rtc_ioctl,
   33333 	v4l2_ioctl): Likewise.
   33334 	* ioctl.c (ioctl_decode, ioctl_lookup, compare, ioctl_next_match):
   33335 	Likewise.
   33336 	* block.c (block_ioctl): Likewise.
   33337 	* loop.c (loop_ioctl): Likewise.
   33338 	* mtd.c (mtd_ioctl, ubi_ioctl): Likewise.
   33339 	* ptp.c (ptp_ioctl): Likewise.
   33340 	* scsi.c (scsi_ioctl): Likewise.
   33341 	* sock.c (sock_ioctl): Likewise.
   33342 	* term.c (term_ioctl): Likewise.
   33343 	* time.c (rtc_ioctl): Likewise.
   33344 	* v4l2.c (v4l2_ioctl): Likewise.
   33345 	* ioctlsort.c (struct ioctlent, compare, main): Likewise.
   33346 
   33347 2015-01-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   33348 
   33349 	ioctlent.sh: cleanup regexps that are used to fetch bases.
   33350 
   33351 	ioctlent.sh: sync lookup regexps that are used in grep and sed.
   33352 	ioctlent.sh looks for ioctl command names using grep, and fetches them
   33353 	with their definitions using sed.  Historically, lookup regexps used in
   33354 	grep and sed are slightly different, which makes the script more
   33355 	complicated than necessary.
   33356 
   33357 	qemu_multiarch_testing: update.
   33358 	* qemu_multiarch_testing/.gitignore: New file.
   33359 	* qemu_multiarch_testing/README: Update statistics.
   33360 	* qemu_multiarch_testing/hdc.dir/init2: Run "make check".
   33361 	* qemu_multiarch_testing/make-hdc-img.sh: Robustify,
   33362 	automatically calculate hdc image size.
   33363 	* qemu_multiarch_testing/parallel-build-hdc-img.sh: Reduce
   33364 	hdb image size.  Report completion of each parallelized task.
   33365 
   33366 2015-01-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   33367 
   33368 	tests: add IPC_STAT to ipc tests, workaround limitiations of old kernels
   33369 	* tests/ipc_msg.c: Include <errno.h>.
   33370 	(main): Add a test call with IPC_STAT, handle old kernels MSG_STAT behaviour.
   33371 	* tests/ipc_sem.c: Include <errno.h>.
   33372 	(main): Add a test call with IPC_STAT, handle old kernels SEM_STAT behaviour.
   33373 	* tests/ipc_shm.c: Include <errno.h>.
   33374 	(main): Add a test call with IPC_STAT, handle old kernels SHM_STAT behaviour.
   33375 
   33376 	Change length type of umoven and umovestr to unsigned.
   33377 	* defs.h (umoven, umovestr): Change type of 3rd argument from "int"
   33378 	to "unsigned int".
   33379 	* util.c (umoven, umovestr): Likewise.  Adjust the code appropriately.
   33380 
   33381 	tests: skip sendmmsg/recvmmsg test if these syscalls are not implemented in kernel
   33382 	* tests/mmsg.c: #include <errno.h>
   33383 	(main): Return 77 if sendmmsg failed with ENOSYS.
   33384 
   33385 	tests: skip ip network tests when the network is not functional.
   33386 	* tests/inet-accept-connect-send-recv.c (main): Return 77 if inet stream
   33387 	socket cannot be created or it cannot be bound to INADDR_LOOPBACK.
   33388 	* tests/net-yy.test: Skip the test if inet-accept-connect-send-recv
   33389 	returns 77.
   33390 
   33391 	tests: handle the case when all 64 process capability bits are set.
   33392 	* tests/caps.awk: Handle the case when all bits of 64-bit capability
   33393 	word are set.
   33394 
   33395 	tests: explicitly request gawk when using gawk features.
   33396 	* tests/uid.test: Check for gawk availability and invoke gawk instead of
   33397 	plain awk because the test uses gawk's match() feature.
   33398 
   33399 	tests: skip detach tests if kill does not work.
   33400 	* tests/detach-running.test: Skip if "kill -0" does not work.
   33401 	* tests/detach-sleeping.test: Likewise.
   33402 	* tests/detach-stopped.test: Likewise.
   33403 
   33404 	ARM OABI: fix potential compilation warning.
   33405 	* syscall.c (get_scno) [!__ARM_EABI__ || ENABLE_ARM_OABI]: Fix
   33406 	"comparison between signed and unsigned" warning reported by some
   33407 	gcc versions.
   33408 
   33409 	powerpc: fix potential compilation warning.
   33410 	* mem.c [POWERPC] (sys_subpage_prot): Fix "comparison between signed
   33411 	and unsigned" warning reported by some gcc versions.
   33412 
   33413 2015-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   33414 
   33415 	sparc, sparc64: remove ioctl header file names from solaris ioctl entries
   33416 	Starting with commit v4.9-27-g3e252ca, header file names should not be
   33417 	part of ioctlent files included by syscall.c
   33418 
   33419 	* linux/sparc/ioctlent1.h: Remove ioctl header file names.
   33420 	* linux/sparc64/ioctlent2.h: Remove all entries, include "ioctlent.h".
   33421 
   33422 2015-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   33423 
   33424 	mips: enable indirect ipc subcall support.
   33425 	* linux/mips/syscallent-n32.h [LINUX_MIPSN32]: Define SYS_socket_subcall,
   33426 	include "subcall.h".
   33427 	* linux/mips/syscallent-n64.h [LINUX_MIPSN64]: Likewise.
   33428 	* linux/mips/syscallent-o32.h [LINUX_MIPSO32]: Likewise.
   33429 
   33430 	mips: remove stub entries from syscallent files, generate stubs at build time
   33431 	* linux/mips/genstub.sh: New file.
   33432 	* Makefile.am (EXTRA_DIST): Add it.
   33433 	* configure.ac [MIPS]: Use it to generate syscallent stubs.
   33434 	* linux/mips/.gitignore: Add syscallent stubs.
   33435 	* linux/mips/syscallent-n32.h: Remove stub entries, include
   33436 	the stub file instead.
   33437 	* linux/mips/syscallent-n64.h: Likewise.
   33438 	* linux/mips/syscallent-o32.h: Likewise.
   33439 
   33440 	build: add $(builddir)/$(OS)/$(ARCH) to the headers search list.
   33441 	* Makefile.am (AM_CPPFLAGS): Add -I$(builddir)/$(OS)/$(ARCH) before
   33442 	-I$(srcdir)/$(OS)/$(ARCH).
   33443 
   33444 	build: fix build if siginfo_t lacks si_timerid/si_overrun.
   33445 	* configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_timerid and
   33446 	siginfo_t.si_overrun.
   33447 	* signal.c (printsiginfo) [SI_TIMER]: Check HAVE_SIGINFO_T_SI_TIMERID
   33448 	and HAVE_SIGINFO_T_SI_OVERRUN.
   33449 
   33450 	configure.ac: remove unused AM_CONDITIONAL expressions.
   33451 	* configure.ac (AM_CONDITIONAL): Remove I386, X86_64, X32.
   33452 
   33453 	tests: portability fixes.
   33454 	* tests/stat.test: dd obs= is not portable, use bs= instead.
   33455 	* tests/stat32-v.test: Likewise.
   33456 	* tests/stat64-v.test: Likewise.
   33457 	* tests/net.test: Use $* instead of $@ in the quoted string.
   33458 	* tests/net-fd.test: Likewise.
   33459 	* tests/statfs.test: Quote { and } in regexps.
   33460 	* tests/caps.awk: Likewise.
   33461 	* tests/getdents.awk: Likewise.
   33462 	* tests/net-yy-accept.awk: Likewise.
   33463 	* tests/net-yy-connect.awk: Likewise.
   33464 	* tests/sigaction.awk: Likewise.
   33465 	* tests/unix-yy-accept.awk: Likewise.
   33466 	* tests/unix-yy-connect.awk: Likewise.
   33467 
   33468 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33469 
   33470 	Wire up new syscalls.
   33471 	* linux/dummy.h (sys_bpf, sys_execveat, sys_getrandom,
   33472 	sys_kexec_file_load, sys_memfd_create, sys_seccomp): New stub aliases.
   33473 	* linux/32/syscallent.h (seccomp, getrandom, memfd_create, bpf,
   33474 	execveat): New entries.
   33475 	* linux/64/syscallent.h: Likewise.
   33476 	* linux/arm/syscallent.h: Likewise.
   33477 	* linux/hppa/syscallent.h: Likewise.
   33478 	* linux/i386/syscallent.h: Likewise.
   33479 	* linux/microblaze/syscallent.h: Likewise.
   33480 	* linux/mips/syscallent-n32.h: Likewise.
   33481 	* linux/mips/syscallent-n64.h: Likewise.
   33482 	* linux/mips/syscallent-o32.h: Likewise.
   33483 	* linux/powerpc/syscallent.h: Likewise.
   33484 	* linux/sparc/syscallent.h: Likewise.
   33485 	* linux/ia64/syscallent.h (getrandom, memfd_create, bpf, execveat):
   33486 	New entries.
   33487 	* linux/m68k/syscallent.h: Likewise.
   33488 	* linux/s390/syscallent.h: (seccomp, getrandom, memfd_create, bpf,
   33489 	s390_pci_mmio_write, s390_pci_mmio_read, execveat): New entries.
   33490 	* linux/s390x/syscallent.h: Likewise.
   33491 	* linux/x86_64/syscallent.h (seccomp, getrandom, memfd_create,
   33492 	kexec_file_load, bpf, execveat): New entries.
   33493 	* linux/x32/syscallent.h: Likewise.
   33494 	* linux/xtensa/syscallent.h (seccomp, getrandom, memfd_create):
   33495 	New entries.
   33496 
   33497 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33498 
   33499 	s390x: adjust some syscall entries.
   33500 	According to linux/arch/s390/include/uapi/asm/unistd.h, readdir is
   33501 	defined both on s390 and s390x, while getrlimit, _llseek, sendfile64,
   33502 	and fadvise64_64 are defined on s390 only.
   33503 
   33504 	* linux/s390x/syscallent.h (readdir): Add.
   33505 	(getrlimit, _llseek, sendfile64, fadvise64_64): Remove.
   33506 
   33507 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33508 
   33509 	Change syscallent.h files to use designated initializers.
   33510 	Automatically convert all linux syscallent.h files to a form that uses
   33511 	designated initializers, with subsequent correction of whitespace
   33512 	indentation.
   33513 
   33514 	* linux/alpha/syscallent.h: Use designated initializers.
   33515 	* linux/arm/syscallent.h: Likewise.
   33516 	* linux/avr32/syscallent.h: Likewise.
   33517 	* linux/bfin/syscallent.h: Likewise.
   33518 	* linux/hppa/syscallent.h: Likewise.
   33519 	* linux/i386/syscallent.h: Likewise.
   33520 	* linux/ia64/syscallent.h: Likewise.
   33521 	* linux/m68k/syscallent.h: Likewise.
   33522 	* linux/microblaze/syscallent.h: Likewise.
   33523 	* linux/mips/syscallent-n32.h: Likewise.
   33524 	* linux/mips/syscallent-n64.h: Likewise.
   33525 	* linux/mips/syscallent-o32.h: Likewise.
   33526 	* linux/powerpc/syscallent.h: Likewise.
   33527 	* linux/s390/syscallent.h: Likewise.
   33528 	* linux/s390x/syscallent.h: Likewise.
   33529 	* linux/sh/syscallent.h: Likewise.
   33530 	* linux/sh64/syscallent.h: Likewise.
   33531 	* linux/sparc/syscallent.h: Likewise.
   33532 	* linux/x32/syscallent.h: Likewise.
   33533 	* linux/x86_64/syscallent.h: Likewise.
   33534 	* linux/xtensa/syscallent.h: Likewise.
   33535 
   33536 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33537 
   33538 	Create generic 32-bit syscallent.h.
   33539 	Since arc/syscallent.h, metag/syscallent.h, or1k/syscallent.h, and
   33540 	tile/syscallent1.h share a lot of identical syscall entries described in
   33541 	<asm-generic/unistd.h>, move these entries to a new file 32/syscallent.h
   33542 	using the following automated conversion with subsequent correction of
   33543 	whitespace indentation:
   33544 
   33545 	sed -e 's|^[[:space:]]*\({[^}]\+},\)[[:space:]]*/\*[[:space:]]\([[:space:]]*[0-9]\+\)[[:space:]]*\*/|[\2] = \1|' -e '/^[[:space:]]*\[[[:space:]]*2\(4[4-9]\|5[0-9]\)/d' linux/arc/syscallent.h
   33546 
   33547 	* linux/32/syscallent.h: New file.
   33548 	* Makefile.am (EXTRA_DIST): Add it.
   33549 	* linux/arc/syscallent.h: Include "32/syscallent.h",
   33550 	remove generic 32-bit syscall entries, use designated initializers.
   33551 	* linux/metag/syscallent.h: Likewise.
   33552 	* linux/or1k/syscallent.h: Likewise.
   33553 	* linux/tile/syscallent1.h: Likewise.
   33554 
   33555 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33556 
   33557 	tile: fix syscall entries.
   33558 	* linux/tile/syscallent1.h (truncate64, ftruncate64): Change nargs to 3.
   33559 	(pread64, pwrite64): Change nargs to 5.
   33560 	(llseek): Change sys_name to _llseek.
   33561 
   33562 	s390: fix fadvise64 and fadvise64_64 syscall entries.
   33563 	* linux/s390/syscallent.h (fadvise64, fadvise64_64): Change sys_func to
   33564 	printargs until special parsers for 31-bit 31 s390 emulation wrappers
   33565 	are written.
   33566 
   33567 	alpha: fix fadvise64 syscall entry.
   33568 	* linux/alpha/syscallent.h (fadvise64): Change sys_name to fadvise64.
   33569 
   33570 	tile: fix fadvise64_64 syscall entry.
   33571 	* linux/tile/syscallent1.h (fadvise64_64): Fix nargs, sys_func,
   33572 	and sys_name.
   33573 
   33574 	Fix getrlimit and ugetrlimit syscall entries.
   33575 	* linux/arm/syscallent.h (getrlimit, ugetrlimit): Fix sys_name.
   33576 	* linux/i386/syscallent.h: Likewise.
   33577 	* linux/m68k/syscallent.h: Likewise.
   33578 	* linux/microblaze/syscallent.h: Likewise.
   33579 	* linux/powerpc/syscallent.h: Likewise.
   33580 	* linux/avr32/syscallent.h (getrlimit): Fix sys_name.
   33581 	* linux/or1k/syscallent.h: Likewise.
   33582 	* linux/s390/syscallent.h (ugetrlimit): Fix sys_name.
   33583 	* linux/sh/syscallent.h: Likewise.
   33584 	* linux/sh64/syscallent.h: Likewise.
   33585 
   33586 	Fix umount and umount2 syscall entries.
   33587 	* linux/aarch64/syscallent1.h (umount): Change nargs to 1.
   33588 	* linux/avr32/syscallent.h: Likewise.
   33589 	* linux/xtensa/syscallent.h: Likewise.
   33590 	* linux/ia64/syscallent.h (umount2): Change nargs to 2.
   33591 	* linux/arm/syscallent.h (umount, umount2): Fix sys_name.
   33592 	* linux/bfin/syscallent.h: Likewise.
   33593 	* linux/i386/syscallent.h: Likewise.
   33594 	* linux/m68k/syscallent.h: Likewise.
   33595 	* linux/microblaze/syscallent.h: Likewise.
   33596 	* linux/powerpc/syscallent.h: Likewise.
   33597 	* linux/s390/syscallent.h: Likewise.
   33598 	* linux/s390x/syscallent.h: Likewise.
   33599 	* linux/sh/syscallent.h: Likewise.
   33600 	* linux/sh64/syscallent.h: Likewise.
   33601 	* linux/sparc/syscallent.h: Likewise.
   33602 	* linux/metag/syscallent.h: (umount2): Fix sys_name.
   33603 	* linux/or1k/syscallent.h: Likewise.
   33604 	* linux/x32/syscallent.h: Likewise.
   33605 	* linux/x86_64/syscallent.h: Likewise.
   33606 
   33607 	Fix sendfile64 syscall entries.
   33608 	* linux/arc/syscallent.h (sendfile64): Change sys_name to sendfile64.
   33609 	* linux/metag/syscallent.h: Likewise.
   33610 	* linux/or1k/syscallent.h: Likewise.
   33611 
   33612 	Fix number of arguments in ipc family syscall entries.
   33613 	* linux/64/syscallent.h (msgget, semget, semtimedop, semop, shmget,
   33614 	shmctl, shmat, shmdt): Fix nargs for direct ipc syscalls.
   33615 	* linux/alpha/syscallent.h (msgctl, msgget, msgrcv, semget, shmctl,
   33616 	shmdt, shmget, semtimedop): Likewise.
   33617 	* linux/avr32/syscallent.h (msgget, semget, semop, semtimedop, shmat,
   33618 	shmget, shmdt, shmctl): Likewise.
   33619 	* linux/bfin/syscallent.h (semget, semop, msgctl, msgget, msgrcv, shmat,
   33620 	* shmctl, shmdt, shmget, semtimedop): Likewise.
   33621 	* linux/hppa/syscallent.h (semop, semget, msgrcv, msgget, msgctl,
   33622 	semtimedop): Likewise.
   33623 	* linux/microblaze/syscallent.h (semtimedop, semget, semop, msgctl,
   33624 	msgget, msgrcv, shmat, shmctl, shmdt, shmget): Likewise.
   33625 	* linux/ia64/syscallent.h (semtimedop): Likewise.
   33626 	* linux/mips/syscallent-n32.h (semtimedop): Likewise.
   33627 	* linux/mips/syscallent-n64.h (semtimedop): Likewise.
   33628 	* linux/or1k/syscallent.h (msgget, msgctl, msgrcv, semget, semtimedop,
   33629 	semop, shmget, shmctl, shmat, shmdt): Likewise.
   33630 	* linux/sh64/syscallent.h (semget, msgget, shmget): Likewise.
   33631 	* linux/tile/syscallent1.h (msgget, semget, semtimedop, semop, shmget,
   33632 	shmctl, shmat, shmdt): Likewise.
   33633 	* linux/x32/syscallent.h (shmget, shmat, shmctl, semget, semop, shmdt,
   33634 	msgget, semtimedop): Likewise.
   33635 	* linux/x86_64/syscallent.h (shmget, shmat, shmctl, semget, semop,
   33636 	shmdt, msgget, semtimedop): Likewise.
   33637 	* linux/xtensa/syscallent.h (shmget, shmat, shmctl, shmdt, semtimedop,
   33638 	semget, semop, msgget, msgrcv, msgctl): Likewise.
   33639 
   33640 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33641 
   33642 	Create generic 64-bit syscallent.h.
   33643 	Since aarch64/syscallent1.h and tile/syscallent.h share a lot of
   33644 	identical syscall entries described in <asm-generic/unistd.h>, move
   33645 	these entries to a new file 64/syscallent.h using the following
   33646 	automated conversion with subsequent correction of whitespace
   33647 	indentation:
   33648 
   33649 	sed -e 's|^[[:space:]]*\({[^}]\+},\)[[:space:]]*/\*[[:space:]]\([[:space:]]*[0-9]\+\)[[:space:]]*\*/|[\2] = \1|' -e '/^\[[[:space:]]*2\(4[4-9]\|5[0-9]\)\]/d' linux/tile/syscallent.h
   33650 
   33651 	* linux/64/syscallent.h: New file.
   33652 	* Makefile.am (EXTRA_DIST): Add it.
   33653 	* linux/aarch64/syscallent1.h: Include "64/syscallent.h",
   33654 	remove generic 64-bit syscall entries, use designated initializers.
   33655 	* linux/tile/syscallent.h: Likewise.
   33656 
   33657 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33658 
   33659 	Fix nfsservctl syscall entries.
   33660 	* linux/arc/syscallent.h (nfsservctl): Set nargs, sys_func, and sys_name.
   33661 	* linux/metag/syscallent.h: Likewise.
   33662 
   33663 	Add missing syscall entries for sched_[gs]etattr and renameat2.
   33664 	* linux/alpha/syscallent.h (sched_setattr, sched_getattr, renameat2):
   33665 	New syscall entries.
   33666 	* linux/arc/syscallent.h: Likewise.
   33667 	* linux/metag/syscallent.h: Likewise.
   33668 	* linux/or1k/syscallent.h: Likewise.
   33669 	* linux/tile/syscallent.h: Likewise.
   33670 	* linux/tile/syscallent1.h: Likewise.
   33671 
   33672 	Fix NUMA related syscall entries.
   33673 	* linux/alpha/syscallent.h (mbind, get_mempolicy, set_mempolicy):
   33674 	Set sys_func.
   33675 	* linux/hppa/syscallent.h (mbind, get_mempolicy, set_mempolicy):
   33676 	Fix nargs, set sys_func.
   33677 	* linux/microblaze/syscallent.h (mbind): Fix nargs.
   33678 	* linux/mips/syscallent-n32.h (move_pages): Set sys_func.
   33679 	* linux/mips/syscallent-n64.h (move_pages): Likewise.
   33680 	* linux/mips/syscallent-o32.h (mbind): Fix nargs.
   33681 	* linux/or1k/syscallent.h (migrate_pages): Likewise.
   33682 	* linux/powerpc/syscallent.h (migrate_pages): Likewise.
   33683 	* linux/sh/syscallent.h (mbind): Likewise.
   33684 	* linux/sh64/syscallent.h (mbind): Likewise.
   33685 
   33686 	xtensa: fix syscall entries.
   33687 	* linux/xtensa/syscallent.h (sendmmsg): Fix sys_func and sys_name.
   33688 	(restart_syscall, io_setup, io_destroy, io_submit, io_getevents,
   33689 	io_cancel, add_key, request_key, keyctl): Set sys_func.
   33690 	(migrate_pages, mbind, get_mempolicy, set_mempolicy, move_pages,
   33691 	fstatat64): Fix nargs.
   33692 	(renameat2): New entry.
   33693 
   33694 	Fix sched_setparam syscall entries.
   33695 	* linux/aarch64/syscallent1.h (sched_setparam): Change nargs to 2.
   33696 	* linux/arm/syscallent.h (sched_setparam): Likewise.
   33697 	* linux/avr32/syscallent.h (sched_setparam): Likewise.
   33698 	* linux/bfin/syscallent.h (sched_setparam): Likewise.
   33699 	* linux/i386/syscallent.h (sched_setparam): Likewise.
   33700 	* linux/m68k/syscallent.h (sched_setparam): Likewise.
   33701 	* linux/microblaze/syscallent.h (sched_setparam): Likewise.
   33702 	* linux/s390/syscallent.h (sched_setparam): Likewise.
   33703 	* linux/s390x/syscallent.h (sched_setparam): Likewise.
   33704 	* linux/sh/syscallent.h (sched_setparam): Likewise.
   33705 	* linux/sh64/syscallent.h (sched_setparam): Likewise.
   33706 	* linux/tile/syscallent.h (sched_setparam): Likewise.
   33707 	* linux/tile/syscallent1.h (sched_setparam): Likewise.
   33708 	* linux/x32/syscallent.h (sched_setparam): Likewise.
   33709 	* linux/x86_64/syscallent.h (sched_setparam): Likewise.
   33710 
   33711 	arc: fix fanotify_mark syscall entry.
   33712 	* linux/arc/syscallent.h (fanotify_mark): Change nargs to 6.
   33713 
   33714 	ia64: add fallocate syscall entry.
   33715 	* linux/ia64/syscallent.h (fallocate): Add syscall entry.
   33716 
   33717 	Fix lookup_dcookie syscall entries.
   33718 	* linux/s390/syscallent.h (lookup_dcookie): Add syscall entry.
   33719 	* linux/s390x/syscallent.h (lookup_dcookie): Likewise.
   33720 	* linux/tile/syscallent.h (lookup_dcookie): Change nargs to 3.
   33721 	* linux/x32/syscallent.h (lookup_dcookie): Likewise.
   33722 
   33723 	aarch64: fix syscall names for statfs, fstatfs, truncate, and ftruncate.
   33724 	* linux/aarch64/syscallent1.h (statfs, fstatfs, truncate, ftruncate):
   33725 	Use correct syscall names.
   33726 
   33727 	aarch64: fix mlock syscall entry.
   33728 	* linux/aarch64/syscallent1.h (mlock): Change to mlock entry.
   33729 
   33730 	sh, sh64: fix mlock syscall entry.
   33731 	* linux/sh/syscallent.h (mlock): Change nargs to 2.
   33732 	* linux/sh64/syscallent.h (mlock): Likewise.
   33733 
   33734 	tile: fix swapon syscall entries.
   33735 	* linux/tile/syscallent.h (swapon): Change nargs to 2.
   33736 	* linux/tile/syscallent1.h (swapon): Likewise.
   33737 
   33738 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33739 
   33740 	ARM EABI: reserve some space for new syscalls.
   33741 	Reserve the same space for new syscalls on EABI as it is already
   33742 	reserved on OABI.
   33743 
   33744 	* linux/arm/syscallent.h [__ARM_EABI__] (ARM_FIRST_SHUFFLED_SYSCALL):
   33745 	Raise to 400.
   33746 
   33747 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33748 
   33749 	arm: rewrite shuffle_scno in a bit more readable way.
   33750 	* linux/arm/syscallent.h: Define ARM_FIRST_SHUFFLED_SYSCALL instead of
   33751 	ARM_LAST_ORDINARY_SYSCALL.
   33752 	* syscall.c [ARM || AARCH64] (shuffle_scno): Update.
   33753 
   33754 	tests: add tests for ipc syscalls decoding.
   33755 	* tests/ipc_msg.c: New file.
   33756 	* tests/ipc_sem.c: Likewise.
   33757 	* tests/ipc_shm.c: Likewise.
   33758 	* tests/ipc_msg.test: New test.
   33759 	* tests/ipc_sem.test: Likewise.
   33760 	* tests/ipc_shm.test: Likewise.
   33761 	* tests/Makefile.am (check_PROGRAMS): Add ipc_msg, ipc_sem, and ipc_shm.
   33762 	(TESTS): Add ipc_msg.test, ipc_sem.test, and ipc_shm.test.
   33763 	* tests/.gitignore: Add ipc_msg, ipc_sem, and ipc_shm.
   33764 
   33765 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33766 
   33767 	Fix indirect ipc subcall handling.
   33768 	indirect_ipccall used to guess whether currently decoded ipc syscall is
   33769 	an indirect subcall or not based on generic knowledge, while there is a
   33770 	robust method to identify indirect ipc subcalls.
   33771 
   33772 	* defs.h (TRACE_INDIRECT_SUBCALL): New flag.
   33773 	* ipc.c (indirect_ipccall): Check it.
   33774 	* linux/subcall.h: Set it.
   33775 
   33776 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33777 
   33778 	Move socket and ipc subcall entries to subcall.h.
   33779 	Syscall entries for socket and ipc subcalls are the same on all
   33780 	architectures, or at least they should be the same, so move them
   33781 	to the single file.
   33782 
   33783 	* linux/subcall.h: Add syscall entries for socket and ipc subcalls.
   33784 	* linux/arm/syscallent.h: Remove entries for socket and ipc subcalls.
   33785 	* linux/i386/syscallent.h: Likewise.
   33786 	* linux/m68k/syscallent.h: Likewise.
   33787 	* linux/powerpc/syscallent.h: Likewise.
   33788 	* linux/s390/syscallent.h: Likewise.
   33789 	* linux/s390x/syscallent.h: Likewise.
   33790 	* linux/sh/syscallent.h: Likewise.
   33791 	* linux/sh64/syscallent.h: Likewise.
   33792 	* linux/sparc/syscallent.h: Likewise.
   33793 
   33794 2015-01-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   33795 
   33796 	sh: fix typo introduced by commit v4.9-121-gd535b8b.
   33797 	* linux/sh/syscallent.h (getresgid32): Fix typo in sys_func and sys_name.
   33798 
   33799 2015-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   33800 
   33801 	Fix fanotify_mark decoding on 32-bit architectures.
   33802 	The fanotify_mark syscall takes a 64-bit mask, and on 32-bit
   33803 	architectures it is split up into two syscall arguments.
   33804 
   33805 	* configure.ac (AC_CHECK_FUNCS): Add fanotify_mark.
   33806 	(AC_CHECK_HEADERS): Add sys/fanotify.h.
   33807 	* defs.h (getllval): New prototype.
   33808 	* util.c (getllval): New function based on printllval.
   33809 	(printllval): Use getllval.
   33810 	* fanotify.c (sys_fanotify_mark): Use getllval to properly decode
   33811 	64-bit mask and two syscall arguments followed by it.
   33812 	* tests/fanotify_mark.c: New file.
   33813 	* tests/fanotify_mark.test: New test.
   33814 	* tests/Makefile.am (check_PROGRAMS): Add fanotify_mark.
   33815 	(TESTS): Add fanotify_mark.test.
   33816 	* tests/.gitignore: Add fanotify_mark.
   33817 
   33818 2015-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   33819 
   33820 	v4l2: fix build on systems with older kernel headers.
   33821 	* v4l2.c (print_v4l2_format_fmt): Do not use
   33822 	V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY unless it is defined.
   33823 	(v4l2_ioctl): Do not use VIDIOC_ENUM_FRAMESIZES and
   33824 	VIDIOC_ENUM_FRAMEINTERVALS unless they are defined.
   33825 
   33826 2015-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   33827 
   33828 	tests: fix build with awk that does not support switch-case.
   33829 	The switch-case statement is a gawk-specific feature which is not
   33830 	necessarily available, let's use traditional if-else statements instead.
   33831 
   33832 	* tests/uid.awk: Rewrite without switch-case statements.
   33833 
   33834 2015-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   33835 
   33836 	Fix build on systems that lack O_CLOEXEC definition.
   33837 	* xlat/timerfdflags.in [!TFD_CLOEXEC]: Check that O_CLOEXEC is defined.
   33838 
   33839 2015-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   33840 
   33841 	Fix build on systems that lack NETLINK_SOCK_DIAG definition.
   33842 	NETLINK_INET_DIAG was introduced in linux v2.6.14,
   33843 	NETLINK_SOCK_DIAG was added much later in linux v3.3.
   33844 
   33845 	* net.c [!NETLINK_SOCK_DIAG && NETLINK_INET_DIAG]
   33846 	(NETLINK_SOCK_DIAG): Define.
   33847 	* socketutils.c: Likewise.
   33848 	* tests/netlink_unix_diag.c: Likewise.
   33849 
   33850 2015-01-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   33851 
   33852 	Cleanup local copy of linux/fanotify.h.
   33853 	* linux/fanotify.h: Remove macros and structures not used by
   33854 	fanotify_init and fanotify_mark parsers.
   33855 
   33856 	Fix "make dist" regression introduced by commit v4.9-125-g120e5db.
   33857 	* Makefile.am (EXTRA_DIST): Add linux/unix_diag.h.
   33858 
   33859 2015-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   33860 
   33861 	tests: fix build with fresh glibc.
   33862 	* tests/netlink_unix_diag.c: Include <stdint.h>.
   33863 
   33864 2015-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   33865 
   33866 	ioctlent.sh: handle linux/aufs_type.h properly.
   33867 	Before this change, ioctlent.sh could not recognize unusual constants
   33868 	defined by linux/aufs_type.h, resulting to ioctls.h with references to
   33869 	these constants without appropriate definitions in ioctldefs.h.
   33870 
   33871 	* linux/ioctlent.sh: Update the regexp that is used to lookup constants
   33872 	referenced by generated ioctls.h.
   33873 
   33874 2015-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   33875 
   33876 	tests: fix distcheck.
   33877 	* tests/stat32-v.test: Remove work files if the test is skipped.
   33878 
   33879 	Fix printing of time_t values set in the distant future.
   33880 	* util.c (sprinttime): Increase buffer size.
   33881 	* tests/stat64-v.test: Try to set modification time of the sample file
   33882 	to a value set in the distant future.
   33883 
   33884 	Use AC_CHECK_TYPES to check for struct statfs64.
   33885 	* m4/statfs.m4: Remove.
   33886 	* configure.ac (AC_STATFS64): Remove.
   33887 	(AC_CHECK_TYPES): Add struct statfs64.
   33888 	* statfs.c: Replace HAVE_STATFS64 with HAVE_STRUCT_STATFS64.
   33889 
   33890 	Use AC_CHECK_TYPES to check for struct stat64.
   33891 	* m4/stat.m4: Remove.
   33892 	* configure.ac (AC_STAT64): Remove.
   33893 	(AC_CHECK_TYPES): Add struct stat64.
   33894 	* file.c: Replace HAVE_STAT64 with HAVE_STRUCT_STAT64.
   33895 
   33896 	file.c: fix 32-bit stat decoding on 64-bit architectures.
   33897 	* file.c [SPARC || SPARC64] (struct stat): Remove, use generic
   33898 	definition from <asm/stat.h>.
   33899 	[SPARC64] (struct stat_sparc64, printstat_sparc64): Remove.
   33900 	[AARCH64 || X86_64 || X32 || POWERPC64 || SPARC64] (struct stat32,
   33901 	STAT32_PERSONALITY): Define.
   33902 	[STAT32_PERSONALITY] (struct stat_powerpc32): Rename to struct stat32.
   33903 	[STAT32_PERSONALITY] (printstat_powerpc32): Rename to printstat32.
   33904 	(printstat) [STAT32_PERSONALITY]: Call printstat32 when
   33905 	current_personality == STAT32_PERSONALITY.
   33906 	[HAVE_STAT64] (printstat64) [STAT32_PERSONALITY]: Call printstat when
   33907 	current_personality != STAT32_PERSONALITY.
   33908 	[!HAVE_STAT64] (sys_stat64): Fallback to sys_stat.
   33909 	[!HAVE_STAT64] (sys_fstat64): Fallback to sys_fstat.
   33910 
   33911 	sparc: reuse struct stat parser code for struct solstat decoding.
   33912 	* printstat.h: Parametrize major() and minor().
   33913 	* file.c [SPARC || SPARC64]: Define do_printstat_sol by instantiating
   33914 	printstat.h template.
   33915 	[SPARC || SPARC64] (printstatsol): Use do_printstat_sol.
   33916 
   33917 	ppc64: reuse struct stat parser code for struct stat_powerpc32 decoding.
   33918 	* file.c [POWERPC64]: Define do_printstat32 by instantiating printstat.h
   33919 	template.
   33920 	[POWERPC64] (printstat_powerpc32): Use do_printstat32.
   33921 
   33922 	file.c: group related parsers together.
   33923 	* file.c (sys_stat, sys_fstat): Collect in one place right before
   33924 	the definition of printstat64.
   33925 	(sys_stat64, sys_fstat64): Collect in one place right after the
   33926 	definition of printstat64.
   33927 
   33928 	file.c: collect scattered __old_kernel_stat related code.
   33929 	* file.c [HAVE_STRUCT___OLD_KERNEL_STAT] (convertoldstat, printoldstat,
   33930 	sys_oldstat, sys_oldfstat): Collect functions in one place.
   33931 
   33932 	Use the same source code for struct stat/stat64 decoding.
   33933 	* file.c: Define do_printstat64 by instantiating printstat.h template.
   33934 	(printstat64): Use do_printstat64.
   33935 
   33936 	x32: use generic printstat/printstat64 parsers.
   33937 	* file.c (printstat) [X32]: Define.
   33938 	(printstat64) [X32]: Use "struct stat64" instead of "struct stat".
   33939 	Use printstat for x32 personality processes.
   33940 	(printstat64_x32): Remove.
   33941 	(sys_stat64, sys_fstat64) [X32]: Use printstat64 instead of
   33942 	printstat64_x32.
   33943 
   33944 	x32: remove redundant definitions.
   33945 	* file.c [X32]: Do not define "struct stat" and "struct
   33946 	__old_kernel_stat" locally, use definitions provided by <asm/stat.h>.
   33947 	Do not define "struct stat64" exclusively, reuse another definition
   33948 	added earlier for X86_64.
   33949 
   33950 	Convert do_printstat to a template function.
   33951 	* printstat.h: New file.
   33952 	* Makefile.am (strace_SOURCES): Add it.
   33953 	* file.c: Include "printstat.h".
   33954 	(do_printstat): Move to printstat.h, parametrize its name
   33955 	and struct stat.
   33956 
   33957 	file.c: prepare realprintstat for parametrization.
   33958 	* file.c (realprintstat): Adjust format strings so that all 64-bit
   33959 	integer fields are printed with %llu format, and %u format is used for
   33960 	all the rest.  Rename to do_printstat.
   33961 	(printstat, printoldstat): Update callers.
   33962 
   33963 	tests: cleanup stat.test.
   33964 	* tests/stat.test: Rewrite in a more readable way.
   33965 
   33966 	tests: check verbose decoding of 32-bit and 64-bit struct stat.
   33967 	* tests/stat.c: New file.
   33968 	* tests/stat32.c: Likewise.
   33969 	* tests/stat32-v.test: New file.
   33970 	* tests/stat64-v.test: Likewise.
   33971 	* tests/Makefile.am (check_PROGRAMS): Add stat and stat32.
   33972 	(stat_CFLAGS): Define.
   33973 	(TESTS): Add stat32-v.test and stat64-v.test.
   33974 	* tests/.gitignore: Add stat and stat32.
   33975 
   33976 2015-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   33977 
   33978 	Cleanup struct stat.st_flags decoding.
   33979 	There are no symbolic constants defined for struct stat.st_flags,
   33980 	so decode this rare field as unsigned int.
   33981 
   33982 	* xlat/fileflags.in: Remove.
   33983 	* file.c (realprintstat, printstat64) [HAVE_STRUCT_STAT_ST_FLAGS]:
   33984 	Decode struct stat.st_flags as unsigned int.
   33985 
   33986 2015-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   33987 
   33988 	Drop struct stat.st_aclcnt and stat.st_level support.
   33989 	Remove the code that supports struct stat.st_aclcnt and stat.st_level
   33990 	decoding -- these fields are not defined in system headers.
   33991 
   33992 	* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_aclcnt and
   33993 	struct stat.st_level.
   33994 	* file.c (realprintstat, printstat64)
   33995 	[HAVE_STRUCT_STAT_ST_ACLCNT || HAVE_STRUCT_STAT_ST_LEVEL]: Remove.
   33996 
   33997 2015-01-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   33998 
   33999 	tests: fix race condition in net-accept-connect based tests.
   34000 	Change all net-accept-connect based tests to use different unix domain
   34001 	socket addresses, so that these tests could be safely run in parallel.
   34002 
   34003 	* tests/net-accept-connect.c: Parametrize unix domain socket address.
   34004 	* tests/net-fd.test: Pass socket address to net-accept-connect.
   34005 	* tests/net.test: Likewise.
   34006 	* tests/unix-yy.test: Likewise.
   34007 	* tests/unix-yy-accept.awk: Update regexps.
   34008 	* tests/unix-yy-connect.awk: Likewise.
   34009 
   34010 2014-12-31  Mike Frysinger  <vapier (a] gentoo.org>
   34011 
   34012 	timerfd: update flags decoding.
   34013 	The current code only decodes TFD_TIMER_ABSTIME when the kernel has
   34014 	a bunch of newer flags.  We have to handle fallbacks for all of them
   34015 	since the kernel doesn't currently export things to userspace.
   34016 
   34017 	* time.c: Include fcntl.h for O_* defines.
   34018 	(TFD_TIMER_ABSTIME): Move to xlat/timerfdflags.in.
   34019 	* xlat/timerfdflags.in: Add more definitions.
   34020 
   34021 2014-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   34022 
   34023 	sparc: fix fxstat decoding.
   34024 	* file.c [SPARC || SPARC64] (sys_fxstat): Print file descriptor
   34025 	using printfd.
   34026 
   34027 2014-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   34028 
   34029 	sparc: drop _STAT64_VER support.
   34030 	Starting with commit v4.6-240-g5afdf12, nobody compiles this
   34031 	non-Linux code.
   34032 
   34033 	* file.c [SPARC || SPARC64] (sys_xstat, sys_fxstat): Remove
   34034 	_STAT64_VER code.
   34035 
   34036 2014-12-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   34037 
   34038 	sparc: remove redundant sys_lxstat.
   34039 	* file.c [SPARC || SPARC64] (sys_lxstat): Remove.
   34040 	* linux/sparc/dummy2.h (solaris_lxstat): Alias to sys_xstat.
   34041 	* linux/sparc64/dummy2.h (solaris_lxstat): Likewise.
   34042 
   34043 2014-12-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   34044 
   34045 	file.c: do not include unused headers.
   34046 	* file.c: Do not include <fcntl.h>.
   34047 
   34048 2014-12-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   34049 
   34050 	Cleanup UTIME_NOW/UTIME_OMIT decoding.
   34051 	Move the code that's present in two copies from sprinttv()
   34052 	to a new helper function.
   34053 
   34054 	* time.c (do_sprinttv): New function.
   34055 	(sprinttv): Use it.
   34056 
   34057 2014-12-27  Elliott Hughes  <enh (a] google.com>
   34058 
   34059 	Fix UTIME_NOW/UTIME_OMIT decoding.
   34060 	The kernel doesn't actually care what tv_sec is set to --- it only checks
   34061 	tv_nsec when looking for the special values.
   34062 
   34063 2014-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   34064 
   34065 	Make -yy output for inet sockets consistent with unix domain sockets.
   34066 	Prepend -yy output generated for INET/INET6 TCP/UDP sockets with their
   34067 	protocol name obtained using getxattr.
   34068 
   34069 	* socketutils.c (inet_parse_response): Add proto_name argument.
   34070 	Print proto_name for connected and unconnected sockets.
   34071 	(receive_responses): Add proto_name argument, pass it to the parser.
   34072 	(inet_print): Add proto_name argument, pass it to receive_responses.
   34073 	(unix_parse_response): Add proto_name argument.
   34074 	(print_sockaddr_by_inode): Pass protocol name to inet_print calls.
   34075 	* tests/net-yy-accept.awk: Update to match new output format.
   34076 	* tests/net-yy-connect.awk: Likewise.
   34077 
   34078 2014-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   34079 
   34080 	tests: robustify unix domain socket decoding test.
   34081 	Unix domain socket address family name is not universally decoded as
   34082 	AF_LOCAL, other names like AF_UNIX and AF_FILE are valid synonyms.
   34083 	Similarly, PF_UNIX and PF_FILE are valid synonyms for PF_LOCAL.
   34084 
   34085 	Some test regexps have to be properly initialized before they could
   34086 	be used, so make sure they are initialized before use.
   34087 
   34088 2014-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   34089 
   34090 	tests: fix unix domain socket decoding availability test.
   34091 	Since inet_diag and unix_diag interfaces are implemented by different
   34092 	kernel modules, they have to be tested separately.
   34093 
   34094 	* tests/netlink_unix_diag.c: New file.
   34095 	* tests/unix-yy.test: Use it.
   34096 	* tests/Makefile.am (check_PROGRAMS): Add it.
   34097 	* tests/.gitignore: Likewise.
   34098 
   34099 2014-12-25  Masatake YAMATO  <yamato (a] redhat.com>
   34100 
   34101 	tests: add a test for decoding unix domain socket addresses.
   34102 	* tests/unix-yy-accept.awk: New file.
   34103 	* tests/unix-yy-connect.awk: New file.
   34104 	* tests/unix-yy.test: New test.
   34105 	* tests/Makefile.am (TESTS): Add it.
   34106 	(EXTRA_DIST): Add unix-yy-accept.awk and unix-yy-connect.awk.
   34107 
   34108 2014-12-25  Masatake YAMATO  <yamato (a] redhat.com>
   34109 
   34110 	Support unix domain sockets in -yy option.
   34111 	This change extends -yy option to handle unix domain sockets:
   34112 	their peer addresses will be printed, similar to inet sockets.
   34113 
   34114 	For a listening socket, its socket inode and socket path are printed.
   34115 	For an accepted socket, its socket inode, the peer inode, and the
   34116 	socket path are printed.
   34117 	For a client socket, its socket inode and the peer inode are printed.
   34118 
   34119 	An example of a server side communication using netcat:
   34120 
   34121 		$ ./strace -yy -e network nc -l -U /tmp/example.sock
   34122 		socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
   34123 		setsockopt(3<UNIX:[14728348]>, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
   34124 		bind(3<UNIX:[14728348]>, {sa_family=AF_LOCAL, sun_path="/tmp/example.sock"}, 19) = 0
   34125 		listen(3<UNIX:[14728348,"/tmp/example.sock"]>, 10) = 0
   34126 		accept(3<UNIX:[14728348,"/tmp/example.sock"]>, {sa_family=AF_LOCAL, NULL}, [2]) = 4<UNIX:[14727246->14727245,"/tmp/example.sock"]>
   34127 		recvfrom(4<UNIX:[14727246->14727245,"/tmp/example.sock"]>, "INPUT\n", 8192, 0, NULL, NULL) = 6
   34128 		INPUT
   34129 
   34130 	An example of a client side communication using netcat:
   34131 
   34132 		$ ./strace -yy -e network nc -U /tmp/example.sock
   34133 		socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
   34134 		connect(3<UNIX:[14727245]>, {sa_family=AF_LOCAL, sun_path="/tmp/example.sock"}, 19) = 0
   34135 		getsockopt(3<UNIX:[14727245]>, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
   34136 		INPUT
   34137 		...
   34138 		sendto(3<UNIX:[14727245->14727246]>, "INPUT\n", 6, 0, NULL, 0) = 6
   34139 
   34140 	* linux/unix_diag.h: New file.
   34141 	* socketutils.c (send_query): Rename to inet_send_query.
   34142 	(parse_response): Rename to inet_parse_response.
   34143 	(unix_print, unix_send_query, unix_parse_response): New functions.
   34144 	(receive_responses): Add a new argument named parser: a function for
   34145 	handling protocol specific data parts of diag messages.
   34146 	(print_sockaddr_by_inode): Call unix_print.
   34147 	Replace NETLINK_INET_DIAG with NETLINK_SOCK_DIAG, they are equal
   34148 	but NETLINK_SOCK_DIAG looks more generic.
   34149 
   34150 2014-12-16  Masatake YAMATO  <yamato (a] redhat.com>
   34151 
   34152 	Use the protocol name of a socket as a hint for peer address resolution.
   34153 	To resolve the peer address of socket, all combinations of families
   34154 	(AF_INET, AF_INET6) and protocols(IPPROTO_TCP, IPPROTO_UDP) were tried.
   34155 	This change utilizes the protocol name obtained via getxattr to specify
   34156 	the right combination.
   34157 
   34158 	* socketutils.c (inet_print): New helper function.
   34159 	(print_sockaddr_by_inode): Use it.  Utilize the protocol name
   34160 	associated with the given inode for resolving the peer socket
   34161 	address.  If the protocol name is NULL, resolve the address
   34162 	by trying combinations of families and protocols as before.
   34163 	* defs.h (print_sockaddr_by_inode): Update prototype.
   34164 	* util.c (printfd): Pass the protocol name associated with
   34165 	the given path to print_sockaddr_by_inode as the 2nd argument.
   34166 
   34167 2014-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   34168 
   34169 	Fix decoding of getgroups, getgroups32, setgroups, and setgroups32 syscalls
   34170 	Convert parsers of these syscalls to the same scheme as were applied to
   34171 	parsers of other uid/gid related syscalls.
   34172 	That is, define two sets of parsers on architectures that support
   34173 	(either directly or via multiarch) 16-bit and 32-bit gid getgroups
   34174 	and setgroups syscalls simultaneously, and reuse essentially the same
   34175 	code by parametrizing uid_t and names of parser functions.
   34176 
   34177 	* groups.c: Remove.
   34178 	(sys_getgroups, sys_setgroups): Move ...
   34179 	* uid.c: ... here and parametrize their names.
   34180 	* Makefile.am (strace_SOURCES): Remove groups.c.
   34181 	* linux/syscall.h (sys_getgroups32, sys_setgroups32): Remove.
   34182 	[NEED_UID16_PARSERS] (sys_getgroups16, sys_setgroups16): New prototypes.
   34183 	* linux/arm/syscallent.h: Rename sys_[gs]etgroups to sys_[gs]etgroups16,
   34184 	rename sys_[gs]etgroups32 to sys_[gs]etgroups.
   34185 	* linux/bfin/syscallent.h: Likewise.
   34186 	* linux/i386/syscallent.h: Likewise.
   34187 	* linux/m68k/syscallent.h: Likewise.
   34188 	* linux/microblaze/syscallent.h: Likewise.
   34189 	* linux/s390/syscallent.h: Likewise.
   34190 	* linux/sh/syscallent.h: Likewise.
   34191 	* linux/sh64/syscallent.h: Likewise.
   34192 	* linux/sparc/syscallent.h: Likewise.
   34193 	* tests/uid.c: Test for getgroups.
   34194 	* tests/uid16.c: Likewise.
   34195 	* tests/uid32.c: Test for getgroups32.
   34196 	* tests/uid.awk: Test for getgroups/getgroups32 decoding.
   34197 	* tests/uid.test: Trace getgroups/getgroups32 syscalls.
   34198 
   34199 2014-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   34200 
   34201 	Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls.
   34202 	Define two sets of parsers on architectures that support (either
   34203 	directly or via multiarch) 16-bit and 32-bit uid/gid syscalls
   34204 	simultaneously.  Since the code in these two sets is essentially
   34205 	the same and the key difference between them is the size of uid_t,
   34206 	implement it by parametrizing uid_t and names of parser functions.
   34207 
   34208 	* defs.h (NEED_UID16_PARSERS): New macro.
   34209 	* linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16,
   34210 	sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16,
   34211 	sys_setreuid16, sys_setuid16): New prototypes.
   34212 	* linux/dummy.h (sys_geteuid16): Alias to sys_getuid16.
   34213 	(sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16,
   34214 	sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding
   34215 	sys_*uid16 functions.
   34216 	* uid.c: Stop including <asm/posix_types.h>.
   34217 	Parametrize uid_t and names of all exported functions.
   34218 	(get_print_uid): New function.
   34219 	(sys_getresuid): Use it.
   34220 	(printuid): Check for (uid_t) -1.
   34221 	* uid16.c: New file.
   34222 	* Makefile.am (strace_SOURCES): Add it.
   34223 	* linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16,
   34224 	sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16,
   34225 	sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16,
   34226 	sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16,
   34227 	and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries.
   34228 	* linux/bfin/syscallent.h: Likewise.
   34229 	* linux/i386/syscallent.h: Likewise.
   34230 	* linux/m68k/syscallent.h: Likewise.
   34231 	* linux/microblaze/syscallent.h: Likewise.
   34232 	* linux/s390/syscallent.h: Likewise.
   34233 	* linux/sparc/syscallent.h: Likewise.
   34234 	* linux/sh/syscallent.h: Likewise.
   34235 	* linux/sh64/syscallent.h: Likewise.
   34236 	* tests/uid16.c: New file.
   34237 	* tests/uid16.test: New test.
   34238 	* tests/Makefile.am (CHECK_PROGRAMS): Add uid16.
   34239 	(TESTS): Add uid16.test.
   34240 	* tests/.gitignore: Add uid16.
   34241 
   34242 2014-12-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   34243 
   34244 	sh, sh64: fix uid/gid syscall entries.
   34245 	* linux/sh/syscallent.h: Replace printargs with real syscall
   34246 	parsers in *chown32 and [gs]et*[gu]id32 syscall entries.
   34247 	* linux/sh64/syscallent.h: Likewise.
   34248 
   34249 	s390: fix uid/gid syscall entries.
   34250 	* linux/s390/syscallent.h: Add "32" suffix to names of *chown32
   34251 	and [gs]et*[gu]id32 syscalls #198..216.
   34252 
   34253 	sparc: fix uid/gid syscall entries.
   34254 	* linux/sparc/syscallent.h: Add "32" suffix to names
   34255 	of [gs]etres[gu]id32 syscalls #108..112.
   34256 	Fix entry for syscall #112 from setresgid32 to setregid32.
   34257 
   34258 2014-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   34259 
   34260 	chown.c: split into separate files.
   34261 	This will make further uid/gid fixes simpler.
   34262 
   34263 	* fchownat.c: New file.
   34264 	* chown.c (sys_fchownat: Move to fchownat.c.
   34265 	(sys_chown, sys_fchown): Move to uid.c.
   34266 	* Makefile.am (strace_SOURCES): Remove chown.c, add fchownat.c.
   34267 
   34268 2014-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   34269 
   34270 	util.c: move printuid to uid.c.
   34271 	This will make further uid/gid fixes simpler.
   34272 
   34273 	* util.c (printuid): Move
   34274 	* uid.c: ... here.
   34275 
   34276 2014-12-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   34277 
   34278 	tests/uid.awk: rewrite in a more maintainable style.
   34279 	Since the test is virtually a FSM, rewrite it as a FSM.
   34280 
   34281 2014-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   34282 
   34283 	printuid: fix uid_t decoding on 64-bit architectures.
   34284 	It was not a good idea to treat uid_t as a long int type because
   34285 	the latter is twice larger than uid_t on 64-bit architectures.
   34286 
   34287 	* defs.h (printuid): Change uid argument type from "unsigned long"
   34288 	to "unsigned int".
   34289 	* util.c (printuid): Likewise.  When uid equals to -1, print "-1".
   34290 	* tests/uid.awk: New file.
   34291 	* tests/uid.c: New file.
   34292 	* tests/uid32.c: Likewise.
   34293 	* tests/uid.test: New test.
   34294 	* tests/uid32.test: Likewise.
   34295 	* tests/Makefile.am (CHECK_PROGRAMS): Add uid and uid32.
   34296 	(TESTS): Add uid.test and uid32.test.
   34297 	(EXTRA_DIST): Add uid.awk.
   34298 	* tests/.gitignore: Add uid and uid32.
   34299 
   34300 2014-12-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   34301 
   34302 	Update PTRACE_* constants.
   34303 	* xlat/ptrace_cmds.in: Add PTRACE_PEEKSIGINFO, PTRACE_GETSIGMASK,
   34304 	and PTRACE_SETSIGMASK.
   34305 
   34306 	Update SWAP_FLAG_* constants.
   34307 	* swapon.c: Ensure that SWAP_FLAG_DISCARD_ONCE and
   34308 	SWAP_FLAG_DISCARD_PAGES are defined.
   34309 	* xlat/swap_flags.in: Add SWAP_FLAG_DISCARD_ONCE and
   34310 	SWAP_FLAG_DISCARD_PAGES.
   34311 
   34312 2014-12-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   34313 
   34314 	Update SCHED_* constants.
   34315 	* xlat/schedulers.in: Add SCHED_BATCH, SCHED_ISO, SCHED_IDLE, and
   34316 	SCHED_DEADLINE.
   34317 
   34318 	Update prctl PR_* constants.
   34319 	* xlat/prctl_options.in: Add PR_SET_THP_DISABLE, PR_GET_THP_DISABLE,
   34320 	PR_MPX_ENABLE_MANAGEMENT, and PR_MPX_DISABLE_MANAGEMENT.
   34321 
   34322 2014-12-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   34323 
   34324 	Always compile sys_prctl parser.
   34325 	Since sys_prctl is referenced by syscallent files unconditionally,
   34326 	conditional compilation of sys_prctl depending on prctl availability is
   34327 	pointless.
   34328 
   34329 	* prctl.c (unalignctl_string, sys_prctl): Compile unconditionally.
   34330 
   34331 2014-12-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   34332 
   34333 	process.c: split struct_user_offsets into architecture-specific include files
   34334 	* Makefile.am (EXTRA_DIST): Add linux/alpha/userent.h,
   34335 	linux/arm/userent.h, linux/avr32/userent.h, linux/bfin/userent.h,
   34336 	linux/crisv10/userent.h, linux/crisv32/userent.h,
   34337 	linux/i386/userent.h, linux/i386/userent0.h, linux/ia64/userent.h,
   34338 	linux/m68k/userent.h, linux/microblaze/userent.h,
   34339 	linux/mips/userent.h, linux/or1k/userent.h, linux/powerpc/userent.h,
   34340 	linux/s390/userent.h, linux/s390/userent0.h, linux/s390/userent1.h,
   34341 	linux/s390x/userent.h, linux/sh/userent.h, linux/sh/userent0.h,
   34342 	linux/sh64/userent.h, linux/sparc/userent.h, linux/sparc64/userent.h,
   34343 	linux/tile/userent.h, linux/userent.h, linux/userent0.h,
   34344 	linux/x32/userent.h, linux/x86_64/userent.h, and
   34345 	linux/xtensa/userent.h.
   34346 	* process.c (struct_user_offsets): Split into architecture-specific
   34347 	include files, inculde userent.h.
   34348 
   34349 	process.c: include less headers.
   34350 	* process.c: Do not include <fcntl.h> and <sys/stat.h>.
   34351 	Reorder inclusion of xlat header files.
   34352 
   34353 	Unexport struct_user_offsets.
   34354 	* defs.h (struct_user_offsets): Remove.
   34355 	* process.c (struct_user_offsets): Make static.
   34356 
   34357 2014-12-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   34358 
   34359 	process.c: introduce XLAT_UOFF macro.
   34360 	Introduce XLAT_UOFF macro and use it to automatically transform
   34361 	struct_user_offsets array into a more readable and compact form.
   34362 
   34363 	for n in $(sed -n 's/^[[:space:]]*{[[:space:]]*uoff(\([a-z_0-9]\+\)),.*/\1/p' process.c |sort -u); do
   34364 		sed -i 's/^\([[:space:]]*\){[[:space:]]*uoff('"$n"'),[[:space:]]*"offsetof(struct user,[[:space:]]*'"$n"')"[[:space:]]*},$/\1XLAT_UOFF('"$n"'),/' process.c
   34365 	done
   34366 
   34367 	* process.c (XLAT_UOFF): New macro.
   34368 	(struct_user_offsets): Use it.
   34369 
   34370 2014-12-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   34371 
   34372 	process.c: move sethostname and gethostname parsers to a separate file.
   34373 	* hostname.c: New file.
   34374 	* Makefile.am (strace_SOURCES): Add it.
   34375 	* process.c (sys_sethostname, sys_gethostname): Move to hostname.c.
   34376 
   34377 	process.c: move exit parser to a separate file.
   34378 	* exit.c: New file.
   34379 	* Makefile.am (strace_SOURCES): Add it.
   34380 	* process.c (sys_exit): Move to exit.c.
   34381 
   34382 	process.c: move clone, setns, unshare, and fork parsers to a separate file
   34383 	* clone.c: New file.
   34384 	* Makefile.am (strace_SOURCES): Add it.
   34385 	* process.c: Move sys_clone, sys_setns, sys_unshare, sys_fork, and
   34386 	related code to clone.c.
   34387 
   34388 	process.c: move get*uid and set*uid parsers to a separate file.
   34389 	* uid.c: New file.
   34390 	* Makefile.am (strace_SOURCES): Add it.
   34391 	* process.c (sys_getuid, sys_setfsuid, sys_setuid, sys_getresuid,
   34392 	sys_setreuid, sys_setresuid): Move to uid.c.
   34393 
   34394 	process.c: move getgroups* and setgroups* parsers to a separate file.
   34395 	* groups.c: New file.
   34396 	* Makefile.am (strace_SOURCES): Add it.
   34397 	* process.c: Move sys_setgroups, sys_getgroups, sys_setgroups32,
   34398 	sys_getgroups32, and related code to groups.c.
   34399 
   34400 	process.c: move execve and execv parsers to a separate file.
   34401 	* execve.c: New file.
   34402 	* Makefile.am (strace_SOURCES): Add it.
   34403 	* process.c: Move sys_execve, sys_execv, and related code to execve.c.
   34404 
   34405 	process.c: move waitpid, wait4, osf_wait4, and waitid parsers to a separate file
   34406 	* wait.c: New file.
   34407 	* Makefile.am (strace_SOURCES): Add it.
   34408 	* process.c: Move sys_waitpid, sys_wait4, sys_osf_wait4, sys_waitid and
   34409 	related code to wait.c.
   34410 
   34411 	process.c: move uname parser to a separate file.
   34412 	* uname.c: New file.
   34413 	* Makefile.am (strace_SOURCES): Add it.
   34414 	* process.c (sys_uname): Move to uname.c.
   34415 
   34416 	process.c: move futex parser to a separate file.
   34417 	* futex.c: New file.
   34418 	* Makefile.am (strace_SOURCES): Add it.
   34419 	* process.c: Move sys_futex and related code to futex.c.
   34420 
   34421 	process.c: move get_robust_list parser to a separate file.
   34422 	* get_robust_list.c: New file.
   34423 	* Makefile.am (strace_SOURCES): Add it.
   34424 	* process.c (sys_get_robust_list): Move to get_robust_list.c.
   34425 
   34426 	process.c: move sched_* parsers to a separate file.
   34427 	* sched.c: New file.
   34428 	* Makefile.am (strace_SOURCES): Add it.
   34429 	* process.c: Move sys_sched_getscheduler, sys_sched_setscheduler,
   34430 	sys_sched_getparam, sys_sched_setparam, sys_sched_get_priority_min,
   34431 	sys_sched_rr_get_interval, and related code to sched.c.
   34432 
   34433 	process.c: move sched_setaffinity and sched_getaffinity parsers to a separate file
   34434 	* affinity.c: New file.
   34435 	* Makefile.am (strace_SOURCES): Add it.
   34436 	* process.c (sys_sched_setaffinity, sys_sched_getaffinity): Move
   34437 	to affinity.c.
   34438 
   34439 	process.c: move prctl and arch_prctl parsers to a separate file.
   34440 	* prctl.c: New file.
   34441 	* Makefile.am (strace_SOURCES): Add it.
   34442 	* process.c: Move sys_prctl, sys_arch_prctl, and related code to prctl.c.
   34443 
   34444 	process.c: move getcpu parser to a separate file.
   34445 	* getcpu.c: New file.
   34446 	* Makefile.am (strace_SOURCES): Add it.
   34447 	* process.c (sys_getcpu): Move to getcpu.c.
   34448 
   34449 	process.c: move process_vm_readv and process_vm_writev parsers to a separate file
   34450 	* process_vm.c: New file.
   34451 	* Makefile.am (strace_SOURCES): Add it.
   34452 	* process.c (sys_process_vm_readv, sys_process_vm_writev): Move
   34453 	to process_vm.c.
   34454 
   34455 	Implement decoding of fallocate FALLOC_FL_* flags.
   34456 	* xlat/falloc_flags.in: New file.
   34457 	* configure.ac (AC_CHECK_HEADERS): Add linux/falloc.h.
   34458 	* fallocate.c [HAVE_LINUX_FALLOC_H]: Include <linux/falloc.h>.
   34459 	Include xlat/falloc_flags.h.
   34460 	(sys_fallocate): Decode flags.
   34461 
   34462 	Fix decoding of renameat2 RENAME_* flags.
   34463 	* renameat.c: Include <linux/fs.h> where RENAME_NOREPLACE,
   34464 	RENAME_EXCHANGE, and RENAME_WHITEOUT are usually defined.
   34465 
   34466 	file.c: move open, openat, and creat parsers to a separate file.
   34467 	* open.c: New file.
   34468 	* Makefile.am (strace_SOURCES): Add it.
   34469 	* file.c: Move sys_open, sys_openat, sys_creat, and related code
   34470 	to open.c.
   34471 
   34472 	file.c: move access and faccessat parsers to a separate file.
   34473 	* access.c: New file.
   34474 	* Makefile.am (strace_SOURCES): Add it.
   34475 	* file.c: Move sys_access, sys_faccessat and related code to access.c.
   34476 
   34477 	file.c: move umask parser to a separate file.
   34478 	* umask.c: New file.
   34479 	* Makefile.am (strace_SOURCES): Add it.
   34480 	* file.c (sys_umask): Move to umask.c.
   34481 
   34482 	file.c: move lseek and llseek parsers to a separate file.
   34483 	* lseek.c: New file.
   34484 	* Makefile.am (strace_SOURCES): Add it.
   34485 	* file.c: Move sys_lseek, sys_llseek, and related code to lseek.c.
   34486 
   34487 	file.c: move readahead parser to a separate file.
   34488 	* readahead.c: New file.
   34489 	* Makefile.am (strace_SOURCES): Add it.
   34490 	* file.c (sys_readahead): Move to readahead.c.
   34491 
   34492 	file.c: move truncate, truncate64, ftruncate, and ftruncate64 parsers to a separate file
   34493 	* truncate.c: New file.
   34494 	* Makefile.am (strace_SOURCES): Add it.
   34495 	* file.c (sys_truncate, sys_truncate64, sys_ftruncate, sys_ftruncate64):
   34496 	Move to truncate.c.
   34497 
   34498 	file.c: move chdir parser to a separate file.
   34499 	* chdir.c: New file.
   34500 	* Makefile.am (strace_SOURCES): Add it.
   34501 	* file.c (sys_chdir): Move to chdir.c.
   34502 
   34503 	file.c: move link, linkat, unlinkat, and symlinkat parsers to a separate file
   34504 	* link.c: New file.
   34505 	* Makefile.am (strace_SOURCES): Add it.
   34506 	* file.c: Move sys_link, sys_linkat, sys_unlinkat, sys_symlinkat, and
   34507 	related code to link.c.
   34508 
   34509 	file.c: move readlink and readlinkat parsers to a separate file.
   34510 	* readlink.c: New file.
   34511 	* Makefile.am (strace_SOURCES): Add it.
   34512 	* file.c (decode_readlink, sys_readlink, sys_readlinkat): Move
   34513 	to readlink.c.
   34514 
   34515 	file.c: move renameat and renameat2 parsers to a separate file.
   34516 	* renameat.c: New file.
   34517 	* Makefile.am (strace_SOURCES): Add it.
   34518 	* file.c: Move sys_renameat, sys_renameat2, and related code
   34519 	to renameat.c.
   34520 
   34521 	file.c: move chown, fchown, and fchownat parsers to a separate file.
   34522 	* chown.c: New file.
   34523 	* Makefile.am (strace_SOURCES): Add it.
   34524 	* file.c (sys_chown, sys_fchownat, sys_fchown): Move to chown.c.
   34525 
   34526 	Export at_flags.
   34527 	* defs.h (at_flags): New prototype.
   34528 
   34529 	file.c: move chmod, fchmod, and fchmodat parsers to a separate file.
   34530 	* chmod.c: New file.
   34531 	* Makefile.am (strace_SOURCES): Add it.
   34532 	* file.c (sys_chmod, sys_fchmodat, sys_fchmod): Move to chmod.c.
   34533 
   34534 	file.c: move utimes, futimesat, utimensat, and osf_utimes parsers to a separate file
   34535 	* utimes.c: New file.
   34536 	* Makefile.am (strace_SOURCES): Add it.
   34537 	* file.c (decode_utimes, sys_utimes, sys_futimesat, sys_utimensat,
   34538 	sys_osf_utimes): Move to utimes.c.
   34539 
   34540 	file.c: move utime parser to a separate file.
   34541 	* utime.c: New file.
   34542 	* Makefile.am (strace_SOURCES): Add it.
   34543 	* file.c (sys_utime): Move to utime.c.
   34544 
   34545 	Export sprinttime.
   34546 	* defs.h (sprinttime): New prototype.
   34547 	* file.c (sprinttime): Make global and move to util.c.
   34548 
   34549 	file.c: move mknod, mknodat, and xmknod parsers to a separate file.
   34550 	* mknod.c: New file.
   34551 	* Makefile.am (strace_SOURCES): Add it.
   34552 	* file.c: Move sys_mknod, sys_mknodat, sys_xmknod, and related code
   34553 	to mknod.c.
   34554 
   34555 	file.c: export sprintmode and move it to a separate file.
   34556 	* printmode.c: New file.
   34557 	* Makefile.am (strace_SOURCES): Add it.
   34558 	* defs.h (sprintmode): New prototype.
   34559 	* file.c (sprintmode): Make global and move to printmode.c.
   34560 
   34561 	file.c: move getcwd parser to a separate file.
   34562 	* getcwd.c: New file.
   34563 	* Makefile.am (strace_SOURCES): Add it.
   34564 	* file.c (sys_getcwd): Move to getcwd.c.
   34565 
   34566 	file.c: move *xattr parsers to a separate file.
   34567 	* xattr.c: New file.
   34568 	* Makefile.am (strace_SOURCES): Add it.
   34569 	* file.c: Move sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr,
   34570 	sys_listxattr, sys_flistxattr, sys_removexattr, sys_fremovexattr,
   34571 	and related code to xattr.c.
   34572 
   34573 	file.c: move fadvise64 and fadvise64_64 parsers to a separate file.
   34574 	* fadvise.c: New file.
   34575 	* Makefile.am (strace_SOURCES): Add it.
   34576 	* file.c: Move sys_fadvise64, sys_fadvise64_64, and related code
   34577 	to fadvise.c.
   34578 
   34579 	file.c: move sync_file_range and sync_file_range2 parsers to a separate file
   34580 	* sync_file_range.c: New file.
   34581 	* Makefile.am (strace_SOURCES): Add it.
   34582 	* file.c: Move sys_sync_file_range, sys_sync_file_range2, and related
   34583 	code to sync_file_range.c.
   34584 
   34585 	file.c: move fallocate parser to a separate file.
   34586 	* fallocate.c: New file.
   34587 	* Makefile.am (strace_SOURCES): Add it.
   34588 	* file.c (sys_fallocate): Move to fallocate.c.
   34589 
   34590 	file.c: move swapon parser to a separate file.
   34591 	* swapon.c: New file.
   34592 	* Makefile.am (strace_SOURCES): Add it.
   34593 	* file.c: Move sys_swapon and related code to swapon.c.
   34594 
   34595 2014-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   34596 
   34597 	Implement full decoding of 64-bit capabilities.
   34598 	Unlike v1 capabilities which are 32-bit, v2 and v3 are 64-bit, but
   34599 	before this change only lower 32 capability bits were decoded for
   34600 	v2 and v3.
   34601 
   34602 	* xlat/capabilities1.in: New file.
   34603 	* capability.c: Define v2/v3 CAP_* constants.
   34604 	Include xlat/capabilities1.h.
   34605 	(get_cap_header): New function.
   34606 	(print_cap_header): Update to use get_cap_header result.
   34607 	(print_cap_data): Decoder higher capability bits for v2 and v3.
   34608 	(sys_capget, sys_capset): Use get_cap_header, update print_cap_header
   34609 	and print_cap_data calls.
   34610 	* tests/caps.c: New file.
   34611 	* tests/caps.awk: New file.
   34612 	* tests/caps.test: New test.
   34613 	* tests/Makefile.am (CHECK_PROGRAMS): Add caps.
   34614 	(TESTS): Add caps.test.
   34615 	(EXTRA_DIST): Add caps.awk.
   34616 
   34617 2014-12-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   34618 
   34619 	Make parsers of capget and capset syscalls self-contained.
   34620 	Various versions of <linux/capability.h> used to require different
   34621 	workarounds to avoid conflicts with types defined by libc headers.
   34622 	Define all required types and constants locally to fix this issue.
   34623 
   34624 	* configure.ac (AC_CHECK_HEADERS): Remove linux/capability.h.
   34625 	* capability.c: Do not include <linux/capability.h>, remove workarounds
   34626 	for problematic versions of <linux/capability.h> file.
   34627 	Define CAP_* and _LINUX_CAPABILITY_VERSION_* constants as enums.
   34628 	(struct __user_cap_header_struct, struct __user_cap_data_struct): Define.
   34629 	* xlat/cap_version.in: Add #unconditional.
   34630 	* xlat/capabilities.in: Likewise.
   34631 
   34632 2014-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   34633 
   34634 	Remove system.c.
   34635 	All disjoint parts of system.c have been moved to separate files.
   34636 
   34637 	* system.c: Remove.
   34638 	* Makefile.am (strace_SOURCES): Remove it.
   34639 
   34640 2014-12-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   34641 
   34642 	Move mount parser to a separate file.
   34643 	* mount.c: New file.
   34644 	* Makefile.am (strace_SOURCES): Add it.
   34645 	* system.c: Move sys_mount and related code to mount.c.
   34646 
   34647 	Move umount2 parser to a separate file.
   34648 	* umount.c: New file.
   34649 	* Makefile.am (strace_SOURCES): Add it.
   34650 	* system.c: Move sys_umount2 and related code to umount.c.
   34651 
   34652 	Move personality parser to a separate file.
   34653 	* personality.c: New file.
   34654 	* Makefile.am (strace_SOURCES): Add it.
   34655 	* system.c: Move sys_personality and related code to personality.c.
   34656 
   34657 	Move syslog parser to a separate file.
   34658 	* syslog.c: New file.
   34659 	* Makefile.am (strace_SOURCES): Add it.
   34660 	* system.c: Move sys_syslog and related code to syslog.c.
   34661 
   34662 	Move cacheflush parser to a separate file.
   34663 	* cacheflush.c: New file.
   34664 	* Makefile.am (strace_SOURCES): Add it.
   34665 	* system.c: Move inclusion of <asm/cachectl.h> to cacheflush.c.
   34666 	[M68K, BFIN, SH]: Move to cacheflush.c.
   34667 
   34668 	bfin: move sram_alloc parser to a separate file.
   34669 	* sram_alloc.c: New file.
   34670 	* Makefile.am (strace_SOURCES): Add it.
   34671 	* system.c [BFIN]: Move sys_sram_alloc and related code to sram_alloc.c.
   34672 
   34673 	Move capget and capset parsers to a separate file.
   34674 	* capability.c: New file.
   34675 	* Makefile.am (strace_SOURCES): Add it.
   34676 	* system.c: Move inclusion of headers and macro definitions related
   34677 	to capget and capset decoding to capability.c.
   34678 	(print_cap_header, print_cap_data, sys_capget, sys_capset): Move
   34679 	to capability.c.
   34680 
   34681 2014-12-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   34682 
   34683 	Move sysctl parser to a separate file.
   34684 	* sysctl.c: New file.
   34685 	* Makefile.am (strace_SOURCES): Add it.
   34686 	* system.c: Move sys_sysctl and related code to sysctl.c.
   34687 
   34688 	mips: move sysmips parser to a separate file.
   34689 	* sysmips.c: New file.
   34690 	* Makefile.am (strace_SOURCES): Add it.
   34691 	* system.c: Fix typo in the check for <linux/utsname.h>.
   34692 	Move inclusions of <linux/utsname.h> and <asm/sysmips.h> to sysmips.c.
   34693 	[MIPS]: Likewise.
   34694 
   34695 	or1k: move or1k_atomic parser to a separate file.
   34696 	* or1k_atomic.c: New file.
   34697 	* Makefile.am (strace_SOURCES): Add it.
   34698 	* system.c [OR1K]: Move to or1k_atomic.c.
   34699 
   34700 2014-12-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   34701 
   34702 	Alias sys_setdomainname to sys_sethostname.
   34703 	Since parsers for setdomainname and sethostname syscalls are identical,
   34704 	replace sys_setdomainname with an alias to sys_sethostname.
   34705 
   34706 	* linux/dummy.h (sys_setdomainname): Alias to sys_sethostname.
   34707 	* linux/syscall.h (sys_setdomainname): Remove.
   34708 	* process.c (sys_setdomainname): Remove.
   34709 
   34710 2014-12-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   34711 
   34712 	Alias sys_getpeername to sys_getsockname.
   34713 	Since parsers for getpeername and getsockname syscalls are identical,
   34714 	replace sys_getpeername with an alias to sys_getsockname.
   34715 
   34716 	* linux/dummy.h (sys_getpeername): Alias to sys_getsockname.
   34717 	* linux/syscall.h (sys_getpeername): Remove.
   34718 	* net.c (sys_getpeername): Remove.
   34719 
   34720 2014-12-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   34721 
   34722 	Alias sys_stime to sys_time.
   34723 	Since parsers for stime and time syscalls are identical,
   34724 	replace sys_stime with an alias to sys_time.
   34725 
   34726 	* linux/dummy.h (sys_stime): Alias to sys_time.
   34727 	* linux/syscall.h (sys_stime): Remove.
   34728 	* time.c (sys_stime): Remove.
   34729 
   34730 2014-12-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   34731 
   34732 	Remove unused sys_mctl.
   34733 	Starting with commit v4.6-240-g5afdf12, nobody compiles this
   34734 	non-Linux code.
   34735 
   34736 	* mem.c [MC_SYNC]: Remove.
   34737 	* xlat/mctl_funcs.in: Remove.
   34738 	* xlat/mctl_lockas.in: Remove.
   34739 
   34740 2014-12-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   34741 
   34742 	Alias sys_mkdir and sys_mkdirat to sys_chmod and sys_fchmodat.
   34743 	Special parsers for mkdir and mkdirat are redundant because
   34744 	sys_chmod and sys_fchmodat implement the same decoding.
   34745 
   34746 	* file.c (decode_mkdir, sys_mkdir, sys_mkdirat): Remove.
   34747 	* linux/dummy.h (sys_mkdir): Alias to sys_chmod.
   34748 	(sys_mkdirat): Alias to sys_fchmodat.
   34749 	* linux/syscall.h (sys_mkdir, sys_mkdirat): Remove.
   34750 	* pathtrace.c (pathtrace_match): Do not check for sys_mkdirat.
   34751 
   34752 2014-12-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   34753 
   34754 	Remove unused <sys/acl.h> based code.
   34755 	Starting with commit v4.6-240-g5afdf12, nobody compiles this
   34756 	non-Linux code.
   34757 
   34758 	* configure.ac (AC_CHECK_HEADERS): Remove sys/acl.h.
   34759 	* file.c [HAVE_SYS_ACL_H]: Remove.
   34760 	* xlat/aclcmds.in: Remove.
   34761 
   34762 2014-12-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   34763 
   34764 	Remove unused <sys/asynch.h> based code.
   34765 	Starting with commit v4.6-240-g5afdf12, nobody compiles this
   34766 	non-Linux code.
   34767 
   34768 	* configure.ac (AC_CHECK_HEADERS): Remove sys/asynch.h.
   34769 	* file.c [HAVE_SYS_ASYNCH_H]: Remove.
   34770 
   34771 2014-11-27  Masatake YAMATO  <yamato (a] redhat.com>
   34772 
   34773 	Print protocol name of socket descriptors with -yy option.
   34774 	For those socket descriptors that have no associated ip:port pairs
   34775 	(or when this information is not available), -yy option prints
   34776 	the same <socket:[INODE]> information as -y option, e.g.
   34777 
   34778 	$ strace -e sendto -yy ip l > /dev/null
   34779 	sendto(3<socket:[23456789]>, ...
   34780 
   34781 	This change makes -yy output more informative: instead of just
   34782 	printing "socket", the name of protocol behind the socket descriptor
   34783 	will be printed, e.g.
   34784 
   34785 	sendto(3<NETLINK:[23456789]>, ...
   34786 
   34787 	* configure.ac (AC_CHECK_HEADERS): Add sys/xattr.h.
   34788 	* tests/net-yy-accept.awk: Update to support protocol names.
   34789 	* tests/net-yy-connect.awk: Likewise.
   34790 	* util.c [HAVE_SYS_XATTR_H]: Include <sys/xattr.h>.
   34791 	(getfdproto): New function.
   34792 	(printfd): Use it.
   34793 
   34794 2014-11-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   34795 
   34796 	Replace MAXPATHLEN with PATH_MAX.
   34797 	MAXPATHLEN is defined to PATH_MAX, so replace the former with the latter.
   34798 
   34799 	* strace.c (startup_child): Replace MAXPATHLEN with PATH_MAX.
   34800 	* util.c (printpathn, printpath): Likewise.
   34801 
   34802 2014-11-21  Mike Frysinger  <vapier (a] gentoo.org>
   34803 
   34804 	Decode FIFREEZE/FITHAW/FITRIM ioctls.
   34805 	The freeze/thaw ones are simple, but the trim is an interesting struct.
   34806 
   34807 	* block.c (block_ioctl): Handle FIFREEZE/FITHAW/FITRIM.
   34808 	* ioctl.c (ioctl_decode): Pass 'X' ioctls to block_ioctl.
   34809 
   34810 2014-11-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   34811 
   34812 	Include <sys/uio.h> unconditionally.
   34813 	Since <sys/uio.h> is standardized by POSIX and is present in all
   34814 	available versions of glibc, it's safe to assume that any usable
   34815 	libc implementation provides this header file.
   34816 
   34817 	* configure.ac (AC_CHECK_HEADERS): Remove sys/uio.h.
   34818 	* io.c: Include <sys/uio.h> unconditionally.
   34819 	(tprint_iov_upto, tprint_iov, sys_readv, sys_writev,
   34820 	print_llu_from_low_high_val, sys_preadv, sys_pwritev): Define
   34821 	unconditionally.
   34822 	* net.c: Include <sys/uio.h> unconditionally.
   34823 	* util.c: Include <sys/uio.h> unconditionally.
   34824 	(dumpiov): Define unconditionally.
   34825 
   34826 2014-11-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   34827 
   34828 	Consistently use C99 designated initializers in the new netlink code.
   34829 	* socketutils.c (send_query, receive_responses): Use designated
   34830 	initializers for sockaddr_nl, nlmsghdr, and inet_diag_req_v2 structures.
   34831 	* tests/netlink_inet_diag.c (send_query, check_responses): Likewise.
   34832 
   34833 2014-11-20  Mike Frysinger  <vapier (a] gentoo.org>
   34834 
   34835 	Decode open's O_TMPFILE.
   34836 	* xlat/open_mode_flags.in: Add O_TMPFILE definition.
   34837 
   34838 2014-11-11  Helge Deller  <deller (a] gmx.de>
   34839 
   34840 	hppa: update error codes and signal numbers.
   34841 	There are two important changes in here:
   34842 
   34843 	1. EWOULDBLOCK has been up to kernel 3.14 errorcode #246. Since hppa
   34844 	folks had problems with EWOULDBLOCK != EAGAIN, this was changed in
   34845 	kernel 3.14.
   34846 
   34847 	2. Starting with kernel 3.18, hppa folks changed some signal numbers in
   34848 	such a way that we end up with SIGRTMIN == 32, which brings hppa in sync
   34849 	with other linux ports.
   34850 
   34851 	Both were incompatible changes which basically broke hppa ABI, but since
   34852 	they have been merged into the kernel, we have to follow.
   34853 
   34854 2014-11-11  Thomas De Schampheleire  <thomas.de.schampheleire (a] gmail.com>
   34855 
   34856 	stack trace support: fix check on symbol name presence.
   34857 	The output format of the stack trace is supposed to be different
   34858 	depending on whether symbol names are available in the build.
   34859 
   34860 	However, the check only verified the validity of the pointer, not of the
   34861 	string pointed to (which could be empty).
   34862 
   34863 	This commit fixes the check so that the original output:
   34864 
   34865 	mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x5e000
   34866 	 > /lib/libc-2.10.1.so(_IO_file_doallocate+0x8c) [0x68a38]
   34867 	 > /lib/libc-2.10.1.so(_IO_doallocbuf+0x6c) [0x78574]
   34868 	 > /lib/libc-2.10.1.so(_IO_file_overflow+0x184) [0x7763c]
   34869 	 > /lib/libc-2.10.1.so(_IO_file_xsputn+0x88) [0x76aac]
   34870 	 > /lib/libc-2.10.1.so(_IO_puts+0xc8) [0x6b64c]
   34871 	 > /bin/busybox(+0x0) [0x62c60]
   34872 	 > /bin/busybox(+0x0) [0x4940]
   34873 	 > /bin/busybox(+0x0) [0x499c]
   34874 	 > /bin/busybox(+0x0) [0x4e08]
   34875 	 > /lib/libc-2.10.1.so(__libc_init_first+0x30c) [0x1f84c]
   34876 	 > /lib/libc-2.10.1.so(__libc_start_main+0xd8) [0x1f9f8]
   34877 
   34878 	becomes:
   34879 
   34880 	mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x5e000
   34881 	 > /lib/libc-2.10.1.so(_IO_file_doallocate+0x8c) [0x68a38]
   34882 	 > /lib/libc-2.10.1.so(_IO_doallocbuf+0x6c) [0x78574]
   34883 	 > /lib/libc-2.10.1.so(_IO_file_overflow+0x184) [0x7763c]
   34884 	 > /lib/libc-2.10.1.so(_IO_file_xsputn+0x88) [0x76aac]
   34885 	 > /lib/libc-2.10.1.so(_IO_puts+0xc8) [0x6b64c]
   34886 	 > /bin/busybox() [0x62c60]
   34887 	 > /bin/busybox() [0x4940]
   34888 	 > /bin/busybox() [0x499c]
   34889 	 > /bin/busybox() [0x4e08]
   34890 	 > /lib/libc-2.10.1.so(__libc_init_first+0x30c) [0x1f84c]
   34891 	 > /lib/libc-2.10.1.so(__libc_start_main+0xd8) [0x1f9f8]
   34892 
   34893 	Acked-by: Masatake YAMATO <yamato (a] redhat.com>
   34894 
   34895 2014-11-11  Masatake YAMATO  <yamato (a] redhat.com>
   34896 
   34897 	tests: add a test for decoding and dumping of recvmmsg/sendmmsg.
   34898 	* configure (AC_CHECK_FUNCS): Add sendmmsg.
   34899 	* tests/mmsg.c: New file.
   34900 	* tests/mmsg.expected: New file.
   34901 	* tests/mmsg.test: New test.
   34902 	* tests/.gitignore: Add mmsg.
   34903 	* tests/Makefile.am (CHECK_PROGRAMS): Add mmsg.
   34904 	(TESTS): Add mmsg.test.
   34905 	(EXTRA_DIST): Add mmsg.expected.
   34906 
   34907 2014-11-11  Masatake YAMATO  <yamato (a] redhat.com>
   34908 
   34909 	Add functions for dumping iovecs in mmsghdr used in sendmmsg and recvmmsg
   34910 	This patch is similar to what I did in commit
   34911 	02f9f6b386741a52f58e1b31ad4e7fff60781ef8.
   34912 	That commit was for sendmsg and recvmsg system calls.
   34913 	This one is for sendmmsg and recvmmsg system calls.
   34914 
   34915 	* defs.h (dumpiov_in_mmsghdr): New declaration.
   34916 	* net.c (extractmmsghdr): New function derived from printmmsghdr.
   34917 	(printmmsghdr): Use it.
   34918 	(dumpiov_in_mmsghdr): New function.
   34919 	* syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_mmsghdr
   34920 	for recvmmsg and sendmmsg syscalls.
   34921 
   34922 2014-11-11  Masatake YAMATO  <yamato (a] redhat.com>
   34923 
   34924 	Use the definition of struct mmsghdr if it is defined in build environment
   34925 	mmsghrd structure type is defined locally in printmmsghdr function.
   34926 
   34927 	However, more functions will refer the definition in modifications for
   34928 	supporting "-e write=set" and "-e read=set" option for sendmmsg and
   34929 	recvmmsg system calls.
   34930 
   34931 	After this change, the system definition of struct mmsghdr will be used
   34932 	if configure reports it is available, falling back to the old local
   34933 	definition.
   34934 
   34935 	* configure.ac (AC_CHECK_TYPES): Add struct mmsghdr.
   34936 	* net.c [!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define.
   34937 	(printmmsghdr): Use previously defined struct mmsghdr.
   34938 
   34939 2014-11-11  Masatake YAMATO  <yamato (a] redhat.com>
   34940 
   34941 	Introduce a separate function to copy from msghdr32 to msghdr.
   34942 	This patch is an initial step for supporting "-e write=set" and
   34943 	"-e read=set" option for sendmmsg and recvmmsg system calls.
   34944 
   34945 	Coverting a data of msghdr32 to msghdr is needed both for
   34946 	{send,recv}msg and {send,recv}mmsg to decode parameters.
   34947 	To share the copying code in both decoders, a separate
   34948 	function named copy_from_msghdr32 is introduced.
   34949 
   34950 	* net.c [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4]
   34951 	(copy_from_msghdr32): New function.
   34952 	(extractmsghdr) [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4]: Use it.
   34953 
   34954 2014-11-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   34955 
   34956 	ioctlsort: rewrite build rules using noinst_PROGRAMS.
   34957 	* linux/ioctlsort.c: Rename to ioctlsort.c
   34958 	* Makefile.am (EXTRA_DIST): Rename linux/ioctlsort.c to ioctlsort.c.
   34959 	[MAINTAINER_MODE] (noinst_PROGRAMS): Add ioctlsort.
   34960 	(ioctlsort_SOURCES): Add ioctlsort.c.
   34961 	(nodist_ioctlsort_SOURCES): Add ioctls.h and ioctldefs.h.
   34962 	(CLEANFILES): Add $(nodist_ioctlsort_SOURCES).
   34963 	(ioctlsort.$(OBJEXT)): Likewise.
   34964 	(ioctlsort): Remove.
   34965 
   34966 2014-11-11  Lubomir Rintel  <lkundrak (a] v3.sk>
   34967 
   34968 	Makefile.am: look for ioctl definitions in the kernel build tree by default
   34969 	While most of ioctl-related kernel headers are now exported by kernel's
   34970 	headers_install, some are still modules_install only.  The kernel's
   34971 	headers installed into /usr/include/ are usually headers_install'ed and
   34972 	therefore don't contain some internal headers we need.  The solution is
   34973 	to look for modules_install'ed headers for the running kernel, and fall
   34974 	back to old behavior if they aren't found.
   34975 
   34976 2014-11-04  Lubomir Rintel  <lkundrak (a] v3.sk>
   34977 
   34978 	Dump details for Bluetooth socket operations.
   34979 	* configure.ac (AC_CHECK_HEADERS): Add bluetooth/bluetooth.h.
   34980 	* xlat/bt_protocols.in: New file.
   34981 	* net.c [AF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Include bluetooth
   34982 	headers.
   34983 	[PF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Include "xlat/bt_protocols.h".
   34984 	(printsock) [AF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Dump details
   34985 	for AF_BLUETOOTH sockets.
   34986 	(sys_socket) [PF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Decode
   34987 	protocol for PF_BLUETOOTH sockets.
   34988 
   34989 2014-11-04  Philippe De Muyter  <phdm (a] macqel.be>
   34990 
   34991 	Implement Video4Linux video-input ioctls decoder.
   34992 	Introduce v4l2.c, a decoder for the arguments of the video-input subset
   34993 	of the v4l2 ioctl's.  This is a combination of
   34994 	- previous work by Peter Zotov <whitequark (a] whitequark.org>, found at
   34995 	https://gist.githubusercontent.com/whitequark/1263207/raw/strace-4.6-v4l2-ioctls.patch
   34996 	- previous work by William Manley <will (a] williammanley.net>, found at
   34997 	http://marc.info/?l=strace&m=139395588520675
   34998 	- forward port, additions and fixes by Philippe De Muyter <phdm (a] macqel.be>
   34999 
   35000 	As v4l2 is a moving target, I have made v4l2.c compilable with ancient
   35001 	linux kernels by testing the availability of some macros.  It has been
   35002 	succesfully compiled on linux 3.10, 3.1, 2.6.31 and 2.6.22, and
   35003 	succesfully used on linux 3.10 with a camera device.
   35004 
   35005 	* configure.ac: Check for availabilty of V4L2_* enum constants.
   35006 	* Makefile.am (strace_SOURCES): Add v4l2.c.
   35007 	* defs.h (v4l2_ioctl): New prototype.
   35008 	* ioctl.c (ioctl_decode): Use v4l2_ioctl.
   35009 	* v4l2.c: New file.
   35010 	* xlat/v4l2_*.in: New files.
   35011 
   35012 	Cc: Peter Zotov <whitequark (a] whitequark.org>
   35013 	Cc: William Manley <will (a] williammanley.net>
   35014 
   35015 2014-11-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   35016 
   35017 	Update ioctl entries.
   35018 	* linux/ioctlent.h.in: Regenerate from v3.17 headers.
   35019 
   35020 	Remove ioctl header file names from the executable.
   35021 	* defs.h (struct ioctlent): Remove "doth" field.
   35022 	* Makefile.am ($(ioctlent_h)): Remove 1st field.
   35023 
   35024 2014-11-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   35025 
   35026 	Filter out redundant ioctl entries early.
   35027 	For two ioctl entries with the same code, if one's name is a prefix
   35028 	to another's name, keep the entry with a shorter name.  Filter out
   35029 	redundant ioctl entries at ioctlsort stage so that distributed
   35030 	ioctlent.h.in files will be already filtered.
   35031 
   35032 	* linux/ioctlsort.c (is_not_prefix): New function.
   35033 	(main): Use it.
   35034 	* linux/ioctlent-filter.awk: Remove.
   35035 	* Makefile.am (EXTRA_DIST): Remove linux/ioctlent-filter.awk.
   35036 	($(ioctlent_h)): Don't use linux/ioctlent-filter.awk.
   35037 
   35038 2014-11-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   35039 
   35040 	ioctlent.sh: update the list of directories exported by headers_install.
   35041 	* linux/ioctlent.sh: Add drm, mtd, rdma, video, and xen directories.
   35042 
   35043 2014-11-01  Masatake YAMATO  <yamato (a] redhat.com>
   35044 
   35045 	Add a function for dumping iovec in msghdr used in sendmsg and recvmsg.
   35046 	Here is an example session:
   35047 
   35048 	    $ ./strace -e write=all ip link change dev enp0s25 mtu 1501 > /dev/null
   35049 	    sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"(...
   35050 	     * 40 bytes in buffer 0
   35051 	     | 00000  28 00 00 00 10 00 05 00  d0 d9 aa 53 00 00 00 00  (..........S.... |
   35052 	     | 00010  00 00 00 00 02 00 00 00  00 00 00 00 00 00 00 00  ................ |
   35053 	     | 00020  08 00 04 00 dd 05 00 00                           ........         |
   35054 	    ...
   35055 
   35056 	    $ ./strace -e read=all ip link show > /dev/null
   35057 	    recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"...
   35058 	     * 8192 bytes in buffer 0
   35059 	     | 00000  34 00 00 00 02 00 00 00  00 00 00 00 ff 23 00 00  4............#.. |
   35060 	     | 00010  ff ff ff ff 20 00 00 00  10 00 05 00 00 00 00 00  .... ........... |
   35061 	    ...
   35062 
   35063 	* defs.h (dumpiov_in_msghdr): New prototype.
   35064 	* net.c (extractmsghdr): New function derived from printmsghdr.
   35065 	(printmsghdr): Use extractmsghdr.
   35066 	(dumpiov_in_msghdr): New function.
   35067 	* syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_msghdr for recvmsg
   35068 	and sendmsg syscalls.
   35069 
   35070 2014-10-31  Maarten ter Huurne  <maarten (a] treewalker.org>
   35071 
   35072 	Include <linux/ptrace.h> regardless of <sys/reg.h> existence.
   35073 	This fixes compilation with musl libc.
   35074 	This approach was already used in process.c, so I assume it is safe.
   35075 
   35076 	* signal.c: Move [HAVE_LINUX_PTRACE_H] code out of [HAVE_SYS_REG_H] check.
   35077 	* syscall.c: Likewise.
   35078 	* util.c: Likewise.
   35079 
   35080 2014-10-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   35081 
   35082 	sock: decode SIOCSIFNAME on entering syscall.
   35083 	* sock.c (sock_ioctl): Handle SIOCSIFNAME on entering syscall.
   35084 
   35085 2014-10-31  Mike Frysinger  <vapier (a] gentoo.org>
   35086 
   35087 	sock: fix decoding of SIOCSIFNAME.
   35088 	The decoding of SIOCSIFNAME is incorrect.  It does not use
   35089 	the ifr_index field to look things up, but ifr_newname.
   35090 
   35091 	* sock.c (sock_ioctl): Split out SIOCSIFNAME from SIOCGIFNAME and
   35092 	display ifr_newname.
   35093 
   35094 2014-10-31  Mike Frysinger  <vapier (a] gentoo.org>
   35095 
   35096 	sock: fix decoding of struct ifreq.ifr_name.
   35097 	The ifr name fields of the ifreq structure might not be NUL terminated.
   35098 	If the user makes an ioctl call where they aren't, then strace ends up
   35099 	reading random content from its own stack.  Limit the printf lengths.
   35100 
   35101 	* sock.c (sock_ioctl): Add explicit length limits to ifr_name printfs.
   35102 
   35103 2014-10-03  Elliott Hughes  <enh (a] google.com>
   35104 
   35105 	Don't risk truncating open flags by using mode_t.
   35106 	On Android, 32-bit arm and x86 use __kernel_mode_t (an unsigned short)
   35107 	as their mode_t.  The open(2) flags are actually an int, so high ones
   35108 	like O_CLOEXEC get truncated if you coerce them to mode_t.
   35109 
   35110 	* defs.h (tprint_open_modes, sprint_open_modes): Change argument type
   35111 	from mode_t to int.
   35112 	* file.c (tprint_open_modes, sprint_open_modes): Likewise.
   35113 
   35114 2014-09-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   35115 
   35116 	Enhance sysinfo decoding.
   35117 	* configure.ac (AC_CHECK_MEMBERS): Check for struct sysinfo.totalhigh,
   35118 	struct sysinfo.freehigh, and struct sysinfo.mem_unit.
   35119 	* sysinfo.c (sys_sysinfo): Treat failed umove() call as syserror().
   35120 	Print totalhigh, freehigh, and mem_unit members when struct sysinfo
   35121 	supports them.
   35122 
   35123 	Move sysinfo parser to a separate file.
   35124 	* sysinfo.c: New file.
   35125 	* Makefile.am (strace_SOURCES): Add it.
   35126 	* resource.c (sys_sysinfo): Move to sysinfo.c.
   35127 
   35128 2014-09-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   35129 
   35130 	Fix build with musl libc.
   35131 	* resource.c: Include <sys/sysinfo.h> for struct sysinfo definition.
   35132 
   35133 	Reported-by: Steven Honeyman <stevenhoneyman (a] gmail.com>
   35134 
   35135 2014-09-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   35136 
   35137 	tests: cleanup checks for basic programs.
   35138 	* tests/init.sh: Check for cat and rm.
   35139 	* tests/getdents.test: Check for awk.
   35140 	* tests/ptrace_setoptions.test: Check for grep.
   35141 	* tests/net-fd.test: Do not check for rm.
   35142 	* tests/net.test: Likewise.
   35143 	* tests/scm_rights-fd.test: Likewise.
   35144 	* tests/stat.test: Likewise.
   35145 	* tests/uio.test: Likewise.
   35146 
   35147 	tests: add a test for -yy option.
   35148 	* tests/net-yy.test: New test.
   35149 	* tests/inet-accept-connect-send-recv.c: New file.
   35150 	* tests/netlink_inet_diag.c: Likewise.
   35151 	* tests/net-yy-accept.awk: Likewise.
   35152 	* tests/net-yy-connect.awk: Likewise.
   35153 	* tests/.gitignore: Add inet-accept-connect-send-recv,
   35154 	netlink_inet_diag, *.tmp-*, and *.tmp.*.
   35155 	* tests/Makefile.am (check_PROGRAMS): Add inet-accept-connect-send-recv
   35156 	and netlink_inet_diag.
   35157 	(TESTS): Add net-yy.test.
   35158 	(EXTRA_DIST): Add net-yy-accept.awk and net-yy-connect.awk.
   35159 
   35160 2014-09-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   35161 
   35162 	Move statfs related parsers to a separate file.
   35163 	* statfs.c: New file.
   35164 	* Makefile.am (strace_SOURCES): Add it.
   35165 	* file.c (sprintfstype, printstatfs, sys_statfs, sys_fstatfs): Move
   35166 	to statfs.c.
   35167 	[HAVE_STATFS64] (printstatfs64, printcompat_statfs64, sys_statfs64,
   35168 	sys_fstatfs64): Likewise.
   35169 	[ALPHA] (osf_statfs, osf_fstatfs): Likewise.
   35170 
   35171 	fsmagic: sort array by value and use bsearch for faster lookup.
   35172 	* defs.h (xlat_search): New prototype.
   35173 	* util.c (xlat_bsearch_compare, xlat_search): New functions.
   35174 	* file.c (sprintfstype): Use xlat_search for fsmagic lookup.
   35175 	* xlat/fsmagic.in: Sort by value and mark as not NULL-terminated.
   35176 	* tests/statfs.c: New file.
   35177 	* tests/statfs.test: New test.
   35178 	* tests/Makefile.am (check_PROGRAMS): Add statfs.
   35179 	(statfs_CFLAGS): Define.
   35180 	(TESTS): Add statfs.test.
   35181 	* tests/.gitignore: Add statfs.
   35182 
   35183 2014-09-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   35184 
   35185 	fsmagic: update from <linux/magic.h>
   35186 	* xlat/fsmagic.in: Add new constants from <linux/magic.h>.
   35187 	Reported by Elliott Hughes.
   35188 
   35189 2014-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   35190 
   35191 	Add -yy option: print ip and port associated with socket descriptors.
   35192 	When two ore more -y options are given, print local and remote ip:port
   35193 	pairs associated with socket descriptors.  This implementation uses
   35194 	NETLINK_INET_DIAG for sockaddr lookup; it's based on the patch
   35195 	prepared by Zubin Mithra as a part of his GSoC 2014 strace project.
   35196 
   35197 	* Makefile.am (strace_SOURCES): Add socketutils.c
   35198 	(EXTRA_DIST): Add linux/inet_diag.h and linux/sock_diag.h.
   35199 	* defs.h (print_sockaddr_by_inode): New prototype.
   35200 	* linux/inet_diag.h: New file.
   35201 	* linux/sock_diag.h: Likewise.
   35202 	* socketutils.c: Likewise.
   35203 	* strace.1: Document -yy option.
   35204 	* strace.c (usage): Likewise.
   35205 	* util.c (printfd): Use print_sockaddr_by_inode.
   35206 
   35207 2014-09-17  Vicente Olivert Riera  <vincent (a] gentoo.org>
   35208 
   35209 	sigaction: wrap sa_restorer in #ifdef SA_RESTORER consistently.
   35210 	Wrap sa_restorer member definitions in #ifdef SA_RESTORER to be
   35211 	consistent with their use.
   35212 	If an architecture does not provide sa_restorer members but still
   35213 	defines SA_RESTORER macro, the latter has to be explicitly undefined.
   35214 
   35215 	This change fixes compilation failures like this one:
   35216 	signal.c: In function 'decode_old_sigaction':
   35217 	signal.c:631:21: error: 'struct old_sigaction' has no member named 'sa_restorer'
   35218 	signal.c: In function 'decode_new_sigaction':
   35219 	signal.c:1224:21: error: 'struct new_sigaction' has no member named 'sa_restorer'
   35220 
   35221 	* signal.c (struct old_sigaction, struct old_sigaction32,
   35222 	struct new_sigaction, struct new_sigaction32):
   35223 	Wrap sa_restorer member in #ifdef SA_RESTORER.
   35224 	(decode_old_sigaction, decode_new_sigaction):
   35225 	Wrap use of sa32.sa_restorer in #ifdef SA_RESTORER.
   35226 
   35227 2014-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   35228 
   35229 	Fix compilation warnings reported by gcc -Wsign-compare.
   35230 	* configure.ac (gl_WARN_ADD): Add -Wsign-compare.
   35231 	* defs.h (struct tcb): Change 'currpers' type to unsigned.
   35232 	(struct xlat): Change 'val' type to unsigned
   35233 	(signame): Add 'const' qualifier to its argument.
   35234 	(xlookup, printxval): Add 'const' qualifier to the 2nd argument and
   35235 	change its type to unsigned.
   35236 	(printpathn): Change the 3rd argument type to unsigned.
   35237 	(ioctl_lookup): Change 1st argument type to unsigned.
   35238 	* count.c (call_summary_pers, call_summary): Change 'i' type to unsigned.
   35239 	* file.c (print_xattr_list): Fix comparisons between signed and unsigned
   35240 	long values.
   35241 	* ioctl.c (compare): Fix cast.
   35242 	(ioctl_lookup): Change 1st argument type to to unsigned.
   35243 	(ioctl_next_match): Change 'code' type to unsigned.
   35244 	* mem.c (sys_move_pages): Change 'i' type to unsigned.
   35245 	* mtd.c (mtd_ioctl): Change 'i' and 'j' types to unsigned.
   35246 	Print 'i' using %u format string.
   35247 	* process.c (sys_prctl): Change 'i' type to unsigned.
   35248 	(printargv): Change 'n' type to unsigned.
   35249 	(sys_ptrace): Change 'addr' type to unsigned.
   35250 	* scsi.c (print_sg_io_buffer): Add 'const' qualifier to 'len' argument
   35251 	and change its type to unsigned.  Change 'i' and 'allocated' types
   35252 	to unsigned.
   35253 	* signal.c (signame): Add 'const' qualifier to its argument.
   35254 	Fix comparisons between signed and unsigned values.
   35255 	(sprintsigmask_n, printsiginfo): Fix comparisons between signed and
   35256 	unsigned values.
   35257 	* sock.c (sock_ioctl): Change 'i' and 'nifra' types to unsigned.
   35258 	* strace.c (expand_tcbtab, alloctcb): Change 'i' type to unsigned.
   35259 	(detach): Change 'sig' type to unsigned.
   35260 	(startup_attach): Change 'tcbi' type to unsigned.
   35261 	(startup_child): Change 'm', 'n', and 'len' types to unsigned.
   35262 	(init): Use new variable to iterate 'tcbtab'.
   35263 	(pid2tcb): Change 'i' type to unsigned.
   35264 	(cleanup): Change 'i' and 'sig' types to unsigned.
   35265 	* syscall.c (update_personality): Change 'personality' argument type
   35266 	to unsigned.
   35267 	(struct qual_options): Change 'bitflag' type to unsigned.
   35268 	(reallocate_qual): Add 'const' qualifier to its argument and change its
   35269 	type to unsigned.
   35270 	(qualify_one): Change 'n' and 'bitflag' arguments types to unsigned.
   35271 	Add 'const' qualifier to 'n', 'not', and 'pers' arguments.
   35272 	Change 'p' type to signed int.
   35273 	(qual_syscall): Change 'bitflag' argument type to unsigned.
   35274 	Add 'const' qualifier to 'bitflag' and 'not' arguments.
   35275 	Change 'p' type to signed int.
   35276 	(qual_signal): Change 'bitflag' argument type to unsigned.
   35277 	Add 'const' qualifier to 'bitflag' and 'not' arguments.
   35278 	Change 'i' type to unsigned.
   35279 	(qual_desc): Change 'bitflag' argument type to unsigned.
   35280 	Add 'const' qualifier to 'bitflag' and 'not' arguments.
   35281 	(qualify): Change 'i' type to unsigned.
   35282 	(get_scno): Change 'currpers' type to unsigned.
   35283 	Fix a comparison between signed and unsigned values.
   35284 	* system.c (sys_sysctl): Change 'cnt' and 'max_cnt' types to unsigned.
   35285 	Fix comparisons between signed and unsigned values.
   35286 	* util.c (xlookup, printxval): Add 'const' qualifier to 'val' argument
   35287 	and change its type to unsigned.
   35288 	(printuid): Fix a comparison between signed and unsigned values.
   35289 	(printpathn): Change 'n' argument type to unsigned.
   35290 	(printstr): Change 'size' type to unsigned.
   35291 	Fix a comparison between signed and unsigned values.
   35292 	(setbpt): Change 'i' type to unsigned.
   35293 	* net.c (printsock): Silence a compilation warning.
   35294 	* reboot.c (sys_reboot): Likewise.
   35295 
   35296 2014-09-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   35297 
   35298 	Move dirent related parsers to a separate file.
   35299 	* dirent.c: New file.
   35300 	* Makefile.am (strace_SOURCES): Add it.
   35301 	* file.c (print_old_dirent, sys_readdir, sys_getdents, sys_getdents64):
   35302 	Move to dirent.c.
   35303 
   35304 	getdents, getdents64: fix potential out-of-bounds read issues.
   35305 	* file.c (sys_getdents): Check for invalid d_reclen.
   35306 	Avoid reading from uninitialized memory.
   35307 	(sys_getdents64): Likewise.
   35308 	* tests/getdents.awk: New file.
   35309 	* tests/getdents.test: New test.
   35310 	* tests/Makefile.am (TESTS): Add it.
   35311 	(EXTRA_DIST): Add getdents.awk.
   35312 
   35313 2014-09-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   35314 
   35315 	tprint_sock_type: remove unused parameter.
   35316 	* net.c (tprint_sock_type): Remove unused parameter 'tcp'.
   35317 	(sys_socket, sys_socketpair): Update callers.
   35318 
   35319 	printsock: fix decoding of unrecognized AF_PACKET packet types.
   35320 	* net.c (printsock): Fix fallback string for AF_PACKET packet types.
   35321 
   35322 2014-09-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   35323 
   35324 	decode_select: fix potential use of an uninitialized variable.
   35325 	A pointer to fd_set was used uninitialized when nfds == 0.
   35326 
   35327 	* desc.c (decode_select): Initialize fds.
   35328 
   35329 	Reported-by: Zubin Mithra <zubin.mithra (a] gmail.com>
   35330 
   35331 2014-09-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   35332 
   35333 	Use external libaio.h.
   35334 	Stop using an outdated partial copy of libaio.h, switch back to external
   35335 	libaio.h from libaio.
   35336 	This partially reverts commit 2df03c494eb3c36c4178eba35c374831031d1a58.
   35337 
   35338 	* aio.c: Drop a partial copy of libaio.h, include <libaio.h> instead.
   35339 	(print_common_flags): Check for HAVE_STRUCT_IOCB_U_C_FLAGS.
   35340 	(sys_io_submit): Check for HAVE_DECL_IO_CMD_PWRITE and
   35341 	HAVE_DECL_IO_CMD_PWRITEV.
   35342 	* configure.ac: Check for libaio.h and declaration it provides.
   35343 
   35344 2014-08-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   35345 
   35346 	maint: post-release administrivia.
   35347 	* NEWS: Add header line for next release.
   35348 
   35349 2014-08-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   35350 
   35351 	Prepare for 4.9 release.
   35352 	* NEWS: Update for 4.9 release.
   35353 	* debian/changelog: 4.9-1.
   35354 	* strace.spec: 4.9-1.
   35355 
   35356 	Sync strace.spec and debian/ with packages.
   35357 	* debian/changelog: Sync with 4.8-1.1.
   35358 	* debian/control: Likewise.
   35359 	* debian/rules: Likewise.
   35360 	* strace.spec: Sync with 4.8-5.
   35361 
   35362 	NEWS: Update for 4.9 release.
   35363 
   35364 2014-08-15  Mike Frysinger  <vapier (a] gentoo.org>
   35365 
   35366 	Update syscall tables to the point where they include renameat2.
   35367 	* linux/dummy.h: Add printargs aliases for sys_sched_getattr and
   35368 	sys_sched_setattr.
   35369 	* linux/aarch64/syscallent1.h: Add kcmp/finit_module/sched_setattr/
   35370 	sched_getattr/renameat2.
   35371 	* linux/alpha/syscallent.h: Add kcmp/finit_module.
   35372 	* linux/arm/syscallent.h: Add sched_setattr/sched_getattr/renameat2.
   35373 	* linux/hppa/syscallent.h: Add sched_setattr/sched_getattr/utimes/renameat2.
   35374 	* linux/i386/syscallent.h: Add sched_setattr/sched_getattr/renameat2.
   35375 	* linux/ia64/syscallent.h: Likewise.
   35376 	* linux/m68k/syscallent.h: Likewise.
   35377 	* linux/microblaze/syscallent.h: Likewise.
   35378 	* linux/mips/syscallent-n32.h: Likewise.
   35379 	* linux/mips/syscallent-n64.h: Add getdents64/sched_setattr/sched_getattr/
   35380 	renameat2.
   35381 	* linux/mips/syscallent-o32.h: Add sched_setattr/sched_getattr/renameat2.
   35382 	* linux/powerpc/syscallent.h: Fix finit_module/kcmp order.  Add sched_setattr/
   35383 	sched_getattr/renameat2.
   35384 	* linux/s390/syscallent.h: Add sched_setattr/sched_getattr/renameat2.
   35385 	* linux/s390x/syscallent.h: Likewise.
   35386 	* linux/sparc/syscallent.h: Likewise.
   35387 	* linux/x32/syscallent.h: Likewise.
   35388 	* linux/x86_64/syscallent.h: Likewise.
   35389 	* linux/xtensa/syscallent.h: Add sched_setattr/sched_getattr.
   35390 
   35391 	renameat2: add decoding support.
   35392 	* file.c (decode_renameat, sys_renameat2): New functions.
   35393 	(sys_renameat): Use decode_renameat.
   35394 	* pathtrace.c (pathtrace_match): Handle sys_renameat2.
   35395 	* linux/syscall.h (sys_renameat2): New prototype.
   35396 	* xlat/rename_flags.in: New file.
   35397 
   35398 2014-08-14  Mike Frysinger  <vapier (a] gentoo.org>
   35399 
   35400 	CREDITS: fix generation in out of tree builds.
   35401 	The {...} code changes the working dir with `cd`, but the commands outside
   35402 	of that block expects to be in the original dir.  Change to a subshell so
   35403 	the path outside of this block remains unchanged.
   35404 
   35405 	* Makefile.am ($(srcdir)/CREDITS): Change {...} to (...).
   35406 
   35407 2014-08-14  Mike Frysinger  <vapier (a] gentoo.org>
   35408 
   35409 	ia64: add missing syscalls.
   35410 	When the preadv/pwritev syscalls were added, the ones before it in the
   35411 	ia64 list were missed, so all the syscalls there and later were not in
   35412 	the right location (causing things to be decoded incorrectly).
   35413 
   35414 	Add the missing syscalls before preadv which also re-aligns all the
   35415 	syscalls after that point.  This fixes the uio.test.
   35416 
   35417 	* linux/ia64/syscallent.h: Add syscalls 1310 through 1318.
   35418 
   35419 2014-08-14  Mike Frysinger  <vapier (a] gentoo.org>
   35420 
   35421 	ia64: fix sigaction decoding.
   35422 	Looks like ia64 doesn't have sa_restorer either, yet still defines
   35423 	SA_RESTORER.  Deploy the same trick that HPPA is using to make the
   35424 	test pass.
   35425 
   35426 	* signal.c (SA_RESTORER): Undefine when IA64 is defined.
   35427 	(struct new_sigaction) [IA64]: Disable sa_restorer.
   35428 
   35429 2014-08-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   35430 
   35431 	tests: skip detach-stopped.test when PTRACE_SEIZE doesn't work.
   35432 	detach-stopped.test is known to fail when PTRACE_SEIZE is not available,
   35433 	so skip the test in that case.
   35434 
   35435 	* tests/detach-stopped.test: Check for "strace -d" output and skip the
   35436 	test when it says that PTRACE_SEIZE doesn't work.
   35437 
   35438 2014-08-11  Erik Johansson  <erik (a] ejohansson.se>
   35439 
   35440 	sh: fix syscall numbering for recv and sendto.
   35441 	* linux/sh/syscallent.h: Swap recv and sendto syscall entries.
   35442 
   35443 2014-08-11  Mike Frysinger  <vapier (a] gentoo.org>
   35444 
   35445 	tests: fix uio building w/out preadv/pwritev.
   35446 	The preadv/pwritev symbols weren't added to glibc until the 2.10 release,
   35447 	so trying to build the uio test leads to link failures.  Add configure
   35448 	tests and update uio.test to handle this.
   35449 
   35450 	* configure.ac (AC_CHECK_FUNCS): Add preadv/pwritev.
   35451 	* tests/uio.c: Include config.h.
   35452 	(main): Check for HAVE_PREADV and HAVE_PWRITEV.
   35453 	* tests/uio.test: Check exit status of uio helper.
   35454 
   35455 2014-08-11  Mike Frysinger  <vapier (a] gentoo.org>
   35456 
   35457 	tests: ignore *.tmp files.
   35458 	The tests like to generate random .tmp files, so ignore them.
   35459 
   35460 	* tests/.gitignore: Add *.tmp.
   35461 
   35462 2014-08-11  Mike Frysinger  <vapier (a] gentoo.org>
   35463 
   35464 	tests: fix shell errors in detach tests.
   35465 	The current detach test code does:
   35466 		set -e
   35467 		...
   35468 		cleanup() {
   35469 			set +e
   35470 			kill ...
   35471 			wait ...
   35472 		}
   35473 		...
   35474 		cleanup
   35475 		exit 0
   35476 
   35477 	The problem is that while `set -e` is disabled for the body of the
   35478 	cleanup function, it isn't necessarily disabled in the caller scope.
   35479 	So if the return value of the cleanup function (`wait` in this case)
   35480 	is non-zero, the script ends up failing overall.
   35481 
   35482 	Add an explicit return 0 to the cleanup function so that we don't kill
   35483 	the overall test pipeline.
   35484 
   35485 	* tests/detach-running.test (cleanup): Add return 0.
   35486 	* tests/detach-sleeping.test (cleanup): Likewise.
   35487 	* tests/detach-stopped.test (cleanup): Likewise.
   35488 
   35489 2014-08-11  Mike Frysinger  <vapier (a] gentoo.org>
   35490 
   35491 	set_ptracer_any: add a little documentation.
   35492 	This way I don't have to keep reading up on these options and wondering
   35493 	why the code isn't aborting when the call fails.
   35494 
   35495 	* tests/set_ptracer_any.c (main): Note prctl failures are ok.
   35496 
   35497 2014-08-10  Mike Frysinger  <vapier (a] gentoo.org>
   35498 
   35499 	signal: fix thinko in sa_restorer.
   35500 	Previous commit here re-added the bugs trying to be fixed due to a
   35501 	logic thinko.  The patches were tested in isolation and hand merged
   35502 	later.  Oops.
   35503 
   35504 	* signal.c (struct new_sigaction): Change || to &&.
   35505 
   35506 2014-08-09  Mike Frysinger  <vapier (a] gentoo.org>
   35507 
   35508 	sigaction test: support arches w/out SA_RESTORER and swapped args.
   35509 	Running Linux 3.15 (sparc64) and glibc 2.17 (sparc32) triggers a
   35510 	rt_sigaction call that does not use SA_RESTORER and has an order
   35511 	where it inserts a restorer and a size.  The current tests don't
   35512 	support that ordering, so add another regex.
   35513 
   35514 	* tests/sigaction.awk: Support no SA_RESTORER and swapped args.
   35515 
   35516 2014-08-09  Mike Frysinger  <vapier (a] gentoo.org>
   35517 
   35518 	alpha/sparc: fix arg count for rt_sigaction.
   35519 	Both these arches have a rt_sigaction syscall that takes 5 args, not 4.
   35520 
   35521 	* linux/alpha/syscallent.h (rt_sigaction): Change nargs to 5.
   35522 	* linux/sparc/syscallent.h (rt_sigaction): Change nargs to 5.
   35523 
   35524 2014-08-09  Mike Frysinger  <vapier (a] gentoo.org>
   35525 
   35526 	hppa: fix sigaction decoding.
   35527 	Since the rt_sigaction syscall on hppa doesn't have a sa_restorer,
   35528 	do not include it in the kernel struct.
   35529 
   35530 	We also have to undefine SA_RESTORER so that code doesn't try to
   35531 	use it.  The headers will export this, but the syscall doesn't
   35532 	actually respect it.
   35533 
   35534 	* signal.c (SA_RESTORER): Undefine when HPPA is defined.
   35535 	(struct new_sigaction): Disable sa_restorer on hppa.
   35536 
   35537 2014-08-09  Mike Frysinger  <vapier (a] gentoo.org>
   35538 
   35539 	alpha: fix sigaction decoding.
   35540 	Since the rt_sigaction syscall on alpha doesn't have a sa_restorer,
   35541 	do not include it in the kernel struct.
   35542 
   35543 	* signal.c (struct new_sigaction): Disable sa_restorer on alpha.
   35544 
   35545 2014-08-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   35546 
   35547 	Prepare for -yy option support.
   35548 	* defs.h (show_fd_path): Change type to unsigned int.
   35549 	* strace.c (show_fd_path): Likewise.
   35550 	(init): Handle repeated -y option.
   35551 
   35552 2014-08-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   35553 
   35554 	Fix preadv/pwritev offset decoding on ILP32 architectures.
   35555 	This fixes regression introduced by the previous commit.
   35556 
   35557 	* io.c (print_llu_from_low_high_val) [SIZEOF_LONG != SIZEOF_LONG_LONG]:
   35558 	Cast argument to unsigned long before casting it to unsigned long long.
   35559 
   35560 2014-08-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   35561 
   35562 	Fix preadv/pwritev offset decoding on bigendian architectures.
   35563 	This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560.
   35564 
   35565 	* util.c (printllval): Remove align argument.
   35566 	* defs.h (printllval): Update prototype.
   35567 	(printllval_aligned, printllval_unaligned): Remove.
   35568 	* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
   35569 	sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
   35570 	sys_fallocate): Replace printllval_aligned call with printllval.
   35571 	* io.c (sys_pread, sys_pwrite): Likewise.
   35572 	(print_llu_from_low_high_val): New function.
   35573 	(sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
   35574 
   35575 2014-08-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   35576 
   35577 	Decode file descriptors returned by accept and accept4 syscalls.
   35578 	* net.c (do_accept): Rename to do_sockname.
   35579 	(sys_accept, sys_accept4): Update callers, return RVAL_FD.
   35580 	(sys_getsockname, sys_getpeername): Call do_sockname directly.
   35581 	* tests/net-fd.test: Update.
   35582 
   35583 2014-08-01  Mike Frysinger  <vapier (a] gentoo.org>
   35584 
   35585 	x32: update io_{setup,submit} syscalls.
   35586 	Starting in 3.16, these two syscalls have gotten their own entry
   35587 	point for x32.  See linux 7fd44dacdd803c0bbf38bf478d51d280902bb0f1.
   35588 
   35589 	* linux/x32/syscallent.h: Change existing io_{setup,submit} to 64bit,
   35590 	and add new entry points for x32 specifically.
   35591 
   35592 2014-06-18  Max Filippov  <jcmvbkbc (a] gmail.com>
   35593 
   35594 	xtensa: sort values in struct_user_offsets.
   35595 	Otherwise ptrace syscall argument decoding is wrong:
   35596 	  ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x4048eb]) = 0
   35597 	  ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x3fa6cd30]) = 0
   35598 	  ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x8040676d]) = 0
   35599 	instead of
   35600 	  ptrace(PTRACE_PEEKUSER, 296, pc, [0x4048eb]) = 0
   35601 	  ptrace(PTRACE_PEEKUSER, 296, a1, [0x3fa6cd30]) = 0
   35602 	  ptrace(PTRACE_PEEKUSER, 296, a0, [0x8040676d]) = 0
   35603 
   35604 	* process.c (struct_user_offsets) [XTENSA]: Sort values.
   35605 
   35606 2014-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   35607 
   35608 	Document -k option as experimental.
   35609 	strace -k does not produce a reliable output on all supported
   35610 	configurations yet, even basic strace-k.test is known to fail
   35611 	on some of them.
   35612 
   35613 	* strace.c (usage): Document -k option as experimental.
   35614 	* strace.1: Likewise.
   35615 	* NEWS: Likewise.
   35616 
   35617 2014-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   35618 
   35619 	tests: robustify -k test.
   35620 	Split stack-fcall.c into several compilation units so that intermediate
   35621 	function calls would not be optimized out by compiler.
   35622 
   35623 	* tests/stack-fcall.c: Move intermediate functions to ...
   35624 	* tests/stack-fcall-*.c: ... new files.
   35625 	* tests/Makefile.am (stack_fcall_SOURCES): Add stack-fcall-*.c.
   35626 
   35627 2014-06-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   35628 
   35629 	tests: enhance -k test.
   35630 	Add two more function calls to the stack.  Suggested by Masatake YAMATO.
   35631 
   35632 	* tests/stack-fcall.c (f1): Rename to f3.
   35633 	(f1, f2): New functions.
   35634 	* tests/strace-k.test: Update.
   35635 
   35636 2014-06-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   35637 
   35638 	unwind: ignore memory mappings that have no PROT_EXEC bit set.
   35639 	* unwind.c (build_mmap_cache): For each memory mapping being scanned,
   35640 	save its PROT_EXEC bit and skip the mapping if it is not set.
   35641 
   35642 	unwind: cleanup build_mmap_cache.
   35643 	* unwind.c (build_mmap_cache): Move local variables to the code branch
   35644 	where they are used.  Check return code of sscanf and strdup.  Do not
   35645 	treat unusual memory mappings as fatal errors.  Do not skip memory
   35646 	mappings with path names starting with "[".
   35647 
   35648 	unwind: remove unused field from mmap_cache_t.
   35649 	* unwind.c (mmap_cache_t): Remove "deleted" field.
   35650 	(build_mmap_cache): Remove initialization of "deleted" field.
   35651 
   35652 2014-06-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   35653 
   35654 	unwind: refactor stacktrace_walk.
   35655 	* unwind.c (stacktrace_walk): Move stack frame printing code
   35656 	to separate function print_stack_frame.
   35657 
   35658 	unwind: constify binary_filename and symbol_name functions arguments.
   35659 	* unwind.c (call_action_fn, print_call_cb, sprint_call_or_error,
   35660 	queue_put, queue_put_call): Add const qualifier to binary_filename and
   35661 	symbol_name arguments.
   35662 
   35663 2014-06-11  Luca Clementi  <luca.clementi (a] gmail.com>
   35664 
   35665 	unwind: disable stack trace with multiple personalities.
   35666 	* unwind.c (unwind_cache_invalidate, unwind_print_stacktrace,
   35667 	unwind_capture_stacktrace): Disable stack tracing of non-default
   35668 	personality processes.
   35669 
   35670 2014-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   35671 
   35672 	unwind: rename function_off_set to function_offset.
   35673 	* unwind.c (call_action_fn, stacktrace_walk, STACK_ENTRY_SYMBOL_FMT,
   35674 	print_call_cb, sprint_call_or_error, queue_put, queue_put_call):
   35675 	Rename function_off_set to function_offset.
   35676 
   35677 	unwind: fix a bug in range updating of binary search.
   35678 	* unwind.c (print_stacktrace): Fix another off-by-one error in binary search.
   35679 
   35680 	unwind: use fopen64 instead of fopen.
   35681 	* unwind.c (fopen_for_input): Define to fopen64 iff
   35682 	[_LARGEFILE64_SOURCE && HAVE_FOPEN64], otherwise define it to fopen.
   35683 	(build_mmap_cache): Use fopen_for_input instead of fopen.
   35684 
   35685 2014-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   35686 
   35687 	unwind: fix build on 32-bit architectures.
   35688 	Fix compilation warnings in unwind.c on 32-bit architectures.
   35689 	On some architectures getuid is actually getuid32, so change the test
   35690 	to use getpid instead of getuid.
   35691 
   35692 	* unwind.c (STACK_ENTRY_SYMBOL_FMT): Explicitly cast function_off_set
   35693 	to unsigned long.
   35694 	(queue_put_error): Change the 3rd argument's type to unsigned long.
   35695 	* tests/stack-fcall.c (f1): Use getpid instead of getuid.
   35696 	* tests/strace-k.test: Likewise.
   35697 
   35698 2014-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   35699 
   35700 	tests: robustify -w option test.
   35701 	* tests/count.test: Allow nanosleep to spend a bit less time than 1 second.
   35702 
   35703 2014-06-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   35704 
   35705 	Fix delete_module decoding.
   35706 	* xlat/delete_module_flags.in: New file.
   35707 	* file.c (sys_delete_module): Move ...
   35708 	* bjm.c (sys_delete_module): ... to here.
   35709 	Decode 1st argument using printstr instead of printpath.
   35710 	* NEWS: Mention it.
   35711 
   35712 2014-06-04  Zubin Mithra  <zubin.mithra (a] gmail.com>
   35713 
   35714 	Decode paths associated with file descriptors returned by syscalls.
   35715 	* defs.h (RVAL_FD): New macro.
   35716 	(RVAL_MASK, RVAL_STR, RVAL_NONE): Update.
   35717 	* desc.c (sys_dup, sys_delete_module): New functions.
   35718 	(do_dup2, decode_open, sys_creat): Change return value to RVAL_FD.
   35719 	* linux/dummy.h (sys_delete_module, sys_dup): Remove.
   35720 	* linux/syscall.h (sys_delete_module, sys_dup): New prototypes.
   35721 	* syscall.c (trace_syscall_exiting): Handle RVAL_FD.
   35722 
   35723 2014-06-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   35724 
   35725 	NEWS: Prepare for 4.9 release.
   35726 
   35727 	Warn about flags that have no effect with -c.
   35728 	* strace.c (init): Issue a warning if -i, -k, -r, -t, -T, or -y is used
   35729 	along with -c.
   35730 	This fixes Debian bug #443895.
   35731 
   35732 	debian: enable security hardening features.
   35733 	* debian/rules: Follow the advice in https://wiki.debian.org/Hardening
   35734 	and enable maximum hardening as for programs that handle untrusted data.
   35735 	Patch by Markus <waldeck (a] gmx.de>.
   35736 
   35737 2014-06-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   35738 
   35739 	debian: update control file.
   35740 	* debian/control (strace64): Fix a typo in package description.
   35741 	Patch by Pascal De Vuyst <pascal.devuyst (a] gmail.com>.
   35742 	(strace, strace-udeb): Add x32 to architecture list.
   35743 	Patch by Guillaume Morin <guillaume (a] morinfr.org>.
   35744 	(strace, strace-udeb): Add or1k to architecture list.
   35745 	Patch by Christian Svensson <debian (a] cmd.nu>.
   35746 	(strace, strace-udeb): Add arm64 to architecture list,
   35747 	and remove defunct arm.
   35748 	Patch by Wookey <wookey (a] debian.org>.
   35749 
   35750 	This fixes Debian bugs: #697625, #727018, #742235, #749956.
   35751 
   35752 2014-06-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   35753 
   35754 	manpage: minor corrections.
   35755 	$ groff -ww -mandoc -z strace.1
   35756 	strace.1:65: warning: macro `IX' not defined
   35757 
   35758 	* strace.1: define IX macro as empty for groff.
   35759 	Change remaining '-' as minus to '\-'.
   35760 	Have two word spaces after a full stop as an end of sentence.
   35761 	Use extra space ('\,' or '\/') between roman and italic characters.
   35762 	Based on patch by Bjarni Ingi Gislason <bjarniig (a] rhi.hi.is>.
   35763 	This fixes Debian bug #725987.
   35764 
   35765 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35766 
   35767 	unwind: tests: add a test for -k option.
   35768 	* tests/stack-fcall.c: New test target.
   35769 	* tests/strace-k.test: New test driver.
   35770 	* tests/Makefile.am (check_PROGRAMS): Add stack-fcall.
   35771 	(TESTS): Add strace-k.test.
   35772 	* tests/.gitignore: Add stack-fcall.
   35773 
   35774 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35775 
   35776 	unwind: move stacktrace capturing and mmap cache invalidating to trace_syscall_entering
   35777 	Instead of handling stacktrace capturing and mmap cache invalidating in
   35778 	sys_* functions, handle them uniformly in trace_syscall_entering using
   35779 	new flags introduced by previous two commits.
   35780 
   35781 	The patch is simpler than its older version(v3).  The value of
   35782 	hide_log_until_execve is just ignored.  I found the value is nothing
   35783 	to do with this patch.  unwind_cache_invalidate is mentioned only
   35784 	once in trace_syscall_exiting.
   35785 	Both are suggested by Dmitry Levin.
   35786 
   35787 2014-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   35788 
   35789 	unwind: add SE and SI flags to syscall entries for all architectures.
   35790 	Add SE flag to execve, exit, and exit_group syscall entries.
   35791 	Add SI flag to brk, execve, mmap, mprotect, mremap, munmap,
   35792 	remap_file_pages, shmat, and shmdt syscall entries.
   35793 
   35794 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35795 
   35796 	unwind: introduce markers specifying the needs of special care in unwinding
   35797 	Some system calls require capturing the stack trace before they are
   35798 	processed in kernel.  Typical one is execve.  Some system calls require
   35799 	invalidating mmap cache after they are processed in kernel.
   35800 
   35801 	In current implementation these requirements are handled directly by
   35802 	appropriate syscall handlers.  However, it is difficult to keep the
   35803 	source code maintainable using this approach to cover all system calls
   35804 	which have such requirements.
   35805 
   35806 	A more generic way to implement this is to flag all syscalls that
   35807 	require special processing, and handle these flags right in
   35808 	trace_syscall_entering instead of changing syscall handlers.
   35809 
   35810 	This patch just defines new flags: STACKTRACE_INVALIDATE_CACHE and
   35811 	STACKTRACE_CAPTURE_ON_ENTER.
   35812 
   35813 	The names of macros are suggested by Dmitry Levin.
   35814 
   35815 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35816 
   35817 	unwind: enable dwarf cache of libunwind.
   35818 	Here is the benchmark of the dwarf cache.
   35819 
   35820 	Target program:
   35821 
   35822 	    #include <sched.h>
   35823 	    int main(void)
   35824 	    {
   35825 	      unsigned int max = 0x6fff, i;
   35826 	      for (i = 0; i < max; i++)
   35827 		sched_yield();
   35828 	      return 0;
   35829 	    }
   35830 
   35831 	Command line:
   35832 
   35833 		./strace -o /dev/null -k a.out
   35834 
   35835 	With the dwarf cache:
   35836 
   35837 	    real	0m12.081s
   35838 	    user	0m3.858s
   35839 	    sys 	0m8.194s
   35840 
   35841 	Without the dwarf cache:
   35842 
   35843 	    real	0m22.326s
   35844 	    user	0m5.218s
   35845 	    sys		0m16.952s
   35846 
   35847 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35848 
   35849 	unwind: report expected backtracing error.
   35850 	When a file mmap'ed to the target process is unlink'ed, backtracing the
   35851 	stack would fail.  Current implementation reports it as
   35852 	"backtracing_error".  To avoid confusion, the message is changed to
   35853 	"expected_backtracing_error".
   35854 
   35855 	Here is the reproducer:
   35856 
   35857 	  $ cat ./p-deleted.c
   35858 	  #include <unistd.h>
   35859 
   35860 	  int main(int argc, char **argv) {
   35861 	    return unlink(argv[0]) < 0;
   35862 	  }
   35863 
   35864 	  $ strace -e unlink -k ./p-deleted
   35865 	  unlink("./p-deleted")                   = 0
   35866 	   > /usr/lib64/libc-2.18.so(unlink+0x7) [0xe7f17]
   35867 	   > /home/yamato/var/strace/t_unwind/p-deleted (deleted)(+0x0) [0x575]
   35868 	   > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65]
   35869 	   > backtracing_error [0x7ffff1365590]
   35870 	  +++ exited with 0 +++
   35871 
   35872 	p-deleted is deleted therefore backtracing_error is reported.  This
   35873 	patch records the deleted marker when making mmap cache and refers the
   35874 	recorded information in the case "backtracing_error" to switch the
   35875 	message.
   35876 
   35877 	Here is the output of this patch:
   35878 
   35879 	  $ strace -e unlink -k ./p-deleted
   35880 	  unlink("./p-deleted")                   = 0
   35881 	   > /usr/lib64/libc-2.18.so(unlink+0x7) [0xe7f17]
   35882 	   > /home/yamato/var/strace/t_unwind/p-deleted (deleted)(+0x0) [0x575]
   35883 	   > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65]
   35884 	   > expected_backtracing_error [0x7ffff1365590]
   35885 	  +++ exited with 0 +++
   35886 
   35887 	This solution is not perfect: if a file is unlink'ed after making the
   35888 	mmap cache and before unwinding, strace cannot have a chance to record
   35889 	the deleted marker.
   35890 
   35891 	In this version of patch, hardcoded magic number used in comparing "(delete)"
   35892 	string is replaced with strlen as suggested by Dmitry Levin.
   35893 
   35894 	In old version of patch, the deleted entry was thrown away from mmap
   35895 	cache to avoid to report "backtracing_error".  In this patch I keep it,
   35896 	and just switch the error message.
   35897 	Inspired by the review comment from Dmitry Levin.
   35898 
   35899 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35900 
   35901 	unwind: call unwind_tcb_fin before printing detached message.
   35902 	captured stacktrace is printed in unwind_tcb_fin if tcp->queue is not
   35903 	empty.  This should happen before printing detached message, so
   35904 	unwind_tcb_fin is moved to the top of droptcb.
   35905 
   35906 	This is implicitly suggested by Dmitry Levin in patch review process.
   35907 
   35908 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35909 
   35910 	unwind: implement automatic mmap cache invalidation.
   35911 	A mmap cache belonging to a tcb was updated when a system call which
   35912 	changed the memory mapping was called.  This implementation was assumed
   35913 	the mapping was changed only by the tcb.  However, this assumption is
   35914 	incorrect if the target application is multi-threaded; more than two
   35915 	tcbs can shared the same memory mapping and a tcb can modify it without
   35916 	being noticed by the others.
   35917 
   35918 	This change introduces a global integer variable mmap_cache_generation,
   35919 	and mmap_cache_generation field to struct tcb.  The variable
   35920 	is incremented each time a process enters a syscall that can modify its
   35921 	memory mapping.  Each tcb records the value of this variable at the
   35922 	moment if  building its mmap cache.  Every mmap cache associated with
   35923 	the given tcb can be validated by comparing its mmap_cache_generation
   35924 	field with the variable mmap_cache_generation.
   35925 
   35926 	This implementation is inefficient.  If strace attaches two processes
   35927 	which don't share the memory mapping, rebuilding mmap cache of a tcb
   35928 	triggered by another tcb's mmap system call is not necessary.
   35929 
   35930 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35931 
   35932 	unwind: introduce queue_t for capturing stacktrace.
   35933 	This is the second step for splitting capturing from printing.
   35934 
   35935 	New `queue' field is added to tcb.  Captured stacktrace is stored here.
   35936 	The field is initialized/finalized at unwind_tcb_init/unwind_tcb_fin.
   35937 
   35938 	New API function unwind_capture_stacktrace is added.  This function
   35939 	captures the currest stack using stracktrace_walker and records it in
   35940 	tcb.  It's printing is delayed to the next call of
   35941 	unwind_print_stacktrace.
   35942 
   35943 	unwind_print_stacktrace is extended.  Now it checks queue field of
   35944 	the given tcb at the start of function.  If the function finds a
   35945 	captured stack trace, the latter is printed using stracktrace_walker.
   35946 
   35947 	Currently unwind_capture_stacktrace invocations are added directly to
   35948 	handlers of mmap, munmap, mprotect, and execve.
   35949 
   35950 	Here is the difference of output with/without patch:
   35951 
   35952 	(without patch)
   35953 	  execve("./test-fork", ["./test-fork"], [/* 56 vars */]) = 0
   35954 	   > /usr/lib64/ld-2.18.so(check_one_fd.part.0+0x82) [0x11f0]
   35955 
   35956 	(with patch)
   35957 	  execve("./test-fork", ["./test-fork"], [/* 54 vars */]) = 0
   35958 	   > /usr/lib64/libc-2.18.so(execve+0x7) [0xbcd27]
   35959 	   > /home/yamato/var/strace/strace(exec_or_die+0x10c) [0x26ac]
   35960 	   > /home/yamato/var/strace/strace(startup_child+0x346) [0x134f6]
   35961 	   > /home/yamato/var/strace/strace(init+0x89f) [0x13dff]
   35962 	   > /home/yamato/var/strace/strace(main+0xa) [0x26ca]
   35963 	   > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65]
   35964 	   > /home/yamato/var/strace/strace(_start+0x29) [0x2799]
   35965 
   35966 	In older version output lines of captured elements were built when
   35967 	printing.  In this version they are built when capturing the stack.
   35968 	As result, unneeded dynamic memory allocations are avoided.
   35969 	Suggested by Luca Clementi.
   35970 
   35971 	In older version the combination of snprintf and realloc were used.
   35972 	In this version they are replaced with asprintf.
   35973 	Suggested by Dmitry Levin.
   35974 
   35975 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35976 
   35977 	unwind: introduce own debug macro.
   35978 	* unwind.c (DPRINTF): New macro, to be utilized in debugging cache
   35979 	management code.
   35980 
   35981 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35982 
   35983 	unwind: introduce stacktrace_walker.
   35984 	In current implementation, the stack trace is captured and printed at
   35985 	the same time, in trace_syscall_exiting.  This approach cannot
   35986 	provide user expected information when a system call changes the
   35987 	memory mapping.  In such cases, the stack trace should be captured on
   35988 	entering syscall and printed on exiting.
   35989 
   35990 	As the initial step for splitting capturing from printing, this change
   35991 	introduces stacktrace_walker utility function.  It can be used both for
   35992 	capturing in trace_syscall_entering and printing in
   35993 	trace_syscall_exiting.
   35994 
   35995 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   35996 
   35997 	unwind: give all exported functions "unwind_" prefix.
   35998 	* unwind.c (init_unwind_addr_space): Rename to unwind_init.
   35999 	(init_libunwind_ui): Rename to unwind_tcb_init.
   36000 	(free_libunwind_ui): Rename to unwind_tcb_fin.
   36001 	(delete_mmap_cache): Rename to unwind_cache_invalidate.
   36002 	(print_stacktrace): Rename to unwind_print_stacktrace.
   36003 	* defs.h: Update prototypes.
   36004 	* mem.c: All callers updated.
   36005 	* process.c: Likewise.
   36006 	* strace.c: Likewise.
   36007 	* syscall.c: Likewise.
   36008 
   36009 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   36010 
   36011 	unwind: delete mmap cache in free_libunwind_ui.
   36012 	free_libunwind_ui is expected to release all unwind related resources
   36013 	attached to tcp.
   36014 
   36015 	* strace.c (droptcb): Move delete_mmap_cache call ...
   36016 	* unwind.c (free_libunwind_ui): ... to here.
   36017 
   36018 2014-05-30  Masatake YAMATO  <yamato (a] redhat.com>
   36019 
   36020 	unwind: make alloc_mmap_cache function local.
   36021 	* defs.h (alloc_mmap_cache): Remove.
   36022 	* unwind.c (alloc_mmap_cache): Add static qualifier.
   36023 
   36024 	unwind: fix a bug in range updating of binary search.
   36025 	* unwind.c (print_stacktrace): Fix off-by-one error in binary search.
   36026 
   36027 2014-05-30  Luca Clementi  <luca.clementi (a] gmail.com>
   36028 
   36029 	Add -k option to print stack trace after each syscall.
   36030 	Print the stack trace of the traced process after each system call when
   36031 	-k option is specified.  It is implemented using libunwind to unwind the
   36032 	stack and to obtain the function name pointed by the IP.
   36033 
   36034 	Based on the code that was originally taken from strace-plus
   36035 	of Philip J. Guo.
   36036 
   36037 	* configure.ac: Add --with-libunwind option.  Check libunwind support.
   36038 	* Makefile.am: Add libunwind support.
   36039 	* defs.h (struct tcb) [USE_LIBUNWIND]: Append libunwind specific fields.
   36040 	[USE_LIBUNWIND] (stack_trace_enabled, alloc_mmap_cache,
   36041 	delete_mmap_cache, print_stacktrace): New prototypes.
   36042 	* mem.c (print_mmap, sys_munmap, sys_mprotect): Add libunwind support.
   36043 	* process.c (sys_execve): Likewise.
   36044 	* strace.c (usage, alloctcb, droptcb, init): Likewise.
   36045 	* syscall.c (trace_syscall_exiting): Likewise.
   36046 	* unwind.c: New file.
   36047 	* strace.1: Document -k option.
   36048 
   36049 2014-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   36050 
   36051 	sysctl: update CTL_*, KERN_*, NET_*, and VM_* constants.
   36052 	* configure.ac (AC_CHECK_DECLS): Add CTL_*, KERN_*, NET_*, and
   36053 	VM_* constants.
   36054 	* system.c (CTL_PROC, CTL_CPU): Remove definitions.
   36055 	* xlat/sysctl_*.in: Update.
   36056 
   36057 	Check for constants used by waitid function.
   36058 	* configure.ac (AC_CHECK_DECLS): Add P_* constants.
   36059 
   36060 	Check for LO_FLAGS_READ_ONLY constant.
   36061 	* configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_READ_ONLY.
   36062 
   36063 	Compress blank lines.
   36064 	Suppress empty lines left after automated xlat conversion.
   36065 
   36066 	xlat: cleanup the aftermath of automatic conversion.
   36067 
   36068 	Generate xlat/*.in files.
   36069 	Automatically convert xlat structures from *.c files to xlat/*.in files
   36070 	using "./generate_xlat_in.sh *.c" command.
   36071 
   36072 	Rename several xlat structures to avoid collisions.
   36073 	* bjm.c (which): Rename to qm_which.
   36074 	* ipc.c (msg_flags): Rename to ipc_msg_flags.
   36075 	* time.c (which): Rename to itimer_which.
   36076 
   36077 	Enhance xlat generator.
   36078 	* xlat/gen.sh: Define all xlat structs not declared in defs.h as static.
   36079 	Some symbolic constants are not macros, extend #ifdef check to cover
   36080 	symbolic constants checked by AC_CHECK_DECLS.
   36081 	Handle complex symbolic constants in SYMBOL|... form.
   36082 	Handle symbolic constants in 1<<SYMBOL form.
   36083 	Handle numeric constants.
   36084 	Implement #unconditional directive that turns off preprocessor checks.
   36085 	Implement #unterminated directive that turns off adding XLAT_END.
   36086 
   36087 2014-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   36088 
   36089 	Use bootstrap script consistently.
   36090 	Now that ./xlat/gen.sh has to be run before autoreconf,
   36091 	replace all autoreconf calls with ./bootstrap call.
   36092 
   36093 	* bootstrap: Forward arguments to autoreconf.
   36094 	* build_static_example.sh: Replace autoreconf call with bootstrap call.
   36095 	* make-dist: Likewise.
   36096 	* qemu_multiarch_testing/README: Likewise.
   36097 
   36098 2014-05-30  Mike Frysinger  <vapier (a] gentoo.org>
   36099 
   36100 	Implement xlat generator.
   36101 	* bootstrap: New file.
   36102 	* xlat/gen.sh: Likewise.
   36103 	* Makefile.am: Include xlat/Makemodule.am
   36104 	(EXTRA_DIST): Add $(XLAT_INPUT_FILES), $(XLAT_HEADER_FILES), and
   36105 	xlat/gen.sh.
   36106 
   36107 2014-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   36108 
   36109 	tests: fix SCM_RIGHTS test for big-endian systems.
   36110 	* tests/scm_rights.c (main): Send zero integer to avoid issues with
   36111 	endianness.
   36112 	* tests/scm_rights-fd.test: Update grep patterns.
   36113 
   36114 	Decode file descriptors passed via SCM_RIGHTS control messages.
   36115 	* net.c (printcmsghdr): Print descriptors from SCM_RIGHTS control
   36116 	messages using printfd.
   36117 	* tests/scm_rights.c: New file.
   36118 	* tests/scm_rights-fd.test: New test.
   36119 	* tests/Makefile.am (check_PROGRAMS): Add scm_rights.
   36120 	(TESTS): Add scm_rights-fd.test.
   36121 	* tests/.gitignore: Add scm_rights and uio.
   36122 
   36123 	tests: add a test for -c and -w options.
   36124 	* tests/count.test: New test.
   36125 	* tests/Makefile.am (TESTS): Add it.
   36126 
   36127 2014-05-29  Mark Hills  <Mark.Hills (a] framestore.com>
   36128 
   36129 	Optionally produce stats on syscall latency.
   36130 	Time spent in system time is not useful where a syscall depends on some
   36131 	non-CPU resource, eg. typically open() or stat() to a network drive.
   36132 
   36133 	This patch adds a new flag (-w) to produce a summary of the time
   36134 	difference between beginning and end of the system call (ie. latency)
   36135 
   36136 	This functionality has been useful to profile slow processes that
   36137 	are not CPU-bound.
   36138 
   36139 2014-05-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   36140 
   36141 	Constify count_syscall function.
   36142 	* count.c (count_syscall): Add const qualifier to timeval argument and
   36143 	rename it.  Store the wall clock time spent while in syscall in separate
   36144 	timeval variable.
   36145 	* defs.h (count_syscall): Update prototype.
   36146 	* syscall.c (trace_syscall_exiting): Update count_syscall invocation.
   36147 
   36148 	Constify tv_* functions.
   36149 	* defs.h (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div): Add
   36150 	const qualifier to read only arguments.
   36151 	* util.c (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div):
   36152 	Likewise.
   36153 
   36154 2014-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   36155 
   36156 	Use printstr for sethostname, setdomainname, and gethostname decoding.
   36157 	The argument passed to sethostname and setdomainname syscalls, as well
   36158 	as the string returned by gethostname syscall, is not a pathname, so
   36159 	printpathn is not the right method for its decoding.
   36160 
   36161 	* process.c (sys_sethostname, sys_setdomainname): Decode 1st argument
   36162 	using printstr instead of printpathn.
   36163 	[ALPHA] (sys_gethostname): Likewise.
   36164 
   36165 2014-05-21  James Hogan  <james.hogan (a] imgtec.com>
   36166 
   36167 	Fix {get,set}rlimit decoding with unreliable SIZEOF_RLIM_T.
   36168 	When strace is built with large file support definitions in CFLAGS (as
   36169 	may be provided by buildroot) the C library headers may expose a 64-bit
   36170 	rlim_t even though the struct rlimit fields used by the system call
   36171 	interface are only 32-bit.  The SIZEOF_RLIM_T will then be 8 which
   36172 	results in bad decoding of the getrlimit and setrlimit syscalls.
   36173 
   36174 	This is fixed by replacing unreliable SIZEOF_RLIM_T based checks with
   36175 	checks for current_wordsize.
   36176 
   36177 2014-05-13  Masatake YAMATO  <yamato (a] redhat.com>
   36178 
   36179 	Enhance setns syscall decoding.
   36180 	* process.c (sys_setns): New function.
   36181 	Decode the 2nd syscall argument using clone_flags.
   36182 	* linux/syscall.h (sys_setns): New prototype.
   36183 	* linux/dummy.h (sys_setns): Remove.
   36184 
   36185 2014-05-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36186 
   36187 	mips: fix syscall entries that should have TP flag set.
   36188 
   36189 	xtensa: fix unshare syscall entry.
   36190 
   36191 	alpha, hppa, mips n64: fix waitid syscall entry.
   36192 
   36193 	Add TM flag to shmat and shmdt syscall entries.
   36194 
   36195 	Alias sys_vfork to sys_fork.
   36196 	* process.c (sys_vfork): Remove.
   36197 	* linux/syscall.h (sys_vfork): Likewise.
   36198 	* linux/dummy.h (sys_vfork): Alias to sys_fork.
   36199 	* linux/alpha/syscallent.h: Fix vfork entry.
   36200 	* util.c (setbpt): Do not check for sys_vfork.
   36201 	* syscall.c (syscall_fixup_for_fork_exec): Likewise.
   36202 
   36203 2014-04-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   36204 
   36205 	epoll_ctl: fix EPOLL_CTL_DEL argument decoding.
   36206 	* desc.c (sys_epoll_ctl): Do not parse the event structure for
   36207 	EPOLL_CTL_DEL operation.
   36208 
   36209 	Reported-by:   <socketpair (a] gmail.com>
   36210 
   36211 2014-04-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   36212 
   36213 	Update CLOCK_* constants.
   36214 	* time.c (clocknames): Add CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM,
   36215 	CLOCK_BOOTTIME_ALARM, CLOCK_SGI_CYCLE, and CLOCK_TAI.
   36216 	Fixes RH#1088455.
   36217 
   36218 2014-04-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   36219 
   36220 	Fix preadv/pwritev offset decoding.
   36221 	* util.c (printllval): Add align argument.
   36222 	* defs.h (printllval): Update prototype.
   36223 	(printllval_aligned, printllval_unaligned): New macros.
   36224 	* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
   36225 	sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
   36226 	sys_fallocate): Replace printllval call with printllval_aligned.
   36227 	* io.c (sys_pread, sys_pwrite): Likewise.
   36228 	(sys_preadv, sys_pwritev): Replace printllval call with
   36229 	printllval_unaligned.
   36230 	* linux/arm/syscallent.h: Set the number of preadv and pwritev
   36231 	arguments to 5.
   36232 	* linux/mips/syscallent-o32.h: Likewise.
   36233 	* linux/powerpc/syscallent.h: Likewise.
   36234 	* linux/sh/syscallent.h: Likewise.
   36235 	* linux/xtensa/syscallent.h: Likewise.
   36236 
   36237 	Reported-by: Dima Kogan <dima (a] secretsauce.net>
   36238 
   36239 2014-04-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   36240 
   36241 	tests: add a test for pread/pwrite and preadv/pwritev offset decoding.
   36242 	* tests/uio.c: New file.
   36243 	* tests/uio.test: New test.
   36244 	* tests/Makefile.am (check_PROGRAMS): Add uio.
   36245 	(uio_CFLAGS): Define.
   36246 	(TESTS): Add uio.test.
   36247 
   36248 2014-04-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   36249 
   36250 	Refactor LDT decoding.
   36251 	* configure.ac (AC_CHECK_TYPES): Remove struct user_desc.
   36252 	* ldt.c: New file.
   36253 	* Makefile.am (strace_SOURCES): Add ldt.c.
   36254 	* mem.c: Do not include <asm/ldt.h>.
   36255 	(print_ldt_entry): Remove.
   36256 	(sys_modify_ldt, sys_set_thread_area, sys_get_thread_area): Move...
   36257 	* ldt.c: ... here.
   36258 	* process.c: Do not include <asm/ldt.h>.
   36259 	(sys_clone) [I386 || X86_64 || X32]: Use print_user_desc.
   36260 
   36261 2014-04-10  Denys Vlasenko  <dvlasenk (a] redhat.com>
   36262 
   36263 	Make int3 example in comments more cut-n-pastable.
   36264 	I found that I use it quite often. Lets make it so that
   36265 	after cut-n-pasting it into a file, there is no need
   36266 	to edit the result (e.g. no need to remove C comment
   36267 	chars from every line.
   36268 
   36269 2014-04-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   36270 
   36271 	mips: enable decoding of set_thread_area.
   36272 	* linux/dummy.h [MIPS]: Do not redirect sys_set_thread_area to printargs.
   36273 	* mem.c [MIPS] (sys_set_thread_area): Define.
   36274 
   36275 	x86_64, x32: enable decoding of modify_ldt, get_thread_area, and set_thread_area
   36276 	* linux/dummy.h [X86_64 || X32]: Do not redirect sys_modify_ldt,
   36277 	sys_get_thread_area, and sys_set_thread_area to printargs.
   36278 
   36279 	x32: decode clone LDT user_desc entries for x86 processes.
   36280 	* mem.c [X32]: Include asm/ldt.h.
   36281 	[X32] (print_ldt_entry, sys_modify_ldt, sys_set_thread_area,
   36282 	sys_get_thread_area): Define.
   36283 	* process.c [X32]: Include asm/ldt.h.
   36284 	(sys_clone) [X32]: Decode LDT entry if current_personality == 1.
   36285 
   36286 2014-04-09  Elliott Hughes  <enh (a] google.com>
   36287 
   36288 	x86-64: decode clone LDT user_desc entries for x86 processes.
   36289 	* mem.c [X86_64]: Include asm/ldt.h.
   36290 	[X86_64] (print_ldt_entry, sys_modify_ldt, sys_set_thread_area,
   36291 	sys_get_thread_area): Define.
   36292 	* process.c [X86_64]: Include asm/ldt.h.
   36293 	(sys_clone) [X86_64]: Decode LDT entry if current_personality == 1.
   36294 
   36295 2014-04-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   36296 
   36297 	x32: fix clone(2) argument order for x86 processes.
   36298 	Apply the same fix that was made for x86_64.
   36299 
   36300 	* process.c [X32] (ARG_CTID, ARG_TLS): Take current
   36301 	personality into account.
   36302 
   36303 2014-04-09  Elliott Hughes  <enh (a] google.com>
   36304 
   36305 	x86-64: fix clone(2) argument order for x86 processes.
   36306 	Without this patch, strace claims that parent_tidptr == tls, which is
   36307 	clearly wrong.  It is expected that parent_tidptr == child_tidptr.
   36308 
   36309 	* process.c [X86_64] (ARG_CTID, ARG_TLS): Take current
   36310 	personality into account.
   36311 
   36312 2014-04-06  Elliott Hughes  <enh (a] google.com>
   36313 
   36314 	aarch64: Fix decoding of arm struct stat64.
   36315 	We need to handle this situation more like x86-64.  32-bit arm and i386
   36316 	actually have a common struct stat64, except the arm one must not be
   36317 	packed.  Additionally, on aarch64 the 32-bit personality is personality 0.
   36318 
   36319 2014-03-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   36320 
   36321 	ARM EABI: disable OABI support by default.
   36322 	OABI is rarely used in ARM EABI systems nowadays, so disable its support
   36323 	by default.  Add --enable-arm-oabi option to enable ARM OABI support.
   36324 
   36325 	* configure.ac: New option --enable-arm-oabi.
   36326 	* syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by
   36327 	configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
   36328 
   36329 2014-03-12  Elliott Hughes  <enh (a] google.com>
   36330 
   36331 	Fix stat decoding for LP64 bionic.
   36332 	Patch fb642bb6d63f7ffe2228bf48a6008bc8f56f67ff fixed building with
   36333 	HAVE_STAT64 for aarch64 with uapi kernel headers but not x86_64.
   36334 	The workaround needed to be applied to all LP64 architectures, not
   36335 	just aarch64.  This patch fixes that and adds an explanatory comment.
   36336 
   36337 2014-03-11  Masatake YAMATO  <yamato (a] redhat.com>
   36338 
   36339 	Decode protocol argument for PF_NETLINK sockets.
   36340 	* net.c (protocols): Rename to inet_protocols.
   36341 	[PF_NETLINK] (netlink_protocols): New xlat structure.
   36342 	(sys_socket): Rename protocols to inet_protocols.
   36343 	[PF_NETLINK]: Decode protocol argument using netlink_protocols.
   36344 
   36345 	Acked-by: Mike Frysinger <vapier (a] gentoo.org>
   36346 
   36347 2014-03-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   36348 
   36349 	Cleanup socketpair decoding.
   36350 	The only supported domain for socketpair syscall is AF_UNIX, so
   36351 	no decoding related to other domains is required for socketpair.
   36352 
   36353 	* net.c (sys_socketpair): Remove support for PF_INET and PF_IPX domains,
   36354 	print the protocol argument as is.
   36355 
   36356 2014-03-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   36357 
   36358 	printsiginfo: add SIGSYS decoding.
   36359 	* configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_syscall.
   36360 	* signal.c (SYS_SECCOMP): Define if not yet defined.
   36361 	(sigsys_codes): new xlat structure.
   36362 	(printsiginfo): Decode SIGSYS.
   36363 
   36364 	Update siginfo codes.
   36365 	* signal.c (siginfo_codes): Add SI_DETHREAD.
   36366 
   36367 	Factor out printing of si_pid and si_uid members of siginfo_t.
   36368 	* signal.c (printsigsource): New function.
   36369 	(printsiginfo): Use it.
   36370 
   36371 2014-03-10  Elliott Hughes  <enh (a] google.com>
   36372 
   36373 	Improve SI_TIMER decoding.
   36374 	Decode siginfo_t more clearly for si_code SI_TIMER.
   36375 	The 'pid' is actually a POSIX timer id, and the 'uid' is actually the
   36376 	overrun.
   36377 	Also factor out the si_value dumping so it's the same for every si_code.
   36378 
   36379 2014-03-03  Elliott Hughes  <enh (a] google.com>
   36380 
   36381 	aarch64: fix decoding of arm syscall numbers.
   36382 	If an aarch64 strace is tracing a process using the arm personality, it
   36383 	also needs to call the shuffle_scno function for the ARM-specific
   36384 	syscalls.
   36385 
   36386 	* syscall.c (shuffle_scno): Define on AARCH64.
   36387 	(get_scno) [AARCH64]: Call shuffle_scno when the tracee is in 32-bit mode.
   36388 
   36389 2014-03-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   36390 
   36391 	Fix fcntl decoding.
   36392 	Assume that F_SETLK64, F_SETLKW64, and F_GETLK64 are either defined or
   36393 	not defined altogether.
   36394 	Do not assume that sizeof(off_t) < sizeof(long long) when F_SETLK64 is
   36395 	undefined.
   36396 
   36397 	This change fixes build with musl libc on x86.
   36398 
   36399 	* configure.ac: Define SIZEOF_OFF_T.
   36400 	* desc.c (USE_PRINTFLOCK64): New macro.
   36401 	(struct flock64, printflock64): Do not define on X32.
   36402 	(printflock): Replace X32 specific workaround with SIZEOF_OFF_T check.
   36403 	Fix printing off_t members of struct flock.
   36404 	(sys_fcntl): Use USE_PRINTFLOCK64.
   36405 
   36406 2014-03-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   36407 
   36408 	sys_fcntl: remove F_FREESP and F_FREESP64 support.
   36409 	F_FREESP and F_FREESP64 fcntl commands are not available in Linux
   36410 	and therefore the code implementing their decoding is useless.
   36411 	Besides that, F_FREESP64 decoding is too complicated to support.
   36412 
   36413 	* desc.c (fcntlcmds): Remove F_FREESP and F_FREESP64.
   36414 	Remove F_FREESP64 from the check whether to define struct flock64.
   36415 	(sys_fcntl): Remove F_FREESP and F_FREESP64 support.
   36416 
   36417 2014-02-28  Elliott Hughes  <enh (a] google.com>
   36418 
   36419 	Add multi-personality support to struct old_sigaction decoding.
   36420 	struct sigaction is another structure that contains members
   36421 	whose size differs between 32-bit and 64-bit personalities.
   36422 
   36423 	* signal.c [HAVE_SIGACTION] (old_sigaction32): New structure.
   36424 	[HAVE_SIGACTION] (decode_old_sigaction): Decode 32-bit struct
   36425 	old_sigaction on a 64-bit host.
   36426 
   36427 2014-02-28  Elliott Hughes  <enh (a] google.com>
   36428 
   36429 	Fix decoding of arm struct stat64 by aarch64 strace.
   36430 	aarch64's uapi header files have a struct stat but no struct stat64.
   36431 	To correctly decode a 32-bit process' s struct stat64 we need
   36432 	HAVE_STAT64, but then the build fails because there is no struct stat64.
   36433 	Luckily, the aarch64 struct stat is structurally equivalent to the arm
   36434 	struct stat64, so we can just reuse that.
   36435 
   36436 	* file.c [AARCH64] (stat64): Define to stat.
   36437 
   36438 2014-02-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   36439 
   36440 	Remove obsolete ioctlsort.c.
   36441 	The generic version of ioctlsort.c became obsolete after commit
   36442 	v4.6-240-g5afdf12 that removed its last non-Linux users.
   36443 
   36444 	* ioctlsort.c: Remove.
   36445 	* Makefile.am (EXTRA_DIST): Remove ioctlsort.c.
   36446 
   36447 	Reported-by: Elliott Hughes <enh (a] google.com>
   36448 
   36449 2014-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   36450 
   36451 	Add multi-personality support to stack_t decoding.
   36452 	stack_t is one of many structures that contain members
   36453 	whose size differs between 32-bit and 64-bit personalities.
   36454 
   36455 	* signal.c (print_stack_t): Decode 32-bit stack_t on a 64-bit host.
   36456 
   36457 	Reported-by: Elliott Hughes <enh (a] google.com>
   36458 
   36459 2014-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   36460 
   36461 	Rewrite signal mask decoding without sigset_t.
   36462 	The sigset_t provided by libc is not quite convenient.
   36463 	In glibc, sigset_t is an array with space for 1024 bits, which is much
   36464 	more than required: all architectures supported by Linux have only 64
   36465 	signals except MIPS, which has 128.
   36466 	In bionic libc, LP32 sigset_t is only 4 bytes long, which is less than
   36467 	necessary.
   36468 
   36469 	With this change, signal mask is decoded without use of intermediate
   36470 	sigset_t structure, which saves us some cpu cycles in case of glibc with
   36471 	its inflated sigset_t, and enables build with libcs where sigset_t is
   36472 	broken.
   36473 
   36474 	Old implementation used to check each signal number in the given signal
   36475 	mask twice using sigismember().
   36476 	New implementation is based on popcount and next_set_bit() so it's
   36477 	noticeably faster.
   36478 
   36479 	* configure.ac: Check for __builtin_popcount.
   36480 	* signal.c: Ensure that NSIG >= 32.
   36481 	(sprintsigmask, sprintsigmask_long, printsigmask): Remove.
   36482 	(popcount32, sprintsigmask_n): New functions.
   36483 	(tprintsigmask_addr, sprintsigmask_val, tprintsigmask_val): New macros.
   36484 	(print_sigset_addr_len, sys_sigsetmask, sys_sigreturn, sys_siggetmask,
   36485 	sys_sigsuspend, sys_sigprocmask, decode_new_sigaction): Update to use
   36486 	new signal mask decoding interface.
   36487 	* tests/sigaction.c (main): Add a test with almost filled signal mask.
   36488 	* tests/sigaction.awk: Update.
   36489 
   36490 2014-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   36491 
   36492 	Fix build with Bionic libc.
   36493 	Add generic tests for fopen64 and fputs_unlocked functions to fix build
   36494 	with Bionic libc that does not provide them.
   36495 
   36496 	* configure.ac (AC_CHECK_FUNCS): Add fopen64 and fputs_unlocked.
   36497 	* strace.c [_LARGEFILE64_SOURCE]: Use fopen instead of fopen64
   36498 	if !HAVE_FOPEN64.
   36499 	Use fputs instead of fputs_unlocked if !HAVE_FPUTS_UNLOCKED.
   36500 	* vsprintf.c: Use fputs instead of fputs_unlocked
   36501 	if !HAVE_FPUTS_UNLOCKED.
   36502 
   36503 	Reported-by: Elliott Hughes <enh (a] google.com>
   36504 
   36505 2014-02-25  James Yang  <james.yang (a] freescale.com>
   36506 
   36507 	powerpc64: fix 64-bit process detection on embedded.
   36508 	* syscall.c (get_scno) [POWERPC64]: Fix 64-bit process detection
   36509 	on embedded powerpc.
   36510 
   36511 2014-02-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   36512 
   36513 	Do not compile scsi ioctl decoding if <scsi/sg.h> is not available.
   36514 	Add a generic test for <scsi/sg.h> availability to fix build with
   36515 	Bionic libc that does not provide <scsi/sg.h>.
   36516 
   36517 	* configure.ac (AC_CHECK_HEADERS): Add scsi/sg.h.
   36518 	* ioctl.c (ioctl_decode): Do not call scsi_ioctl if !HAVE_SCSI_SG_H.
   36519 	* scsi.c: Do not compile scsi ioctl decoding if !HAVE_SCSI_SG_H.
   36520 
   36521 	Reported-by: Elliott Hughes <enh (a] google.com>
   36522 
   36523 2014-02-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   36524 
   36525 	Revert "Add support for Altera's Nios-II softcore architecture"
   36526 	The patch originally submitted by Ezequiel Garca was OK, but I somehow
   36527 	managed to mangle it so that most of the patch was not applied.
   36528 
   36529 	According to Ezequiel Garca, an architecture port based on the generic
   36530 	syscall ABI is in progress.
   36531 
   36532 	This reverts commit 61e426e87ac81be4b4ff9de581635b4ea585624f.
   36533 
   36534 2014-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   36535 
   36536 	tests: tighten sigaction check.
   36537 	* tests/sigaction.awk: Check that input conatins all expected lines.
   36538 
   36539 2014-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   36540 
   36541 	Fix sigaction reporting on non-x86 architectures.
   36542 	If SA_RESTORER is not defined by libc headers but defined by kernel
   36543 	headers, use the definition provided by kernel headers for proper
   36544 	sigaction decoding.
   36545 
   36546 	* signal.c [!SA_RESTORER]: Define to ASM_SA_RESTORER if the latter is
   36547 	defined, regardless of architecure.
   36548 
   36549 2014-02-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   36550 
   36551 	Check for SA_RESTORER definition in <asm/signal.h>
   36552 	Kernel header <asm/signal.h> cannot be included from regular code
   36553 	because it conflicts with libc headers, but SA_RESTORER is needed in
   36554 	signal.c, so SA_RESTORER value is forwarded from <asm/signal.h> to
   36555 	config.h using a configure check.
   36556 
   36557 	* configure.ac (ASM_SA_RESTORER): Define if SA_RESTORER is defined
   36558 	in <asm/signal.h>.
   36559 
   36560 2014-02-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   36561 
   36562 	arm: fix compilation warning.
   36563 	Fix "dereferencing type-punned pointer will break strict-aliasing rules"
   36564 	warning introduced by commit v4.8-54-g670b21b.
   36565 
   36566 	* signal.c (sys_sigreturn) [ARM]: Avoid dereferencing type-punned pointers.
   36567 
   36568 2014-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   36569 
   36570 	kexec: fix typo.
   36571 	* kexec.c (print_kexec_segments) [SUPPORTED_PERSONALITIES == 1]: Fix typo.
   36572 
   36573 2014-02-06  Ezequiel Garcia  <ezequiel (a] vanguardiasur.com.ar>
   36574 
   36575 	Add support for Altera's Nios-II softcore architecture.
   36576 	This commit adds strace support for Altera's Nios-II official
   36577 	kernel port as found in git://git.rocketboards.org/linux-socfpga.git
   36578 
   36579 	Notice that this an out-of-tree kernel architectural port, and uses the
   36580 	legacy (non-generic) system call ABI. In particular, the port doesn't
   36581 	support PTRACE_GETREGSET, so the implementation is based on PTRACE_GETREGS.
   36582 
   36583 	Given it's mandatory for new architectures to support the generic
   36584 	syscall ABI and PTRACE_GETREGSET, if the nios2 architecure is ever
   36585 	mainlined, the strace support will have to be re-factored accordingly.
   36586 
   36587 	* linux/nios2/ioctlent.h.in: New file.
   36588 	* linux/nios2/syscallent.h: Likewise.
   36589 	* Makefile.am (EXTRA_DIST): Add linux/nios2/ioctlent.h.in and
   36590 	linux/nios2/syscallent.h.
   36591 	* configure.ac: Add NIOS2 to the list of supported architectures.
   36592 	* defs.h [NIOS2]: Use register reading system.
   36593 	* process.c (struct_user_offsets): Add NIOS2 support.
   36594 	* syscall.c (get_regs, get_scno, get_syscall_args,
   36595 	get_syscall_result, get_error): Likewise.
   36596 	* util.c (change_syscall): Likewise.
   36597 	* mem.c (sys_getpagesize): Define on NIOS2.
   36598 	* system.c [NIOS2] (sys_cacheflush, sys_nios2cmpxchg): New functions.
   36599 
   36600 	Acked-by: Mike Frysinger <vapier (a] gentoo.org>
   36601 
   36602 2014-02-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   36603 
   36604 	Implement add_key, keyctl, and request_key decoding.
   36605 	* keyctl.c: New file.
   36606 	* linux/keyctl.h: Likewise.
   36607 	* Makefile.am (strace_SOURCES): Add keyctl.c.
   36608 	(EXTRA_DIST): Add linux/keyctl.h.
   36609 	* linux/dummy.h (sys_add_key, sys_keyctl, sys_request_key): Remove.
   36610 	* linux/syscall.h (sys_add_key, sys_keyctl, sys_request_key): New
   36611 	prototypes.
   36612 
   36613 	Implement ioprio_get and ioprio_set decoding.
   36614 	* ioprio.c: New file.
   36615 	* Makefile.am (strace_SOURCES): Add ioprio.c.
   36616 	* linux/dummy.h (sys_ioprio_get, sys_ioprio_set): Remove.
   36617 	* linux/syscall.h (sys_ioprio_get, sys_ioprio_set): New prototypes.
   36618 
   36619 	Implement finit_module decoding.
   36620 	* bjm.c (module_init_flags): New xlat structure.
   36621 	(sys_finit_module): New function.
   36622 	* linux/dummy.h (sys_finit_module): Remove.
   36623 	* linux/syscall.h (sys_finit_module): New prototype.
   36624 
   36625 	Cleanup inotify syscalls decoding.
   36626 	* linux/inotify.h: New file.
   36627 	* file.c (inotify_modes, inotify_init_flags, sys_inotify_add_watch,
   36628 	sys_inotify_rm_watch, sys_inotify_init1): Move...
   36629 	* inotify.c: ... here.
   36630 	(inotify_modes): Rename to inotify_flags, convert to XLAT form.
   36631 	(inotify_init_flags): Convert to XLAT form.
   36632 	* Makefile.am (strace_SOURCES): Add inotify.c.
   36633 	(EXTRA_DIST): Add linux/inotify.h.
   36634 
   36635 	Enhance reboot decoding.
   36636 	* linux/reboot.h: New file.
   36637 	* system.c (bootflags1, bootflags2, bootflags3, sys_reboot): Move...
   36638 	* reboot.c: ... here.
   36639 	(bootflags2, bootflags3): Update constants.
   36640 	* Makefile.am (strace_SOURCES): Add reboot.c.
   36641 	(EXTRA_DIST): Add linux/reboot.h.
   36642 
   36643 	Implement kexec_load decoding.
   36644 	* kexec.c: New file.
   36645 	* linux/kexec.h: Likewise.
   36646 	* Makefile.am (strace_SOURCES): Add kexec.c.
   36647 	(EXTRA_DIST): Add linux/kexec.h.
   36648 	* linux/dummy.h (sys_kexec_load): Remove.
   36649 	* linux/syscall.h (sys_kexec_load): New prototype.
   36650 
   36651 	Use prepared editions of recently imported linux headers.
   36652 	* linux/fanotify.h: Replace with edition prepared with headers_install.sh.
   36653 	* linux/personality.h: Likewise.
   36654 
   36655 	Implement fanotify_init and fanotify_mark decoding.
   36656 	* fanotify.c: New file.
   36657 	* linux/fanotify.h: Likewise.
   36658 	* Makefile.am (strace_SOURCES): Add fanotify.c.
   36659 	(EXTRA_DIST): Add linux/fanotify.h.
   36660 	* defs.h (print_dirfd): New prototype.
   36661 	* file.c (print_dirfd): Export.
   36662 	* linux/dummy.h (sys_fanotify_init, sys_fanotify_mark): Remove.
   36663 	* linux/syscall.h (sys_fanotify_init, sys_fanotify_mark): New
   36664 	prototypes.
   36665 	* pathtrace.c (pathtrace_match): Handle sys_fanotify_init and
   36666 	sys_fanotify_mark.
   36667 
   36668 	Use XLAT_END macro.
   36669 	Automatically update all xlat structures using the following sed regexp:
   36670 	s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/
   36671 
   36672 	Itroduce XLAT_END macro to make xlat structures more compact.
   36673 	* defs.h (XLAT_END): New macro.
   36674 
   36675 	Convert personality_options to XLAT form.
   36676 	* linux/personality.h: New file.
   36677 	* Makefile.am (EXTRA_DIST): Add it.
   36678 	* system.c: Include <linux/personality.h>.
   36679 	(personality_options): Update PER_* constants, convert to XLAT form.
   36680 
   36681 	Convert futexops to XLAT form.
   36682 	* process.c: Define FUTEX_*_PRIVATE macros.
   36683 	(futexops): Convert to XLAT form.
   36684 
   36685 	Convert sigev_value to XLAT form.
   36686 	* time.c (sigev_value): Convert to XLAT form.
   36687 	(printsigevent32, printsigevent): Update use of sigev_value.
   36688 
   36689 	Use XLAT macro.
   36690 	Automatically convert all xlat structures to XLAT form
   36691 	using the following sed regexp:
   36692 	s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/
   36693 
   36694 2014-02-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   36695 
   36696 	Introduce XLAT macro to ease maintenance of xlat structures.
   36697 	* defs.h (XLAT): New macro.
   36698 
   36699 	Suggested-by: Mike Frysinger <vapier (a] gentoo.org>
   36700 
   36701 2014-02-04  Stefan Srensen  <stefan.sorensen (a] spectralink.com>
   36702 
   36703 	Decode ptp ioctls.
   36704 	* defs.h (ptp_ioctl): New prototype.
   36705 	* ioctl.c (ioctl_decode): Call ptp_ioctl when code is '='.
   36706 	* Makefile.am (strace_SOURCES): Add ptp.c.
   36707 	(EXTRA_DIST): Add linux/ptp_clock.h.
   36708 	* ptp.c: New file.
   36709 	* linux/ptp_clock.h: New file.
   36710 
   36711 2014-02-03  Stefan Srensen  <stefan.sorensen (a] spectralink.com>
   36712 
   36713 	Decode dynamic posix clocks.
   36714 	* time.c (cpuclocknames): New xlat structure.
   36715 	(printclockname): New function that decodes posix clock names,
   36716 	including dynamic fd encoded clocks.
   36717 	(sys_clock_settime, sys_clock_gettime, sys_clock_nanosleep,
   36718 	sys_clock_adjtime, sys_timer_create, sys_timerfd, sys_timerfd_create):
   36719 	Use it.
   36720 
   36721 	Update ADJ_* constants.
   36722 	* time.c (adjtimex_modes): Add ADJ_TAI, ADJ_SETOFFSET, ADJ_MICRO,
   36723 	ADJ_NANO, ADJ_OFFSET_SS_READ.
   36724 
   36725 2014-02-02  Philippe Ombredanne  <pombredanne (a] nexb.com>
   36726 
   36727 	Add decoding of sockets descriptor 'paths' for network calls.
   36728 	* net.c (sys_bind, sys_listen, do_accept, sys_send, sys_sendto,
   36729 	sys_sendmsg, sys_sendmmsg, sys_recv, sys_recvfrom, sys_recvmsg,
   36730 	sys_recvmmsg, sys_shutdown, sys_getsockopt, sys_setsockopt): Decode
   36731 	socket descriptor arguments using printfd.
   36732 	* pathtrace.c (pathtrace_match): Also check TRACE_NETWORK syscalls
   36733 	that take socket descriptor arguments.
   36734 	* tests/net-fd.test: New test for socket descriptor arguments decoding.
   36735 	* tests/Makefile.am (TESTS): Add net-fd.test.
   36736 	(net-fd.log): New dependency on net.log.
   36737 
   36738 2014-02-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   36739 
   36740 	tests: rename all tests so that their names end in .test suffix.
   36741 	Due to automake limitations, some features work only for tests
   36742 	that end in one of the suffixes listed in TEST_EXTENSIONS.
   36743 
   36744 	* tests/detach-running: Rename to detach-running.test.
   36745 	* tests/detach-sleeping: Rename to detach-sleeping.test.
   36746 	* tests/detach-stopped: Rename to detach-stopped.test.
   36747 	* tests/net: Rename to net.test.
   36748 	* tests/ptrace_setoptions: Rename to ptrace_setoptions.test.
   36749 	* tests/qual_syscall: Rename to qual_syscall.test.
   36750 	* tests/sigaction.sh: Rename to sigaction.test.
   36751 	* tests/stat: Rename to stat.test.
   36752 	* tests/strace-f: Rename to strace-f.test.
   36753 	* tests/Makefile.am (TESTS): Update.
   36754 	(LOG_COMPILER): Rename to TEST_LOG_COMPILER.
   36755 
   36756 2014-01-31  Mike Frysinger  <vapier (a] gentoo.org>
   36757 
   36758 	net: add more sockopt options.
   36759 	This syncs with the defines as available in linux-3.13.
   36760 
   36761 	* net.c (sockipoptions): Add IP_IPSEC_POLICY, IP_XFRM_POLICY,
   36762 	IP_PASSSEC, IP_TRANSPARENT, IP_ORIGDSTADDR, IP_RECVORIGDSTADDR,
   36763 	IP_MINTTL, IP_NODEFRAG, IP_UNBLOCK_SOURCE, IP_BLOCK_SOURCE,
   36764 	IP_ADD_SOURCE_MEMBERSHIP, IP_DROP_SOURCE_MEMBERSHIP, MCAST_JOIN_GROUP,
   36765 	MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, MCAST_LEAVE_GROUP,
   36766 	MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, IP_MULTICAST_ALL,
   36767 	IP_UNICAST_IF.
   36768 
   36769 2014-01-08  Chris Dearman  <chris.dearman (a] imgtec.com>
   36770 
   36771 	mips: fix sigaction reporting.
   36772 	MIPS userland uses the same sigaction structure with a full signal
   36773 	mask for old_sigaction and new_sigaction and does does not have
   36774 	an sa_restorer field.
   36775 
   36776 	These changes have been tested on MIPS O32 big/little endian, MIPS N64
   36777 	big endian and x86-64.
   36778 
   36779 	* signal.c (old_sigaction) [MIPS]: Add definition for MIPS.
   36780 	(decode_old_sigaction) [MIPS]: Print sa_mask according to its definition.
   36781 	(new_sigaction) [MIPS]: Add definition for MIPS.
   36782 
   36783 2014-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   36784 
   36785 	Factor out struct sigaction printing code.
   36786 	* signal.c [HAVE_SIGACTION] (decode_old_sigaction): New function.
   36787 	[HAVE_SIGACTION] (sys_sigaction): Use it.
   36788 	(decode_new_sigaction): New function.
   36789 	(sys_rt_sigaction): Use it.
   36790 
   36791 2014-01-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   36792 
   36793 	tests: add a test for rt_sigaction output.
   36794 	Since "struct sigaction" varies between architectures, rt_sigaction
   36795 	decoding sometimes produces incorrect output.  This test is expected
   36796 	to catch basic rt_sigaction decoding bugs.
   36797 
   36798 	Based on a patch proposed by Chris Dearman.
   36799 
   36800 	* tests/sigaction.c: New file.
   36801 	* tests/sigaction.awk: Likewise.
   36802 	* tests/sigaction.sh: New test.
   36803 	* tests/Makefile.am (check_PROGRAMS): Add sigaction.
   36804 	(TESTS): Add sigaction.sh.
   36805 	(EXTRA_DIST): Add sigaction.awk.
   36806 	* tests/.gitignore: Add sigaction.
   36807 
   36808 2014-01-05  Kirill A. Shutemov  <kirill.shutemov (a] linux.intel.com>
   36809 
   36810 	mem: add missed MAP_HUGETLB mmap flag.
   36811 	* mem.c (mmap_flags): Add MAP_HUGETLB mmap flag.
   36812 
   36813 	Acked-by: Mike Frysinger <vapier (a] gentoo.org>
   36814 
   36815 2013-12-31  Mike Frysinger  <vapier (a] gentoo.org>
   36816 
   36817 	Delete old PTRACE_{PEEK,POKE}USR logic.
   36818 	The code base has settled on PTRACE_{PEEK,POKE}USER (with an E) and has
   36819 	logic in defs.h to make sure it's set sanely.  Delete this old logic as
   36820 	the defs.h takes care of it now.
   36821 
   36822 	* process.c: Delete PTRACE_PEEKUSR/PTRACE_POKEUSR defines.
   36823 	* signal.c: Likewise.
   36824 	* syscall.c: Delete PTRACE_PEEKUSR define.
   36825 	* util.c: Likewise.
   36826 
   36827 2013-12-31  Mike Frysinger  <vapier (a] gentoo.org>
   36828 
   36829 	Decode the O_PATH flag.
   36830 	* file.c (open_mode_flags): Add O_PATH.
   36831 
   36832 2013-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   36833 
   36834 	Remove unused configure checks.
   36835 	* configure.ac (AC_CHECK_FUNCS): Remove _sys_siglist and sys_siglist.
   36836 	(AC_CHECK_DECLS): Likewise.
   36837 
   36838 2013-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   36839 
   36840 	Assume that <sys/ptrace.h> provides a valid ptrace prototype.
   36841 	We used to explicitly list architectures where <sys/ptrace.h> from glibc
   36842 	is known to provide a valid prototype for ptrace, and use a homegrown
   36843 	replacement for all the rest.  Situation seems to be better nowadays,
   36844 	glibc is not the only libc available, so let's use ptrace prototype from
   36845 	<sys/ptrace.h> by default, leaving the replacement for rare broken cases
   36846 	if any.
   36847 
   36848 	* defs.h: Use ptrace prototype workaround iff
   36849 	NEED_PTRACE_PROTOTYPE_WORKAROUND is defined.
   36850 
   36851 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36852 
   36853 	Stop using _LFS64_LARGEFILE.
   36854 	There is only one place left in the code where strace guesses whether
   36855 	libc provides LFS64 functions and structures.  The most natural thing to
   36856 	do there is to check for _LARGEFILE64_SOURCE - the macro provided by
   36857 	glibc.  Other libc implementations that provide nondegenerate LFS64
   36858 	interfaces are expected to define this macro as well.
   36859 
   36860 	* defs.h (_LFS64_LARGEFILE): Remove.
   36861 	* strace.c: Use _LARGEFILE64_SOURCE instead of _LFS64_LARGEFILE.
   36862 
   36863 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36864 
   36865 	Define truncate64, ftruncate64, and getdents64 decoders unconditionally.
   36866 	These decoders are referenced by most architectures, there were no
   36867 	undefined references so far because _LFS64_LARGEFILE appears to be
   36868 	always defined by glibc when _GNU_SOURCE is defined.
   36869 
   36870 	* file.c (sys_truncate64, sys_ftruncate64, sys_getdents64): Define
   36871 	unconditionally.
   36872 
   36873 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36874 
   36875 	Define printflock64 only if it is referenced by other code.
   36876 	* configure.ac (AC_CHECK_TYPES): Add struct flock64.
   36877 	* desc.c (HAVE_F_SETLK64, HAVE_F_SETLKW64, HAVE_F_GETLK64): New macros.
   36878 	[!HAVE_STRUCT_FLOCK64] (struct flock64): Define.
   36879 	(printflock64): Define only if referenced by other code.
   36880 	(sys_fcntl): Handle F_FREESP64, F_SETLK64, F_SETLKW64, and F_GETLK64 iff
   36881 	these constants are defined and differ from their non-64bit versions.
   36882 
   36883 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36884 
   36885 	Make PTRACE_PEEKUSER/PTRACE_POKEUSER checks less glibc specific.
   36886 	* configure.ac (AC_CHECK_DECLS): Add PTRACE_PEEKUSER and
   36887 	PTRACE_POKEUSER.
   36888 	* defs.h: Define PTRACE_PEEKUSER and PTRACE_POKEUSER only if
   36889 	they are not provided by <sys/ptrace.h>.
   36890 
   36891 	Reported by John Spencer.
   36892 
   36893 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36894 
   36895 	Remove unneeded redefinitions of IPPROTO_* macros.
   36896 	IPPROTO_* macros are defined by <netinet/in.h>, no need to redefine
   36897 	them.
   36898 
   36899 	* net.c (IPPROTO_EGP, IPPROTO_PUP, IPPROTO_IDP, IPPROTO_IGMP,
   36900 	IPPROTO_RAW, IPPROTO_MAX): Remove.
   36901 
   36902 	Reported by John Spencer.
   36903 
   36904 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36905 
   36906 	Remove unused AC_OFF_T_IS_LONG_LONG configure check.
   36907 	* configure.ac: Remove AC_OFF_T_IS_LONG_LONG.
   36908 	* m4/long_long.m4: Likewise.
   36909 
   36910 	Remove unused code.
   36911 	* configure.ac (AC_CHECK_TYPES): Remove struct opthdr and
   36912 	struct t_opthdr.
   36913 	* net.c (print_sock_optmgmt): Remove.
   36914 
   36915 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36916 
   36917 	Use struct sigcontext instead of struct sigcontext_struct.
   36918 	* configure.ac (AC_CHECK_TYPES): Remove struct sigcontext_struct.
   36919 	* signal.c (sys_sigreturn) [S390 || S390X || POWERPC || ALPHA): Replace
   36920 	struct sigcontext_struct with struct sigcontext.
   36921 
   36922 	Reported by John Spencer.
   36923 
   36924 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36925 
   36926 	Use standard names of sched_param structure members.
   36927 	* process.c (sys_sched_setscheduler, sys_sched_getparam,
   36928 	sys_sched_setparam): Use portable struct sched_param member name
   36929 	sched_priority instead of glibc specific __sched_priority.
   36930 
   36931 	Reported by John Spencer.
   36932 
   36933 2013-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   36934 
   36935 	Make SIGEV_THREAD_ID decoding less glibc specific.
   36936 	SIGEV_THREAD_ID decoding requires access to an internal member of
   36937 	struct sigevent.  There seems to be no portable way to do it besides
   36938 	adding a configure check.
   36939 
   36940 	* configure.ac (AC_CHECK_MEMBERS): Check for
   36941 	struct sigevent._sigev_un._pad and struct sigevent.__pad.
   36942 	* time.c (printsigevent): Use an appropriate struct sigevent member
   36943 	to print thread id.
   36944 
   36945 	Reported by John Spencer.
   36946 
   36947 2013-11-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   36948 
   36949 	Remove unused configure checks.
   36950 	* configure.ac (AC_CHECK_MEMBERS): Remove T_conn_res.QUEUE_ptr,
   36951 	T_conn_res.ACCEPTOR_id, dqblk.dqb_curblocks, sigcontext.sc_hi2.
   36952 
   36953 2013-11-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   36954 
   36955 	Assume "long long" availability.
   36956 	Most of the code already uses long long types unconditionally.
   36957 
   36958 	* configure.ac: Remove the check for long long.
   36959 	* file.c (printstat64): Remove HAVE_LONG_LONG checks, use %llu format
   36960 	string unconditionally.
   36961 
   36962 2013-11-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   36963 
   36964 	Include <sys/poll.h> only if there is no <poll.h>
   36965 	* pathtrace.c: Do not include <sys/poll.h> if <poll.h> is available.
   36966 	* stream.c: Likewise.
   36967 
   36968 	Move io_* syscalls decoding to a separate file.
   36969 	* desc.c (sys_io_setup, sys_io_destroy, sys_io_submit, sys_io_cancel,
   36970 	sys_io_getevents, declarations from libaio.h): Move to ...
   36971 	* aio.c: new file.
   36972 	* Makefile.am (strace_SOURCES): Add aio.c.
   36973 
   36974 2013-11-11  Denys Vlasenko  <dvlasenk (a] redhat.com>
   36975 
   36976 	Stop using external libaio.h.
   36977 	This change incorporates a partial copy instead
   36978 	of using external libaio.h.
   36979 	Why?
   36980 	Because we want to properly decode 32-bit aio calls
   36981 	by 64-bit strace. For that, we need more definitions than
   36982 	libaio.h provides.
   36983 	(These defs are not done yet, but will eventually be done).
   36984 	Keeping our local 32-bit compat defs in sync with libaio.h
   36985 	_without seeing libaio structs_ is hard/more bug prone.
   36986 	A smaller benefit is that we don't need libaio installed.
   36987 
   36988 2013-11-11  Denys Vlasenko  <dvlasenk (a] redhat.com>
   36989 
   36990 	sys_io_submit: simplify iocb_cmd_lookup() helper.
   36991 	This helper returns two values (a string and an enum).
   36992 	The caller prints the string. It's simpler to just print
   36993 	the string in the caller itself. This eliminates
   36994 	"return by reference" and more importantly, an intermediate
   36995 	static string buffer for the string result.
   36996 
   36997 	Since function of the helper is different now,
   36998 	it is renamed to tprint_lio_opcode().
   36999 
   37000 2013-11-11  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37001 
   37002 	sys_io_submit: stop traversing iocb vector after first failure.
   37003 	The program may use a very large nr but supply either outright
   37004 	invalid iocbpp[], or one with far fewer elements than nr.
   37005 	We used to try reading iocbpp[i] until i == nr.
   37006 	With this change, we stop on the first failure.
   37007 
   37008 2013-11-09  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37009 
   37010 	Fix pathtrace_match() to match recent fixes to select decoding.
   37011 
   37012 	Fix select decoding on e.g. 32-bit ppc process by 64-bit strace.
   37013 	Added next_set_bit() function which finds the next set bit,
   37014 	properly taking into account word size of the traced process.
   37015 	Use it in decode_select() instead of fd_isset().
   37016 	Also, properly round fdsize up to word size of traced process,
   37017 	not to strace's word size.
   37018 
   37019 2013-11-06  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37020 
   37021 	Speed up and explain fd_isset()
   37022 
   37023 2013-11-05  Dr. David Alan Gilbert  <dave (a] treblig.org>
   37024 
   37025 	Add a test for the latest select decoding fix.
   37026 	* test/select.c (main): Add a test for nfds larger than FD_SETSIZE.
   37027 
   37028 2013-11-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   37029 
   37030 	Fix select decoding for glibc in _FORTIFY_SOURCE mode.
   37031 	glibc in _FORTIFY_SOURCE mode raises SIGABRT when descriptor greater
   37032 	or equal to FD_SETSIZE is passed to FD_ISSET.  Select family syscalls,
   37033 	however, can legitimately accept such descriptors.  To overcome this
   37034 	limitation, we have to replace FD_ISSET with an equivalent that imposes
   37035 	no such restrictions.
   37036 
   37037 	* desc.c (fd_isset): New function.
   37038 	(decode_select): Use it instead of FD_ISSET.
   37039 
   37040 2013-11-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   37041 
   37042 	More select decoding fixes.
   37043 	* desc.c (decode_select): Actually print arg[0] as int on entering
   37044 	syscall.  When arg[0] is negative, do not attempt to fetch and decode
   37045 	descriptor sets on entering syscall, kernel will reject it anyway.
   37046 	On exiting syscall, stop checking descriptor sets as soon as all
   37047 	returned descriptors are found.
   37048 
   37049 2013-11-05  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37050 
   37051 	Truncate arg[0] to int in select decoding.
   37052 	This matches kernel's behavior.
   37053 
   37054 	test/select.c: make comment more understandable.
   37055 
   37056 2013-11-05  Dr. David Alan Gilbert  <dave (a] treblig.org>
   37057 
   37058 	Fix select decoding with bogus (huge or negative) nfds.
   37059 	We used to allocate and fetch bit arrays using a sanitized
   37060 	length, but then iterate over them with "j < arg[0]" condition,
   37061 	where arg[0] is not sanitized. This segfaults if arg[0] is huge
   37062 	or negative. This change fixes this.
   37063 
   37064 	Add test/select.c to capture the case.
   37065 
   37066 2013-09-26  Ali Polatel  <alip (a] exherbo.org>
   37067 
   37068 	Work around conflict between <sys/ptrace.h> and <linux/ptrace.h>
   37069 	Since glibc-2.18~39 <sys/ptrace.h> defines ptrace_peeksiginfo_args
   37070 	which collides with <linux/ptrace.h>.
   37071 
   37072 	* configure.ac: Check for `struct ptrace_peeksiginfo_args' in
   37073 	<sys/ptrace.h>.
   37074 	* process.c: Work around potential conflict between <sys/ptrace.h>
   37075 	and <linux/ptrace.h> by redefining ptrace_peeksiginfo_args.
   37076 	* signal.c: Likewise.
   37077 	* syscall.c: Likewise.
   37078 	* util.c: Likewise.
   37079 
   37080 2013-09-11  Vineet Gupta  <Vineet.Gupta1 (a] synopsys.com>
   37081 
   37082 	Add support for ARC Cores from Synopsys.
   37083 	Take #2 on mainlining strace support for ARC (last one was 4.6 based back
   37084 	in March 2011), see
   37085 	http://sourceforge.net/p/strace/mailman/message/27210168/
   37086 
   37087 	The syscall ABI is asm-generic/unistd.h based (so no legacy syscalls),
   37088 	hence very similar to metag port.
   37089 
   37090 	test/* all seem to work well.
   37091 
   37092 	* linux/arc/ioctlent.h.in: New file.
   37093 	* linux/arc/syscallent.h: Likewise.
   37094 	* Makefile.am (EXTRA_DIST): Add linux/arc/ioctlent.h.in and
   37095 	linux/arc/syscallent.h.
   37096 	* configure.ac: Add ARC to the list of supported architectures.
   37097 	* defs.h: Add ARC support.
   37098 	* process.c (struct_user_offsets): Likewise.
   37099 	* signal.c (sys_sigreturn): Likewise.
   37100 	* syscall.c (print_pc, get_regset, get_regs, get_scno, get_syscall_args,
   37101 	get_syscall_result, get_error): Likewise.
   37102 	* util.c (change_syscall): Likewise.
   37103 
   37104 	Acked-by: Mike Frysinger <vapier (a] gentoo.org>
   37105 
   37106 2013-09-11  William Manley  <william.manley (a] youview.com>
   37107 
   37108 	Add support for decoding sync_file_range.
   37109 	* file.c (sync_file_range_flags): New xlat structure.
   37110 	(sys_sync_file_range, sys_sync_file_range2): New functions.
   37111 	* linux/syscall.h (sys_sync_file_range, sys_sync_file_range2): New
   37112 	prototypes.
   37113 	* linux/dummy.h (sys_sync_file_range, sys_sync_file_range2): Remove.
   37114 	* linux/mips/syscallent-o32.h: Set the number of sync_file_range
   37115 	arguments to 7.
   37116 
   37117 2013-09-11  Mike Frysinger  <vapier (a] gentoo.org>
   37118 
   37119 	fanotify_mark: fix number of args for 32bit arches.
   37120 	The fanotify_mark func takes a 64bit mask, so 32bit arches have to split
   37121 	it up into two fields.  When the syscall was added, it was listed as only
   37122 	having 5 fields total (since that's correct for 64bit systems).
   37123 
   37124 	* linux/arm/syscallent.h: Set the number of fanotify_mark arguments to 6.
   37125 	* linux/bfin/syscallent.h: Likewise.
   37126 	* linux/hppa/syscallent.h: Likewise.
   37127 	* linux/i386/syscallent.h: Likewise.
   37128 	* linux/m68k/syscallent.h: Likewise.
   37129 	* linux/metag/syscallent.h: Likewise.
   37130 	* linux/microblaze/syscallent.h: Likewise.
   37131 	* linux/mips/syscallent-o32.h: Likewise.
   37132 	* linux/or1k/syscallent.h: Likewise.
   37133 	* linux/powerpc/syscallent.h: Likewise.
   37134 	* linux/s390/syscallent.h: Likewise.
   37135 	* linux/sh/syscallent.h: Likewise.
   37136 	* linux/sparc/syscallent.h: Likewise.
   37137 	* linux/tile/syscallent1.h: Likewise.
   37138 
   37139 	Acked-by: Chris Metcalf <cmetcalf (a] tilera.com> [for tile]
   37140 
   37141 2013-09-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   37142 
   37143 	x86, x86_64: fix compilation warnings.
   37144 	Fix "dereferencing type-punned pointer will break strict-aliasing rules"
   37145 	warnings introduced by commit v4.8-52-gb51f364.
   37146 
   37147 	* signal.c (sys_sigreturn): Avoid dereferencing type-punned pointers.
   37148 
   37149 2013-07-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37150 
   37151 	Remove rt parameter from [s]printsigmask()
   37152 	In almost all cases, the parameter was 1 ("decode RT sigs too").
   37153 	This change hardwires it to be 1.
   37154 
   37155 	The cases where it was 0 are, and why the change to "decode RT sigs too"
   37156 	is fine:
   37157 
   37158 	IA64: 64-bit arch, all 64 signals fit in one word in any case.
   37159 	S390[x]: sc.oldmask is a sigset_t on kernel side,
   37160 		(sigset_t *)&sc.oldmask[0] does contain all 64 signals.
   37161 	TILE: uc.uc_sigmask is a sigset_t on kernel side,
   37162 		memcpy(&sigm, &uc.uc_sigmask, NSIG / 8) copies all 64 signals.
   37163 
   37164 2013-07-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37165 
   37166 	Convert some uses of long_to_sigmask+printsigmask to sprintsigmask_long.
   37167 	This allows to drop long_to_sigmask function,
   37168 	and a whole bunch of sigset_t variables.
   37169 
   37170 	Simplify some sigmask manipulations.
   37171 
   37172 	Add compat support for sys_pselect6.
   37173 
   37174 	I386: fix signedness mismatch warning.
   37175 	&i386_regs.esp is a pointer to long, not unsigned long.
   37176 	It needs a cast.
   37177 
   37178 2013-07-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37179 
   37180 	Fix sigset printing via print_sigset().
   37181 	Replace print_sigset() with print_sigset_addr_len(),
   37182 	which takes not only addr, but also len parameter.
   37183 	This allows us to drop "do we need to print RT signals?" parameter,
   37184 	and this fixes RT signals printing in many syscalls.
   37185 
   37186 	sys_epoll_pwait: print RT signals too, print sigmask size argument.
   37187 
   37188 	sys_sigprocmask: print_sigset -> print_sigset_addr_len(current_wordsize),
   37189 	no change in functionality.
   37190 
   37191 	sys_sigpending: use print_sigset_addr_len(current_wordsize)
   37192 	instead of open-coding it.
   37193 
   37194 	sys_rt_sigprocmask: use print_sigset_addr_len instead of open-coding it.
   37195 	sys_rt_sigpending: ditto.
   37196 	sys_rt_sigsuspend: ditto.
   37197 	sys_rt_sigtimedwait: ditto.
   37198 
   37199 	do_signalfd: print_sigset -> print_sigset_addr_len. This fixes
   37200 	RT signals printing (wasn't showing them before).
   37201 
   37202 	sys_ppoll: ditto.
   37203 
   37204 	copy_sigset_len() is folded into its only user, print_sigset_addr_len(),
   37205 	and copy_sigset() is gone.
   37206 
   37207 	While at it, checked kernel sources and noted where kernel enforces
   37208 	sigset_size == NSIG / 8 (== sizeof(kernel_sigset_t)),
   37209 	and where it allows word-sized sigset_size ([rt_]sigpending).
   37210 
   37211 2013-07-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37212 
   37213 	sys_rt_sigaction: fix sigset copying.
   37214 	In practice, we always copy as many bytes as syscall param says
   37215 	(8, or 16 on mips). However, malicious program can call sigaction
   37216 	with wrong sigset size. Such syscall will result in EINVAL,
   37217 	but we (strace) end up copying 128 bytes (sizeof(sigset_t)),
   37218 	which copyes some garbage from stack after struct sigaction.
   37219 
   37220 	Now we always copy NSIG / 8 bytes (which is 8 bytes, or 16 on mips).
   37221 
   37222 2013-07-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37223 
   37224 	ARM: remove wrong NSIG = 32 define.
   37225 	ARM in fact has 64 signals (1..64), and NSIG should be 65
   37226 	(as usual, rememebr that NSIG_libc == NSIG_kernel+1).
   37227 
   37228 	I carefully reviewed all usages of NSIG. In syscall.c,
   37229 	the only usage is:
   37230 	        for (i = 0; i <= NSIG; i++)
   37231 	                if (strcasecmp(s, signame(i) + 3) == 0)...
   37232 	which is safe even if NSIG is way too big - signame(i)
   37233 	returns a well-formed string for any i.
   37234 
   37235 	In signal.c, memcpy(&sigset, &sc.sc_mask, NSIG / 8) is used by
   37236 	IA64 and TILE code, so ARM change can't affect it. And final
   37237 	usage is:
   37238 	 struct new_sigaction::unsigned long sa_mask[NSIG / sizeof(long)];
   37239 	It will grow on ARM (and become correct in the process).
   37240 	Its only use is
   37241 	 memcpy(&sigset, &sa.sa_mask, NSIG / 8);
   37242 	 printsigmask(&sigset, 1);
   37243 	which used to copy garbage in high bits, now it will copy actual data.
   37244 
   37245 2013-07-17  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37246 
   37247 	ARM: fix sigreturn decoding.
   37248 	Decoding of test/sigreturn testcase:
   37249 	Was:
   37250 	sigreturn() (mask [QUIT TRAP ABRT BUS SEGV USR2 PIPE STKFLT STOP XCPU VTALRM PROF WINCH IO PWR RTMIN]) = 0
   37251 	Now:
   37252 	sigreturn() (mask [CHLD RT_1 RT_3 RT_31 RT_32]) = 0
   37253 
   37254 2013-07-16  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37255 
   37256 	Group USE_CUSTOM_PRINTF define with other tweakables.
   37257 	No code changes.
   37258 
   37259 2013-07-16  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37260 
   37261 	Improve sigreturn decoding on x86 to show RT signal bits too.
   37262 	This includes decoding of 32-bit sigreturn by 64-bit strace,
   37263 	which previously wasn't done.
   37264 
   37265 	Added a test for it.
   37266 
   37267 2013-07-12  Anton Blanchard  <anton (a] samba.org>
   37268 
   37269 	powerpc: enhance 32/64bit detection.
   37270 	We were using uname to determine if userspace was 32 or 64bit.
   37271 	This fails when we have a 64bit kernel and a 32bit userspace.
   37272 
   37273 	* configure.ac (powerpc*): Similar to x86, use a runtime test
   37274 	to determine if we are 32 or 64bit.
   37275 
   37276 2013-07-12  Anton Blanchard  <anton (a] samba.org>
   37277 
   37278 	powerpc: fix some compiler warnings.
   37279 	Fix a number of differing signedness warnings when building on
   37280 	powerpc.
   37281 
   37282 	powerpc: fix iflag build issue (static -> extern)
   37283 
   37284 2013-07-10  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37285 
   37286 	PTRACE_SEIZE can set ptrace options immediately, use this feature.
   37287 	This eliminates some rare bugs, such as post-execve SIGTRAP
   37288 	generation when we attach to a process, and it manages to finish
   37289 	execve'ing before we set TRACEEXEC option to suppress that.
   37290 
   37291 2013-07-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37292 
   37293 	If -o|logger is in use, exit trace loop if nprocs == 0.
   37294 
   37295 	Exit trace loop if got ECHILD, not if nprocs == 0.
   37296 	Comment gives a testcase which wasn't handled correctly
   37297 	by the old code.
   37298 
   37299 2013-07-07  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37300 
   37301 	s390[x]: get rid of syscall_mode, delete code which never triggers.
   37302 	Before this change, the logic was as follows:
   37303 	syscall entry:
   37304 	  get_scno:
   37305 	    syscall_mode = GPR2
   37306 	    scno = syscall_mode unless syscall_mode == -ENOSYS
   37307 	    (if -ENOSYS, scn is retrieved by decoding current insn)
   37308 	  fixup:
   37309 	    gpr2 = GPR2
   37310 	    syscall_mode = scno unless syscall_mode == -ENOSYS
   37311 	    if (gpr2 != syscall_mode) stray_entry
   37312 	syscall exit:
   37313 	  get_res:
   37314 	    gpr2 = GRP2
   37315 	  fixup:
   37316 	    syscall_mode = scno unless syscall_mode == -ENOSYS
   37317 	    if (WAITEXECVE && gpr2 in (-ENOSYS, scno)) gpr2 = 0;
   37318 	  get_error:
   37319 	    gpr2 is retval
   37320 
   37321 	Entry fixup's if() can never trigger:
   37322 	regardless whether GPR2 is -ENOSYS or not, syscall_mode is always
   37323 	equal to GRP2 value there. So it can be removed.
   37324 
   37325 	On sysexit path, syscall mode is never used.
   37326 
   37327 	Therefore, syscall_mode variable is deleted. grp2 is read from
   37328 	GPR2 register in get_scno, redundant read in entry fixup is removed.
   37329 	As a result, entry fixup's s390 code block vanishes completely.
   37330 
   37331 	gpr2 variable is renamed s390_gpr2 to match the convention used
   37332 	by other arches.
   37333 
   37334 2013-07-04  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37335 
   37336 	ARM: add STRACE_KNOWS_ONLY_EABI define which can be used to omit OABI support
   37337 
   37338 	Add paranoia check before passing a long to pid2tcb(int pid)
   37339 
   37340 2013-07-02  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37341 
   37342 	In debug output, show waitpid status with 6 hex digits, not 4.
   37343 	This shows event byte values better (without variable offset):
   37344 
   37345 	 [wait(0x01057f) = 29491] WIFSTOPPED,sig=SIGTRAP,EVENT_FORK (1)
   37346 	 [wait(0x80057f) = 29492] WIFSTOPPED,sig=SIGTRAP,EVENT_STOP (128)
   37347 	         ^^
   37348 
   37349 2013-07-02  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37350 
   37351 	Replace suspicious popen_pid assignment with an obviously correct one.
   37352 	popen_pid = vfork() does work correctly, but for a subtle reason
   37353 	that wrong assignment of 0 happens in the child _first_,
   37354 	and _then_ correct value overwrites it in the parent.
   37355 
   37356 	(And in a hyphothetical system where vfork = fork,
   37357 	popen_pid wouldn't be shared, so it will also be ok.)
   37358 
   37359 	However, it's not necessary to be difficult.
   37360 	This change makes it so that assignment is done only in parent.
   37361 
   37362 2013-07-01  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37363 
   37364 	Convert trace() from returning int to returning void.
   37365 	The cleanup sequence in error cases, and on normal code path
   37366 	was nearly the same, no point in duplicating it.
   37367 
   37368 	Remove ia64-specific printing of current address on signal delivery.
   37369 	The address is printed anyway by printleader() if -i is active.
   37370 
   37371 	Rename ia32 to ia64_ia32mode, and make it bool, not long.
   37372 	Grepping for just ia32 was turning up many false positives.
   37373 
   37374 2013-06-30  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37375 
   37376 	Fold is_restart_error() into its sole user.
   37377 
   37378 2013-06-29  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37379 
   37380 	Update qemu_multiarch_testing/README.
   37381 
   37382 2013-06-28  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37383 
   37384 	sys_clone: add a comment about CLONE_PTRACE and CLONE_UNTRACED.
   37385 	No code changes.
   37386 
   37387 	POWERPC: get rid of "static long ppc_result"
   37388 
   37389 	POWERPC: read ppc_regs.nip if -i.
   37390 
   37391 	POWERPC: if GETREGS fails with EIO, don't try it again.
   37392 
   37393 	Get rid of powerpc_getreg(), it's a copy of upeek()
   37394 
   37395 	Change upeek() to take pid, not full tcp.
   37396 	This will be used by next change.
   37397 
   37398 2013-06-26  Anton Blanchard  <anton (a] samba.org>
   37399 
   37400 	powerpc: Provide a fallback for old kernels without PTRACE_GETREGS.
   37401 	PTRACE_GETREGS was added to the ppc kernel in 2.6.23. In order to
   37402 	provide backward compatibility for very old kernels, add a manual
   37403 	fallback.
   37404 
   37405 	* syscall.c (powerpc_getreg, powerpc_getregs_old): New functions.
   37406 	(get_regs): Call powerpc_getregs_old if PTRACE_GETREGS is not supported.
   37407 
   37408 2013-06-26  Anton Blanchard  <anton (a] samba.org>
   37409 
   37410 	powerpc: Use PTRACE_GETREGS to fetch all registers.
   37411 	* defs.h: declare ppc_regs and get_regs_error.
   37412 	* signal.c (sys_sigreturn): Use ppc_regs instead of upeek.
   37413 	* syscall.c: define ppc_regs.
   37414 	(printcall): Use ppc_regs instead of upeek.
   37415 	(get_scno): Replace multiple upeek calls with one PTRACE_GETREGS call.
   37416 	(get_syscall_result): Likewise.
   37417 
   37418 2013-06-26  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37419 
   37420 	Another manpage tweak.
   37421 
   37422 	Manpage update.
   37423 
   37424 	Update build_static_example.sh.
   37425 	Now it also contains a tested example of i686 build on 64-bit host.
   37426 
   37427 	In -f mode, do not assume that new pid is stopped - handle exits too.
   37428 
   37429 2013-06-26  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37430 
   37431 	Set strace_child only in the right branch.
   37432 	"strace_child = pid" assignment was racing in NOMMU case
   37433 	because of vfork (no way to know which process would win).
   37434 
   37435 	After this change, strace_child is set to nonzero only
   37436 	in one process after [v]fork.
   37437 
   37438 2013-06-26  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37439 
   37440 	Get rid of TCB_INUSE and TCB_STRACE_CHILD.
   37441 	We can use tcb::pid == 0 as an indicator of free tcb,
   37442 	and we already have strace_child variable which holds
   37443 	pid of our child, if any.
   37444 
   37445 2013-06-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37446 
   37447 	Fix debug output of wait4 result (was reusing buf[] on unknown events)
   37448 
   37449 	Show PTRACE_EVENT_STOP correctly in debug output.
   37450 
   37451 2013-06-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37452 
   37453 	Panic a bit less when we see an unknown pid.
   37454 	I stumbeld over this case when I used "exec stace ...".
   37455 
   37456 	* strace.c (trace): Do not exit if we see an unknown pid in wait4.
   37457 
   37458 2013-06-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37459 
   37460 	detach(): Reorganize code. Logic is the same.
   37461 	* strace.c (detach): Use goto's instead of excessive nesting.
   37462 	Drop sigstop_expected and interrupt_done variables.
   37463 
   37464 	Eat pending SIGSTOP _before_ PTRACE_DETACH in detach()
   37465 	* strace.c (detach): If TCB_IGNORE_ONE_SIGSTOP is set,
   37466 	di not PTRACE_DETACH - wait for SIGSTOP first.
   37467 
   37468 2013-06-20  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37469 
   37470 	detach(): warn if we see ECHILD from waitpid.
   37471 	* strace.c (detach): Warn if we see ECHILD from waitpid.
   37472 	Explain in comments that we don't normally expect !WIFSTOPPED
   37473 	either, and also that PTRACE_CONT failure isn't expected
   37474 	(the "break" there is a "I'm confused, bailing out" code style)..
   37475 
   37476 	Improve error messages in detach()
   37477 	* strace.c (detach): Change return type from int to void.
   37478 	Improve error meesages: show PID, tell exactly which operation fails.
   37479 
   37480 2013-06-20  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37481 
   37482 	Remove workarounds for ancient kernels lacking __WALL.
   37483 	__WALL is available and working at least since 2.4 kernels: 10 years ago.
   37484 
   37485 	* strace (detach): Remove workarounds for ancient kernels lacking __WALL.
   37486 	Add missing EINTR check.
   37487 	(trace): Remove workarounds for ancient kernels lacking __WALL.
   37488 	Remove redundant double error printout.
   37489 
   37490 2013-06-20  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37491 
   37492 	USE_SEIZE: fix detaching from stopped processes.
   37493 	V3: split SEIZE/!SEIZE code paths to reduce confusion.
   37494 	Extensively comment every possible case.
   37495 	Verified that all tests/detach* tests work in both SEIZE and !SEIZE
   37496 	cases.
   37497 
   37498 	* strace.c (detach): If PTRACE_SEIZE API is in use, stop the tracee
   37499 	using PTRACE_INTERRUPT instead of sending it a SIGSTOP.
   37500 	In a subsequent waitpid loop, correctly wait and suppress SIGSTOP
   37501 	on detach if PTRACE_INTERRUPT wasn't used, or wait for any ptrace
   37502 	stop and detach without suppressing signals.
   37503 
   37504 2013-06-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   37505 
   37506 	tests: disable /proc based checks when /proc is not mounted.
   37507 	* tests/detach-running: Disable /proc based checks when
   37508 	/proc/self/status is not available.
   37509 	* tests/detach-sleeping: Likewise.
   37510 	* tests/detach-stopped: Likewise.
   37511 
   37512 2013-06-19  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37513 
   37514 	tests/detach-{running,sleeping,stopped}: check post-detach state.
   37515 	Check that traced process still exists and is in a right state
   37516 	after strace detached from it.
   37517 
   37518 2013-06-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   37519 
   37520 	tests: ensure that strace can detach from running processes.
   37521 	* tests/detach-running: New test.
   37522 	* tests/Makefile.am (TESTS): Add it.
   37523 
   37524 	tests: ensure that strace does not leave sleeping processes stopped.
   37525 	* tests/detach-sleeping: Do not send SIGCONT to the sleeping process.
   37526 
   37527 2013-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   37528 
   37529 	tests: fix parallel-tests support in detach-* tests.
   37530 	* tests/detach-sleeping: Use $LOG file for set_ptracer_any output.
   37531 	* tests/detach-stopped: Likewise.
   37532 
   37533 	tests: parametrize "sleep 1"
   37534 	* tests/init.sh (SLEEP_A_BIT): New variable.
   37535 	* tests/detach-sleeping: Use it.
   37536 	* tests/detach-stopped: Likewise.
   37537 
   37538 	tests: ensure that strace can detach from sleeping and stopped processes
   37539 	* tests/set_ptracer_any.c: New file.
   37540 	* tests/detach-sleeping: New test.
   37541 	* tests/detach-stopped: Likewise.
   37542 	* tests/Makefile.am (check_PROGRAMS): Add set_ptracer_any.
   37543 	(TESTS): Add detach-sleeping and detach-stopped.
   37544 	* tests/.gitignore: Add set_ptracer_any.
   37545 
   37546 2013-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   37547 
   37548 	tests: enhance timeout checks.
   37549 	Run each test using a wrapper that does all necessary timeout checks.
   37550 
   37551 	* tests/run.sh: New file.
   37552 	* tests/Makefile.am (EXTRA_DIST, LOG_COMPILER): Add it.
   37553 	* tests/init.sh (check_strace, check_timeout): Remove.
   37554 	* tests/detach-stopped: Update callers.
   37555 	* tests/net: Likewise.
   37556 	* tests/ptrace_setoptions: Likewise.
   37557 	* tests/qual_syscall: Likewise.
   37558 	* tests/stat: Likewise.
   37559 	* tests/strace-f: Likewise.
   37560 
   37561 2013-06-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   37562 
   37563 	tests: enable parallel-tests support.
   37564 	* configure.ac (AM_INIT_AUTOMAKE): Add parallel-tests.
   37565 
   37566 	tests: prepare for parallel-tests support.
   37567 	* tests/Makefile.am (CLEANFILES): Calculate dynamically from TESTS.
   37568 	* tests/init.sh (LOG): New variable.
   37569 	* tests/detach-stopped: Use it.
   37570 	* tests/net: Likewise.
   37571 	* tests/qual_syscall: Likewise.
   37572 	* tests/stat: Likewise.
   37573 	* tests/strace-f: Likewise.
   37574 
   37575 2013-06-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37576 
   37577 	Cleanups. No logic changes.
   37578 	* defs.h: Define new ptrace constants unconditionally.
   37579 	* strace.c (detach): Fix comment.
   37580 	(trace): Remove now unnecessary "if USE_SEIZE".
   37581 
   37582 2013-06-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   37583 
   37584 	maint: post-release administrivia.
   37585 	* NEWS: Add header line for next release.
   37586 
   37587 2013-06-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   37588 
   37589 	ioctlent: add UAPI support.
   37590 	* Makefile.am (IOCTLSORT_INCLUDEDIR): Define.
   37591 	(ioctlsort): Use it.
   37592 	* linux/ioctlent.sh (lookup_ioctls): Look into uapi directory tree.
   37593 	Strip "uapi/" prefix from output path names.
   37594 	* linux/ioctlent.h.in: Regenerate from v3.9 headers.
   37595 	* NEWS: Mention it.
   37596 
   37597 	Prepare for 4.8 release.
   37598 	* NEWS: Update for 4.8 release.
   37599 	* debian/changelog: 4.8-1.
   37600 	* strace.spec: 4.8-1.
   37601 
   37602 2013-06-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   37603 
   37604 	Fix "make dist" on recently added architectures.
   37605 	* Makefile.am (EXTRA_DIST): Add linux/aarch64/errnoent1.h,
   37606 	linux/aarch64/ioctlent.h.in, linux/aarch64/ioctlent1.h,
   37607 	linux/aarch64/signalent1.h, linux/aarch64/syscallent.h,
   37608 	linux/aarch64/syscallent1.h, linux/metag/ioctlent.h.in,
   37609 	linux/metag/syscallent.h, linux/or1k/ioctlent.h.in,
   37610 	linux/or1k/syscallent.h, linux/tile/errnoent1.h, linux/tile/ioctlent1.h,
   37611 	linux/tile/signalent1.h, linux/tile/syscallent1.h, linux/ubi-user.h,
   37612 	linux/xtensa/ioctlent.h.in, and linux/xtensa/syscallent.h.
   37613 
   37614 	Fix "make dist" regression introduced by commit v4.7-184-gd648f29.
   37615 	* Makefile.am (EXTRA_DIST): Add linux/ubi-user.h.
   37616 
   37617 2013-05-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   37618 
   37619 	Do not suppress signal delivery messages with -qq.
   37620 	Current implementation of -qq does not allow suppressing exit status
   37621 	messages without suppressing signal delivery messages, which is not
   37622 	good.  There is a traditional "-e signal=none" syntax that can be used
   37623 	to suppress all signal delivery messages.
   37624 	This partially reverts commit v4.7-222-g01997cf.
   37625 
   37626 	* strace.c (trace): Do not suppress signal delivery messages with -qq.
   37627 	* strace.1: Update documentation about -qq option.
   37628 
   37629 2013-05-23  Chris Metcalf  <cmetcalf (a] tilera.com>
   37630 
   37631 	tile: use siginfo_t, not struct siginfo.
   37632 	As of glibc 2.16, "struct siginfo" is no longer supported,
   37633 	and "siginfo_t" must be used instead.
   37634 
   37635 	tile: remove MAP_CACHE_xxx support in mem.c.
   37636 	These flags support functionality in mmap() that has not been
   37637 	pushed back to the community, and which may or may not eventually
   37638 	end up being the final community model.  In the interim, having
   37639 	these flags unconditionally present for "#ifdef TILE" just means
   37640 	that the TILE build breaks if using the community versions of
   37641 	the kernel and glibc, so just revert the code until such time
   37642 	as it may end up in the community.
   37643 
   37644 2013-05-17  Mike Frysinger  <vapier (a] gentoo.org>
   37645 
   37646 	Rename COPYRIGHT to COPYING.
   37647 	The standard name people have adopted is "COPYING" rather than
   37648 	"COPYRIGHT".  Use that as a lot of license scanning tools look for it.
   37649 
   37650 	* COPYRIGHT: Rename to ...
   37651 	* COPYING: ... this.
   37652 	* Makefile.am (EXTRA_DIST): Rename COPYRIGHT to COPYING.
   37653 	* README: Likewise.
   37654 	* strace.spec (%files): Likewise.
   37655 
   37656 2013-05-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   37657 
   37658 	Sync strace.spec and debian/ with packages.
   37659 	* debian/changelog: Sync with 4.7-1.
   37660 	* debian/strace.docs: Likewise.
   37661 	* strace.spec: Sync with 4.7-3.
   37662 
   37663 	Update PTRACE_O_* constants.
   37664 	* process.c (ptrace_setoptions_flags): Sync with Linux 3.9.
   37665 
   37666 	Update AF_*, PF_*, MSG_*, and TCP_* constants.
   37667 	* net.c (domains, addrfams, protocols, socktcpoptions): Sync with
   37668 	Linux 3.9.
   37669 
   37670 2013-05-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   37671 
   37672 	NOMMU: do not hide startup syscalls unless in -D mode.
   37673 	On NOMMU systems in "strace PROG" case, we have no way to attach to
   37674 	the tracee before it calls execve unless in -D mode.  That is, the
   37675 	first execve call is very likely to be missed, and setting
   37676 	hide_log_until_execve just results to empty log.
   37677 
   37678 	* strace.c (init) [NOMMU_SYSTEM]: Do not set hide_log_until_execve
   37679 	unless in -D mode.
   37680 
   37681 2013-05-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   37682 
   37683 	Make -D mode work when the Yama LSM is enabled.
   37684 	* strace.c [HAVE_PRCTL]: Include sys/prctl.h.
   37685 	(startup_child) [HAVE_PRCTL && PR_SET_PTRACER && PR_SET_PTRACER_ANY]:
   37686 	In -D mode, allow tracing the process that is going to become the
   37687 	tracee.
   37688 
   37689 	Update PR_* constants.
   37690 	* process.c (prctl_options): Add PR_SET_PTRACER.
   37691 
   37692 2013-05-14  Denys Vlasenko  <dvlasenk (a] redhat.com>
   37693 
   37694 	Hide startup syscalls.
   37695 	Tested with "./strace [-D] [-q] [-bexecve] env true",
   37696 	all cases seem to work.
   37697 
   37698 	* defs.h: Declare new variable: bool hide_log_until_execve.
   37699 	* strace.c: Define hide_log_until_execve.
   37700 	Rename skip_startup_execve to skip_one_b_execve.
   37701 	(startup_child): Do not set skip_one_b_execve = 1 here.
   37702 	(init): If "strace PROG" case (as opposed to "strace -pPID"),
   37703 	set skip_one_b_execve and hide_log_until_execve to 1.
   37704 	(trace): Don't print signal messages if hide_log_until_execve == 1.
   37705 	* syscall.c (trace_syscall_entering):
   37706 	Skip syscall printing if hide_log_until_execve == 1.
   37707 	Reset hide_log_until_execve if we enter execve syscall.
   37708 	(trace_syscall_exiting): Skip syscall printing if hide_log_until_execve == 1.
   37709 
   37710 2013-05-13  Daniel P. Berrange  <berrange (a] redhat.com>
   37711 
   37712 	Allow -q to be repeated for very quiet output.
   37713 	Even with the -q flag specified, tracing output is still mixed
   37714 	with messages about signals and process exit status, which is
   37715 	often irrelevant.  Allow the -q option to be repeated to force
   37716 	the suppression of signals / exit status info too.
   37717 
   37718 	* defs.h: Change 'qflag' from 'bool' to 'unsigned int'.
   37719 	* strace.1: Document ability to repeat '-q' option.
   37720 	* strace.c: Allow '-q' to be repeated to quieten process
   37721 	exit status and signal messages.
   37722 
   37723 2013-05-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   37724 
   37725 	mips o32: fix syscall table.
   37726 	* linux/mips/syscallent-o32.h: Add entries for getpmsg, putpmsg,
   37727 	get_mempolicy, set_mempolicy and vserver.  Fix names for umount,
   37728 	umount2, mmap, mmap2, pread64, pwrite64, sigaltstack and fstatat64
   37729 	syscalls.
   37730 
   37731 2013-05-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   37732 
   37733 	mips n64: fix syscall table.
   37734 	* linux/mips/syscallent-n64.h: Add entries for get_mempolicy,
   37735 	set_mempolicy and timerfd syscalls.  Fix entry for socket syscall.
   37736 	Fix names for pread64, pwrite64, shmat, rt_sigsuspend, sigaltstack
   37737 	and umount2 syscalls.
   37738 
   37739 	mips n32: fix syscall table.
   37740 	* linux/mips/syscallent-n32.h: Add entries for mbind, get_mempolicy,
   37741 	set_mempolicy and timerfd syscalls.  Fix entry for socket syscall.
   37742 	Fix handlers for truncate, ftruncate and getdents64 syscalls.
   37743 	Fix names for pread64, pwrite64, shmat, rt_sigsuspend, sigaltstack,
   37744 	umount2, and getdents64 syscalls.
   37745 
   37746 2013-05-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   37747 
   37748 	sync_file_range: fix number of syscall arguments.
   37749 	* linux/avr32/syscallent.h: Set the number of sync_file_range arguments
   37750 	to 6.
   37751 	* linux/bfin/syscallent.h: Likewise.
   37752 	* linux/hppa/syscallent.h: Likewise.
   37753 	* linux/i386/syscallent.h: Likewise.
   37754 	* linux/m68k/syscallent.h: Likewise.
   37755 	* linux/microblaze/syscallent.h: Likewise.
   37756 	* linux/mips/syscallent-o32.h: Likewise.
   37757 	* linux/or1k/syscallent.h: Likewise.
   37758 	* linux/s390/syscallent.h: Likewise.
   37759 	* linux/sh/syscallent.h: Likewise.
   37760 	* linux/powerpc/syscallent.h: Change sync_file_range to
   37761 	sync_file_range2, set the number of sync_file_range2 arguments to 6.
   37762 	* linux/tile/syscallent.h: Change sync_file_range to sync_file_range2,
   37763 	set the number of sync_file_range2 arguments to 4.
   37764 	* linux/tile/syscallent1.h: Change sync_file_range to sync_file_range2.
   37765 	update handler.
   37766 	* linux/xtensa/syscallent.h: Likewise.
   37767 
   37768 	Add syscall entries for new linux syscalls.
   37769 	* linux/dummy.h: Add printargs aliases for sys_finit_module, sys_kcmp
   37770 	and sys_sync_file_range2.
   37771 	* linux/alpha/syscallent.h: Add entries for process_vm_readv
   37772 	and process_vm_writev.
   37773 	* linux/bfin/syscallent.h: Likewise.
   37774 	* linux/arm/syscallent.h: Add entries for sync_file_range2, kcmp
   37775 	and finit_module.
   37776 	* linux/hppa/syscallent.h: Add entries for process_vm_readv,
   37777 	process_vm_writev, kcmp and finit_module.
   37778 	* linux/tile/syscallent.h: Likewise.
   37779 	* linux/tile/syscallent1.h: Likewise.
   37780 	* linux/ia64/syscallent.h: Add entry for finit_module.
   37781 	* linux/i386/syscallent.h: Add entries for kcmp and finit_module.
   37782 	* linux/m68k/syscallent.h: Likewise.
   37783 	* linux/metag/syscallent.h: Likewise.
   37784 	* linux/microblaze/syscallent.h: Likewise.
   37785 	* linux/mips/syscallent-n32.h: Likewise.
   37786 	* linux/mips/syscallent-n64.h: Likewise.
   37787 	* linux/mips/syscallent-o32.h: Likewise.
   37788 	* linux/or1k/syscallent.h: Likewise.
   37789 	* linux/powerpc/syscallent.h: Likewise.
   37790 	* linux/sh/syscallent.h: Likewise.
   37791 	* linux/sh64/syscallent.h: Likewise.
   37792 	* linux/x32/syscallent.h: Likewise.
   37793 	* linux/x86_64/syscallent.h: Likewise.
   37794 	* linux/xtensa/syscallent.h: Likewise.
   37795 	* linux/s390/syscallent.h: Add entries for s390_runtime_instr, kcmp
   37796 	and finit_module.
   37797 	* linux/s390x/syscallent.h: Likewise.
   37798 	* linux/sparc/syscallent.h: Add entries for kern_features, kcmp
   37799 	and finit_module.
   37800 
   37801 	tests/net: fix portability issues.
   37802 	* tests/net-accept-connect.c: Fix address length passed to bind()
   37803 	and connect().
   37804 	* tests/net: Update regexps.
   37805 
   37806 	tests: add a test for basic network syscalls.
   37807 	* tests/.gitignore: Add net-accept-connect, *.o and *.log.*.
   37808 	* tests/Makefile.am (AM_CFLAGS): New variable.
   37809 	(check_PROGRAMS): Add net-accept-connect.
   37810 	(TESTS): Add net.
   37811 	* tests/net-accept-connect.c: New file.
   37812 	* tests/net: New file.
   37813 
   37814 	tests: do not skip tests when timeout utility is not available.
   37815 	* tests/init.sh (check_timeout): New function.
   37816 	* tests/ptrace_setoptions: Use it.
   37817 	* tests/qual_syscall: Likewise.
   37818 	* tests/stat: Likewise.
   37819 	* tests/strace-f: Likewise.
   37820 
   37821 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37822 
   37823 	Move subcall decoding configuration out of the common code.
   37824 	* Makefile.am (EXTRA_DIST): Add linux/subcall.h.
   37825 	* linux/syscall.h (SYS_socket_subcall): Remove.
   37826 	(SYS_socket_nsubcalls, SYS_ipc_subcall, SYS_ipc_nsubcalls): Move to ...
   37827 	* linux/subcall.h: ... new file.
   37828 	* linux/arm/syscallent.h: Define SYS_socket_subcall, include subcall.h.
   37829 	* linux/i386/syscallent.h: Likewise.
   37830 	* linux/m68k/syscallent.h: Likewise.
   37831 	* linux/powerpc/syscallent.h: Likewise.
   37832 	* linux/s390/syscallent.h: Likewise.
   37833 	* linux/s390x/syscallent.h: Likewise.
   37834 	* linux/sh/syscallent.h: Likewise.
   37835 	* linux/sh64/syscallent.h: Likewise.
   37836 	* linux/sparc/syscallent.h: Likewise.
   37837 
   37838 	Suggested by Mike Frysinger and Chris Metcalf.
   37839 
   37840 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37841 
   37842 	sparc: remove some unused declarations and macros.
   37843 	* linux/syscall.h [SPARC || SPARC64] (sys_msgsys, sys_semsys,
   37844 	sys_shmsys): Remove declarations.
   37845 	[SPARC || SPARC64] (SYS_semsys_subcall, SYS_semsys_nsubcalls,
   37846 	SYS_msgsys_subcall, SYS_msgsys_nsubcalls, SYS_shmsys_subcall,
   37847 	SYS_shmsys_nsubcalls): Remove macros.
   37848 
   37849 2013-05-07  Mike Frysinger  <vapier (a] gentoo.org>
   37850 
   37851 	mips: fix build regression.
   37852 	The recent commit (2690fadc8b35190dddd29274a7405bac13adc469) shuffled
   37853 	the mips headers around causing it to check the ABI defines before it
   37854 	included the header which set those up.  Now all mips builds fail with:
   37855 		In file included from count.c:36:0:
   37856 		defs.h:48:4: error: #error Unsupported _MIPS_SIM
   37857 
   37858 	* defs.h [MIPS]: Move sgidefs.h above _MIPS_SIM check.
   37859 
   37860 2013-05-07  James Hogan  <james.hogan (a] imgtec.com>
   37861 
   37862 	metag: rename llseek syscall to _llseek.
   37863 	The raw llseek syscall is called _llseek from userland, so fix the
   37864 	naming of it for metag to allow the stat test to pass.
   37865 
   37866 	* linux/metag/syscallent.h: Rename llseek syscall to _llseek.
   37867 
   37868 2013-05-07  James Hogan  <james.hogan (a] imgtec.com>
   37869 
   37870 	metag: disable socket and ipc subcall support.
   37871 	The metag architecture also uses dedicated syscalls and doesn't need to
   37872 	multiplex ipc and socket subcalls.
   37873 
   37874 	* linux/syscall.h [METAG]: Do not define SYS_socket_subcall and
   37875 	SYS_ipc_subcall.
   37876 
   37877 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37878 
   37879 	pread, pwrite: fix number of syscall arguments.
   37880 	The number of pread and pwrite arguments depends on architecture and
   37881 	personality.  For 64bit and ilp32 it equals to 4, for unaligned
   37882 	32bit it equals to 5, and for aligned 32bit it equals to 6.
   37883 
   37884 	* linux/aarch64/syscallent1.h: Change the number of pread and pwrite
   37885 	arguments to 4.
   37886 	* linux/alpha/syscallent.h: Likewise.
   37887 	* linux/mips/syscallent-n32.h: Likewise.
   37888 	* linux/mips/syscallent-n64.h: Likewise.
   37889 	* linux/s390x/syscallent.h: Likewise.
   37890 	* linux/sh64/syscallent.h: Likewise.
   37891 	* linux/tile/syscallent.h: Likewise.
   37892 	* linux/x32/syscallent.h: Likewise.
   37893 	* linux/x86_64/syscallent.h: Likewise.
   37894 	* linux/or1k/syscallent.h: Change the number of pread and pwrite
   37895 	arguments to 5.
   37896 
   37897 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37898 
   37899 	preadv, pwritev: fix number of syscall arguments.
   37900 	The number of preadv and pwritev arguments depends on architecture and
   37901 	personality.  For 64bit and ilp32 it equals to 4, for unaligned 32bit
   37902 	it equals to 5, and for aligned 32bit it equals to 6.
   37903 
   37904 	* linux/aarch64/syscallent1.h: Change the number of preadv and pwritev
   37905 	arguments to 4.
   37906 	* linux/alpha/syscallent.h: Likewise.
   37907 	* linux/ia64/syscallent.h: Likewise.
   37908 	* linux/mips/syscallent-n32.h: Likewise.
   37909 	* linux/mips/syscallent-n64.h: Likewise.
   37910 	* linux/s390x/syscallent.h: Likewise.
   37911 	* linux/sh64/syscallent.h: Likewise.
   37912 	* linux/tile/syscallent.h: Likewise.
   37913 	* linux/x32/syscallent.h: Likewise.
   37914 	* linux/x86_64/syscallent.h: Likewise.
   37915 	* linux/powerpc/syscallent.h: Change the number of preadv and pwritev
   37916 	arguments to 6.
   37917 	* linux/sh/syscallent.h: Likewise.
   37918 	* linux/xtensa/syscallent.h: Likewise.
   37919 
   37920 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37921 
   37922 	ftruncate64, truncate64: fix number of syscall arguments.
   37923 	The number of ftruncate64/truncate64 arguments depends on architecture
   37924 	and personality.  For 64bit and ilp32 it equals to 2, for unaligned
   37925 	32bit it equals to 3, and for aligned 32bit it equals to 4.
   37926 
   37927 	* linux/or1k/syscallent.h: Change the number of ftruncate64 and
   37928 	truncate64 arguments to 3.
   37929 	* linux/sh/syscallent.h: Likewise.
   37930 	* linux/sh64/syscallent.h: Change ftruncate64 and truncate64 handlers.
   37931 	* linux/sparc/syscallent.h: Change ftruncate64 handler, change the
   37932 	number of its arguments to 3.
   37933 	* linux/xtensa/syscallent.h: Change the number of ftruncate64 and
   37934 	truncate64 arguments to 4.
   37935 
   37936 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37937 
   37938 	fallocate: fix number of syscall arguments.
   37939 	The number of fallocate arguments depends on architecture and
   37940 	personality.  For 64bit and ilp32 it equals to 4,
   37941 	for 32bit it equals to 6.
   37942 
   37943 	* linux/aarch64/syscallent1.h: Change the number of fallocate arguments
   37944 	to 4.
   37945 	* linux/alpha/syscallent.h: Likewise.
   37946 	* linux/mips/syscallent-n32.h: Likewise.
   37947 	* linux/mips/syscallent-n64.h: Likewise.
   37948 	* linux/s390x/syscallent.h: Likewise.
   37949 	* linux/sh64/syscallent.h: Likewise.
   37950 	* linux/tile/syscallent.h: Likewise.
   37951 	* linux/x32/syscallent.h: Likewise.
   37952 	* linux/x86_64/syscallent.h: Likewise.
   37953 	* linux/microblaze/syscallent.h: Set fallocate handler and flags.
   37954 
   37955 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37956 
   37957 	fadvise64, fadvise64_64: fix handlers and number of syscall arguments.
   37958 	The number of fadvise64 arguments depends on architecture and
   37959 	personality.  For 64bit and ilp32 it equals to 4, for unaligned
   37960 	32bit it equals to 5, and for aligned 32bit it equals to 6.
   37961 
   37962 	The number of fadvise64_64 arguments is 4 for 64bit and ilp32, for
   37963 	unaligned 32bit and most of aligned 32bit it equals to 6, and for
   37964 	mips o32 it equals to 7.
   37965 
   37966 	* linux/alpha/syscallent.h: Set fadvise64 handler.
   37967 	* linux/s390/syscallent.h: Likewise.
   37968 	* linux/hppa/syscallent.h: Set fadvise64_64 handler, change the number
   37969 	of syscall arguments to 6.
   37970 	* linux/ia64/syscallent.h: Change the number of fadvise64 arguments
   37971 	to 4.
   37972 	* linux/mips/syscallent-n32.h: Likewise.
   37973 	* linux/tile/syscallent1.h: Change the number of fadvise64 arguments
   37974 	to 5.
   37975 	* linux/mips/syscallent-o32.h: Change the number of fadvise64_64
   37976 	arguments to 7.
   37977 	* linux/s390x/syscallent.h: Change fadvise64_64 handler.  Set fadvise64
   37978 	handler.  Change numbers of fadvise64 and fadvise64_64 arguments to 4.
   37979 	* linux/sh64/syscallent.h: Change fadvise64_64 handler.
   37980 	Change numbers of fadvise64 and fadvise64_64 arguments to 4.
   37981 	* linux/sparc/syscallent.h: Set fadvise64 and fadvise64_64 handlers,
   37982 	change numbers of their arguments to 5 and 6.
   37983 	* linux/x86_64/syscallent.h: Change fadvise64 handler.
   37984 
   37985 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37986 
   37987 	mips o32: raise the max number of syscall arguments to 7.
   37988 	On mips o32, fadvise64_64 takes 7 arguments.
   37989 
   37990 	* defs.h [LINUX_MIPSO32]: Raise MAX_ARGS to 7.
   37991 
   37992 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   37993 
   37994 	mips: split syscallent.h.
   37995 	linux/mips/syscallent.h consisted of several parts that had little in
   37996 	common.  Split them into separate files to ease maintenance.
   37997 
   37998 	* linux/mips/syscallent-compat.h: New file.
   37999 	* linux/mips/syscallent-n32.h: Likewise.
   38000 	* linux/mips/syscallent-n64.h: Likewise.
   38001 	* linux/mips/syscallent-o32.h: Likewise.
   38002 	* linux/mips/syscallent.h: Include them.
   38003 	* Makefile.am (EXTRA_DIST): Add them.
   38004 
   38005 2013-05-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   38006 
   38007 	readahead: fix number of syscall arguments.
   38008 	The number of readahead arguments depends on architecture and
   38009 	personality.  For 64bit and ilp32 it equals to 3, for unaligned 32bit it
   38010 	equals to 4, and for aligned 32bit it equals to 5.
   38011 
   38012 	* linux/aarch64/syscallent1.h: Set number of readahead arguments to 3.
   38013 	* linux/alpha/syscallent.h: Likewise.
   38014 	* linux/ia64/syscallent.h: Likewise.
   38015 	* linux/s390x/syscallent.h: Likewise.
   38016 	* linux/sh64/syscallent.h: Likewise.
   38017 	* linux/x32/syscallent.h: Likewise.
   38018 	* linux/x86_64/syscallent.h: Likewise.
   38019 	* linux/or1k/syscallent.h: Set number of readahead arguments to 4.
   38020 	* linux/sh/syscallent.h: Likewise.
   38021 	* linux/tile/syscallent.h: Likewise.
   38022 	* linux/xtensa/syscallent.h: Set number of readahead arguments to 5.
   38023 
   38024 2013-05-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   38025 
   38026 	linux/syscall.h: make subcall decoding configuration more readable.
   38027 	* linux/syscall.h: Inverse and sort the subcall ifdef,
   38028 	add a comment why subcall decoding support is not enabled
   38029 	on some architectures.
   38030 
   38031 2013-05-06  Chris Zankel  <chris (a] zankel.net>
   38032 
   38033 	xtensa: disable socket and ipc subcall support.
   38034 	The Xtensa architecture also uses dedicated syscalls and doesn't
   38035 	need to multiplex ipc and socket subcalls.
   38036 
   38037 	* linux/syscall.h [XTENSA]: Do not define SYS_socket_subcall and
   38038 	SYS_ipc_subcall.
   38039 
   38040 2013-05-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   38041 
   38042 	Fix syscall flags.
   38043 	* linux/aarch64/syscallent1.h: Fix syscall flags for send.
   38044 	* linux/alpha/syscallent.h: Fix syscall flags for fchdir, getcwd,
   38045 	oldumount, sigaltstack, umount, uselib, and utimes.
   38046 	* linux/arm/syscallent.h: Fix syscall flags for close, creat, dup, dup2,
   38047 	fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, fdatasync, flock,
   38048 	fsetxattr, fsync, getdents, getdents64, ioctl, oldfstat, oldselect,
   38049 	open, pipe, poll, pread, pwrite, read, readahead, readdir, readv,
   38050 	select, socketcall, write, and writev.
   38051 	* linux/avr32/syscallent.h: Fix syscall flags for inotify_init and
   38052 	unshare.
   38053 	* linux/bfin/syscallent.h: Fix syscall flags for pread64 and pwrite64.
   38054 	* linux/hppa/syscallent.h: Fix syscall flags for fchdir, flistxattr,
   38055 	getcwd, pause, signal, umount2, uselib, utime, and vfork.
   38056 	* linux/ia64/syscallent.h: Fix syscall flags for creat, fchdir,
   38057 	lstat, umount, uselib, and utimes.  Fix syscall handlers for
   38058 	fgetxattr, flistxattr, fremovexattr, and fsetxattr.
   38059 	* linux/m68k/syscallent.h: Fix syscall flags for close, creat, dup,
   38060 	dup2, fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, fdatasync,
   38061 	flock, fsetxattr, getdents, ioctl, oldfstat, oldselect, open, pipe,
   38062 	poll, pread64, pwrite64, read, readahead, readdir, readv, select,
   38063 	socketcall, write, and writev.
   38064 	* linux/metag/syscallent.h: Fix syscall flags for fanotify_init,
   38065 	prlimit64, process_vm_readv, process_vm_writev, and quotactl.
   38066 	* linux/microblaze/syscallent.h: Fix syscall flags for close, creat,
   38067 	dup, dup2, fchdir, fchmod, fchown, fchown32, fcntl, fcntl64,
   38068 	fdatasync, flock, fsetxattr, getdents, ioctl, oldfstat, oldselect,
   38069 	open, perf_event_open, pipe, poll, pread64, pwrite64, read, readahead,
   38070 	readdir, readv, select, socketcall, write, and writev.
   38071 	* linux/mips/syscallent.h: Fix syscall flags for close, creat, dup,
   38072 	dup2, fchdir, fchmod, fchown, fcntl, fcntl64, fdatasync, flock,
   38073 	fsetxattr, getdents, getdents64, getxattr, ioctl, lgetxattr,
   38074 	listxattr, llistxattr, lremovexattr, lsetxattr, oldfstat, open, pipe,
   38075 	pivot_root, poll, pread, pwrite, read, readahead, readv, removexattr,
   38076 	select, setxattr, socketcall, statfs, write, and writev.
   38077 	* linux/or1k/syscallent.h: Fix syscall flags for fchdir and quotactl.
   38078 	* linux/powerpc/syscallent.h: Fix syscall flags for fchdir.
   38079 	* linux/sh/syscallent.h: Fix syscall flags for getcwd.
   38080 	* linux/sparc/syscallent.h: Fix syscall flags for getresgid, getresuid,
   38081 	setresgid, setresgid32, and setresuid.
   38082 	* linux/xtensa/syscallent.h: Fix syscall flags for close, creat, dup,
   38083 	dup2, fallocate, fchdir, fchmod, fchown, fcntl, fcntl64, fdatasync,
   38084 	flock, fsetxattr, fstatfs, fstatfs64, fsync, getdents, getdents64,
   38085 	ioctl, open, pipe, pivot_root, poll, pread64, pwrite64, read,
   38086 	readahead, readv, rt_sigreturn, select, setfsgid, setfsuid, setuid,
   38087 	swapoff, times, utime, write, and writev.
   38088 
   38089 	tests/stat: enhance regexps.
   38090 	* tests/stat: Enhance regexps that check tracing of stat/stat64 and
   38091 	fstatat/fstatat64 syscalls.
   38092 
   38093 2013-05-06  Chris Metcalf  <cmetcalf (a] tilera.com>
   38094 
   38095 	tests/stat: support fstatat syscall for stat()
   38096 	Newer Linux architectures don't support the stat/stat64 syscalls.
   38097 	Instead they use fstatat() with AT_FDCWD and an extra flags argument.
   38098 	Support seeing this output in the 'strace -efile' test.
   38099 
   38100 	As part of this change, use "grep -E -x" syntax consistently for
   38101 	all stat tests, since the number of \(foo\)\? expressions was becoming
   38102 	pretty unwieldy.
   38103 
   38104 	* tests/stat: Update stat/stat64 check regexp to handle architectures
   38105 	that use fstatat instead.  Use "grep -E -x" syntax consistently.
   38106 
   38107 2013-05-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   38108 
   38109 	ARM OABI: fix 64-bit arguments decoding.
   38110 	ARM OABI and ARM EABI have different function parameters passing rules,
   38111 	see commit v4.6-11-g7a5b08f for details.
   38112 
   38113 	* util.c (printllval): Do not align argument number in case of ARM OABI.
   38114 	* file.c (sys_fadvise64_64): Likewise.
   38115 
   38116 2013-05-06  Mike Frysinger  <vapier (a] gentoo.org>
   38117 
   38118 	printllval: fix 64bit unpacking on mips/o32 and xtensa.
   38119 	The mips/o32 ABI and xtensa arch also do 64bit aligning, so add it to the
   38120 	printllval list for this.
   38121 
   38122 	Normally for sys_fadvise64_64 we'd handle the same list of arches, but
   38123 	mips/o32 ABI is funky and doesn't shift -- it has 7 args.  So just add
   38124 	xtensa to it.
   38125 
   38126 	* file.c (sys_fadvise64_64): Add XTENSA to the shifted list.
   38127 	* util.c (printllval): Add LINUX_MIPSO32 and XTENSA to the shifted list.
   38128 
   38129 2013-05-06  Chris Metcalf  <cmetcalf (a] tilera.com>
   38130 
   38131 	tile: disable socket and ipc subcall support.
   38132 	The tile arch just has the dedicated syscalls, so disable
   38133 	the logic for parsing subcalls.
   38134 
   38135 	* linux/syscall.h [TILE]: Do not define SYS_socket_subcall and
   38136 	SYS_ipc_subcall.
   38137 
   38138 2013-05-06  Mike Frysinger  <vapier (a] gentoo.org>
   38139 
   38140 	Blackfin: disable socketcall and ipc subcall support.
   38141 	The Blackfin arch does not have a socketcall or ipc subcall
   38142 	(it has dedicated syscalls broken out), so disable the logic for it.
   38143 
   38144 	* linux/syscall.h [BFIN]: Do not define SYS_socket_subcall and
   38145 	SYS_ipc_subcall.
   38146 
   38147 2013-05-05  Mike Frysinger  <vapier (a] gentoo.org>
   38148 
   38149 	s390: fix # of args truncate64/ftruncate64 takes.
   38150 	* linux/s390/syscallent.h: Change nargs to 3 for truncate64/ftruncate64.
   38151 
   38152 2013-05-05  Mike Frysinger  <vapier (a] gentoo.org>
   38153 
   38154 	mtd: clamp ubi name strings.
   38155 	Since the length fields with the ubi volnames are signed 16bit values,
   38156 	make sure we clamp that number to the size of the buffer we've allocated
   38157 	on the stack to prevent buffer overflows.
   38158 
   38159 	* mtd.c (ubi_ioctl): Clamp length to string_quote to 0/UBI_MAX_VOLUME_NAME.
   38160 	Check the return of string_quote and tweak the output accordingly.
   38161 
   38162 2013-05-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   38163 
   38164 	printxval: support more architectures.
   38165 	* configure.ac: Define SIZEOF_LONG_LONG.
   38166 	* util.c (printllval): Handle all architectures with sizeof(long) > 4
   38167 	and sizeof(long) == sizeof(long long).
   38168 
   38169 2013-05-04  Mike Frysinger  <vapier (a] gentoo.org>
   38170 
   38171 	Fix building for sparc64 targets.
   38172 	* util.c (printllval): Handle SPARC64 define.
   38173 
   38174 	Fix building for mips n64 targets.
   38175 	* util.c (printllval): Handle LINUX_MIPSN64 define.
   38176 
   38177 2013-05-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   38178 
   38179 	hppa: fix stat64 and fstat64 decoding.
   38180 	* file.c [HPPA]: Do not redefine stat64 to hpux_stat64.
   38181 
   38182 	arm, aarch64, ppc: fix printllval-based decoders.
   38183 	* util.c (printllval) [ARM || POWERPC]: Align argument number.
   38184 	[AARCH64]: Align argument number in 32bit mode.
   38185 	* file.c (sys_fadvise64_64) [ARM || POWERPC]: Remove no longer needed
   38186 	printllval workaround.
   38187 	[AARCH64]: Fix printing POSIX_FADV_* constants in 32bit mode.
   38188 
   38189 2013-05-02  Mike Frysinger  <vapier (a] gentoo.org>
   38190 
   38191 	Decode mtd/ubi ioctls.
   38192 	Been playing with UBI of late and it'd help if I could see what it was
   38193 	doing.  Not entirely sure about the decoding of UBI_IOCVOLUP -- it takes
   38194 	a pointer to a 64bit value, not a strict.
   38195 
   38196 	* util.c (MAX, MIN): Move to ...
   38197 	* defs.h (MAX, MIN): ... here.
   38198 	(CLAMP): Define.
   38199 	(ubi_ioctl): New prototype.
   38200 	* ioctl.c (ioctl_decode): Call ubi_ioctl when code is 'o' or 'O'.
   38201 	* mtd.c: Include ubi user API header.
   38202 	(ubi_volume_types): New enum decode.
   38203 	(ubi_volume_props): Likewise.
   38204 	(ubi_ioctl): Define.
   38205 	* linux/ubi-user.h: Import from linux 3.8.
   38206 
   38207 2013-05-02  Mike Frysinger  <vapier (a] gentoo.org>
   38208 
   38209 	test: add mtd/ubi test helpers.
   38210 	I used these to develop the mtd/ubi ioctl decoders.
   38211 
   38212 	* test/.gitignore: Add mtd/ubi.
   38213 	* test/Makefile: Declare all tests in a PROGS var.
   38214 	Declare build targets .PHONY.
   38215 	(all): Depend on $(PROGS) instead of hardcoded list.
   38216 	(clean): Remove $(PROGS) instead of hardcoded list.
   38217 	* test/mtd.c: New file.
   38218 	* test/ubi.c: Likewise.
   38219 
   38220 2013-05-02  Mike Frysinger  <vapier (a] gentoo.org>
   38221 
   38222 	test: include headers for used funcs.
   38223 	These funcs use things like wait/write/read/strcmp but sometimes
   38224 	don't include the right header for them.
   38225 
   38226 	* test/Makefile: Add -Wall to CFLAGS.
   38227 	* test/clone.c: Include unistd.h.
   38228 	* test/fork.c: Include sys/wait.h.
   38229 	* test/sig.c: Include unistd.h.
   38230 	* test/sigkill_rain.c: Include sys/wait.h.
   38231 	* test/vfork.c: Include sys/wait.h.
   38232 	* test/wait_must_be_interruptible.c: Include string.h
   38233 
   38234 2013-05-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   38235 
   38236 	ia64: fix compilation warnings introduced by commit v4.7-174-g44f0ed1.
   38237 	* linux/ia64/syscallent.h: Undefine sys_oldlstat, sys_lstat and
   38238 	sys_lstat64 before redefining them to printargs.
   38239 
   38240 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   38241 
   38242 2013-05-02  Mike Frysinger  <vapier (a] gentoo.org>
   38243 
   38244 	tests: stat: fix clean up of sample file.
   38245 	* tests/stat: Also rm the sample file at the end of the test.
   38246 
   38247 	Ignore more files.
   38248 	* .gitignore: Add gdb related files.
   38249 	* tests/.gitignore: Ignore test logs.
   38250 
   38251 2013-05-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   38252 
   38253 	x32: fix decoding of i386 truncate and ftruncate syscalls.
   38254 	* linux/x32/syscallent1.h: Remove sys_*truncate64 redirections.
   38255 
   38256 	x32: fix printllval-based decoders of i386 syscalls.
   38257 	* util.c (printllval) [X32]: Handle i386 personality.
   38258 
   38259 	tests: add basic test for ftruncate, lseek and stat family syscalls.
   38260 	* tests/stat: New test.
   38261 	* tests/Makefile.am (TESTS): Add stat.
   38262 
   38263 2013-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   38264 
   38265 	x32: fix build regressions introduced by commit v4.7-96-g8435d67.
   38266 	* desc.c (printflock) [X32]: Add special handling required for
   38267 	this architecture with sizeof(long) < sizeof(off_t).
   38268 	* file.c [X32] (struct stat64): Add __attribute__((packed)).
   38269 	[X32] (HAVE_STAT64): Define.
   38270 	(printstat) [X32]: Redirect to printstat64.
   38271 	(printstat64) [X32]: Use "struct stat" instead of "struct stat64".
   38272 	[X32] (realprintstat64): Rename to printstat64_x32.
   38273 	(sys_stat64, sys_fstat64) [X32]: Remove second definitions of these
   38274 	functions.  Call printstat64_x32 instead of printstat64
   38275 	* linux/x32/syscallent.h: Fix handlers for truncate and ftruncate.
   38276 
   38277 	Alias sys_*lstat* syscall printing functions.
   38278 	* file.c (sys_lstat, sys_lstat64, sys_oldlstat): Remove.
   38279 	* linux/dummy.h: Move !HAVE_STRUCT___OLD_KERNEL_STAT aliases forward.
   38280 	(sys_lstat): Alias to sys_stat.
   38281 	(sys_lstat64): Alias to sys_stat64.
   38282 	(sys_oldlstat): Alias to sys_oldstat.
   38283 	* linux/syscall.h (sys_lstat, sys_lstat64, sys_oldlstat): Remove.
   38284 	* linux/x32/syscallent1.h (sys_lstat64): Remove.
   38285 
   38286 	x86_64: decode __old_kernel_stat based syscalls.
   38287 	* linux/x86_64/syscallent1.h: Remove sys_old*stat redirections.
   38288 
   38289 	x32: fix decoding of __old_kernel_stat based syscalls.
   38290 	* file.c [X32] (struct __old_kernel_stat): Define.
   38291 	* linux/x32/syscallent1.h: Remove sys_old*stat redirections.
   38292 
   38293 2013-05-01  James Hogan  <james.hogan (a] imgtec.com>
   38294 
   38295 	test/threaded_execve: fix on metag.
   38296 	The metag ABI has stacks growing upwards so clone expects the stack
   38297 	argument to point at the bottom of the stack instead of the top.
   38298 
   38299 	* test/threaded_execve.c [__metag__]: Define clone2 differently
   38300 	to avoid a segfault at runtime.
   38301 
   38302 2013-05-01  James Hogan  <james.hogan (a] imgtec.com>
   38303 
   38304 	test/skodic: make a bit more portable.
   38305 	* test/skodic.c (main): Don't use MAP_FIXED since valid virtual addresses
   38306 	vary between architectures (as far as I can tell the use of MAP_FIXED is
   38307 	not relevant to the test).  Also don't assume the file desriptor returned
   38308 	by open call is 3 when passing it to mmap.
   38309 
   38310 2013-05-01  Mike Frysinger  <vapier (a] gentoo.org>
   38311 
   38312 	printllval: handle s390x.
   38313 	This is a 64bit arch w/no personalities, so fix printing.
   38314 	It can now trace a simple call like readahead:
   38315 	$ cat test.c
   38316 	main(){readahead(-1, (unsigned long long)1 << 50, 0);}
   38317 	$ gcc test.c
   38318 	$ ./strace -ereadahead ./a.out
   38319 	readahead(-1, 1125899906842624, 0)      = -1 EBADF (Bad file descriptor)
   38320 
   38321 	* util.c (printllval): Handle S390X define.
   38322 
   38323 2013-05-01  Mike Frysinger  <vapier (a] gentoo.org>
   38324 
   38325 	Stop using old AM_CONFIG_HEADER macro.
   38326 	Building with automake-1.13 throws an error:
   38327 	configure.ac:6: error: 'AM_CONFIG_HEADER': this macro is obsolete.
   38328 	    You should use the 'AC_CONFIG_HEADERS' macro instead.
   38329 
   38330 	* configure.ac (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADERS.
   38331 
   38332 2013-04-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   38333 
   38334 	build: introduce git-version-gen.
   38335 	* .gitignore: Add .version.
   38336 	* Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add $(srcdir)/.version.
   38337 	Add rules to check NEWS, generate $(srcdir)/.version and
   38338 	$(distdir)/.tarball-version files.
   38339 	Change ChangeLog and CREDITS generation rules to depend on
   38340 	$(srcdir)/.version instead of $(srcdir)/.git/refs/heads/*.
   38341 	* NEWS: Add dates to recent releases.
   38342 	* configure.ac (AC_INIT): Use git-version-gen.
   38343 	(AM_INIT_AUTOMAKE): Remove check-news.
   38344 	* git-version-gen: Import from gnulib.
   38345 	* make-dist: Check NEWS.
   38346 
   38347 	Makefile.am: sort long lists to ease maintenance.
   38348 	* Makefile.am (strace_SOURCES, EXTRA_DIST): Sort, place one list element
   38349 	per line.
   38350 
   38351 	build: fix "make dist" regression introduced by commit v4.7-105-g7270de5
   38352 	* Makefile.am (EXTRA_DIST): Remove linux/arm/syscallent1.h,
   38353 	linux/arm/signalent1.h, linux/arm/ioctlent1.h and linux/arm/errnoent1.h.
   38354 
   38355 	build: fix "make dist" regression introduced by commit v4.7-29-g17e3860.
   38356 	* Makefile.am (EXTRA_DIST): Add linux/ioctlent-filter.awk.
   38357 
   38358 2013-04-30  Mike Frysinger  <vapier (a] gentoo.org>
   38359 
   38360 	Blackfin: tweak sram_alloc syscall decode.
   38361 	* system.c (sys_sram_alloc): The 2nd argument of sram_alloc syscall
   38362 	is a bit field, not a specific value, so decode it as such.
   38363 
   38364 2013-03-31  Zev Weiss  <zev (a] bewilderbeest.net>
   38365 
   38366 	Print io_submit() offsets in decimal.
   38367 	This makes output formatting more consistent with pread()/pwrite(),
   38368 	which print their offset parameters in decimal.
   38369 
   38370 	* desc.c (sys_io_submit): Change offset output format from %llx to %lld.
   38371 
   38372 2013-03-30  Andreas Schwab  <schwab (a] suse.de>
   38373 
   38374 	Fix building outside source directory.
   38375 	The file linux/ioctlent.h is generated in the build directory, so
   38376 	"../ioctlent.h" won't find it.
   38377 
   38378 	* linux/aarch64/ioctlent1.h: Remove "../" from include file name.
   38379 	* linux/powerpc/ioctlent1.h: Likewise.
   38380 	* linux/tile/ioctlent1.h: Likewise.
   38381 	* linux/x32/ioctlent1.h: Likewise.
   38382 	* linux/x86_64/ioctlent1.h: Likewise.
   38383 	* linux/x86_64/ioctlent2.h: Likewise.
   38384 
   38385 2013-03-30  Andreas Schwab  <schwab (a] suse.de>
   38386 
   38387 	AArch64: Fix printing of long long value.
   38388 	* util.c (printllval): Fix printing of long long values on
   38389 	AArch64.
   38390 
   38391 2013-03-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   38392 
   38393 	Update PR_* constants.
   38394 	* process.c (prctl_options): Add more PR_* constants from linux/prctl.h.
   38395 
   38396 2013-03-25  Chris Zankel  <chris (a] zankel.net>
   38397 
   38398 	Add support for the XTENSA architecture.
   38399 	* configure.ac: Add XTENSA to the list of supported architectures.
   38400 	* defs.h: Add XTENSA support.
   38401 	* linux/xtensa/syscallent.h: New file.
   38402 	* linux/xtensa/ioctlent.h.in: Likewise.
   38403 	* process.c (struct_user_offsets): Add XTENSA support.
   38404 	* signal.c (sys_sigreturn): Likewise.
   38405 	* syscall.c (printcall, get_scno, get_syscall_args,
   38406 	  get_syscall_result, get_error): Likewise.
   38407 	* util.c (change_syscall): Likewise.
   38408 
   38409 2013-03-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38410 
   38411 	Add example script which builds static (possibly cross-compiled) strace.
   38412 
   38413 2013-03-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   38414 
   38415 	Use 64-bit versions of stat, readdir and setrlimit functions when available
   38416 	strace already has a mechanism to use fopen64 for output when the 64-bit
   38417 	version of fopen is available on 32-bit architectures.  Apply this
   38418 	mechanism for other three functions to make strace fully adopted for
   38419 	64-bit types.
   38420 
   38421 	* strace.c (struct_stat, stat_file, struct_dirent, read_dir,
   38422 	struct_rlimit, set_rlimit): New macros.
   38423 	(startup_attach): Use read_dir.
   38424 	(startup_child): Use struct_stat and stat_file.
   38425 	(main): Use struct_rlimit and set_rlimit.
   38426 
   38427 2013-03-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   38428 
   38429 	Do not use struct dirent in readdir decoding.
   38430 	struct dirent from libc should not be used for umove'ing into because it
   38431 	contains fixed size d_name.
   38432 
   38433 	* file.c (printdir): Rename to print_old_dirent.
   38434 	[SH64]: Decode using struct kernel_dirent.
   38435 	[!SH64]: Decode using an open-coded struct with 32-bit d_ino and d_off.
   38436 	(sys_readdir): Update.
   38437 
   38438 2013-03-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   38439 
   38440 	Do not use off_t in sendfile decoding.
   38441 	sendfile parser used to decode off_t* parameter as a pointer to host
   38442 	off_t type.  With this change, it is decoded as a pointer to target long
   38443 	type.
   38444 
   38445 	* io.c (print_off_t): New function.
   38446 	(sys_sendfile): Use it.
   38447 	* linux/aarch64/syscallent1.h: Use sys_sendfile64 for sendfile decoding.
   38448 	* linux/tile/syscallent.h: Likewise.
   38449 	* linux/x32/syscallent.h: Likewise.
   38450 	* linux/x86_64/syscallent.h: Likewise.
   38451 	* linux/hppa/syscallent.h: Use sys_sendfile64 for sendfile64 decoding.
   38452 	* linux/metag/syscallent.h: Correct sendfile syscall name.
   38453 	* linux/or1k/syscallent.h: Likewise.
   38454 
   38455 2013-03-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   38456 
   38457 	Fix build with older versions of libaio.h.
   38458 	* configure.ac: When libaio.h is available, check for
   38459 	struct iocb.u.c.flags, IO_CMD_PWRITE and IO_CMD_PWRITEV.
   38460 	* desc.c (print_common_flags): Check for HAVE_STRUCT_IOCB_U_C_FLAGS.
   38461 	(sys_io_submit): Check for HAVE_DECL_IO_CMD_PWRITE and
   38462 	HAVE_DECL_IO_CMD_PWRITEV.
   38463 
   38464 	Fix io_submit decoding.
   38465 	* desc.c (print_common_flags, sys_io_submit): Add missing ", " to
   38466 	SUB_COMMON output, remove extra ", " from SUB_VECTOR output.
   38467 
   38468 2013-03-18  Maxin B. John  <maxin.john (a] enea.com>
   38469 
   38470 	tests: relax check_prog to allow timeout command provided by busybox.
   38471 	Busybox version of timeout doesn't have --version option.
   38472 	Relax check_prog to handle those cases.
   38473 
   38474 	* tests/init.sh (check_prog): Use type builtin to check program
   38475 	availability.
   38476 
   38477 2013-03-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   38478 
   38479 	Reorganize get_regs code, hopefully without functional changes.
   38480 	* syscall.c [I386 || ARM || OR1K || METAG] (ARCH_REGS_FOR_GETREGSET):
   38481 	New macro.
   38482 	(get_regset): Implement for AARCH64, METAG, OR1K and X32.
   38483 	(get_regs) [AARCH64 || METAG || OR1K || X32]: Use it.
   38484 
   38485 	arm, i386: use PTRACE_GETREGSET if available.
   38486 	* syscall.c [ARM || I386 || X86_64] (get_regset): New function.
   38487 	(get_regs) [ARM || I386 || X86_64]: Use it.
   38488 
   38489 	Include <sys/uio.h> and <elf.h> on all architectures.
   38490 	* syscall.c: Include <sys/uio.h> and <elf.h> on all architectures.
   38491 
   38492 	x86-64: enhance PTRACE_GETREGSET test.
   38493 	* syscall.c (get_regs) [X86_64]: Check whether PTRACE_GETREGSET
   38494 	works regardless of the kernel version.
   38495 
   38496 	x32: use PTRACE_GETREGSET unconditionally.
   38497 	* syscall.c (get_regs) [X32]: Assume that PTRACE_GETREGSET always works
   38498 	regardless of the kernel version.
   38499 
   38500 	x86-64, x32: do not include linux/ptrace.h unnecessarily.
   38501 	* syscall.c [X86_64 || X32]: Stop including linux/ptrace.h.
   38502 
   38503 	i386, tile, x32: do not redefine ptrace prototype.
   38504 	* defs.h [I386 || TILE || X32]: Use ptrace prototype from sys/ptrace.h.
   38505 
   38506 	ptrace: decode note segment descriptor types.
   38507 	* configure.ac (AC_CHECK_HEADERS): Add elf.h.
   38508 	* process.c: Include elf.h.
   38509 	(nt_descriptor_types): New xlat structure.
   38510 	(sys_ptrace): Use it.
   38511 
   38512 2013-03-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   38513 
   38514 	Update MADV_* constants.
   38515 	* mem.c (madvise_cmds): Add more MADV_* constants from
   38516 	asm-generic/mman-common.h
   38517 
   38518 	Reported-by: Robin Hack <hack.robin (a] gmail.com>
   38519 
   38520 2013-03-07  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38521 
   38522 	Tweaks for -c: fixed setitimer/getitimer hack; optimized call_summary_pers()
   38523 	count_syscall() was calling setitimer/getitimer once in order to find
   38524 	smallest "tick" OS uses in time accounting, in order to use it
   38525 	for syscalls which apparently spent less than that time in syscall.
   38526 	The code assumed that this "tick" is not zero... but it is zero
   38527 	on linux-3.6.11. Which means that this hack doesn't work...
   38528 
   38529 	At least this change prevents this measurement from being done
   38530 	_repeatedly_, by initializing one_tick to -1, not 0.
   38531 
   38532 	While at it, added comments in count_syscall() explaining what we are doing.
   38533 
   38534 	Optimized call_summary_pers() a bit, by eliminating redundant tv -> float
   38535 	conversions, and prevented 0.0/0.0 which was resulting in "% time"
   38536 	being shown as "-nan" if total CPU time spent was 0.000000
   38537 	(try "strace -c /bin/true").
   38538 
   38539 	The code seems to seriously underestimate CPU usage:
   38540 	"strace -c ls -lR /usr/share >/dev/null" shows total time spent
   38541 	in syscalls to be only ~10..20% of what "time ls -lR /usr/share >/dev/null"
   38542 	shows.
   38543 
   38544 	It might be useful to have a mode where we show wall clock time
   38545 	spent in syscalls, not CPU time. It might also be more accurate.
   38546 
   38547 	   text	   data	    bss	    dec	    hex	filename
   38548 	 245019	    676	   5708	 251403	  3d60b	strace_old
   38549 	 244923	    684	   5676	 251283	  3d593	strace
   38550 
   38551 2013-03-06  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38552 
   38553 	Open-code isprint(c) and isspace(c)
   38554 	We don't call setlocale, thus we always use C locale.
   38555 	But libc supports various other locales, and therefore
   38556 	its ctype interface is general and at times inefficient.
   38557 	For example, in glibc these macros result in function call,
   38558 	whereas for e.g. isprint(c) just c >= ' ' && c <= 0x7e
   38559 	suffices.
   38560 
   38561 	By open-coding ctype checks (we have only 4 of them)
   38562 	we avoid function calls, we get smaller code:
   38563 
   38564 	   text	   data	    bss	    dec	    hex	filename
   38565 	 245127	    680	   5708	 251515	  3d67b	strace_old
   38566 	 245019	    676	   5708	 251403	  3d60b	strace
   38567 
   38568 	and we don't link in ctype tables (beneficial for static builds).
   38569 
   38570 2013-03-06  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38571 
   38572 	Makefile: add commented-out tweak to generate link map.
   38573 
   38574 	Stop using a large static buffer in getfdpath.
   38575 	   text	   data	    bss	    dec	    hex	filename
   38576 	 245075	    680	   9836	 255591	  3e667	strace_old
   38577 	 245143	    680	   5708	 251531	  3d68b	strace
   38578 
   38579 2013-03-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38580 
   38581 	Fix wrongly indented closing curly brace. No code changes.
   38582 
   38583 	strace_vfprintf: if malloc fails, exit gracefully.
   38584 
   38585 2013-03-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   38586 
   38587 	Use sysconf(_SC_PAGESIZE) instead of hardcoded PAGE_SHIFT.
   38588 	PAGE_SHIFT couldn't be reliably obtained at compile time,
   38589 	thanks to Chris Metcalf for the hint.
   38590 
   38591 	* mem.c: Do not include <sys/user.h>.
   38592 	[SH64] Do not include <asm/page.h>.
   38593 	(get_pagesize): New function.
   38594 	(sys_mmap_pgoff, sys_old_mmap_pgoff): Use it.
   38595 
   38596 2013-03-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38597 
   38598 	Emit better message for ERESTARTNOHAND return.
   38599 
   38600 	Disable STREAMS syscalls for non-SPARC.
   38601 	   text	   data	    bss	    dec	    hex	filename
   38602 	   3002	      0	   1024	   4026	    fba	stream.o.old
   38603 	   1729	      0	   1024	   2753	    ac1	stream.o
   38604 
   38605 	Fix printstrbufarg's address argument to be long, not int.
   38606 
   38607 	Remove variable tracing_paths and check in pathtrace_match.
   38608 
   38609 2013-03-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38610 
   38611 	Use dynamically-sized selected[] array for -P PATH.
   38612 	While at it, added a small optimization of not remembering
   38613 	the path twice if it happens to be the same.
   38614 
   38615 	   text	   data	    bss	    dec	    hex	filename
   38616 	 245111	    680	  10860	 256651	  3ea8b	strace_old
   38617 	 245075	    680	   9804	 255559	  3e647	strace
   38618 
   38619 2013-03-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38620 
   38621 	metag,or1k: whitesace style fix. no code changes.
   38622 
   38623 	Assorted fixes to syscallent.h.
   38624 	or1k was missing TM on many memory-related syscalls
   38625 	sys_lookup_dcookie is 3-arg on 64-bit arches, and isn't TF
   38626 	sys_recvmsg is 3-arg on all arches
   38627 	sys_nfsservctl is 3-arg on all arches
   38628 	sys_timerfd_create is 2-arg on all arches
   38629 	sys_[f]truncate64 is 4-arg or 3-arg, never 5-arg
   38630 	truncate64 is TF
   38631 	sys_[l]lseek is TD
   38632 	fstat[64] is TD
   38633 
   38634 2013-03-05  James Hogan  <james.hogan (a] imgtec.com>
   38635 
   38636 	Add support for Imagination Technologies Meta.
   38637 	Add support for Imagination Technologies Meta architecture (the
   38638 	architecture/ABI is usually referred to as metag in code). The Meta
   38639 	Linux kernel port is in the process of being upstreamed for v3.9 so it
   38640 	uses generic system call numbers.
   38641 
   38642 	sys_lookup_dcookie writes a filename to buffer argument, so I've set
   38643 	TF flag.
   38644 	nfsservctl appears to be set to sys_ni_syscall in asm-generic/unistd.h
   38645 	so I've left it blank.
   38646 	truncate64/ftruncate64/pread64/pwrite64/readahead have unaligned 64bit
   38647 	args which are packed tightly on metag, so less arguments on metag.
   38648 	fchdir/llseek takes a file descriptor so s/TF/TD/
   38649 	sync_file_range has 2 64bit args so uses 6 args, so s/4/6/
   38650 	timerfd_create/msgget/msgctl/msgrcv/semget/segtimedop/semop/shmget/
   38651 	shmctl/shmat/shmdt/recvmsg/migrate_pages have different number of args.
   38652 	oldgetrlimit is just getrlimit for metag.
   38653 	add TM flag to various memory syscalls.
   38654 	metag doesn't directly use sys_mmap_pgoff for mmap2.
   38655 	prlimit64/process_vm_readv/process_vm_writev take a pid so add TP flag.
   38656 	fanotify_init doesn't appear to take a file descriptor so remove TD.
   38657 	Add kcmp syscall.
   38658 
   38659 	Cc: Christian Svensson <blue (a] cmd.nu>
   38660 
   38661 2013-03-01  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38662 
   38663 	umovestr: speed up check for NUL byte in the fetched word.
   38664 
   38665 2013-03-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   38666 
   38667 	Fix trace=set regression introduced by commit v4.7-111-g9cbc15b.
   38668 	* syscall.c (qual_syscall, qualify): Pass personality down to
   38669 	qualify_one.
   38670 	* tests/qual_syscall: New test.
   38671 	* tests/Makefile.am (TESTS): Add qual_syscall.
   38672 
   38673 2013-03-01  Chris Metcalf  <cmetcalf (a] tilera.com>
   38674 
   38675 	tile: handle printllval like x86_64 or powerpc64.
   38676 	Without this fix the tilegx build fails when it hits the new #error
   38677 	about SIZEOF_LONG > 4.
   38678 
   38679 	* util.c (printllval): Fix printing of long long values on TILE.
   38680 
   38681 2013-02-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38682 
   38683 	Make -b take SYSCALL param, document it in --help and in manpage.
   38684 	To not waste an option letter for just one trick,
   38685 	extend -b to take a parameter:
   38686 	"on which syscalls do you want to detach?".
   38687 	Currently supports only execve.
   38688 
   38689 	While at it, fixed (by removing non-Linux and stale info)
   38690 	and extended manpage text about -f.
   38691 
   38692 2013-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   38693 
   38694 	Cleanup umoven and umovestr.
   38695 	Cleanup sloppy error handling.
   38696 
   38697 	First, EFAULT kind of errors from process_vm_readv by itself is not
   38698 	something unusual, so a warning message will not be issued unless a
   38699 	short read is detected.
   38700 
   38701 	Second, clients of umoven and umovestr are not prepared to detect and
   38702 	handle short reads that can happen in these functions.  The most safe
   38703 	way to handle them is to return an error code.
   38704 
   38705 	* util.c (umoven, umovestr): Cleanup handling of errors coming from
   38706 	process_vm_readv and PTRACE_PEEKDATA.
   38707 
   38708 2013-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   38709 
   38710 	pathtrace: fix umovestr return code check.
   38711 	* pathtrace.c (upathmatch): Only NUL-terminated strings can be
   38712 	path-matched, so fix the umovestr return code check to filter out
   38713 	unsuitable strings.
   38714 
   38715 2013-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   38716 
   38717 	Fix compilation errors uncovered by -Werror=enum-compare.
   38718 	This fixes regression introduced by commit v4.7-111-g9cbc15b.
   38719 
   38720 	* syscall.c: Merge all nsyscalls* enums into single enum.
   38721 	Likewise merge nerrnos*, nsignals*, and nioctlents* into single enums.
   38722 
   38723 2013-02-26  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38724 
   38725 	Mass replace error_msg("%s", "literal") -> error_msg("literal")
   38726 	There is no need to print literal strings through "%s".
   38727 	Only untrusted strings such as filenames need that.
   38728 
   38729 2013-02-26  Ben Noordhuis  <info (a] bnoordhuis.nl>
   38730 
   38731 	Make umoven report success as 0, not >=0, stop returning success on partial reads
   38732 	umoven() uses process_vm_readv() when available but it returns the
   38733 	return value of that syscall, which is the number of bytes copied,
   38734 	while its callers expect it to simply return zero on success.
   38735 
   38736 	It was causing syscalls that take a user-space argument to print
   38737 	the abbreviated version, e.g.:
   38738 
   38739 	  epoll_ctl(5, EPOLL_CTL_ADD, 10, {...})
   38740 
   38741 	Instead of:
   38742 
   38743 	  epoll_ctl(5, EPOLL_CTL_ADD, 10, {EPOLLIN, {u32=10, u64=10}})
   38744 
   38745 	* util.c (umoven): Make umove[n] report success as 0, not >=0,
   38746 	stop returning "success" on partial reads.
   38747 
   38748 2013-02-26  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38749 
   38750 	Assorted NOMMU fixes.
   38751 	With -D, strdup'ing of pathname is necessary only on NOMMU.
   38752 
   38753 	Don't set skip_startup_execve to 1 if NOMMU and not in daemonized mode
   38754 	(try "strace [-D] -b env echo HI" to see whether we detach on correct execve).
   38755 
   38756 	Fix test_ptrace_FOO shortcuts on NOMMU to always assume success
   38757 	and _properly_ set all variables.
   38758 
   38759 2013-02-26  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38760 
   38761 	Shorten help text - no need to show deprecated option -F.
   38762 
   38763 2013-02-23  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38764 
   38765 	Merge adjacent tprint's.
   38766 
   38767 	Correct i > MAX_NSYSCALLS commparison: should be i >= MAX_NSYSCALLS.
   38768 
   38769 2013-02-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38770 
   38771 	Fix wrong offset display in dumpstr.
   38772 	BTW, the new code from prev commit is 5 times faster
   38773 	than old one :)
   38774 
   38775 2013-02-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38776 
   38777 	Fix a bug in dumpstr (no null termination). Essentially rewrote dumpstr.
   38778 	This is a 14 year old bug (!).
   38779 
   38780 	It wasn't biting us merely because outstr[80] was static, thus ended up
   38781 	in bss and whatever was after it "accidentally" provided the NUL byte.
   38782 	When dumpstr was changed to use on-stack buffer, the bug reared its ugly head.
   38783 
   38784 	This is a rewrite which is smaller and should be significantly faster
   38785 	for _long_ strings.
   38786 
   38787 	   text	   data	    bss	    dec	    hex	filename
   38788 	 244627	    680	  10860	 256167	  3e8a7	strace.t9/strace
   38789 	 244563	    680	  10860	 256103	  3e867	strace.ta/strace
   38790 
   38791 	* util.c (dumpstr): Rewrite to be faster and smaller.
   38792 
   38793 2013-02-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38794 
   38795 	Eliminate MAX_QUALS, make qualifier array dynamic.
   38796 	MAX_QUALS was 2048, even though most arches used less than 500 entries
   38797 	in it. MAX_QUALS had to be maintained by hand to be higher than syscall
   38798 	count. It also limited the highest possible fd to track.
   38799 
   38800 	This change makes qual_flagsN[] arrays start sized to the required minimum
   38801 	(number of syscalls) and grow dynamically if user requested
   38802 	-e read=BIGNUM. As a precaution, BIGNUM should be < 2^15, but this limit
   38803 	can be raised with no cost for normal strace invocations.
   38804 
   38805 	qual_flags is now a define to qual_vec[current_personality].
   38806 
   38807 	As a bonus, this patch aliases sysent, errnoent, signalent, ioctlent
   38808 	names in one-personality arches to their corresponding <foo>0 arrays,
   38809 	removing one indirection level.
   38810 
   38811 	  text   data    bss    dec    hex filename
   38812 	244471    700  12928 258099  3f033 strace.t7/strace
   38813 	244627    680  10860 256167  3e8a7 strace.t8/strace
   38814 
   38815 2013-02-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38816 
   38817 	Create and use struct_sysent and struct_ioctlent typedefs.
   38818 	This is a preparatory mass replace patch with no code changes.
   38819 
   38820 	The future change will need to typedef sysent to sysent0,
   38821 	which results in compile failures when "struct sysent" string
   38822 	gets mangled into "struct sysent0".
   38823 
   38824 2013-02-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38825 
   38826 	Use tcp->qual_flg instead of qual_flags[] in verbose() and abbrev()
   38827 	We have hundreds of uses of these macros.
   38828 	Result is more efficient and 1.1 kbyte shorter code:
   38829 
   38830 	  text	   data	    bss	    dec	    hex	filename
   38831 	245579	    700	  12928	 259207	  3f487	strace.t5/strace
   38832 	244471	    700	  12928	 258099	  3f033	strace.t6/strace
   38833 
   38834 2013-02-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38835 
   38836 	Remove unused QUAL_FAULT code (was used by non-Linux code only).
   38837 
   38838 2013-02-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38839 
   38840 	Use uint8_t for qual_flags[] instead of ints.
   38841 	Resulting bss reduction is ~6kbytes:
   38842 
   38843 	   text	   data	    bss	    dec	    hex	filename
   38844 	 245703	    700	  19072	 265475	  40d03	strace.t4/strace
   38845 	 245687	    700	  12928	 259315	  3f4f3	strace.t5/strace
   38846 
   38847 2013-02-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38848 
   38849 	Eliminate many SCNO_IS_VALID checks.
   38850 	By adding tcp->s_ent pointer tot syscall table entry,
   38851 	we can replace sysent[tcp->scno] references by tcp->s_ent.
   38852 	More importantly, we may ensure that tcp->s_ent is always valid,
   38853 	regardless of tcp->scno value. This allows us to drop
   38854 	SCNO_IS_VALID(tcp->scno) checks before we access syscall
   38855 	table entry.
   38856 
   38857 	We can optimize (qual_flags[tcp->scno] & QUAL_foo) checks
   38858 	with a similar technique.
   38859 
   38860 	Resulting code shrink:
   38861 	   text    data     bss     dec     hex filename
   38862 	 245975     700   19072  265747   40e13 strace.t3/strace
   38863 	 245703     700   19072  265475   40d03 strace.t4/strace
   38864 
   38865 	* count.c (count_syscall): Use cheaper SCNO_IN_RANGE() check.
   38866 	* defs.h: Add "int qual_flg" and "const struct sysent *s_ent"
   38867 	to struct tcb. Remove "int u_nargs" from it.
   38868 	Add UNDEFINED_SCNO constant which will mark undefined scnos
   38869 	in tcp->qual_flg.
   38870 	* pathtrace.c (pathtrace_match): Drop SCNO_IS_VALID check.
   38871 	Use tcp->s_ent instead of sysent[tcp->scno].
   38872 	* process.c (sys_prctl): Use tcp->s_ent->nargs instead of tcp->u_nargs.
   38873 	(sys_waitid): Likewise.
   38874 	* strace.c (init): Add compile-time check that DEFAULT_QUAL_FLAGS
   38875 	constant is consistent with init code.
   38876 	* syscall.c (decode_socket_subcall): Use tcp->s_ent->nargs
   38877 	instead of tcp->u_nargs. Set tcp->qual_flg and tcp->s_ent.
   38878 	(decode_ipc_subcall): Likewise.
   38879 	(printargs): Use tcp->s_ent->nargs instead of tcp->u_nargs.
   38880 	(printargs_lu): Likewise.
   38881 	(printargs_ld): Likewise.
   38882 	(get_scno): [MIPS,ALPHA] Use cheaper SCNO_IN_RANGE() check.
   38883 	If !SCNO_IS_VALID, set tcp->s_ent and tcp->qual_flg to default values.
   38884 	(internal_fork): Use tcp->s_ent instead of sysent[tcp->scno].
   38885 	(syscall_fixup_for_fork_exec): Remove SCNO_IS_VALID check.
   38886 	Use tcp->s_ent instead of sysent[tcp->scno].
   38887 	(get_syscall_args): Likewise.
   38888 	(get_error): Drop SCNO_IS_VALID check where it is redundant.
   38889 	(dumpio): Drop SCNO_IS_VALID check where it is redundant.
   38890 	Use tcp->s_ent instead of sysent[tcp->scno].
   38891 	(trace_syscall_entering): Use (tcp->qual_flg & UNDEFINED_SCNO) instead
   38892 	of SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno].
   38893 	Drop SCNO_IS_VALID check where it is redundant.
   38894 	Print undefined syscall name with undefined_scno_name(tcp).
   38895 	(trace_syscall_exiting): Likewise.
   38896 	* util.c (setbpt): Use tcp->s_ent instead of sysent[tcp->scno].
   38897 
   38898 2013-02-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38899 
   38900 	ARM: make it one-personality arch.
   38901 	ARM in fact _is_ one personality.
   38902 
   38903 	We had two personalities for it because it has a handful of
   38904 	syscalls with huge scnos (0x000f00xx).
   38905 
   38906 	Extending syscall table to have [0x000f0005] index is of course
   38907 	not a good idea.
   38908 
   38909 	Someone decided to handle that by having a separate personality
   38910 	just for these syscalls.
   38911 
   38912 	But multi-personality arch does a bit more work in other parts.
   38913 
   38914 	This patch is another alternative: "move" 0x000f00nn syscalls
   38915 	down to the entries just above last ordinary syscall,
   38916 	by manipulating scno if it falls into the 0x000f00xx range.
   38917 
   38918 	In order to not worsen genuine undefined scnos' printing,
   38919 	the code remaps scno back to actual value before printing
   38920 	"syscall_NNN" string.
   38921 
   38922 	* defs.h: Remove multi-reprsonality defines from ARM.
   38923 	* syscall.c (shuffle_scno): New function.
   38924 	(undefined_scno_name): New function.
   38925 	(get_scno): [ARM] Replace personality setting with scno shuffling.
   38926 	(trace_syscall_entering): Print unknown syscall name using
   38927 	undefined_scno_name().
   38928 	(trace_syscall_exiting): Likewise.
   38929 	* linux/arm/syscallent.h: Add ARM specific syscalls at the end.
   38930 	* linux/arm/errnoent1.h: Deleted.
   38931 	* linux/arm/ioctlent1.h: Deleted.
   38932 	* linux/arm/signalent1.h: Deleted.
   38933 	* linux/arm/syscallent1.h: Deleted.
   38934 
   38935 2013-02-20  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38936 
   38937 	arm: shorten syscall table for EABI - no point in storing NULL entries.
   38938 	Also, reformatted ARM code in get_scno(), mostly improved comments,
   38939 	without code changes.
   38940 
   38941 	Use the same style of includes in linux/*/* files.
   38942 	While at it, fix some comments which say
   38943 	"we use i386 syscalls/ioctls/errnos" but in reality
   38944 	common ones are used.
   38945 
   38946 2013-02-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38947 
   38948 	Fix compiler warnings.
   38949 	With constant current_wordsize == 4 and 32-bit longs,
   38950 	gcc was spooked by "1ul << (8 * current_wordsize)" = "1ul << 32".
   38951 
   38952 	Make such places conditional on SIZEOF_LONG > 4.
   38953 
   38954 2013-02-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38955 
   38956 	Improve comment text. No code changes.
   38957 
   38958 2013-02-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38959 
   38960 	Fix NOMMU + daemonized tracer SEGV.
   38961 	pathname[] was getting destroyed, execve of garbage pathname
   38962 	failing, and to top it off, the tracer's stack was also
   38963 	smashed and trecer segfaulted.
   38964 
   38965 	* strace.c (exec_or_die): New function.
   38966 	(startup_child): Don't use pathname[] contents after vfork,
   38967 	make a malloced copy instead. Explain "NOMMU + -D bug"
   38968 	and how we work around it.
   38969 
   38970 2013-02-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38971 
   38972 	Make it possible to to do test builds for NOMMU architectures.
   38973 	And while using it, I discovered that -D doesn't work too well
   38974 	on NOMMU. Added a comment about it.
   38975 
   38976 2013-02-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   38977 
   38978 	Clean up mmap decoding.
   38979 	Previous code merges too many similar, but different ways
   38980 	of decoding mmap. For example, sys_old_mmap is "params in memory"
   38981 	API... except SH[64], where it is "params in regs",
   38982 	i.e. what sys_mmap ("new mmap") function does on other arches!
   38983 
   38984 	It's much simpler when every mmap handler has same API regardless
   38985 	of arch. Where API means whether params are in regs or in memory,
   38986 	and whether offset is in bytes, pages, or 4k blocks.
   38987 
   38988 	Then we just insert correct function pointers into
   38989 	arch syscall tables.
   38990 
   38991 	It turns out there are four common mmap APIs over
   38992 	all architectures which exist in Linux kernel,
   38993 	and one outlier for S390.
   38994 
   38995 	A number of mmap decoders were plain wrong in arch tables.
   38996 	For example, BFIN has no old_mmap. It returns ENOSYS.
   38997 	I checked kernel sources for all arches nad fixed the tables.
   38998 
   38999 	There was dead code for x86_64 for old_mmap:
   39000 	x86_64 has no old_mmap.
   39001 
   39002 	* mem.c: Refactor mmap functions so that we have five mmap syscall
   39003 	handlers, each with the fixed API (not varying by arch).
   39004 	* pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks.
   39005 	* linux/syscall.h: Declare new mmap syscall handler functions.
   39006 	* linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff.
   39007 	* linux/avr32/syscallent.h: mmap is sys_mmap_pgoff.
   39008 	* linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff.
   39009 	* linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff.
   39010 	* linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff.
   39011 	* linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff.
   39012 	* linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff.
   39013 	* linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff.
   39014 	* linux/mips/syscallent.h: mmap is sys_mmap_4kgoff.
   39015 	* linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff.
   39016 	* linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff.
   39017 	* linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff.
   39018 	* linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg.
   39019 	* linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff.
   39020 	* linux/sh64/syscallent.h: Likewise.
   39021 	* linux/sparc/syscallent1.h: mmap is TD|TM.
   39022 	* linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff.
   39023 
   39024 2013-02-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39025 
   39026 	Remove unused function sys_mmap64.
   39027 	No wonder that it is unused.
   39028 	It's code looked quite questionable.
   39029 
   39030 	* mem.c (sys_mmap64): Remove this function.
   39031 
   39032 2013-02-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39033 
   39034 	Remove code which supports systems with long long off_t.
   39035 	While looking at mmap mess, did experimenting in order
   39036 	to figure out what gets used when.
   39037 
   39038 	Tried building armv4tl, armv5l, armv6l, mips, mipsel, i686,
   39039 	x86_64 and none of they have long long off_t,
   39040 	which isn't suprprising: we aren't using glibc defines
   39041 	which enable that.
   39042 
   39043 	Moreover, we SHOULD NOT use off_t in syscall decode!
   39044 	Its size depends on libc, not on arch! I.e. it is essentially
   39045 	unpredictable and can even in theory vary on the same arch
   39046 	with different libc.
   39047 
   39048 	We should use longs or long longs, in a way which matches
   39049 	architectural ABI for the given syscall. There are usually
   39050 	*at most* two permutations, no need to add yet another variable
   39051 	(sizeof(off_t)) to the mix.
   39052 
   39053 	This change removes almost all HAVE_LONG_LONG_OFF_T conditionals,
   39054 	which will reveal further possible simplifications.
   39055 
   39056 	* mem.c: Remove code conditional on HAVE_LONG_LONG_OFF_T.
   39057 	As a result, never remap sys_mmap64 to sys_mmap.
   39058 	(print_mmap): Compile unconditionally.
   39059 	(sys_old_mmap): Compile unconditionally.
   39060 	(sys_mmap): Compile unconditionally.
   39061 	* io.c (sys_sendfile): Add a FIXME comment.
   39062 	* file.c: Remove code conditional on HAVE_LONG_LONG_OFF_T.
   39063 	As a result, never remap sys_*stat64 to sys_*stat etc.
   39064 	(sys_truncate): Compile unconditionally.
   39065 	(realprintstat): Likewise.
   39066 	(sys_stat): Likewise.
   39067 	(sys_fstat): Likewise.
   39068 	(sys_lstat): Likewise.
   39069 	* desc.c (printflock): Likewise.
   39070 
   39071 2013-02-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39072 
   39073 	Fixes in "new" mmap.
   39074 	* mem.c (sys_mmap): Ensure unsigned expansion of tcp->u_arg[5].
   39075 	Add page shift of offset for I386.
   39076 	Use tcp->ext_arg[5] as offset for X32.
   39077 	(sys_old_mmap): [X32] Remove this function, X32 doesn't use is.
   39078 
   39079 	Preliminary simplifications in mmap functions.
   39080 	* mem.c: Move "define sys_mmap64 sys_mmap" from the top
   39081 	to the only place it affects.
   39082 	(print_mmap): Make offset argument unsigned, for safer implicit conversions.
   39083 	(sys_old_mmap): [IA64] use unsigned narrow_arg[].
   39084 	Cast u_arg[5] (offset param) to unsigned long, to prevent erroneous signed
   39085 	expansion.
   39086 
   39087 2013-02-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39088 
   39089 	Remove broken HAVE_LONG_LONG conditionals.
   39090 	We use printllval without HAVE_LONG_LONG guards in many places,
   39091 	but define it only if HAVE_LONG_LONG. This means that
   39092 	on !HAVE_LONG_LONG systems we won't build for some time now.
   39093 
   39094 	* defs.h: Remove HAVE_LONG_LONG guard around LONG_LONG() macro
   39095 	and printllval() function declaration.
   39096 	* util.c: Remove HAVE_LONG_LONG guard around printllval()
   39097 	function definition.
   39098 	(printllval): Add compile-time error check for using wrong
   39099 	if branch. Explain places where we deliberately use mismatched
   39100 	types for printf formats.
   39101 
   39102 2013-02-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39103 
   39104 	Use explicit long type instead of off_t.
   39105 	* file.c (sys_lseek): Use long instead of off_t.
   39106 
   39107 	Merge two identical tables.
   39108 	* defs.h: Declare whence_codes[].
   39109 	* desc.c: Delete static whence[].
   39110 	(printflock[64]): Use whence_codes.
   39111 	* file.c: Make whence_codes[] non-static.
   39112 	Add SEEK_DATA and SEEK_HOLE to them.
   39113 
   39114 2013-02-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39115 
   39116 	Remove wrong x32-specific lseek.
   39117 	Testing confirmed what I suspected: x32 lseek uses kernel-sized
   39118 	(i.e. wide) long for offset parameter.
   39119 
   39120 	* file.c: Delete sys_lseek32.
   39121 	* linux/syscall.h: Likewise.
   39122 	* linux/x32/syscallent1.h: Likewise.
   39123 	* test/x32_lseek.c: New file.
   39124 
   39125 2013-02-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39126 
   39127 	Fix SEGV in lseek.
   39128 	I found hard way why the code was using "_whence" name.
   39129 
   39130 	* file.c: Rename whence[] to whence_codes[].
   39131 	(sys_lseek): Fix printxval() to use whence_codes[].
   39132 	(sys_lseek32): Likewise.
   39133 
   39134 2013-02-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39135 
   39136 	Comment inner workings of sys_[l]lseek.
   39137 	The code doesn't look fully correct to me, but I need to experiment
   39138 	on actual x32 machine before I start "fixing" things.
   39139 	For now, add comments, and optimize out one tprints() call...
   39140 
   39141 	* file.c (sys_lseek): Rename '_whence' as 'whence'.
   39142 	Merge printing of ", " into subsequent tprintf.
   39143 	(sys_lseek32): Likewise.
   39144 	(sys_llseek): Likewise.
   39145 
   39146 2013-02-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39147 
   39148 	Cosmetic fixes to syscall tables, no code changes.
   39149 
   39150 2013-02-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39151 
   39152 	Make linux/mips/syscallent.h smaller.
   39153 	* linux/mips/syscallent.h: Remove trailing empty elements.
   39154 	Compactify huge stretches of NULL elements in the middle.
   39155 
   39156 	Simple optimization in get_error.
   39157 	* defs.h: Define SCNO_IN_RANGE(scno) macro.
   39158 	* syscall.c (get_error): Change return type to void.
   39159 	Use SCNO_IN_RANGE instead of SCNO_IS_VALID.
   39160 	(trace_syscall_exiting): Stop checking get_error() return value.
   39161 
   39162 	Mass rename of SCNO_IN_RANGE define to SCNO_IS_VALID.
   39163 
   39164 	Finish prefixing regs struct names with arch_
   39165 	* defs: Rename regs -> sparc_regs.
   39166 	* signal.c (sys_sigreturn): Use new variable name.
   39167 	* syscall.c: Rename regs -> sparc_regs, regs -> avr32_regs.
   39168 	(getrval2): Use new variable names.
   39169 	(printcall): Likewise.
   39170 
   39171 2013-02-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39172 
   39173 	Use the same type for i386_regs on 32-bit and 64-bit x86.
   39174 	* defs.h: Stop including <asm/ptrace.h> for x86.
   39175 	Change i386_regs from "struct pt_regs" to "struct user_regs_struct".
   39176 	* syscall.c: Likewise.
   39177 
   39178 	Fix build error on Tile.
   39179 	* syscall.c (get_scno): [TILE] Remove TCB_WAITEXECVE check,
   39180 	it is never true on Tile, and stopped compiling when
   39181 	TCB_WAITEXECVE define was removed for Tile.
   39182 
   39183 2013-02-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39184 
   39185 	x86: zero-extend 32-bit args in syscall entry instead of sign-extension.
   39186 	Zero-extension is slightly more common that sign-extension:
   39187 	all pointers are zero-extended, and some other params are unsigned.
   39188 
   39189 	Whereas signed ones (fds, pids, etc) are often treated as
   39190 	_32-bit ints_ even by kernel, so just unconditionally casting
   39191 	such tcp->u_arg[N] to int works.
   39192 
   39193 	* syscall.c (get_syscall_args): [X86] Zero-extend 32-bit args
   39194 	instead of sign-extension.
   39195 
   39196 2013-02-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39197 
   39198 	Macroize conditional signed widening operation.
   39199 	* defs.h: Define widen_to_long() macro.
   39200 	* signal.c (sys_kill): Use it instead of open-coding it.
   39201 	(sys_tgkill): Use widen_to_long() on pids.
   39202 	* resource.c (decode_rlimit): Formatting fix.
   39203 
   39204 2013-02-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39205 
   39206 	A better handling of current_wordsize.
   39207 	On x86_64:
   39208 	  text	   data	    bss	    dec	    hex	filename
   39209 	435661	  26628	  47424	 509713	  7c711	strace_old
   39210 	435501	  26612	  47440	 509553	  7c671	strace_new_clever_wordsize
   39211 
   39212 	On x32 and arm it should be even better, current_wordsize becomes
   39213 	a constant there.
   39214 
   39215 	* defs.h: Declare current_wordsize as a variable if needed,
   39216 	else declare as a constant define.
   39217 	Remove declatation of personality_wordsize[].
   39218 	* syscall.c: Make personality_wordsize[] static.
   39219 	Declare current_wordsize as a variable if needed.
   39220 	(set_personality): Set current_wordsize only if non-constant.
   39221 
   39222 2013-02-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39223 
   39224 	Remove unnecessary "return 0" statements.
   39225 	* util.c (change_syscall): Remove dummy "return 0"s.
   39226 
   39227 2013-02-14  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39228 
   39229 	x86: fix required kernel version for GETREGSET.
   39230 	* syscall.c (get_regs): [X86] Use GETREGSET only if kernel >= 2.6.35
   39231 
   39232 	Whitespace fix, no code changes.
   39233 
   39234 2013-02-14  Christian Svensson  <blue (a] cmd.nu>
   39235 
   39236 	Add support for the OpenRISC 1000 platform.
   39237 	* configure.ac: Added or1k architecture..
   39238 	* defs.h: Added or1k to use register reading system.
   39239 	* linux/or1k/ioctlent.h.in: Use i386 ioctls.
   39240 	* linux/or1k/syscallent.h: New file.
   39241 	* process.c: Added or1k register defs to struct_user_offsets[].
   39242 	* syscall.c: Added or1k_io iovec for or1k GETREGSET,
   39243 	 regset structure for or1k.
   39244 	 (printcall): Added handling for or1k.
   39245 	 (get_regs): Likewise.
   39246 	 (get_scno): Likewise.
   39247 	 (get_syscall_args): Likewise.
   39248 	 (get_syscall_result): Likewise.
   39249 	  (get_error): Likewise.
   39250 	* util.c (change_syscall): Added dummy handling for or1k.
   39251 	* system.c (sys_or1k_atomic): New function (or1k specific syscall).
   39252 
   39253 2013-02-14  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39254 
   39255 	[X86] Use ptrace(PTRACE_GETREGSET, NT_PRSTATUS) to get registers.
   39256 	Unlike PTRACE_GETREGS, this new method detects 32-bit processes
   39257 	reliably, without checking segment register values which
   39258 	are undocumented and aren't part of any sort of API.
   39259 	While at it, also fixed x32 detection to use __X32_SYSCALL_BIT,
   39260 	as it should have been from the beginning.
   39261 
   39262 	* defs.h: Declare os_release and KERNEL_VERSION.
   39263 	* strace.c: Make os_release non-static, remove KERNEL_VERSION define.
   39264 	* syscall.c: New struct i386_user_regs_struct,
   39265 	static union x86_regs_union and struct iovec x86_io.
   39266 	(printcall): Use i386_regs or x86_64_regs depending on x86_io.iov_len.
   39267 	(get_regs): On x86 and kernels 2.6.30+, use PTRACE_GETREGSET,
   39268 	on earlier kernels fall back to old method.
   39269 	(get_scno): [X86] Determine personality based on regset size
   39270 	on scno & __X32_SYSCALL_BIT.
   39271 	(syscall_fixup_on_sysenter): Use i386_regs or x86_64_regs depending
   39272 	on x86_io.iov_len.
   39273 	(get_syscall_args): Likewise.
   39274 	(get_error): Likewise.
   39275 
   39276 2013-02-13  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39277 
   39278 	Rename some register statics by prefixing their names with arch.
   39279 	This makes it easier to grep for them.
   39280 
   39281 	* syscall.c: Rename variables:
   39282 	r0 -> bfin_r0,alpha_r0,sh_r0.
   39283 	a3 -> mips_a3.
   39284 	r2 -> mips_r2.
   39285 	(get_scno): Use new variable names.
   39286 	(get_syscall_result): Likewise.
   39287 	(get_error): Likewise.
   39288 
   39289 2013-02-13  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39290 
   39291 	Factor out code to check addr, fetch and print siginfo.
   39292 	* defs.h: Declare new function printsiginfo_at(tcp, addr).
   39293 	* process.c (sys_waitid): Use printsiginfo_at().
   39294 	(sys_ptrace): Likewise.
   39295 	* signal.c: (printsiginfo_at): Implement this new function.
   39296 	(sys_rt_sigsuspend): Use printsiginfo_at().
   39297 	(sys_rt_sigtimedwait): Likewise.
   39298 
   39299 	Decode struct iov in PTRACE_GET/SETREGSET.
   39300 	* process.c (sys_ptrace): Decode struct iov in PTRACE_GET/SETREGSET.
   39301 
   39302 2013-02-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39303 
   39304 	Unify representations of struct user fields for subarchitectures.
   39305 	* process.c: Unify MIPS and LINUX_MIPSN32, and SH and SH64 parts of
   39306 	struct_user_offsets[].
   39307 
   39308 	Add start_code and start_data members of struct user.
   39309 	* process.c: Add start_code and start_data members of struct user
   39310 	in struct_user_offsets[], where appropriate.
   39311 
   39312 	Remove hacks for old kernels for architectures which require new kernels
   39313 	* util.c (change_syscall): For MICROBLAZE, replace code
   39314 	with dummy "return 0" and a comment explaining why that is ok
   39315 	for this architecture.
   39316 
   39317 2013-02-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39318 
   39319 	Remove stray syscall result reading code on syscall entry for s390.
   39320 	This is a leftover from sysenter/sysexit split.
   39321 	I can't run-test it, but from code inspection it seems to be correct.
   39322 
   39323 	* syscall.c (get_scno): Remove stray syscall result reading for s390[x].
   39324 
   39325 2013-02-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39326 
   39327 	Deobfuscate definitions of struct user offsets.
   39328 	The maze of ifdefs/ifndefs was scaring new contributors.
   39329 	Format it so that every arch has its own ifdef block.
   39330 
   39331 	* process.c: Deobfuscate definitions of struct user offsets.
   39332 
   39333 2013-02-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39334 
   39335 	Remove hacks for old kernels for architectures which require new kernels
   39336 	* defs.h: Do not define TCB_WAITEXECVE for AARCH64.
   39337 	* util.c (change_syscall): For AARCH64 and X32, replace code
   39338 	with dummy "return 0" and a comment explaining why that is ok
   39339 	for these architectures.
   39340 
   39341 	Remove old kernel hacks for architectures which require new kernels.
   39342 	* defs.h: Do not define TCB_WAITEXECVE for AVR32, BFIN and TILE.
   39343 	* util.c (change_syscall): For AVR32, BFIN and TILE, replace code
   39344 	with dummy "return 0" and a comment explaining why that is ok
   39345 	for these architectures.
   39346 
   39347 	Handle recv[m]msg for non-native 32-bit personality syscalls.
   39348 	* net.c (printmsghdr): If current_wordsize is 4 and long is wider than it,
   39349 	read 32-bit struct msghdr and expand it into a native one before using it.
   39350 	(printmmsghdr): Likewise for struct mmsghdr.
   39351 
   39352 2013-02-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39353 
   39354 	Fix is_negated_errno() check for X32.
   39355 	X32's return value is 64-bit. We were truncating it to 32-bit long
   39356 	before checking for -errno.
   39357 
   39358 	* syscall.c (is_negated_errno_x32): New function.
   39359 	(get_error): Use is_negated_errno_x32 for X32 architecture.
   39360 
   39361 2013-02-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39362 
   39363 	Remove unused / ambiguously used defines.
   39364 	We sometimes use LINUXSPARC and sometimes (more often)
   39365 	use "defined(SPARC) || defined(SPARC64)". Better to use
   39366 	one construct consistently.
   39367 	LINUX_MIPS64 is altogether unused.
   39368 
   39369 	* defs.h: Remove LINUXSPARC and LINUX_MIPS64 defines.
   39370 	Move PTRACE_xxx compat defines up, before arch-specific
   39371 	machinery. Use defined(SPARC) || defined(SPARC64)
   39372 	instead of LINUXSPARC.
   39373 	* file.c: Use defined(SPARC) || defined(SPARC64) instead of LINUXSPARC.
   39374 	* signal.c: Likewise.
   39375 
   39376 2013-02-11  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39377 
   39378 	Preparatory patch for "new" x86 personality detection.
   39379 	* syscall.c: Move PT_FLAGS_COMPAT define to its only user, get_scno().
   39380 	Rename arm_regs_union's fields to names less likely to collide with
   39381 	system defines.
   39382 	(get_regs): Use sizeof(arm_regs_union) instead of sizeof(aarch64_regs).
   39383 	This should be the same, but htis way it's cleaner.
   39384 	Remove __X32_SYSCALL_MASK and use __X32_SYSCALL_BIT instead.
   39385 	Explain 64-bit check in X32 build better.
   39386 
   39387 2013-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   39388 
   39389 	Fix sigaltstack decoder.
   39390 	strace used to hang when decoding sigaltstack called with invalid
   39391 	stack_t pointers because of mishandling umove() return code.
   39392 
   39393 	* signal.c (print_stack_t): Handle unfetchable stack_t properly.
   39394 	Change return type to void.
   39395 	(sys_sigaltstack): Update print_stack_t() usage.
   39396 
   39397 	Reported-by: kawillia (a] ucalgary.ca
   39398 
   39399 2013-02-09  Mike Frysinger  <vapier (a] gentoo.org>
   39400 
   39401 	Fix decoding of sysctl() when oldval fields are NULL.
   39402 	If you call glibc's syscall wrapper like so:
   39403 		static int name[] = { CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE };
   39404 		int buffer[2] = { 32768, 61000 };
   39405 		size_t size = sizeof(buffer);
   39406 		sysctl(name, 3, 0, 0, buffer, size);
   39407 	(note that oldval/oldlenp are NULL).
   39408 
   39409 	The current strace code complains like so:
   39410 	_sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, process_vm_readv: Bad address
   39411 	(nil), 0, 0x7fffe23c3960, 8}) = -1 EACCES (Permission denied)
   39412 
   39413 	Since passing NULL for the old values is valid, handle that explicitly.
   39414 	This also simplifies the code a bit by splitting up the handling of the
   39415 	new and old args so that we only handle the new args once.
   39416 
   39417 	Now the output looks like:
   39418 	_sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, NULL, 0, 0x7fff8c0c91b0, 8) = -1 EACCES (Permission denied)
   39419 
   39420 	* system.c (sys_sysctl): Check if info.oldval is NULL first.  Move the
   39421 	processing of oldlen/info.newval/info.newlen out so they always get
   39422 	executed.  Fix the format strings so we use %lu for unsigned long rather
   39423 	than a mix of %ld and %lu.
   39424 
   39425 2013-02-08  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39426 
   39427 	If we are on a glibc system, assume it's at least glibc 2.1.
   39428 	It is not likely anyone uses glibc older that that:
   39429 	glibc 2.1.1 was released in 1999
   39430 
   39431 	* net.c: Remove test for glibc >= 2.1.
   39432 	* signal.c: Remove code which is compiled only for glibc < 2.1.
   39433 	* util.c: Likewise.
   39434 
   39435 2013-02-08  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39436 
   39437 	S390: stop using needlessly static long pc variable.
   39438 	* syscall.c: Remove "static long pc" variable.
   39439 	(get_scno): Use an automatic long variable instead of a static.
   39440 
   39441 	Dying suddenly with abort() is rude, avoid if possible.
   39442 	* file.c (sys_utime): Don't call abort() if wordsize is strange.
   39443 	Instead, warn user about it.
   39444 	* desc.c (printflock): Use the same message string as in sys_utime.
   39445 
   39446 	Remove vestigial hacks around non-Linux struct sigactions.
   39447 	* signal.c: Stop using __sighandler_t glibc'ism. Remove SA_HANDLER macro.
   39448 	Explain why we can't use "sa_handler" as a field name.
   39449 	(sys_sigaction): Use __sa_handler instead of SA_HANDLER macro.
   39450 	(sys_rt_sigaction): Likewise.
   39451 
   39452 2013-02-08  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39453 
   39454 	Optimize AArch64 handling of 32-bit personality.
   39455 	By putting aarch64_regs and arm_regs into a union,
   39456 	register copying is eliminated.
   39457 	No need to check and change personality on syscall exit.
   39458 
   39459 	* defs.h: Remove unused NUM_ARM_REGS define. Fix indentation.
   39460 	* syscall.c: Put aarch64_regs and arm_regs into a union.
   39461 	(update_personality): Shorten bitness message.
   39462 	(printcall): Add commented-out PC printing.
   39463 	(get_regs): Remove now-unnecessary 64-to-32 bits register copying.
   39464 	(get_syscall_result): Drop personality changing code.
   39465 
   39466 2013-02-07  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39467 
   39468 	Rename some register statics by prefixing their names with arch.
   39469 	This makes it easier to grep for them.
   39470 
   39471 	* syscall.c: Make IA64's r8, r10 global variables static.
   39472 	Rename variables:
   39473 	r8,r10 -> ia64_r8,ia64_r10.
   39474 	d0 -> m68k_d0.
   39475 	a3 -> alpha_a3.
   39476 	r28 -> hppa_r28.
   39477 	r9 -> sh64_r9.
   39478 	r10 -> cris_r10.
   39479 	r3 -> microblaze_r3.
   39480 	(get_scno): Use new variable names.
   39481 	(syscall_fixup_on_sysenter): Likewise.
   39482 	(get_syscall_result): Likewise.
   39483 	(get_error): Likewise.
   39484 
   39485 2013-02-06  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39486 
   39487 	Rename ARM's regs structure to arm_regs.
   39488 	Compile-tested.
   39489 
   39490 	* defs.h: Rename regs structure to arm_regs.
   39491 	* syscall.c: Likewise.
   39492 	(printcall): Use new name instead of old one.
   39493 	(get_regs): Likewise.
   39494 	(get_scno): Likewise.
   39495 	(get_syscall_args): Likewise.
   39496 	(get_error): Likewise.
   39497 	* signal.c (sys_sigreturn): Likewise.
   39498 
   39499 2013-02-06  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39500 
   39501 	Stop needlessly using static variable.
   39502 	* syscall.c: Remove static long psr.
   39503 	(get_scno): Use local psr variable.
   39504 	(get_syscall_result): Likewise.
   39505 
   39506 2013-02-06  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39507 
   39508 	Shortcut tests for fork/exec syscalls.
   39509 	This change should speed up strace by a tiny bit.
   39510 
   39511 	More importantly, it makes it much more clear that
   39512 	fork and exec fixups are not necessary for any reasonably
   39513 	recent kernels. IOW: syscall_fixup_for_fork_exec() and its callees
   39514 	are all dead code.
   39515 
   39516 	* defs.h: Declare new need_fork_exec_workarounds flag variable.
   39517 	* strace.c: Define need_fork_exec_workarounds flag variable.
   39518 	(test_ptrace_setoptions_followfork): Return 0/1 as success/fail indicator.
   39519 	(test_ptrace_setoptions_for_all): Likewise.
   39520 	(init): Set need_fork_exec_workarounds to TRUE if needed.
   39521 	* syscall.c: Rename internal_syscall() to syscall_fixup_for_fork_exec().
   39522 	(trace_syscall_entering): Call syscall_fixup_for_fork_exec() only if
   39523 	need_fork_exec_workarounds == TRUE.
   39524 	(trace_syscall_exiting): Likewise.
   39525 
   39526 2013-02-05  Ben Noordhuis  <info (a] bnoordhuis.nl>
   39527 
   39528 	Improve perf_event_open argument decoding.
   39529 	* configure.ac (AC_CHECK_HEADERS): Add linux/perf_event.h.
   39530 	* desc.c [HAVE_LINUX_PERF_EVENT_H]: Include <linux/perf_event.h>.
   39531 	(perf_event_open_flags): New xlat structure.
   39532 	(sys_perf_event_open): New function.
   39533 	* linux/dummy.h (sys_perf_event_open): Remove.
   39534 	* linux/syscall.h (sys_perf_event_open): New prototype.
   39535 
   39536 2013-02-05  Chris Metcalf  <cmetcalf (a] tilera.com>
   39537 
   39538 	tile: fix merge skew with new get_regs architecture.
   39539 	* defs.h [TILE]: Declare clear_regs(), get_regs() and get_regs_error.
   39540 	* syscall.c (get_regs) [TILE]: Fix merge skew.
   39541 	(printcall) [TILE]: fix a compiler warning about pt_reg_t in
   39542 	a printf expression.
   39543 
   39544 2013-02-05  Bernhard Reutner-Fischer  <rep.dot.nop (a] gmail.com>
   39545 
   39546 	mount: decode MS_NOSEC.
   39547 	* system.c (MS_NOSEC): Define.
   39548 	(mount_flags): Add MS_NOSEC.
   39549 
   39550 	mmap: decode MAP_UNINITIALIZED.
   39551 	* mem.c (mmap_flags): Add MAP_UNINITIALIZED.
   39552 
   39553 2013-02-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   39554 
   39555 	Print 64-bit instruction pointers zero padded.
   39556 	* syscall.c (printcall): Print 64-bit instruction pointers zero padded.
   39557 
   39558 	x86_64: fix compilation warning introduced in previous commit.
   39559 	* syscall.c (printcall): Cast x86_64_regs.rip to the type being printed.
   39560 
   39561 2013-02-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39562 
   39563 	Simple bug fix for x86_86.
   39564 	* syscall.c (printcall): Use x86_64_regs.rip, not x86_64_regs.ip.
   39565 
   39566 2013-02-05  Chris Metcalf  <cmetcalf (a] tilera.com>
   39567 
   39568 	Add tilegx support to strace.
   39569 	tilegx support has been in the kernel since 3.0.
   39570 	In addition, fix some issues with the tilepro support already
   39571 	present in strace, primarily the decision to use the
   39572 	<asm/unistd.h> numbering space for system calls.
   39573 
   39574 	* defs.h [TILE]: Include <asm/ptrace.h> and provide an extern
   39575 	struct pt_regs tile_regs for efficiency.  Provide compat 32-bit
   39576 	personality via SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE,
   39577 	PERSONALITY1_WORDSIZE, and DEFAULT_PERSONALITY.
   39578 	* linux/tile/errnoent1.h: New file, includes linux/errnoent.h.
   39579 	* linux/tile/ioctlent1.h: New file, includes linux/ioctlent.h.
   39580 	* linux/tile/signalent1.h: New file, includes linux/signalent.h.
   39581 	* linux/tile/syscallent.h: Update with new asm-generic syscalls.
   39582 	The version previously committed was the from the first tile patch
   39583 	to LKML, which subsequently was changed to use <asm-generic/unistd.h>.
   39584 	* linux/tile/syscallent1.h: Copy from linux/tile/syscallent.h.
   39585 	* mem.c (addtileflags) [TILE]: use %ld properly for a "long" variable.
   39586 	* process.c [TILE]: Choose clone arguments correctly and properly
   39587 	suppress all "struct user" related offsets in user_struct_offsets.
   39588 	* signal.c [TILE]: Use tile_regs not upeek.
   39589 	* syscall.c (update_personality) [TILE]: Print mode.
   39590 	(PT_FLAGS_COMPAT) [TILE]: Provide if not in system headers.
   39591 	(tile_regs) [TILE]: Define 'struct pt_regs' variable to hold state.
   39592 	(get_regs) [TILE]: use PTRACE_GETREGS to set tile_regs rather than using upeek.
   39593 	(get_scno) [TILE]: Set personality.
   39594 	(get_syscall_args) [TILE]: Use tile_regs.
   39595 	(get_syscall_result) [TILE]: Update tile_regs.
   39596 	(get_error) [TILE]: Use tile_regs.
   39597 	(printcall) [TILE]: Print pc.
   39598 	(arg0_offset, arg1_offset, restore_arg0, restore_arg1) [TILE]:
   39599 	Properly handle tile call semantics and support tilegx.
   39600 
   39601 2013-02-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39602 
   39603 	Small optimization for SPARC[64] get_scno.
   39604 	* syscall.c: Remove static unsigned long trap veriable.
   39605 	(get_scno): Use local trap variable.
   39606 
   39607 	Do not compile getrval2() if not needed.
   39608 	* syscall.c (getrval2): Do not compile it for architetures where
   39609 	it isn't ever used.
   39610 
   39611 2013-02-05  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39612 
   39613 	Optimize out PTRACE_PEEKUSER with -i.
   39614 	strace -i was fetching PC with a separate PEEKUSER
   39615 	despite having GETREGS data:
   39616 
   39617 	ptrace(PTRACE_GETREGS, 22331, 0, 0x8087f00) = 0
   39618 	ptrace(PTRACE_PEEKUSER, 22331, 4*EIP, [0x80dd7b7]) = 0
   39619 	write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82
   39620 	ptrace(PTRACE_SYSCALL, 22331, 0, SIG_0) = 0
   39621 
   39622 	Now it does this:
   39623 
   39624 	ptrace(PTRACE_GETREGS, 22549, 0, 0x8087ea0) = 0
   39625 	write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82
   39626 	ptrace(PTRACE_SYSCALL, 22549, 0, SIG_0) = 0
   39627 
   39628 	Analogous improvement in sys_sigreturn() is also implemented.
   39629 
   39630 	* defs.h: Declare extern struct pt_regs regs for SPARC[64] and ARM.
   39631 	Declare clear_regs(), get_regs() and get_regs_error flag variable.
   39632 	* strace.c (trace): Call get_regs(pid) as soon as we know the tcb
   39633 	and that it is stopped.
   39634 	* syscall.c (get_regs): New function. Used to fetch registers early,
   39635 	just after tracee has stopped.
   39636 	(printcall): Move it here from util.c. Use global regs.REG data,
   39637 	if available on the arch, instead of re-fetching it.
   39638 	(get_scno): Use global regs.REG data.
   39639 	(get_syscall_result): Likewise.
   39640 	* signal.c (sys_sigreturn): Likewise.
   39641 	* util.c (printcall): Moved to syscall.c.
   39642 
   39643 2012-12-15  Stanislav Brabec  <sbrabec (a] suse.cz>
   39644 
   39645 	Fix sys_semtimedop decoding on s390x.
   39646 	The s390 and s390x pass semtimedop arguments differently from other
   39647 	architectures.  sys_semtimedop parser was fixed for s390 by commit
   39648 	v4.6-177-ge0f5fd8, and s390x requires the same fix.
   39649 
   39650 	* linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390x.
   39651 
   39652 2012-12-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   39653 
   39654 	Fix *xattr decoding.
   39655 	* file.c (print_xattr_val): Do not attempt to decode a zero sized array.
   39656 	Fixes RH#885233.
   39657 
   39658 2012-12-08  Stanislav Brabec  <sbrabec (a] suse.cz>
   39659 
   39660 	sys_semtimedop: fix timeval argument index in wrapped call.
   39661 	Looking at the implementation of wrapped semtimedop() call inside glibc
   39662 	and kernel, I started to believe that timeval should be located in
   39663 	tcp->u_arg[4] and not tcp->u_arg[5].  Fortunately, tcp->u_arg[5] now
   39664 	works correctly as well, due to side effects of decode_ipc_subcall().
   39665 
   39666 	declaration in header:
   39667 	int semtimedop(semid, *sops, nsops, *timeout);
   39668 	                 0      1      2        3
   39669 
   39670 	sys_ipc arguments in glibc on all patforms except s390*:
   39671 	semid, (int) nsops, 0, CHECK_N (sops, nsops), timeout
   39672 	  0            1    2            3                4
   39673 	We have to use indexes: 0 3 1 4
   39674 
   39675 	sys_ipc arguments on s390*:
   39676 	semid, (int) nsops, timeout, sops
   39677 	  0            1       2       3
   39678 	We have to use indexes: 0 3 1 2
   39679 
   39680 	* ipc.c (sys_semtimedop) [!S390]: Fix timeval argument index in
   39681 	indirect_ipccall case.
   39682 
   39683 2012-12-06  John Spencer  <maillist-strace (a] barfooze.de>
   39684 
   39685 	Fix glibc version checks.
   39686 	* util.c: Check if __GLIBC__ is defined before using it.
   39687 	* signal.c: Likewise.  Fix __GLIBC_MINOR__ checks.
   39688 
   39689 2012-11-29  James Hogan  <james.hogan (a] imgtec.com>
   39690 
   39691 	Add state argument to change_syscall and fix SPARC.
   39692 	Add a state argument to change_syscall() so that SPARC can modify that
   39693 	instead of read-modify-writing the whole register set.  This function is
   39694 	always called within an arg_setup/arg_finish_change sequence which on
   39695 	certain architectures like SPARC will also be doing a read-modify-write.
   39696 	This prevents the second write (from arg_finish_change) from undoing the
   39697 	effects of the change_syscall call.
   39698 
   39699 	* util.c (change_syscall): Move below definition of arg_setup_state.
   39700 	Add state argument.
   39701 	[SPARC || SPARC64] Change to set state->u_regs[U_REG_G1] rather than
   39702 	read-modify-writing it with PTRACE_GETREGS and PTRACE_SETREGS.
   39703 	(setbpt, clearbpt): Pass state argument to change_syscall.
   39704 
   39705 2012-11-12  Steve McIntyre  <steve.mcintyre (a] linaro.org>
   39706 
   39707 	Add support for tracing 32-bit ARM EABI binaries on AArch64.
   39708 	* defs.h [AARCH64]: Copy in the definition of arm_pt_regs and the
   39709 	accessor macros, so it's possible to build on AArch64 without
   39710 	ARM system headers.  Set SUPPORTED_PERSONALITIES to 2.
   39711 	Define PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE.
   39712 	Set DEFAULT_PERSONALITY to 1.
   39713 	* linux/aarch64/errnoent1.h: New file, includes generic errnoent.h.
   39714 	* linux/aarch64/ioctlent1.h: New file, includes generic ioctlent.h.
   39715 	* linux/aarch64/signalent1.h: New file, includes generic signalent.h.
   39716 	* linux/aarch64/syscallent1.h: Rename from linux/aarch64/syscallent.h.
   39717 	* linux/aarch64/syscallent.h: New file, includes arm/syscallent.h.
   39718 	* syscall.c [AARCH64]: Define aarch64_regs.
   39719 	(update_personality) [AARCH64]: Add debug output.
   39720 	(get_scno) [AARCH64]: Determine if we're in ARM or AArch64 mode by
   39721 	checking the size of the returned uio structure from PTRACE_GETREGSET
   39722 	and interpret the structure accordingly.
   39723 	(get_syscall_result): Likewise.
   39724 	(get_syscall_args): Merge the AArch64 and ARM sections so that on
   39725 	AArch64 we can fall back to supporting the ARM personality.
   39726 	(get_error): Likewise.
   39727 
   39728 2012-11-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   39729 
   39730 	Move asm-generic ioctl definitions to linux/ioctlent.h.in.
   39731 	* linux/ioctlent.h.in: Add asm-generic ioctl entries from all
   39732 	linux/*/ioctlent.h.in files.
   39733 	* linux/bfin/ioctlent.h.in: Remove asm-generic ioctl entries.
   39734 	* linux/i386/ioctlent.h.in: Likewise.
   39735 	* linux/powerpc/ioctlent.h.in: Likewise.
   39736 	* linux/s390/ioctlent.h.in: Likewise.
   39737 	* linux/sparc/ioctlent.h.in: Likewise.
   39738 
   39739 2012-10-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   39740 
   39741 	Filter out redundant "*32" ioctl entries.
   39742 	* linux/ioctlent-filter.awk: New file.
   39743 	* Makefile.am: Use it.
   39744 	* linux/ioctlent.h.in: Removed redundant "*32" entries.
   39745 
   39746 2012-10-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   39747 
   39748 	Enhance quotactl decoding.
   39749 	* quota.c (sys_quotactl): Decode 2nd syscall argument using printpath.
   39750 	* pathtrace.c (pathtrace_match): Add quotactl support.
   39751 	* linux/*/syscallent.h: Add TF flag to quotactl entry.
   39752 
   39753 2012-10-26  Steve McIntyre  <steve.mcintyre (a] linaro.org>
   39754 
   39755 	Add AArch64 support to strace.
   39756 	AArch64 has been included in linux from 3.7 onwards.
   39757 	Add support for AArch64 in strace, tested on linux in a simulator.
   39758 
   39759 	* configure.ac: Support AArch64.
   39760 	* defs.h [AARCH64]: Include <sys/ptrace.h>, define TCB_WAITEXECVE.
   39761 	* ipc.c (indirect_ipccall): Support AArch64.
   39762 	* process.c (struct_user_offsets): Likewise.
   39763 	* syscall.c [AARCH64]: Include <asm/ptrace.h>,  <sys/uio.h>, and
   39764 	<elf.h>.  Define struct user_pt_regs regs.
   39765 	(get_scno, get_syscall_result): Support AArch64 using PTRACE_GETREGSET.
   39766 	(get_syscall_args, get_error): Support AArch64.
   39767 	* linux/aarch64/ioctlent.h.in: New file.
   39768 	* linux/aarch64/syscallent.h: New file, based on linux 3.7 version of
   39769 	asm-generic/unistd.h.
   39770 
   39771 2012-10-26  Steve McIntyre  <steve.mcintyre (a] linaro.org>
   39772 
   39773 	linux: add new errno values for EPROBE_DEFER and EOPENSTALE.
   39774 	New definitions match updates in Linux 3.4 and Linux 3.5 respectively.
   39775 
   39776 	* linux/errnoent.h (ERRNO_517): Change to EPROBE_DEFER.
   39777 	(ERRNO_518): Change to EOPENSTALE.
   39778 
   39779 2012-10-26  Namhyung Kim  <namhyung.kim (a] lge.com>
   39780 
   39781 	Add -e trace=memory option.
   39782 	Add a new 'memory' category for tracing memory mapping related syscalls.
   39783 
   39784 	Affected syscalls are: break, brk, get_mempolicy, madvise, mbind,
   39785 	migrate_pages, mincore, mlock, mlockall, mmap, move_pages, mprotect,
   39786 	mremap, msync, munlock, munlockall, munmap, remap_file_pages, and
   39787 	set_mempolicy.
   39788 
   39789 	* defs.h (TRACE_MEMORY): New macro.
   39790 	* syscall.c (lookup_class): Handle trace=memory option.
   39791 	* strace.1: Document it.
   39792 	* linux/alpha/syscallent.h: Add TM flag to memory mapping related syscalls.
   39793 	* linux/arm/syscallent.h: Likewise.
   39794 	* linux/avr32/syscallent.h: Likewise.
   39795 	* linux/bfin/syscallent.h: Likewise.
   39796 	* linux/hppa/syscallent.h: Likewise.
   39797 	* linux/i386/syscallent.h: Likewise.
   39798 	* linux/ia64/syscallent.h: Likewise.
   39799 	* linux/m68k/syscallent.h: Likewise.
   39800 	* linux/microblaze/syscallent.h: Likewise.
   39801 	* linux/mips/syscallent.h: Likewise.
   39802 	* linux/powerpc/syscallent.h: Likewise.
   39803 	* linux/s390/syscallent.h: Likewise.
   39804 	* linux/s390x/syscallent.h: Likewise.
   39805 	* linux/sh/syscallent.h: Likewise.
   39806 	* linux/sh64/syscallent.h: Likewise.
   39807 	* linux/sparc/syscallent.h: Likewise.
   39808 	* linux/tile/syscallent.h: Likewise.
   39809 	* linux/x32/syscallent.h: Likewise.
   39810 	* linux/x86_64/syscallent.h: Likewise.
   39811 
   39812 2012-09-28  Mike Frysinger  <vapier (a] gentoo.org>
   39813 
   39814 	x32: add 64bit annotation too.
   39815 	Since someone can invoke these entry points directly with syscall(),
   39816 	at least decode their name and show that they're 64bit versions rather
   39817 	than just showing syscall_###.
   39818 
   39819 	* linux/x32/syscallent.h: Sync all missing entries below 312 with x86_64.
   39820 
   39821 2012-09-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   39822 
   39823 	Ignore fflush(3) return value.
   39824 	strace used to honor fflush(3) return value in trace_syscall_entering
   39825 	which resulted to tracees not being PTRACE_SYSCALL'ed which in turn
   39826 	caused nasty hangups like this one:
   39827 
   39828 	$ strace -o'|:' pwd
   39829 	|:: Broken pipe
   39830 
   39831 	There is little strace can do in case of fflush(3) returning EOF, and
   39832 	hangup is certainly not the best solution for the issue.
   39833 
   39834 	* syscall.c (trace_syscall_entering): Ignore fflush(3) return value.
   39835 
   39836 2012-09-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   39837 
   39838 	Use perror_msg instead of perror.
   39839 	* signal.c (sys_sigreturn): Use perror_msg instead of perror.
   39840 	* strace.c (tprintf, tprints, detach, startup_attach): Likewise.
   39841 	* syscall.c (get_scno): Likewise.
   39842 	* util.c (umoven, umovestr): Likewise.
   39843 
   39844 2012-09-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39845 
   39846 	process_vm_readv may return ESRCH if tracee was killed, don't complain.
   39847 	Discovered by running test/sigkill_rain under strace.
   39848 
   39849 	* util.c (umoven): Do not emit error message if process_vm_readv
   39850 	fails with ESRCH.
   39851 	(umovestr): LikeWise.
   39852 
   39853 2012-09-13  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39854 
   39855 	Trivial fixes, no code changes.
   39856 	* strace.c: Fix compiler warning message about tgkill - we don't use it.
   39857 	Fix indentation of preprocessor directives.
   39858 	(trace): Remove outdated comment.
   39859 
   39860 2012-08-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   39861 
   39862 	Always check setreuid return code.
   39863 	* strace.c (startup_child): Check setreuid return code.
   39864 
   39865 2012-08-24  Mike Frysinger  <vapier (a] gentoo.org>
   39866 
   39867 	x32: update {g,s}etsockopt syscall numbers.
   39868 	Starting with linux 3.6 (and backported to earlier kernels), these two
   39869 	syscalls have changed numbers (moving from native to compat entry points).
   39870 	Update the strace syscall list accordingly.
   39871 
   39872 	* linux/x32/syscallent.h: Move setsockopt from 54 to 541, and move
   39873 	getsockopt from 55 to 542.
   39874 
   39875 2012-08-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   39876 
   39877 	Decode file type returned by getdents system call.
   39878 	* file.c (sys_getdents): Decode d_type in unabbreviated mode.
   39879 
   39880 2012-07-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   39881 
   39882 	Close pipe and wait for the pipe process termination.
   39883 	In case of normal strace termination, when the trace output is
   39884 	redirected to a file or a pipe, close it and wait for the pipe
   39885 	process termination.
   39886 
   39887 	* strace.c (main): Before normal exit, close shared_log when it
   39888 	differs from stderr, and wait for popen_pid termination.
   39889 
   39890 2012-07-10  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39891 
   39892 	Enable usage of PTRACE_SEIZE.
   39893 	* defs.h: Define USE_SEIZE to 1. Remove PTRACE_SEIZE_DEVEL
   39894 	and PTRACE_EVENT_STOP1.
   39895 	* strace.c (ptrace_attach_or_seize): Replace PTRACE_SEIZE_DEVEL
   39896 	with 0.
   39897 	(trace): Do not check for PTRACE_EVENT_STOP1.
   39898 
   39899 2012-06-05  Mike Frysinger  <vapier (a] gentoo.org>
   39900 
   39901 	x32: update syscall table.
   39902 	This syncs with the syscall table as it is in linux 3.4.
   39903 
   39904 	* linux/x32/syscallent.h (59): Fix comment typo.
   39905 	(78): Add missing getdents entry.
   39906 	(174): Delete create_module entry (not in the kernel).
   39907 	(181, 182, 183, 184, 185): Add missing entries.
   39908 	(524, 536, 539, 540): Fix spacing.
   39909 
   39910 2012-05-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39911 
   39912 	Merge adjacent printing operations in a few places.
   39913 	* file.c (sys_readahead): Merge tprints() with following printllval().
   39914 	(sys_ftruncate64): Likewise.
   39915 	(sys_fadvise64): Likewise.
   39916 	(sys_fadvise64_64): Likewise.
   39917 	(sys_fallocate): Merge tprints() with following tprintf().
   39918 
   39919 2012-05-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39920 
   39921 	Use %d printf format instead of %i everywhere.
   39922 	* loop.c (loop_ioctl): Use %d instead of %i.
   39923 	* mtd.c (mtd_ioctl): Likewise.
   39924 
   39925 	Fix a few goofs in sys_sysctl()
   39926 	* system.c (sys_sysctl): Cast pointer to long, not size_t,
   39927 	when we intend to use it as an address. Set oldlen to 0 prior
   39928 	to reading into it - we want to have deterministic result
   39929 	if read fails.
   39930 
   39931 2012-05-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39932 
   39933 	Stop using non-standard %Zu and %Zd formats for size_t printing.
   39934 	The documented formats are %zu and %zd, but since our (normally disabled)
   39935 	"fast" printf code doesn't support those too, I convert them to %lu and %ld.
   39936 
   39937 	* bjm.c (sys_query_module): Convert %Zd usages to %lu.
   39938 	* system.c (sys_sysctl): Likewise.
   39939 
   39940 2012-05-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39941 
   39942 	Remove outdated comment about suspending new tracees.
   39943 	We no longer track parent/child relationship between tracees.
   39944 	Therefore, we no longer suspend new tracee until parent is seen
   39945 	exiting form [v]fork/clone. The comment is obsolete.
   39946 
   39947 	* strace.c (trace): Remove outdated comment.
   39948 
   39949 2012-05-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39950 
   39951 	Make sure current_wordsize and PERSONALITY0_WORDSIZE are ints in all arches
   39952 	On 64bit systems with a single personality, they used to be sizeof(long),
   39953 	which has type "long", not "int", which complicates printf formats.
   39954 
   39955 	* defs.h: Ensure that PERSONALITY0_WORDSIZE;s tyoe is int.
   39956 	This in turn makes sure current_wordsize is also an int.
   39957 	* count.c (call_summary): Revert the change which added cast to int.
   39958 
   39959 2012-05-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   39960 
   39961 	Add configure --enable-gcc-Werror option.
   39962 	* configure.ac: New option --enable-gcc-Werror.
   39963 
   39964 	Make x86-64 build free of artificial warnings.
   39965 	* signal.c (sys_sigreturn): Do not issue "no sys_sigreturn" warning
   39966 	on X86_64.
   39967 
   39968 2012-05-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   39969 
   39970 	Fix kernel release string parsing.
   39971 	* strace.c (get_os_release): Handle "X.Y-something" utsname.release
   39972 	strings properly.
   39973 
   39974 	Reported-by: Bryce Gibson <bryce (a] gibson-consulting.com.au>
   39975 
   39976 2012-05-14  Denys Vlasenko  <vda.linux (a] googlemail.com>
   39977 
   39978 	On clearing "breakpopint", restore syscall number too.
   39979 	This fixes Fedora bug 659382.
   39980 	Low risk: this code is not supposed to be used on any non-acient kernel.
   39981 
   39982 	* util.c (clearbpt): Restore syscall number too.
   39983 
   39984 2012-05-05  Mike Frysinger  <vapier (a] gentoo.org>
   39985 
   39986 	util: fix building when glibc has a stub process_vm_readv.
   39987 	If you have a newer glibc which provides process_vm_readv, but it is built
   39988 	against older kernel headers which lack __NR_process_vm_readv, the library
   39989 	will contain a stub implementation that just returns ENOSYS.  Autoconf
   39990 	checks for this case explicitly and will declare it as unavailable.  So we
   39991 	end up in a case where the headers provide the prototype, but autoconf has
   39992 	not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again:
   39993 
   39994 	util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration
   39995 	/usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here
   39996 
   39997 	So rename our local function to something unique, and add a define so the
   39998 	callers all hit the right place.
   39999 
   40000 	* util.c (strace_process_vm_readv): Rename from process_vm_readv.
   40001 	(process_vm_readv): Define to strace_process_vm_readv.
   40002 
   40003 2012-05-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   40004 
   40005 	doc: describe documentation policy.
   40006 	* README-hacking: Describe documentation policy.
   40007 
   40008 2012-05-02  Dmitry V. Levin  <ldv (a] altlinux.org>
   40009 
   40010 	maint: post-release administrivia.
   40011 	* NEWS: Add header line for next release.
   40012 
   40013 	Prepare for 4.7 release.
   40014 	* configure.ac: Version 4.7.
   40015 	* debian/changelog: 4.7-1.
   40016 	* strace.spec: 4.7-1.
   40017 
   40018 	Fix build with <linux/loop.h> from 2.6.18 kernel headers.
   40019 	* configure.ac: Check for LO_FLAGS_AUTOCLEAR and LO_FLAGS_PARTSCAN
   40020 	declarations.
   40021 	* loop.c (loop_flags_options): Use LO_FLAGS_AUTOCLEAR and
   40022 	LO_FLAGS_PARTSCAN only when appropriate declarations are available.
   40023 	(loop_ioctl): Use LOOP_SET_CAPACITY only when it is defined.
   40024 
   40025 2012-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   40026 
   40027 	* vsprintf.c: Check for USE_CUSTOM_PRINTF earlier.
   40028 
   40029 	Remove duplicate names from CREDITS.
   40030 	* .mailmap: Merge email addresses.
   40031 	* CREDITS.in: Remove a duplicate name.
   40032 
   40033 2012-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   40034 
   40035 	tests: raise strace check timeout to 60 seconds.
   40036 	* tests/init.sh (check_timeout): New variable.
   40037 	* tests/ptrace_setoptions: Use it.
   40038 	* tests/strace-f: Likewise.
   40039 
   40040 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   40041 
   40042 2012-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   40043 
   40044 	Update STA_* constants.
   40045 	* time.c (adjtimex_status): Add STA_NANO, STA_MODE, and STA_CLK.
   40046 	* NEWS (Improvements): Mention it.
   40047 
   40048 	NEWS: update for release.
   40049 	* NEWS (Improvements): Mention recent recvmsg/recvmmsg decoders
   40050 	enhancements.
   40051 	(Portability): Add a recommendation for the minimum Linux kernel
   40052 	version to use.
   40053 
   40054 	Make printing of utsname.domainname more portable.
   40055 	* configure.ac: Check for struct utsname.domainname field.
   40056 	* process.c (sys_uname): Print utsname.domainname when the field is
   40057 	available.
   40058 
   40059 2012-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   40060 
   40061 	Fix recvmmsg decode: do not show more data than actually returned.
   40062 	This change complements recent fix for recvmsg decoding.
   40063 
   40064 	* net.c (printmmsghdr): Add msg_len parameter to pass down to do_msghdr.
   40065 	When this parameter is zero, pass mmsghdr.msg_len to do_msghdr instead.
   40066 	(decode_mmsg): Add msg_len parameter, pass it down to printmmsghdr.
   40067 	(sys_sendmmsg): Call decode_mmsg with msg_len == (unsigned long) -1L.
   40068 	(sys_recvmmsg): Call decode_mmsg with msg_len == 0.
   40069 
   40070 2012-05-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   40071 
   40072 	Remove recently introduced use of ULONG_MAX.
   40073 	* io.c: Remove limits.h inclusion.
   40074 	(tprint_iov): Use "(unsigned long) -1L" instead of "ULONG_MAX".
   40075 	* net.c: Remove limits.h inclusion.
   40076 	(printmmsghdr, sys_sendmsg): Use "(unsigned long) -1L" instead of
   40077 	"ULONG_MAX".
   40078 
   40079 2012-04-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40080 
   40081 	Enable printing of uts.domainname in uname syscall.
   40082 	* process.c (sys_uname): Enable printing of uts.domainname
   40083 
   40084 2012-04-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40085 
   40086 	Fix printstr's len parameter width.
   40087 	We often pass syscall params and other long-sized values
   40088 	as printstr(len). Truncating them to int may be a bad thing.
   40089 
   40090 	* defs.h: Change len parameter's type from int to long in
   40091 	string_quote and printstr function declarations.
   40092 	* util.c (string_quote): Special-case only len==-1, not all len<0.
   40093 	(printstr): Likewise.
   40094 
   40095 2012-04-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40096 
   40097 	Fix recvmsg decode: do not show more data than actually returned.
   40098 	I noticed that "hostname -d" talks over netlink and gets 20 bytes
   40099 	of response, but we show entire 1024 bytes of iov.
   40100 	This changes fixes that.
   40101 
   40102 	* defs.h: New function tprint_iov_upto.
   40103 	* io.c (tprint_iov_upto): Definition of this function.
   40104 	(tprint_iov): Call tprint_iov_upto.
   40105 	* net.c (do_msghdr): Add data_size parameter, pass it down to tprint_iov_upto.
   40106 	(printmsghdr): Add data_size parameter, pass it down to do_msghdr.
   40107 	(printmmsghdr): Call do_msghdr with data_size==ULONG_MAX.
   40108 	(sys_sendmsg): Call printmsghdr with data_size==ULONG_MAX.
   40109 	(sys_recvmsg): Call printmsghdr with data_size==tcp->u_rval.
   40110 
   40111 2012-04-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   40112 
   40113 	Package strace-log-merge.
   40114 	* strace.spec (%files): Add strace-log-merge.
   40115 
   40116 2012-04-27  Mike Frysinger  <vapier (a] gentoo.org>
   40117 
   40118 	NEWS: clarify & fix typo.
   40119 
   40120 2012-04-27  Mike Frysinger  <vapier (a] gentoo.org>
   40121 
   40122 	Cast current_wordsize to an int.
   40123 	On 64bit systems with a single personality, we see:
   40124 	count.c: In function 'call_summary':
   40125 	count.c:223:5: warning: format '%u' expects type 'unsigned int',
   40126 		but argument 3 has type 'long unsigned int'
   40127 
   40128 	Since on multi-personality systems this is an array of ints, cast
   40129 	the multiplication to an int and update the printf format.
   40130 
   40131 	* count.c (call_summary): Change %u to %d and cast first argument to int.
   40132 
   40133 2012-04-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   40134 
   40135 	Update NEWS for upcoming 4.7 release.
   40136 	* NEWS: Update for 4.7 release.
   40137 
   40138 	Sync strace.spec and debian/ with packages.
   40139 	* debian/changelog: Sync with 4.5.20-2.3.
   40140 	* debian/control: Likewise.
   40141 	* strace.spec: Sync with 4.6-2.
   40142 
   40143 2012-04-18  Mike Frysinger  <vapier (a] gentoo.org>
   40144 
   40145 	Decode /dev/loop ioctls.
   40146 	Needed to debug some losetup failures, and it's easier when you can see
   40147 	what the kernel is getting vs what you think you're sending, so add some
   40148 	decoders for those ioctls.
   40149 
   40150 	* loop.c: New file.
   40151 	* Makefile.am (strace_SOURCES): Add loop.c.
   40152 	* defs.h (loop_ioctl): New prototype.
   40153 	(string_quote): Likewise.
   40154 	* ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'.
   40155 	* util.c (string_quote): Remove static keyword.
   40156 
   40157 2012-04-18  H.J. Lu  <hongjiu.lu (a] intel.com>
   40158 
   40159 	x32: add ia32 support.
   40160 	* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h,
   40161 	linux/x32/ioctlent1.h, linux/x32/signalent1.h and
   40162 	linux/x32/syscallent1.h.
   40163 	* configure.ac: Remove AC_GNU_SOURCE, obsoleted by
   40164 	AC_USE_SYSTEM_EXTENSIONS.
   40165 	* defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32.
   40166 	(PERSONALITY1_WORDSIZE): Set to 4 for X32.
   40167 	* file.c (stat64): New struct for X32.
   40168 	(sys_lseek32): New function for X32.
   40169 	(stat64): Undef.
   40170 	(sys_fstat64): Likewise.
   40171 	(sys_stat64): Likewise.
   40172 	(realprintstat64): New function for X32.
   40173 	(sys_fstat64): Likewise.
   40174 	(sys_stat64): Likewise.
   40175 	* mem.c (sys_old_mmap): New function for X32.
   40176 	* pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32.
   40177 	* syscall.c (update_personality): Add X32 support.
   40178 	(get_scno): Support currpers == 1 for X32.
   40179 	* linux/syscall.h (sys_lseek32): New function prototype for X32.
   40180 	* linux/x32/errnoent1.h: New file.
   40181 	* linux/x32/ioctlent1.h: Likewise.
   40182 	* linux/x32/signalent1.h: Likewise.
   40183 	* linux/x32/syscallent1.h: Likewise.
   40184 
   40185 2012-04-17  H.J. Lu  <hongjiu.lu (a] intel.com>
   40186 
   40187 	Cast clock_t type to unsigned long long.
   40188 	* resource.c (sys_times): Cast clock_t type to unsigned long long.
   40189 	* signal.c (printsiginfo): Likewise.
   40190 
   40191 2012-04-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40192 
   40193 	Add custom (faster) vfprintf implementation (disabled by default)
   40194 	* defs.h: Declare strace_vfprintf either as a alias to vfprintf
   40195 	or as a bona fide function. USE_CUSTOM_PRINTF define controls whether
   40196 	we use strace_vfprintf. By default, we don't.
   40197 	* strace.c (tprintf): Call strace_vfprintf instead of vfprintf.
   40198 	* vsprintf.c: New file, implements strace_vfprintf.
   40199 
   40200 2012-04-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40201 
   40202 	Stop using %h[h]u format specifiers.
   40203 	This is needed for simplified printf, and reduces code size a bit.
   40204 
   40205 	* block.c (block_ioctl): Cast the value to unsinged and use %u
   40206 	instead of using %hu.
   40207 	* desc.c (sys_io_cancel): Likewise.
   40208 	* resource.c (sys_sysinfo): Likewise.
   40209 
   40210 2012-04-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40211 
   40212 	Trivial speed optimization.
   40213 	* strace.c (tprints): Use fputs_unlocked instead of fputs.
   40214 
   40215 2012-04-16  H.J. Lu  <hongjiu.lu (a] intel.com>
   40216 
   40217 	Fix a problem with sys_lseek on x32.
   40218 	* file.c (sys_lseek): Use MIPS-n32 variant also for x32
   40219 
   40220 2012-04-16  H.J. Lu  <hongjiu.lu (a] intel.com>
   40221 
   40222 	Add x32 support to strace.
   40223 	X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
   40224 	32bit pointers.  At system call level, x32 is also identical to x86-64,
   40225 	as shown by many changes like "defined(X86_64) || defined(X32)".  The
   40226 	main differerence bewteen x32 and x86-64 is off_t in x32 is long long
   40227 	instead of long.
   40228 
   40229 	This patch adds x32 support to strace.  Tested on Linux/x32.
   40230 
   40231 	* configure.ac: Support X32.
   40232 	* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
   40233 	Set PERSONALITY2_WORDSIZE to 4 for X86_64.
   40234 	Add tcb::ext_arg for X32.
   40235 	* file.c (stat): New for X32.
   40236 	(sys_lseek): Use 64-bit version for X32.
   40237 	(printstat64): Check current_personality != 1 for X86_64.
   40238 	* ipc.c (indirect_ipccall): Check current_personality == 1
   40239 	for X86_64.
   40240 	* mem.c (sys_mmap64): Also use tcp->u_arg for X32.  Print NULL
   40241 	for zero address.  Call printllval for offset for X32.
   40242 	* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
   40243 	X32.
   40244 	* process.c (ARG_FLAGS): Defined for X32.
   40245 	(ARG_STACK): Likewise.
   40246 	(ARG_PTID): Likewise.
   40247 	(change_syscall): Handle X32.
   40248 	(struct_user_offsets): Support X32.
   40249 	(sys_arch_prctl): Likewise.
   40250 	* signal.c: Include <asm/sigcontext.h> for X32.
   40251 	(SA_RESTORER): Also define for X32.
   40252 	* syscall.c (update_personality): Support X32 for X86_64.
   40253 	(is_restart_error): Likewise.
   40254 	(syscall_fixup_on_sysenter): Likewise.
   40255 	(get_syscall_args): Likewise.
   40256 	(get_syscall_result): Likewise.
   40257 	(get_error): Likewise.
   40258 	(__X32_SYSCALL_BIT): Define if not defined.
   40259 	(__X32_SYSCALL_MASK): Likewise.
   40260 	(get_scno): Check DS register value for X32.  Use
   40261 	__X32_SYSCALL_MASK on X32 system calls.
   40262 	* util.c (printllval): Use ext_arg for X32.
   40263 	(printcall): Support X32.
   40264 	(change_syscall): Likewise.
   40265 	(arg0_offset): Likewise.
   40266 	(arg1_offset): Likewise.
   40267 	* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
   40268 	linux/x32/ioctlent.h.in, linux/x32/signalent.h,
   40269 	linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
   40270 	linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
   40271 	linux/x86_64/syscallent2.h.
   40272 	* linux/x32/errnoent.h: New.
   40273 	* linux/x32/ioctlent.h.in: Likewise.
   40274 	* linux/x32/signalent.h: Likewise.
   40275 	* linux/x32/syscallent.h: Likewise.
   40276 	* linux/x86_64/errnoent2.h: Likewise.
   40277 	* linux/x86_64/ioctlent2.h: Likewise.
   40278 	* linux/x86_64/signalent2.h: Likewise.
   40279 	* linux/x86_64/syscallent2.h: Likewise.
   40280 
   40281 2012-04-16  H.J. Lu  <hongjiu.lu (a] intel.com>
   40282 
   40283 	Restore tcb::u_lrval; fix lseek on MIPS-n32.
   40284 	Linux kernel v3.4 adds x32 support.  Both x32 and n32 use 64bit offset
   40285 	for lseek parameter and return value.  We need u_lrval to handle it
   40286 	properly.  Also we shouldn't check HAVE_LONG_LONG_OFF_T for n32 lseek.
   40287 	This patch fixes it properly and prepares lseek for x32.
   40288 
   40289 	* defs.h (tcb): Restore tcb::u_lrval field, RVAL_Lfoo constants.
   40290 	Set RVAL_MASK to 7.
   40291 	* file.c (sys_lseek): Print 64bit offset and return RVAL_LUDECIMAL
   40292 	for n32.
   40293 	* syscall.c (get_error): Set u_lrval for MIPS-n32.
   40294 	(trace_syscall_exiting): Handle RVAL_Lfoo return value types.
   40295 
   40296 2012-04-06  Mike Frysinger  <vapier (a] gentoo.org>
   40297 
   40298 	Decode mtd ioctls.
   40299 	I got tired of figuring out mtd structures (which show up a lot
   40300 	in the embedded space), so add decoders for those ioctls.
   40301 
   40302 	* defs.h (mtd_ioctl): New prototype.
   40303 	(print_loff_t): Likewise.
   40304 	* io.c (print_loff_t): Delete static keyword
   40305 	* ioctl.c (ioctl_decode): Call mtd_ioctl when code is 'M'.
   40306 	* Makefile.am (strace_SOURCES): Add mtd.c.
   40307 	(EXTRA_DIST): Add linux/mtd-abi.h.
   40308 	* mtd.c: New file.
   40309 	* linux/mtd-abi.h: New file.
   40310 
   40311 2012-04-05  Mike Frysinger  <vapier (a] gentoo.org>
   40312 
   40313 	Fix indefinite hang on no-mmu systems.
   40314 	The ptrace setoptions code will fork a child which goes to sleep and
   40315 	expects the parent to continue on to do tests.  Unfortunately, this
   40316 	does not work on no-mmu systems as fork() is actually vfork() and any
   40317 	vforked children will hang the parent until it exits or execs.
   40318 
   40319 	We might be able to make this test work on no-mmu systems with a bit
   40320 	of work, but easier to just disable this for the release so it works
   40321 	now.
   40322 
   40323 	* strace.c (test_ptrace_setoptions_for_all): Return if strace_vforked.
   40324 
   40325 2012-03-29  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40326 
   40327 	Makefile.am: whitespace fix.
   40328 
   40329 2012-03-27  Anton Blanchard  <anton (a] samba.org>
   40330 
   40331 	powerpc: Add syscall entries for direct socket system calls.
   40332 	* linux/powerpc/syscallent.h: Add direct socket system calls.
   40333 
   40334 2012-03-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   40335 
   40336 	qual_syscall: fix potential NULL dereference.
   40337 	Fix regression introduced by commit
   40338 	c1371ebc400fe9578908beca87f2bf407daf1506
   40339 
   40340 	* syscall.c (qual_syscall): Handle null sys_name.
   40341 
   40342 	Reported-by: Fr. Br. George <george (a] altlinux.org>
   40343 
   40344 2012-03-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   40345 
   40346 	strace-log-merge: fix file suffix calculation.
   40347 	* strace-log-merge: Quote file prefix to fix file suffix calculation.
   40348 
   40349 	Reported-by: Denys Vlasenko <vda.linux (a] googlemail.com>
   40350 	Suggested-by: Andreas Schwab <schwab (a] linux-m68k.org>
   40351 
   40352 2012-03-26  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40353 
   40354 	Remove unreachable code.
   40355 	* strace.c (process_opt_p_list): Remove unreachable code.
   40356 
   40357 	manpage: remove false info about -p being limited to 32 processes.
   40358 
   40359 	Tweak help text and manpage (added -In to manpage)
   40360 
   40361 2012-03-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   40362 
   40363 	printstr: check for potential integer overflow.
   40364 	* util.c (printstr): Check for potential integer overflow during outstr
   40365 	buffer size calculation.
   40366 
   40367 	Robustify parsing of numbers from strings.
   40368 	* defs.h (string_to_uint): New prototype.
   40369 	* util.c (string_to_uint): New function.
   40370 	* strace.c (error_opt_arg): New function.
   40371 	(process_opt_p_list): Use string_to_uint instead of atoi.
   40372 	Terminate in case of invalid process id.
   40373 	(init): Use string_to_uint instead of atoi.
   40374 	Use error_opt_arg in case of invalid option argument.
   40375 	* syscall.c (qual_syscall, qual_signal, qual_desc): Use string_to_uint
   40376 	instead of atoi.
   40377 
   40378 	strace-log-merge: enhance usage error diagnostics.
   40379 	* strace-log-merge: Add --help option.  Check number of arguments.
   40380 	Issue an error message when no strace output was merged.
   40381 
   40382 	configure.ac: sort lists and use m4_normalize to ease maintenance.
   40383 	* configure.ac (AC_CHECK_FUNCS, AC_CHECK_HEADERS, AC_CHECK_MEMBERS,
   40384 	AC_CHECK_DECLS): Sort lists, use m4_normalize.
   40385 
   40386 2012-03-23  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40387 
   40388 	Simple optimizations.
   40389 	Why open-coding isdigit is a good idea?
   40390 
   40391 	Before: call   __ctype_b_loc
   40392 	        movzbl (%ebx),%edx
   40393 	        mov    (%eax),%eax
   40394 	        testb  $0x8,0x1(%eax,%edx,2)
   40395 	        je     lbl
   40396 
   40397 	After:  movzbl (%eax),%edx
   40398 	        sub    $0x30,%edx
   40399 	        cmp    $0x9,%dl
   40400 	        ja     lbl
   40401 
   40402 	   text	   data	    bss	    dec	    hex	filename
   40403 	 236869	    704	  18944	 256517	  3ea05	strace.before
   40404 	 236719	    700	  18944	 256363	  3e96b	strace
   40405 
   40406 	* defs.h: Alias sigemptyset to __sigemptyset on glibc.
   40407 	* syscall.c (qual_syscall): Open-code isdigit.
   40408 	(qual_desc): Likewise.
   40409 	(qual_signal): Open-code isdigit. Remove string copying
   40410 	which was done for no apparent reason.
   40411 
   40412 2012-03-23  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40413 
   40414 	Reorder declarations in defs.h. No code changes.
   40415 	* defs.h: Reorder declarations (such as: keep all printing functions together).
   40416 
   40417 2012-03-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40418 
   40419 	Simplify current tcp switching and current column handling.
   40420 	Instead of using "static FILE *outf and static unsigned int curcol"
   40421 	to cache current outfile and its position, we can simply
   40422 	remember current tcb and use its ->outf and ->curcol.
   40423 	This allows to drop numerous "tcp->curcol = curcol" ops in trace().
   40424 
   40425 	Turns out we can't drop "static FILE *outf", but now its role is
   40426 	a bit clearer: it newer changes after init, stays == stderr or
   40427 	opened to shared log (which may be the same thing if neither -o
   40428 	nor -ff was specified). Let's rename it then.
   40429 
   40430 	   text	   data	    bss	    dec	    hex	filename
   40431 	 236953	    704	  18944	 256601	  3ea59	strace.before.prev.commit
   40432 	 236905	    704	  18944	 256553	  3ea29	strace.before
   40433 	 236869	    704	  18944	 256517	  3ea05	strace
   40434 
   40435 	* strace.c: Replace curcol static variable by struct tcb *current_tcp.
   40436 	Rename static FILE *outf to shared_log (since it no longer caches tcp->outf).
   40437 	(ptrace_restart): Use current_tcp->curcol instead of curcol.
   40438 	(tprintf): Check current_tcp != NULL instead of outf != NULL.
   40439 	Use current_tcp->outf instead of outf, current_tcp->curcol instead of curcol.
   40440 	(tprints): Likewise.
   40441 	(line_ended): Likewise.
   40442 	(printleader): Switch current tcb by "current_tcp = tcp" istead of
   40443 	assignments to outf and curcol.
   40444 	(droptcb): Set current_tcp to NULL if we dropped it.
   40445 	(startup_child): Rename outf to shared_log.
   40446 	(init): Likewise.
   40447 	(cleanup): Likewise.
   40448 	(trace): Simplify current tcp switching and current column handling.
   40449 
   40450 2012-03-22  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40451 
   40452 	Make threaded execve handling code more reabable and somewhat simpler.
   40453 	* strace.c (droptcb): Remove outfname check in "outfname && followfork >= 2" -
   40454 	with recent changes, followfork >= 2 check guarantees that outfile
   40455 	was specified, and _is already opened_.
   40456 	(trace): Move tcb existence check before threaded execve handling.
   40457 	This allows to remove tcp != NULL checks in threaded execve handling.
   40458 	Rewrite threaded execve handling code to be less indented,
   40459 	keeping the same logic.
   40460 
   40461 2012-03-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40462 
   40463 	simple cleanups in defs.h. No logic changes.
   40464 	* defs.h: Move offsetof macro definition into "libc stuff" section.
   40465 	Renumber TCB_foo constants (smaller constants -> sometimes smaller code).
   40466 	Remove uoff macro.
   40467 	* process.c: Move uoff macro here (sole user).
   40468 
   40469 	Show "+++ exited..." with -C.
   40470 	* strace.c (trace): Show "+++ exited..." with -C too.
   40471 	Save tcp->curcol after PTRACE_LISTEN failure too, just in case.
   40472 
   40473 	Slight tweak to qemu_multiarch_testing scripts.
   40474 
   40475 2012-03-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40476 
   40477 	Replace reprinting decision logic.
   40478 	After this change, we no longer need to decide when we need
   40479 	to set TCB_REPRINT, and when we don't: it's never needed :)
   40480 
   40481 	Well, almost. That pesky pid-changing execve needs special treatment.
   40482 	If not it, it'd be possible to nuke TCB_REPRINT...
   40483 
   40484 	While at it, fix a case of mishandled -C.
   40485 
   40486 	* strace.c (printleader): Do not set TCB_REPRINT.
   40487 	(trace): Set TCB_REPRINT only for execve with changing pid.
   40488 	Fix mishandling of -C.
   40489 	* syscall.c (trace_syscall_entering): Do not clear TCB_REPRINT.
   40490 	(trace_syscall_exiting): Replace reprinting decision logic.
   40491 	Remove call to printargs(): it is known to just return 0 here.
   40492 
   40493 2012-03-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40494 
   40495 	Report some ptrace failures; nuke tcp->ptrace_errno.
   40496 	Report some (not all) ptrace errors, namely,
   40497 	errors on ptrace restart operations.
   40498 
   40499 	Before: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <unfinished ...>
   40500 	After:  10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <ptrace(SYSCALL):No such process>
   40501 
   40502 	This tells user that strace failed to let sendto syscall
   40503 	to be entered - process was dead at that point of time.
   40504 	It is (marginally) better than to always say "<unfinished ...>"
   40505 
   40506 	While at it, patch removes tcp->ptrace_errno.
   40507 	I added it many months ago, and it looks that after all
   40508 	it is not needed for ptrace error detection: I failed to execute
   40509 	a single existing code path which is accessible
   40510 	through that variable only.
   40511 
   40512 	* defs.h: Remove struct tcp::ptrace_errno field.
   40513 	* strace.c (ptrace_restart): Emit message to log on error.
   40514 	(printleader): Remove "if (printing_tcp->ptrace_errno)..." code.
   40515 	(trace): Remove !tcp->ptrace_errno check, it's always true.
   40516 
   40517 2012-03-20  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40518 
   40519 	Eliminate redundant checks of res variable.
   40520 	* syscall.c (trace_syscall_entering): Eliminate redundant checks of res variable.
   40521 	(trace_syscall_exiting): Likewise.
   40522 
   40523 	Rename POWERPC-specific static variable result to ppc_result.
   40524 	* syscall.c: Rename POWERPC-specific static variable result to ppc_result.
   40525 
   40526 	Remove redundant checks in syscall entry/exit, rename badly named function
   40527 	* syscall.c (syscall_enter): Rename to get_syscall_args.
   40528 	Document its return values.
   40529 	(trace_syscall_entering): Don't check get_syscall_args() return
   40530 	value for 0, it never returns that.
   40531 	(syscall_fixup_on_sysexit): Make it return void.
   40532 	(trace_syscall_exiting): Fix up syscall_fixup_on_sysexit()
   40533 	call site accordingly.
   40534 
   40535 	Trivial tweaks. No logic changes.
   40536 	* process.c (sys_ptrace): Remove unneeded line wrapping.
   40537 	* syscall.c (trace_syscall_entering): Use tprints() instead of tprintf().
   40538 
   40539 	Make ptrace_restart() static. No code changes.
   40540 	* defs.h: Remove ptrace_restart() declaration.
   40541 	* strace.c (ptrace_restart): Move its definition here.
   40542 	* util.c (ptrace_restart): Remove its definition.
   40543 
   40544 2012-03-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   40545 
   40546 	Do not include limits.h unnecessarily.
   40547 	* ioctl.c: Remove limits.h inclusion left after the reverted change.
   40548 
   40549 2012-03-20  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40550 
   40551 	Partially revert last change.
   40552 	Thank you Dmitry for spotting it.
   40553 
   40554 	* ioctl.c (compare): Partially revert last change - the new
   40555 	comparison logic was buggy.
   40556 
   40557 2012-03-20  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40558 
   40559 	Simplify search in ioctl table.
   40560 	   text	   data	    bss	    dec	    hex	filename
   40561 	 236973	    704	  18944	 256621	  3ea6d	strace.before
   40562 	 236929	    704	  18944	 256577	  3ea41	strace
   40563 
   40564 	* ioctl.c (compare): Simplify generation of compare result.
   40565 	(ioctl_lookup): Pass key directly, not as part of dummy struct.
   40566 	(ioctl_next_match): More readable code. No logic changes.
   40567 
   40568 2012-03-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40569 
   40570 	Update qemu build script: now tries to upload result back to host.
   40571 
   40572 2012-03-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40573 
   40574 	Shrink space needed by undefined syscalls in syscall tables.
   40575 	Undefined syscall looked like this before this change:
   40576 	{ 5,    0,      printargs,              "SYS_53"                },
   40577 	That is, "SYS_53" string had to be allocated and stored in strace binary.
   40578 	Since now SCNO_IN_RANGE() macro requires sysent[scno].sys_func != NULL
   40579 	for valid syscalls, we can replace printargs with NULL in such lines
   40580 	and make them "invalid", thus not requiring syscall name string.
   40581 
   40582 	Savings on i386:
   40583 	   text	   data	    bss	    dec	    hex	filename
   40584 	 237389	    704	  18944	 257037	  3ec0d	strace.before
   40585 	 236973	    704	  18944	 256621	  3ea6d	strace
   40586 	Savings on mips:
   40587 	 336551  153692   38320  528563   810b3 strace.before
   40588 	 275543  153688   38320  467551   7225f strace
   40589 
   40590 	Tested to still decode undefined syscalls correctly (syscall no. 222 on i386).
   40591 
   40592 	* linux/*/syscallent.h: Replace 'printargs, "SYS_nnn"' with
   40593 	'NULL, NULL'.
   40594 
   40595 2012-03-19  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40596 
   40597 	Optimize code if we have only one personality.
   40598 	On i386:
   40599 	   text	   data	    bss	    dec	    hex	filename
   40600 	 238025	    672	  18980	 257677	  3ee8d	strace.before
   40601 	 237389	    704	  18944	 257037	  3ec0d	strace
   40602 
   40603 	* defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined.
   40604 	Introduce new define, current_wordsize as
   40605 	(personality_wordsize[current_personality]).
   40606 	Make set_personality() no-op, current_personality constant zero,
   40607 	current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality.
   40608 	* count.c (call_summary): Use current_wordsize instead of
   40609 	personality_wordsize[current_personality].
   40610 	* desc.c (printflock): Likewise.
   40611 	* file.c (sys_utime): Likewise.
   40612 	* io.c (tprint_iov): Likewise.
   40613 	* process.c (printargv): Likewise.
   40614 	* resource.c (decode_rlimit): Likewise.
   40615 	* signal.c (sys_kill): Likewise.
   40616 	(sys_rt_sigaction): Likewise.
   40617 	* time.c (sprinttv): Likewise.
   40618 	(sprint_timespec): Likewise.
   40619 	(printitv_bitness): Likewise.
   40620 	(tprint_timex): Likewise.
   40621 	(printsigevent): Likewise.
   40622 	* util.c (dumpiov): Likewise.
   40623 	(umoven): Likewise.
   40624 	(umovestr): Likewise.
   40625 	* syscall.c: Initialize sysent to sysent0 etc.
   40626 	Make current_personality, personality_wordsize[], set_personality()
   40627 	conditional on SUPPORTED_PERSONALITIES > 1.
   40628 
   40629 2012-03-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40630 
   40631 	Fix mips64 build failure: sys_pwrite64 doesn't exist.
   40632 	sys_pwrite seems to do the same thing as sys_pwrite64
   40633 	which we deleted when we removed non-Linux code.
   40634 
   40635 	* linux/mips/syscallent.h: s/sys_pwrite64/sys_pwrite/
   40636 
   40637 2012-03-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40638 
   40639 	qemu_multiarch_testing/: a directory with scripts for build testing.
   40640 
   40641 2012-03-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40642 
   40643 	Make internal_fork and internal_exec static.
   40644 	   text	   data	    bss	    dec	    hex	filename
   40645 	 237917	    672	  18980	 257569	  3ee21	strace
   40646 	 237845	    672	  18980	 257497	  3edd9	strace_new
   40647 
   40648 	* defs.h: Remove declarations of internal_fork and internal_exec.
   40649 	* process.c: Remove definitions of internal_fork and internal_exec.
   40650 	* syscall.c: Move them here.
   40651 	(internal_syscall): Return void instead of int. We were always
   40652 	returning zero, and callers weren't checking it anyway.
   40653 
   40654 2012-03-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40655 
   40656 	Remove code which is not used on Linux.
   40657 	Compile tested in qemu on armv4l,armv4tl,armv5l,armv6l,i686,
   40658 	mipsel,mips,x86_64
   40659 
   40660 	* syscall.c: Remove code which handles RVAL_Lfoo constants.
   40661 	* defs.h: Remove struct tcb::u_lrval member - it is never set.
   40662 	Remove RVAL_Lfoo constants which signify return of "long" result -
   40663 	they are never used.
   40664 
   40665 2012-03-18  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40666 
   40667 	Remove unused version of sys_lseek.
   40668 	It is buggy: it returns RVAL_LUDECIMAL, which means the return value
   40669 	is in tcp->u_lrval. But tcp->u_lrval is never set
   40670 	(on Linux - it used to be set on other OSes).
   40671 
   40672 	* file.c (sys_lseek): Remove a version of this function which is
   40673 	supposed to be used if off_t is long long. It appears to be buggy
   40674 	and unused.
   40675 
   40676 2012-03-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40677 
   40678 	Revert "Remove underscores from a few syscall names which have them"
   40679 	This reverts commit 31972d52b1059d8faca1c5f417c2db1a90b868ae.
   40680 
   40681 2012-03-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40682 
   40683 	Simplify sys_lseek64 conditional compilation.
   40684 	It looks like sys_lseek64() is never used.
   40685 	For one, it is buggy (always shows 0 return value), and no one complains.
   40686 
   40687 	From code inspection: sys_lseek64 name is not used anywhere.
   40688 	It is defined to sys_lseek if HAVE_LONG_LONG_OFF_T is true.
   40689 	Thus, if !HAVE_LONG_LONG_OFF_T, it is never used.
   40690 	Therefore "if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T"
   40691 	conditional it sits in can be simplified to
   40692 	"if HAVE_LONG_LONG_OFF_T".
   40693 	Therefore, we can move it a bit up and merge with
   40694 	"if !HAVE_LONG_LONG_OFF_T, use this sys_lseek()" code block,
   40695 	by addind an "else" clause to it.
   40696 	To simplify it more, drop define and just rename sys_lseek64 ->
   40697 	sys_lseek.
   40698 
   40699 	Since the function is buggy, I think it is unused and we can
   40700 	just drop it. (I checked: at least I386 never uses it).
   40701 
   40702 	* file.c (sys_lseek64): Rename to sys_lseek; don't compile it
   40703 	if _LFS64_LARGEFILE but !HAVE_LONG_LONG_OFF_T since in this case
   40704 	it is never used.
   40705 
   40706 2012-03-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40707 
   40708 	Remove underscores from a few syscall names which have them.
   40709 	Affected names are "_newselect", "_llseek", "_sysctl".
   40710 	I see no apparent reason why they have leading underscores.
   40711 	Moreover, some arches have underscored names and some have
   40712 	non-underscored ones. This is not consistent.
   40713 
   40714 	I verified that every architectire I touched did not have
   40715 	a similarly named syscall without underscore, thus this change
   40716 	does not introduce new ambiquities.
   40717 
   40718 	I left "_exit" untouched for now, but the same points stand for it too:
   40719 	some architectures use "exit" and no one complains. So why many
   40720 	arches are using "_exit"?
   40721 
   40722 	* linux/*/syscallent.h: Remove underscores from displayed
   40723 	syscall names for _newselect, _llseek, _sysctl.
   40724 
   40725 2012-03-17  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40726 
   40727 	Remove unused struct tcb::baddr field.
   40728 	* defs.h: Remove unused struct tcb::baddr field.
   40729 
   40730 	Remove unused PTRACE_WRITE{TEXT,DATA} constants (they are from SunOS)
   40731 	* util.c: Remove unused PTRACE_WRITE{TEXT,DATA} constants.
   40732 
   40733 	Reindent case labels. No code changes.
   40734 	* net.c (printsockopt): Reindent case labels.
   40735 	* signal.c (sys_signal): Likewise.
   40736 
   40737 	Remove unused constants. No code changes.
   40738 	* syscall.c: Remove unused ENOIOCTLCMD constant. Fix indentation.
   40739 	* util.c: Remove unused CLONE_STOPPED constant.
   40740 
   40741 	Move change_syscall() to its only user and make it static.
   40742 	* defs.h: Remove declaration of change_syscall().
   40743 	* process.c (change_syscall): Remove definition of this function.
   40744 	* util.c (change_syscall): Add definition of change_syscall().
   40745 
   40746 	MAP_ANON is the same as MAP_ANONYMOUS, no need to have the former.
   40747 	* mem.c: Do not allocate string for MAP_ANON if it is the same as
   40748 	MAP_ANONYMOUS.
   40749 
   40750 	Indentation and whitespace fixes. No code changes.
   40751 
   40752 	test/threaded_execve: make it also test a case when leader is not in syscall
   40753 
   40754 2012-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   40755 
   40756 	Implement prlimit64 decoding, rewrite [gs]etrlimit decoding.
   40757 	* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
   40758 	Define SIZEOF_RLIM_T.
   40759 	* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
   40760 	* linux/dummy.h (sys_prlimit64): Remove.
   40761 	* linux/syscall.h (sys_prlimit64): New prototype.
   40762 	* resource.c (resources): Reindent, add RLIMIT_RTTIME.
   40763 	(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
   40764 	[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
   40765 	[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
   40766 	(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
   40767 	print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
   40768 	sys_prlimit64): New functions.
   40769 
   40770 2012-03-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40771 
   40772 	Remove another "interrupt to quit" message.
   40773 	* strace.c (startup_attach): Remove another "interrupt to quit" message.
   40774 
   40775 	Fix "strace -oFILE -ff -p<nonexistant_pid>" behavior.
   40776 	* strace.c (newoutf): Set tcp->outf in non-ff mode too.
   40777 	(alloctcb): This define is removed.
   40778 	(alloc_tcb): Renamed to alloctcb. Does not set tcp->outf anymore.
   40779 	Lost 'command_options_parsed' flag parameter.
   40780 	(startup_attach): Do not say "interrupt to quit" in attach message -
   40781 	^C does not work in all cases, we mislead users.
   40782 	Call newoutf(tcp) after successful attach.
   40783 	(startup_child): Call newoutf(tcp) after successful attach.
   40784 	(trace): Call newoutf(tcp) when we picked up already attached child.
   40785 
   40786 2012-03-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40787 
   40788 	Make alloc_tcb and droptcb static. No code changes.
   40789 	The change is trivial. Diff is large because it is confused
   40790 	by function definitions being moved around.
   40791 
   40792 	* defs.h: Remove declarations of alloc_tcb and droptcb.
   40793 	* strace.c: Make alloc_tcb and droptcb static.
   40794 	Shuffle functions around to make compiler happy.
   40795 
   40796 2012-03-16  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40797 
   40798 	Tidy up includes and copyright notices, fix indentation.
   40799 	The files not mentioned in changelog below had only
   40800 	copyright notices fixes and indentation fixes.
   40801 
   40802 	* defs.h: Include <stdint.h> and <inttypes.h>.
   40803 	* file.c: Do not include <inttypes.h>.
   40804 	Move struct kernel_dirent declaration below top include block.
   40805 	* block.c: Do not include <stdint.h> and <inttypes.h>.
   40806 	* quota.c: Likewise.
   40807 	* desc.c: Likewise.
   40808 	* signal.c: Likewise.
   40809 
   40810 2012-03-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   40811 
   40812 	scsi.c: add copyright header.
   40813 	* scsi.c: This file was added back in 2007 without a copyright header.
   40814 	Add it now.
   40815 
   40816 2012-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   40817 
   40818 	Enhance capget and capset syscalls decoding.
   40819 	* system.c (cap_version): New xlat structure.
   40820 	(print_cap_header, print_cap_data): New functions.
   40821 	(sys_capget, sys_capset): Use them.
   40822 
   40823 	Remove unused code.
   40824 	* syscall.c (subcall_style, decode_subcall): Remove.
   40825 	[SYS_socket_subcall] (decode_socket_subcall): New function, based on
   40826 	decode_subcall in deref_style.
   40827 	[SYS_ipc_subcall] (decode_ipc_subcall): New function, based on
   40828 	decode_subcall in shift_style.
   40829 	(trace_syscall_entering): Use decode_socket_subcall and
   40830 	decode_ipc_subcall instead of decode_subcall.
   40831 
   40832 	Fix IPC decoding on alpha and arm.
   40833 	* ipc.c (indirect_ipccall): Return 0 on ALPHA and ARM EABI.
   40834 	(sys_shmat): Use indirect_ipccall for proper return value decoding.
   40835 
   40836 	arm: fix compilation warnings.
   40837 	* configure.ac: Define SIZEOF_LONG.
   40838 	* signal.c (sys_rt_sigaction) [SUPPORTED_PERSONALITIES > 1]: Help
   40839 	compiler to optimize out unreachable code that is not expected to work
   40840 	on platforms where sizeof(long) <= 4.
   40841 
   40842 2012-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   40843 
   40844 	tests: robustify again buggy shells.
   40845 	* tests/init.sh (check_strace): Use "${parameter:-word}" shell syntax
   40846 	instead of "${parameter-word}".
   40847 
   40848 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   40849 
   40850 2012-03-15  Mike Frysinger  <vapier (a] gentoo.org>
   40851 
   40852 	improve ifdef check with decode_subcall.
   40853 	Use the same ifdef logic around the call sites of decode_subcall()
   40854 	to protect the definition of the func itself.  This fixes warnings
   40855 	for targets like hppa which don't use this func.
   40856 
   40857 	* syscall.c (decode_subcall): Wrap in SYS_socket_subcall and
   40858 	SYS_ipc_subcall define checks.
   40859 
   40860 2012-03-15  Mike Frysinger  <vapier (a] gentoo.org>
   40861 
   40862 	alpha: fix decode of osf_sigprocmask.
   40863 	The alpha sigprocmask syscall is special in that it comes from OSF rather
   40864 	than the style that everyone else uses.
   40865 
   40866 	Tested with this simple code:
   40867 	$ cat test.c
   40868 	#include <signal.h>
   40869 	main() {
   40870 		sigset_t set, oldset;
   40871 		sigemptyset(&set);
   40872 		sigaddset(&set, SIGINT);
   40873 		sigaddset(&set, SIGHUP);
   40874 		sigprocmask(SIG_SETMASK, &set, &oldset);
   40875 		sigprocmask(SIG_UNBLOCK, &oldset, &set);
   40876 		sleep(3);
   40877 	}
   40878 	$ gcc test.c && ./strace ./a.out
   40879 	...
   40880 	osf_sigprocmask(SIG_SETMASK, [HUP INT]) = 0 (old mask [])
   40881 	osf_sigprocmask(SIG_UNBLOCK, [])        = 0x3 (old mask [HUP INT])
   40882 	osf_sigprocmask(SIG_BLOCK, [CHLD])      = 0x3 (old mask [HUP INT])
   40883 	...
   40884 
   40885 	* linux/alpha/syscallent.h: Call sys_sigprocmask for osf_sigprocmask,
   40886 	and change number of arguments to two.
   40887 	* signal.c (sys_sigprocmask): Fix decoding of alpha osf sigprocmask.
   40888 
   40889 2012-03-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40890 
   40891 	Fix array size calculation in previous commit.
   40892 	* pathtrace.c (getfdpath): Fix array size calculation.
   40893 
   40894 2012-03-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40895 
   40896 	pathtrace_select() is never called with NULL, remove dead code.
   40897 	pathtrace_select() is only called for -P FILE options,
   40898 	and FILE is never a NULL pointer.
   40899 
   40900 	   text	   data	    bss	    dec	    hex	filename
   40901 	 239453	    672	  19012	 259137	  3f441	strace.before
   40902 	 239329	    672	  19012	 259013	  3f3c5	strace
   40903 
   40904 	* pathtrace.c (pathtrace_select): Remove "if (path == NULL)...".
   40905 	(pathtrace_select): Remove code which only executes if path == NULL.
   40906 	The code was also buggy, it can free non-malloced pointer.
   40907 	(getfdpath): Simplify snprintf to sprintf.
   40908 	(pathmatch): Use strcmp() == 0 idiom for string equality test.
   40909 	(pathtrace_match): Likewise.
   40910 
   40911 2012-03-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40912 
   40913 	manpage: remove bugs which are fixed.
   40914 	"A traced process ignores SIGSTOP" - fixed, expected to be in linux-3.4.x.
   40915 	"A traced process which tries to block SIGTRAP will be sent a SIGSTOP
   40916 	in an attempt to force continuation of tracing." - not needed
   40917 	and no longer done.
   40918 	"On Linux, exciting as it would be, tracing the init process is forbidden"
   40919 	- not true anymore.
   40920 	"When a traced process receives a SIGTRAP signal not
   40921 	associated with tracing, strace will not report that signal correctly."
   40922 	- not true anymore.
   40923 
   40924 	Simplify SIGCHLD handler setting.
   40925 	* strace.c (init): Set SIGCHLD to SIG_DFL earlier.
   40926 	(startup_child): Do not bother restoring SIGCHLD handler.
   40927 
   40928 	When reporting signals, use short signal names (SIGfoo) instead of strerror
   40929 	* defs.h: Remove strsignal declaration.
   40930 	* signal.c: Better check for SI_FROMUSER define.
   40931 	* strace.c (strerror): Remove this function.
   40932 	(trace): Use short signal names (SIGfoo) instead of strerror.
   40933 
   40934 	Remove TODO file: it's eleven years old and completely outdated.
   40935 
   40936 	Clean up defs.h order. No code changes.
   40937 	* defs.h: Group together related declarations. No code changes.
   40938 
   40939 2012-03-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40940 
   40941 	Fix lame kernel version checking code.
   40942 	The code "os_release[0] >= '3'" is not good for any
   40943 	finer-grained checks such as "kernel >= 3.2.1".
   40944 	Let's proactively fix it.
   40945 
   40946 	* strace.c: Change os_release from string to integer.
   40947 	(get_os_release): Parse uname.release to KERNEL_VERSION
   40948 	representation.
   40949 	(init): Convert kernel version check to KERNEL_VERSION.
   40950 
   40951 2012-03-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40952 
   40953 	Experimental support for "detach on execve" feature.
   40954 	* strace.c: Define new detach_on_execve, skip_startup_execve bool variables.
   40955 	(init): Set detach_on_execve on -b, set skip_startup_execve if
   40956 	"strace PROG" form is used.
   40957 	(trace): Detach from process if -b and we see PTRACE_EVENT_EXEC event.
   40958 
   40959 	Simple fixes.
   40960 	* strace.c (usage): Document -d; document that -F is deprecated.
   40961 	(droptcb): Print "<detached ...>" correctly for non-ff mode too.
   40962 	(detach): Suppress a warning.
   40963 
   40964 	Remove an outdated comment.
   40965 	* defs.h: Remove an outdated comment.
   40966 
   40967 	Remove extra include directives. No code changes.
   40968 	* defs.h: Include <signal.h> unconditionally.
   40969 	Other files were doing it unconditionally, so no harm done.
   40970 	* bjm.c: Remove system includes which are already included by defs.h.
   40971 	* pathtrace.c: Likewise.
   40972 	* process.c: Likewise.
   40973 	* signal.c: Likewise.
   40974 	* strace.c: Likewise.
   40975 	* stream.c: Likewise.
   40976 	* syscall.c: Likewise.
   40977 	* system.c: Likewise.
   40978 	* util.c: Likewise.
   40979 
   40980 2012-03-15  Denys Vlasenko  <vda.linux (a] googlemail.com>
   40981 
   40982 	Tidy up order of includes; make bool variables explicit.
   40983 	Bool variables are more compact in data and (on x86) on code too:
   40984 
   40985 	   text	   data	    bss	    dec	    hex	filename
   40986 	 237950	    676	  19044	 257670	  3ee86	strace.before
   40987 	 237838	    676	  19012	 257526	  3edf6	strace
   40988 
   40989 	* defs.h: Group library includes at the top of the file.
   40990 	Rename dtime to Tflag, debug to debug_flag.
   40991 	Change debug_flag,Tflag,qflag,not_failing_only,show_fd_path,tracing_paths
   40992 	variable declarations from int to bool.
   40993 	* strace.c: Change corresponding definitions. Do the same for static
   40994 	variables iflag,rflag,print_pid_pfx.
   40995 	Rename dtime to Tflag, debug to debug_flag.
   40996 	* syscall.c: Rename dtime to Tflag, debug to debug_flag.
   40997 
   40998 2012-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   40999 
   41000 	Fix compiler warnings about breaking strict-aliasing rules.
   41001 	* system.c (sys_capget, sys_capset): Use proxy unions to cast long*
   41002 	pointers to cap_user_header_t and cap_user_data_t pointers without
   41003 	breaking strict-aliasing rules.
   41004 
   41005 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   41006 
   41007 2012-03-15  Mike Frysinger  <vapier (a] gentoo.org>
   41008 
   41009 	ppc64: drop unused pid variable.
   41010 	* syscall.c (get_scno) [POWERPC64]: Delete unused pid variable.
   41011 
   41012 2012-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   41013 
   41014 	ia64: fix compilation warnings.
   41015 	* linux/ia64/syscallent.h: Remove improper defines and undefs.
   41016 
   41017 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   41018 
   41019 2012-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   41020 
   41021 	Ensure that SWAP_FLAG_* constants are defined.
   41022 	* file.c: Define those of SWAP_FLAG_* constants which are not yet
   41023 	provided by <sys/swap.h>.
   41024 
   41025 	Reported-by: Mike Frysinger <vapier (a] gentoo.org>
   41026 
   41027 2012-03-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   41028 
   41029 	Enhance *listxattr syscalls decoding.
   41030 	* file.c (print_xattr_list): New function.
   41031 	(sys_listxattr, sys_flistxattr): Use it.
   41032 
   41033 2012-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   41034 
   41035 	Fix *at syscalls flags decoding.
   41036 	Several *at decoders were defining own incomplete *atflags xlat
   41037 	structures.  That was error prone, and fchownat decoder actually
   41038 	failed to recognize AT_EMPTY_PATH.  Merging these incomplete
   41039 	structures into the single at_flags xlat structure will fix
   41040 	flags handling in all these decoders altogether.
   41041 
   41042 	* file.c: Define all AT_* constants used by *at decoders.
   41043 	(at_flags): New xlat structure, with records for all AT_* constants.
   41044 	(fstatatflags, linkat_flags, unlinkatflags): Remove.
   41045 	(sys_newfstatat, sys_linkat, sys_unlinkat, sys_fchownat,
   41046 	sys_utimensat):  Use at_flags.
   41047 
   41048 2012-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   41049 
   41050 	Fix linkat flags decoding.
   41051 	* file.c (linkat_flags): New xlat structure.
   41052 	(sys_linkat): Decode flags using linkat_flags.
   41053 
   41054 	Implement sys_rt_tgsigqueueinfo syscall decoder.
   41055 	* linux/dummy.h (sys_rt_tgsigqueueinfo): Remove.
   41056 	* linux/syscall.h (sys_rt_tgsigqueueinfo): New prototype.
   41057 	* signal.c (print_sigqueueinfo): New function, based on
   41058 	sys_rt_sigqueueinfo.
   41059 	(sys_rt_sigqueueinfo): Use print_sigqueueinfo.
   41060 	(sys_rt_tgsigqueueinfo): New function.
   41061 
   41062 	Implement syslog syscall decoder.
   41063 	* linux/dummy.h (sys_syslog): Remove.
   41064 	* linux/syscall.h (sys_syslog): New prototype.
   41065 	* system.c (syslog_action_type): New xlat structure.
   41066 	(sys_syslog): New function.
   41067 
   41068 2012-03-13  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41069 
   41070 	Less ugly debug display of ptrace events.
   41071 	* strace.c (trace): Less ugly debug display of ptrace events.
   41072 
   41073 	Make manpage mention that -p "`pidof PROG`" works.
   41074 
   41075 2012-03-13  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41076 
   41077 	Fix logging for "strace -o FILE -ff test/threaded_execve" test case.
   41078 	Our logic which was deciding whether to print "<unfinished ...>"
   41079 	thingy wasn't working properly for -ff case.
   41080 
   41081 	* defs.h: Group log generation-related declarations together.
   41082 	Add a large comment which explains how it works.
   41083 	Add declaration of line_ended() function.
   41084 	* strace.c (line_ended): New function which sets up internal data
   41085 	to indicate that previous line was finished.
   41086 	(printleader): Change logic to fix log generation in -ff mode.
   41087 	(newoutf): Make check for -ff mode consistent with other places.
   41088 	(droptcb): Print "<detached ...>" if last line for this tcp wasn't finished.
   41089 	(cleanup): Remove code to print "<unfinished ...>", printleader()
   41090 	or detach() will do it instead.
   41091 	(trace): Remove code to print "<unfinished ...>".
   41092 	Add code which finishes threaded execve's incomplete line
   41093 	with " <pid changed to PID ...>" message. Replace printing_tcp = NULL
   41094 	followed by fflush() by line_ended() call.
   41095 	* process.c (sys_exit): Call line_ended() to indicate that we finished priting.
   41096 	* syscall.c (trace_syscall_exiting): Set printing_tcp to current tcp.
   41097 	Call line_ended() to indicate that we finished priting.
   41098 	Remove call to fflush(), it is done by line_ended() now.
   41099 
   41100 2012-03-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   41101 
   41102 	net.c: recognize MSG_WAITFORONE.
   41103 	* net.c (msg_flags): Add MSG_WAITFORONE.
   41104 
   41105 2012-03-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41106 
   41107 	Treat -ff without -o FILE as single -f.
   41108 	* strace.c (init): Treat -ff without -o FILE as single -f.
   41109 
   41110 	Style fix. No code changes.
   41111 	* strace.c (process_opt_p_list): Style fix.
   41112 
   41113 2012-03-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41114 
   41115 	Reduce stack usage by ~0.5k.
   41116 	main() uses ~0.5k of stack for local variables and such. When we enter
   41117 	main tracing loop, most of these variables are no longer used.
   41118 	But they still take up stack for the entire life of strace.
   41119 	We can avoid this wastage if we move init code into a separate function.
   41120 	(Need to be careful and not allow automatic inlining).
   41121 
   41122 	* strace.c (init): New function. Most of pre-existing code of
   41123 	main is now living here.
   41124 	(main): Call init() to do initialization.
   41125 
   41126 2012-03-12  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41127 
   41128 	Preparatory cosmetic changes for the next commit.
   41129 	* strace.c (tprintf): Move function up in the source file. No code changes.
   41130 	(tprints): Likewise.
   41131 	(printleader): Likewise.
   41132 	(tabto): Likewise.
   41133 
   41134 2012-03-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   41135 
   41136 	Implement sendmmsg syscall decoder.
   41137 	* linux/dummy.h (sys_sendmmsg): Remove.
   41138 	* linux/syscall.h (sys_sendmmsg): New prototype.
   41139 	* net.c (printmmsghdr): Add index argument specifying the element in
   41140 	mmsghdr array to print.
   41141 	(decode_mmsg): New function, prints the whole mmsghdr array, its length
   41142 	and message flags.
   41143 	(sys_sendmmsg): New function.
   41144 	(sys_recvmmsg): Use decode_mmsg to fix mmsghdr array decoding.
   41145 
   41146 	Implement sched_rr_get_interval syscall decoder.
   41147 	* linux/dummy.h (sys_sched_rr_get_interval): Remove.
   41148 	* linux/syscall.h (sys_sched_rr_get_interval): New prototype.
   41149 	* process.c (sys_sched_rr_get_interval): New function.
   41150 
   41151 	Implement migrate_pages syscall decoder.
   41152 	* linux/dummy.h (sys_migrate_pages): Remove.
   41153 	* linux/syscall.h (sys_migrate_pages): New prototype.
   41154 	* mem.c (sys_migrate_pages): New function.
   41155 
   41156 	Implement get_robust_list syscall decoder.
   41157 	* linux/dummy.h (sys_get_robust_list): Remove.
   41158 	* linux/syscall.h (sys_get_robust_list): New prototype.
   41159 	* process.c (sys_get_robust_list): New function.
   41160 
   41161 	Define sys_set_robust_list as an alias to sys_munmap.
   41162 	* linux/dummy.h (sys_set_robust_list): Redefine to sys_munmap.
   41163 
   41164 	Implement clock_adjtime syscall decoder.
   41165 	* linux/dummy.h (sys_clock_adjtime): Remove.
   41166 	* linux/syscall.h (sys_clock_adjtime): New prototype.
   41167 	* time.c (do_adjtimex): New function, based on sys_adjtimex.
   41168 	(sys_adjtimex): Use it.
   41169 	(sys_clock_adjtime): New function.
   41170 
   41171 	Define sys_setns as an alias to sys_inotify_rm_watch.
   41172 	* linux/dummy.h (sys_setns): Redefine to sys_inotify_rm_watch.
   41173 
   41174 	Sort definitions of dummy parsers.  No code changes.
   41175 	* linux/dummy.h: Sort definitions of parsers implemented as aliases.
   41176 
   41177 	Correct inotify_rm_watch decoder.
   41178 	* file.c (sys_inotify_rm_watch): Print second argument as int.
   41179 
   41180 	Alias sys_fsync to sys_close.
   41181 	* file.c (sys_fsync): Remove.
   41182 	* linux/syscall.h (sys_fsync): Likewise.
   41183 	* linux/dummy.h (sys_fsync): Alias to sys_close.
   41184 	* linux/m68k/syscallent.h: Add TD flag to fsync entry.
   41185 	* linux/microblaze/syscallent.h: Likewise.
   41186 	* linux/mips/syscallent.h: Likewise.
   41187 
   41188 2012-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   41189 
   41190 	Update ioctl entries.
   41191 	* linux/ioctlent.h.in: Regenerate from v3.3 headers.
   41192 	* linux/i386/ioctlent.h.in: Likewise.
   41193 
   41194 	strace-log-merge: cleanup.
   41195 	* strace-log-merge: Redirect usage to stderr, make the check
   41196 	for numeric suffix simpler.
   41197 
   41198 	Add syscall entries for new linux syscalls.
   41199 	* linux/i386/syscallent.h: Update process_vm_writev handler.
   41200 	* linux/powerpc/syscallent.h: Likewise.
   41201 	* linux/x86_64/syscallent.h: Likewise.
   41202 	* linux/alpha/syscallent.h: Add entries for accept4 and sendmmsg.
   41203 	* linux/arm/syscallent.h: Add entries for process_vm_readv and
   41204 	process_vm_writev.
   41205 	* linux/m68k/syscallent.h: Likewise.
   41206 	* linux/mips/syscallent.h: Likewise.
   41207 	* linux/s390/syscallent.h: Likewise.
   41208 	* linux/s390x/syscallent.h: Likewise.
   41209 	* linux/sh/syscallent.h: Likewise.
   41210 	* linux/sh64/syscallent.h: Likewise.
   41211 	* linux/sparc/syscallent.h: Likewise.
   41212 	* linux/ia64/syscallent.h: Add entries for process_vm_readv,
   41213 	process_vm_writev and accept4.
   41214 	* linux/microblaze/syscallent.h: Add entries for sendmmsg,
   41215 	process_vm_readv and process_vm_writev.
   41216 
   41217 	Implement process_vm_writev decoder.
   41218 	* process.c (sys_process_vm_writev): New function.
   41219 	* linux/syscall.h (sys_process_vm_writev): New prototype.
   41220 
   41221 	Output iovec length in vmsplice and process_vm_readv decoders.
   41222 	* io.c (sys_vmsplice): Output iovec length.
   41223 	* process.c (sys_process_vm_readv): Likewise.
   41224 
   41225 2012-03-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   41226 
   41227 	swapon: decode swap flags.
   41228 	* file.c: Include <sys/swap.h>.
   41229 	(swap_flags): New xlat structure.
   41230 	(sys_swapon): New function.
   41231 	* linux/dummy.h (sys_swapon): Remove.
   41232 	* linux/syscall.h (sys_swapon): New declaration.
   41233 
   41234 2012-03-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41235 
   41236 	Trivial simplification.
   41237 	* strace.c (detach): Use waitpid instead of wait4.
   41238 
   41239 2012-03-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41240 
   41241 	Don't consider PROG to be our child in "strace -D PROG" case.
   41242 	TCB_STRACE_CHILD is used for the case when "strace PROG" is ^C-ed
   41243 	or something like that. strace should not just exit - it should
   41244 	do something with its child (such as signal it too).
   41245 
   41246 	In -D case, PROG is not really a child of _strace_, it is a child
   41247 	of strace's parent. It's ok to handle it exactly as an attached process.
   41248 
   41249 	While we are at it, remove nonsensical special-casing of TCB_STRACE_CHILD
   41250 	in printing of "<unfinished ...>" message.
   41251 
   41252 	* strace.c (startup_attach): Don't set TCB_STRACE_CHILD if -D.
   41253 	(trace): Print "<unfinished ...>" on error regardless of TCB_STRACE_CHILD.
   41254 
   41255 2012-03-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41256 
   41257 	Fix the case where we try to detach unattached processes.
   41258 	Before this change:
   41259 	$ strace -D -p1
   41260 	strace: -D and -p are mutually exclusive options
   41261 	Process 1 detached  <==== WRONG! (and we try to SIGSTOP it!!!)
   41262 
   41263 	* defs.h: Change the meaning of TCB_ATTACHED: now it means "this tracee
   41264 	is attached to us". Add TCB_STRACE_CHILD: "this tracee is our child".
   41265 	* strace.c (kill_save_errno): Move up. No code changes.
   41266 	(process_opt_p_list): Don't set TCB_ATTACHED on new tcb.
   41267 	(startup_attach): Change how we work with TCB_ATTACHED.
   41268 	Set TCB_STRACE_CHILD on -D.
   41269 	(startup_child): Use kill_save_errno instead of kill.
   41270 	Set TCB_ATTACHED and TCB_STRACE_CHILD on attached strace child.
   41271 	If we are in -D case, don't set TCB_ATTACHED (we aren't attached yet).
   41272 	(detach): do not do PTRACE_DETACH if TCB_ATTACHED is not set.
   41273 	(cleanup): Check TCB_STRACE_CHILD instead of TCB_ATTACHED.
   41274 	(trace): Likewise.
   41275 
   41276 2012-03-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41277 
   41278 	Call PTRACE_CONT with addr=0.
   41279 	* strace.c (trace): Call PTRACE_CONT with addr=0.
   41280 
   41281 	install strace-log-merge by "make install"
   41282 
   41283 	strace_log_merge: new file. Helper to merge timestamped strace -ff logs.
   41284 
   41285 2012-03-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41286 
   41287 	Fix PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case.
   41288 	In this case we were printing PIDs to LOG.* files
   41289 	even though it is not necessary.
   41290 
   41291 	The fix is in the addition of "&& followfork < 2" condition.
   41292 
   41293 	* strace.c: Remove pflag_seen variable, add print_pid_pfx one.
   41294 	(process_opt_p_list): Do not pflag_seen++.
   41295 	(main): Use "nprocs != 0" condition instead of "pflag_seen != 0".
   41296 	Set print_pid_pfx before entering main tracing loop.
   41297 	(printleader): Use print_pid_pfx to decide whether to print pid prefix.
   41298 
   41299 2012-03-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41300 
   41301 	Allow -p PID to take comma or whitespace-separated list of PIDs.
   41302 	* defs.h: Clarify meaning of TCB_ATTACHED. No code changes.
   41303 	* strace.c (process_opt_p_list): New function.
   41304 	(main): Call process_opt_p_list to process -p PIDs argument.
   41305 
   41306 2012-03-08  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41307 
   41308 	Pass addr=0 instead of 1 into restarting ptrace calls.
   41309 	While we are at it, fold do_ptrace into its lone caller.
   41310 	We no longer set tcp->ptrace_errno = ESRCH on ESRC error in upeek.
   41311 	Other code paths where ptrace fails wern't doing it, and the code which
   41312 	checks tcp->ptrace_errno even assumes it is never set to ESRCH.
   41313 	(It was me who added this code sometime ago, so it was my fault
   41314 	that it was a bit messy)
   41315 
   41316 	I ran sigkill_rain test and verified that unfinished syscalls are
   41317 	still handled correctly.
   41318 
   41319 	* util.c (ptrace_restart): Do not pass addr=1 to ptrace(), pass 0 instead.
   41320 	I have no idea why we were passing 1. Ptrace documentation says
   41321 	that addr parameter is ignored.
   41322 	(do_ptrace): Remove this function.
   41323 	(upeek): Use ptrace() instead of do_ptrace().
   41324 	* defs.h: Remove do_ptrace() declaration.
   41325 
   41326 2012-03-08  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41327 
   41328 	Trivial tweaks to error messages.
   41329 	* strace.c (test_ptrace_setoptions_followfork): Use kill_save_errno
   41330 	instead of kill.
   41331 	(trace): Use perror_msg instead of perror.
   41332 	* count.c (set_sortby): Use error_msg_and_die instead of fprintf.
   41333 	* syscall.c (qualify): Likewise.
   41334 	* util.c (ptrace_restart): Expand error message.
   41335 	(umoven): Likewise.
   41336 	(umovestr): Likewise.
   41337 	(upeek): Use perror_msg instead of sprintf + perror.
   41338 
   41339 2012-02-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41340 
   41341 	Remove stray sys_swapon() declaration.
   41342 	* linux/syscall.h: Remove stray sys_swapon() declaration.
   41343 	* linux/mips/syscallent.h: Include dummy.h with correct relative path.
   41344 	* linux/dummy.h: Tweak one place where spaces are used instead of tabs.
   41345 	* linux/dummy_check.sh: New script. It helps in finding stray syscall
   41346 	handler declarations.
   41347 
   41348 2012-02-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41349 
   41350 	Correct syscall entries for t[g]kill.
   41351 	* linux/hppa/syscallent.h: Make tgkill use sys_tgkill, not printargs.
   41352 	* linux/sh/syscallent.h: Change tkill type TD -> TS.
   41353 	* linux/sh64/syscallent.h: Likewise.
   41354 	* linux/mips/syscallent.h: Change tkill type 0 -> TS.
   41355 	* linux/x86_64/syscallent.h: Likewise.
   41356 	* linux/avr32/syscallent.h: Likewise.
   41357 
   41358 2012-02-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41359 
   41360 	Assorted trivial optimizations.
   41361 	   text	   data	    bss	    dec	    hex	filename
   41362 	 236448	    672	  19044	 256164	  3e8a4	strace.before
   41363 	 236360	    672	  19044	 256076	  3e84c	strace
   41364 
   41365 	* file.c (sprintmode): Use smaller static buffer, eliminate strlen call.
   41366 	(sprinttime): Use smaller static buffer.
   41367 	(printstat_sparc64): Coalesce two printing calls into one.
   41368 	(printstat_powerpc32): Likewise.
   41369 	(printcompat_statfs6): Likewise.
   41370 	(sys_utime): Do not fetch personality_wordsize[current_personality]
   41371 	repeatedly - cache it in local variable instead.
   41372 	* process.c (printargv): Likewise.
   41373 	* resource.c (sprintrlim): Return const char*, not char*. This allows
   41374 	to eliminate sprintf(buf, "RLIM_INFINITY"). Use smaller static buffer.
   41375 	(sprintrlim64): Likewise.
   41376 	* strace.c (strerror): Use smaller static buffer.
   41377 	(strsignal): Likewise.
   41378 
   41379 2012-02-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41380 
   41381 	Alias a few more syscall printing functions.
   41382 	   text	   data	    bss	    dec	    hex	filename
   41383 	 237384	    672	  19044	 257100	  3ec4c	strace.before
   41384 	 236448	    672	  19044	 256164	  3e8a4	strace
   41385 
   41386 	* defs.h: Declare new functions printargs_lu(), printargs_ld()
   41387 	which simply print syscall all args as unsigned or signed longs.
   41388 	* desc.c (sys_epoll_create): Call printargs_ld() instead of open-coding it.
   41389 	* linux/syscall.h: Remove declarations of the following functions:
   41390 	sys_alarm, sys_getresgid, sys_getsid, sys_nice, sys_setgid, sys_setpgid,
   41391 	sys_setpgrp, sys_setregid, sys_setresgid.
   41392 	* process.c (sys_setgid): Delete this function: now aliased to sys_setuid().
   41393 	(sys_getresgid): Delete this function: now aliased to sys_getresuid().
   41394 	(sys_setregid): Delete this function: now aliased to sys_setreuid().
   41395 	(sys_setresgid): Delete this function: now aliased to sys_setresuid().
   41396 	(sys_setpgrp): Delete this function: now aliased to printargs_lu().
   41397 	(sys_getsid): Likewise.
   41398 	(sys_setpgid): Likewise.
   41399 	(sys_alarm): Likewise.
   41400 	(sys_getpgrp): Delete this function: was unused - was already shadowed
   41401 	by a define in linux/dummy.h.
   41402 	(sys_setsid): Likewise.
   41403 	(sys_getpgid): Likewise.
   41404 	* resource.c (sys_nice): Delete this function: now aliased to printargs_ld().
   41405 	* linux/dummy.h: Define new aliases (see above for the list).
   41406 	* syscall.c (printargs_lu): New function.
   41407 	(printargs_ld): New function.
   41408 
   41409 2012-02-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41410 
   41411 	Style fixes, no code changes.
   41412 	* desc.c (sys_io_getevents): Indentation fix.
   41413 	* file.c (sys_xstat): Remove space after function name.
   41414 	(decode_mknod): Indentation fix.
   41415 	* net.c (printsockopt): Indentation fix.
   41416 	* process.c (unalignctl_string): Indentation fix.
   41417 	(sys_sched_getscheduler): Remove space after ! operator.
   41418 
   41419 2012-02-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   41420 
   41421 	Compress blank lines.
   41422 	Suppress repeated empty lines left after automated code removal.
   41423 	This change was made by filtering every source code file through
   41424 	"cat -s".
   41425 
   41426 2012-02-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   41427 
   41428 	Remove parts of automake machinery which are not needed on Linux.
   41429 	This change is a verbatim part of Dmitry's changes to remove support
   41430 	for non-Linux architectures.
   41431 
   41432 	* Makefile.am: Don't install PORTING file. Install README-linux-ptrace file.
   41433 	Set OS variable to linux unconditionally.
   41434 	* configure.ac: Remove code to set opsys variable, and its usage.
   41435 	Remove checks for headers which are never present on Linux.
   41436 	* m4/stat.m4: Remove 'ifdef LINUX' check.
   41437 	* m4/statfs.m4: Likewise.
   41438 
   41439 2012-02-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   41440 
   41441 	Remove and update documentation.
   41442 	This change is a verbatim part of Dmitry's changes to remove support
   41443 	for non-Linux architectures.
   41444 
   41445 	* PORTING: Deleted.
   41446 	* INSTALL: Modified.
   41447 	* README: Modified.
   41448 	* strace.1: Modified: bugs should be reported to mailing list, not Debian.
   41449 	* strace.spec: do not install PORTING file.
   41450 
   41451 2012-02-25  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41452 
   41453 	Remove a few more code parts which are unused on Linux.
   41454 	This change is abapted from Dmitry's changes to remove support for
   41455 	non-Linux architectures.
   41456 
   41457 	* Makefile.am: Remove if LINUX/endif pairs.
   41458 	* defs.h: Remove stream_ioctl() declaration.
   41459 	* ioctl.c (ioctl_decode): Remove 'ifdef HAVE_SYS_STREAM_H' block.
   41460 	* resource.c: Use 'defined(FOO)' instead of 'defined FOO' form.
   41461 	* util.c: Likewise.
   41462 	* signal.c: Remove conditional includes which are never used on Linux.
   41463 	* stream.c: Likewise.
   41464 	* file.c: Remove excessive empty lines.
   41465 
   41466 2012-02-25  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41467 
   41468 	Build fixes after non-Linux code removal.
   41469 	* configure.ac: Remove calls to proc-based ptrace checks.
   41470 	* proc.c: Remove, it's empty now.
   41471 	* Makefile.am: Remove reference to proc.c.
   41472 	* net.c: Remove trailing newlines.
   41473 	* quota.c: Likewise
   41474 	* resource.c: Likewise
   41475 	* strace.c: Likewise
   41476 	* stream.c: Likewise
   41477 	* time.c: Likewise
   41478 
   41479 	Fix defined(FOO) style.
   41480 	* file.c: Consistently use defined(FOO) instead of defined (FOO).
   41481 	* mem.c: Likewise.
   41482 	* net.c: Likewise.
   41483 	* signal.c: Likewise.
   41484 	* sock.c: Likewise.
   41485 	* linux/mips/syscallent.h: Likewise.
   41486 
   41487 	Reindent preprocessor directives in util.c; fix style.
   41488 	* util.c: Fix indentation of preprocessor directives broken by
   41489 	automatic removal of non-Linux code. Fix style to use consistent
   41490 	defined(FOO) instead of defined (FOO).
   41491 
   41492 	Reindent preprocessor directives in syscall.c; fix style.
   41493 	* syscall.c: Fix indentation of preprocessor directives broken by
   41494 	automatic removal of non-Linux code. Fix style to use consistent
   41495 	defined(FOO) instead of defined (FOO).
   41496 
   41497 	Reindent defs.h preprocessor directives.
   41498 	* defs.h: Fix indentation of preprocessor directives broken by
   41499 	automatic removal of non-Linux code.
   41500 
   41501 	Cleanup after non-Linux code removal.
   41502 	Conditions such as defined(LINUX) are always true now,
   41503 	defined(FREEBSD) etc are always false.
   41504 	When if directive has them as subexpressions, it can be simplified.
   41505 	Another trivial changes here are fixes for directive indentation.
   41506 
   41507 2012-02-25  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41508 
   41509 	Manual removal of non-Linux source, documentation, etc.
   41510 	Remove non-Linux source directories: freebsd/, svr4/, sunos4/, svr4/.
   41511 	Remove README-freebsd, README-sunos4, README-svr4, m4/procfs.m4.
   41512 
   41513 	linux/sparc/{errnoent1,ioctlent1,signalent1}.h used to point to svr4/ files -
   41514 	replace their contents with copies of used (and now deleted) files.
   41515 	Make linux/sparc64/{errnoent1,ioctlent1,signalent1}.h include these files
   41516 	instead of svr4/* ones.
   41517 
   41518 	Makefile.am: remove references to deleted files.
   41519 	configure.ac: Remove a few tests which make no sense on Linux.
   41520 	Man page: remove non-Linux quirks information.
   41521 
   41522 2012-02-25  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41523 
   41524 	Automated removal of non-Linux code.
   41525 	This change is generated by running every source through the following command:
   41526 
   41527 	unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD
   41528 	-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS
   41529 	-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c
   41530 
   41531 2012-02-24  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41532 
   41533 	When accessing data blocks, truncate addr to wordsize.
   41534 	* util.c (umoven): Truncate addr to wordsize before use.
   41535 
   41536 2012-02-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   41537 
   41538 	strace.1: fix a typo.
   41539 	* strace.1: Fix a typo in example description.
   41540 	This fixes Debian bug #653309.
   41541 
   41542 	Fix sockaddr_un.sun_path name in decoded output.
   41543 	* net.c (printsock): Show sockaddr_un.sun_path as "sun_path".
   41544 	This fixes Debian bug #554946.
   41545 
   41546 	Avoid potential core file clobbering on exit.
   41547 	* strace.c (main): Set RLIMIT_CORE to zero before terminating itself
   41548 	with a deadly signal.
   41549 	This fixes Debian bug #656398.
   41550 
   41551 2012-02-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   41552 
   41553 	Eliminate native_scno and known_scno.
   41554 	* defs.h (known_scno): Remove.
   41555 	(sysent): Remove native_scno field.
   41556 	* process.c [IA64]: Replace known_scno(tcp) with tcp->scno.
   41557 	(internal_fork) [USE_PROCFS || !LINUX]: Likewise.
   41558 	* syscall.c: Do not define NR_SYSCALL_BASE.
   41559 	(known_scno): Remove.
   41560 	(syscall_fixup_on_sysenter) [USE_PROCFS]: Replace known_scno(tcp)
   41561 	with tcp->scno.
   41562 	(trace_syscall_entering) [SVR4 || FREEBSD || SUNOS4]: Likewise.
   41563 	(syscall_fixup_on_sysexit) [SUNOS4]: Likewise.
   41564 
   41565 	Remove initialization of native_scno field.
   41566 	* linux/i386/syscallent.h: Remove native_scno initialization for clone,
   41567 	fork and vfork.
   41568 	* linux/ia64/syscallent.h (sys_fork, sys_vfork): Remove redirections
   41569 	to printargs.
   41570 	* linux/syscall.h [IA64]: Do not define SYS_fork and SYS_vfork.
   41571 	* util.c (printcall) [IA64]: Likewise.
   41572 	(setbpt): Use sys_func to check for clone, fork and vfork syscalls.
   41573 
   41574 	Do not use SYS_ipc and SYS_socketcall.
   41575 	* linux/dummy.h (sys_ipc, sys_socketcall): Remove redirections to
   41576 	printargs.
   41577 	* linux/ia64/syscallent.h: Likewise.
   41578 	* linux/i386/syscallent.h: Remove native_scno initialization for "ipc"
   41579 	and "socketcall".
   41580 	* linux/syscall.h (sys_ipc, sys_socketcall): New prototypes.
   41581 	(SYS_ipc, SYS_socketcall): Remove no longer used constants.
   41582 	[IA64]: Remove undefining of ipc and socket SYS_* constants.
   41583 	[SPARC || SPARC64]: Remove unused ipc SYS_* constants.
   41584 	* ipc.c (sys_ipc): New function.
   41585 	* sock.c (sys_socketcall): Likewise.
   41586 	* syscall.c (trace_syscall_entering): Use sys_func to check for ipc and
   41587 	socket subcalls.
   41588 
   41589 2012-02-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   41590 
   41591 	Remove initialization of native_scno field for most of syscalls.
   41592 	The native_scno field is not so much used in the code than before.
   41593 	In many cases sys_func is checked instead, and for most of syscall
   41594 	entries there is no need to initialize native_scno.
   41595 
   41596 	* linux/i386/syscallent.h: Remove native_scno initialization for
   41597 	_exit, read, write, waitpid, execve, wait4, sysfs, readv, writev,
   41598 	pread64, pwrite64, exit_group, waitid, send, recv, sendto and
   41599 	recvfrom syscall entries.
   41600 	* linux/syscall.h: Do not define no longer used SYS_waitid and
   41601 	SYS_sub_* constants.
   41602 	[IA64]: Do not define SYS_waitpid and SYS32_* constants.
   41603 	* defs.h: Do not define no longer used  __NR_exit_group constant.
   41604 	* strace.c [USE_PROCFS] (proc_open): Use sys_func to check for execve.
   41605 
   41606 2012-02-14  Mike Frysinger  <vapier (a] gentoo.org>
   41607 
   41608 	util: check for process_vm_readv in C library.
   41609 	glibc-2.15 provides process_vm_readv, so trying to provide it ourselves
   41610 	with that version fails.
   41611 
   41612 	* configure.ac (AC_CHECK_FUNCS): Add process_vm_readv.
   41613 	* util.c: Handle HAVE_PROCESS_VM_READV.
   41614 
   41615 2012-02-09  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41616 
   41617 	README-linux-ptrace: correct the description of suppressed signals.
   41618 
   41619 2012-02-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   41620 
   41621 	strace -P: fix handling of invalid syscalls.
   41622 	* pathtrace.c (pathtrace_match): Check the given syscall number using
   41623 	SCNO_IN_RANGE.
   41624 
   41625 2012-02-06  H.J. Lu  <hongjiu.lu (a] intel.com>
   41626 
   41627 	Skip the syscall entry if the sys_func field is NULL.
   41628 	Avoid NULL dereference when there are holes in sysent tables.
   41629 	It can happen with syscall (number, ...) and number is in those holes.
   41630 	There are no targets with holey systent tables so far, but at least
   41631 	one such a target, x32, is already on the horizon.
   41632 
   41633 	* defs.h (SCNO_IN_RANGE): Also check the sys_func field.
   41634 
   41635 2012-02-06  H.J. Lu  <hongjiu.lu (a] intel.com>
   41636 
   41637 	Define RLIM64_INFINITY only if not defined.
   41638 	* resource.c (RLIM64_INFINITY): Define only if it isn't defined.
   41639 
   41640 2012-02-06  H.J. Lu  <hongjiu.lu (a] intel.com>
   41641 
   41642 	Cast to long for %l in printf.
   41643 	Cast a value to long for %l in printf to avoid compiler warning
   41644 	on systems where it may be long long.
   41645 
   41646 	* count.c (call_summary_pers): Cast to long.
   41647 	* ipc.c (sys_mq_open, printmqattr): Likewise.
   41648 	* quota.c (decode_cmd_data): Likewise.
   41649 	* resource.c (sys_sysinfo): Likewise.
   41650 	* time.c (tprint_timex): Likewise.
   41651 
   41652 2012-02-06  H.J. Lu  <hongjiu.lu (a] intel.com>
   41653 
   41654 	Check HAVE_LONG_LONG_OFF_T when printing offset.
   41655 	When HAVE_LONG_LONG_OFF_T is defined, we need to use %llu to print
   41656 	offset.
   41657 
   41658 	* io.c (sys_sendfile): Check HAVE_LONG_LONG_OFF_T when printing
   41659 	offset.
   41660 
   41661 2012-02-06  H.J. Lu  <hongjiu.lu (a] intel.com>
   41662 
   41663 	Define old stat functions only if needed.
   41664 	When HAVE_LONG_LONG_OFF_T is defined, those old stat functions aren't
   41665 	used and strace won't link since they use realprintstat which isn't
   41666 	defined when HAVE_LONG_LONG_OFF_T is defined.
   41667 
   41668 	* file.c (convertoldstat, sys_oldstat, sys_oldfstat, sys_oldlstat):
   41669 	Define only if HAVE_LONG_LONG_OFF_T isn't defined.
   41670 
   41671 2012-02-06  H.J. Lu  <hongjiu.lu (a] intel.com>
   41672 
   41673 	Print NULL for zero address in sys_mmap64.
   41674 	* mem.c (sys_mmap64): Print NULL for zero address so that it is
   41675 	consistent with sys_mmap.
   41676 
   41677 2012-02-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   41678 
   41679 	Remove unused sys_pread64 and sys_pwrite64 parsers on Linux.
   41680 	* io.c [HAVE_LONG_LONG_OFF_T]: Remove sys_pread64 and sys_pwrite64
   41681 	aliases.
   41682 	(sys_pread64, sys_pwrite64): Define these functions only on
   41683 	[SVR4 && _LFS64_LARGEFILE] platform.
   41684 	* linux/mips/syscallent.h: Use sys_pread and sys_pwrite to handle
   41685 	appropriate syscalls.
   41686 	* linux/syscall.h (sys_pread64, sys_pwrite64): Remove.
   41687 	* syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only on
   41688 	[SVR4 && _LFS64_LARGEFILE] platform.
   41689 
   41690 2012-02-03  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41691 
   41692 	Trivial changes to help text. No code changes.
   41693 	* strace.c (usage): Tweak help text: remove unpaired closing brackets,
   41694 	make -V and -h sit on separate lines (hard to see them otherwise).
   41695 
   41696 2012-01-29  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41697 
   41698 	Simple optimizations.
   41699 	   text	   data	    bss	    dec	    hex	filename
   41700 	 239474	    672	  20484	 260630	  3fa16	strace.before
   41701 	 239234	    668	  19044	 258946	  3f382	strace
   41702 
   41703 	* file.c (sprint_open_modes): Reduce static buffer size.
   41704 	Simplify separator printing.
   41705 	* signal.c (sprintsigmask): Reduce static buffer size.
   41706 	Simplify separator printing and printing of almost full masks.
   41707 	Use stpcpy instead of sprintf and strcpy+strlen.
   41708 	* strace.c (startup_child): Don't strchr() for ':' twice in a row.
   41709 	* util.c (sprintflags): Exit loop early if possible.
   41710 
   41711 2012-01-29  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41712 
   41713 	Trivial optimization.
   41714 	* strace.c (cleanup): Read 'interrupted' volatile variable only once.
   41715 
   41716 2012-01-29  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41717 
   41718 	Make interactive-ness directly controllable via command line option.
   41719 	Defaults are often ok, but when they are not, people get confused.
   41720 	"Why can't I kill strace?" and "Why strace dies on ^C when I want
   41721 	to _tracee_ to die instead?" are typical complaints.
   41722 
   41723 	* strace.c: Replace 'interactive' variable with 'opt_intr' variable.
   41724 	Define INTR_foo constants for its possible values.
   41725 	Define 'interactive' as a macro.
   41726 	(usage): Document -I n option.
   41727 	(main): Parse -I n option, modify signal handling to accomidate new
   41728 	-I 1 and -I 4 modes.
   41729 
   41730 2012-01-29  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41731 
   41732 	Suppress compiler warning.
   41733 	* strace.c (trace): Frame potentially unused label with ifdef/endif.
   41734 
   41735 	On Ctrl-C induced detach, send SIGINT to child tracee, not SIGTERM.
   41736 	* strace.c (interrupt): Remember signal number.
   41737 	(cleanup): If we exiting due to signal, send that signal to child tracee.
   41738 
   41739 2012-01-29  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41740 
   41741 	Add experimental code to use PTRACE_SEIZE, disabled by default.
   41742 	All new code is predicated on "ifdef USE_SEIZE". If it is not defined,
   41743 	behavior is not changed.
   41744 
   41745 	If USE_SEIZE is enabled and run-time check shows that PTRACE_SEIZE works, then:
   41746 	- All attaching is done with PTRACE_SEIZE + PTRACE_INTERRUPT.
   41747 	  This means that we no longer generate (and possibly race with) SIGSTOP.
   41748 	- PTRACE_EVENT_STOP will be generated if tracee is group-stopped.
   41749 	  When we detect it, we issue PTRACE_LISTEN instead of PTRACE_SYSCALL.
   41750 	  This leaves tracee stopped. This fixes the inability to SIGSTOP or ^Z
   41751 	  a straced process.
   41752 
   41753 	* defs.h: Add commented-out "define USE_SEIZE 1" and define PTRACE_SEIZE
   41754 	and related constants.
   41755 	* strace.c: New variable post_attach_sigstop shows whether we age going
   41756 	to expect SIGSTOP on attach (IOW: are we going to use PTRACE_SEIZE).
   41757 	(ptrace_attach_or_seize): New function. Uses PTRACE_ATTACH or
   41758 	PTRACE_SEIZE + PTRACE_INTERRUPT to attach to given pid.
   41759 	(startup_attach): Use ptrace_attach_or_seize() instead of ptrace(PTRACE_ATTACH).
   41760 	(startup_child): Conditionally use alternative attach method using PTRACE_SEIZE.
   41761 	(test_ptrace_setoptions_followfork): More robust parameters to PTRACE_TRACEME.
   41762 	(test_ptrace_seize): New function to test whether PTRACE_SEIZE works.
   41763 	(main): Call test_ptrace_seize() while initializing.
   41764 	(trace): If PTRACE_EVENT_STOP is seen, restart using PTRACE_LISTEN in order
   41765 	to not let tracee run.
   41766 	* process.c: Decode PTRACE_SEIZE, PTRACE_INTERRUPT, PTRACE_LISTEN.
   41767 	* util.c (ptrace_restart): Add "LISTEN" to a possible error message.
   41768 
   41769 2012-01-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41770 
   41771 	process_vm_readv gets EINVAL if process is gone (SIGKILLed). Don't complain.
   41772 	* util.c (umoven): Don't complain on EINVAL from process_vm_readv.
   41773 	(umovestr): Likewise.
   41774 
   41775 	Revert last change. Add a comment to prevent further misunderstanding.
   41776 	* time.c (sys_nanosleep): Display remaining time only on interrupt.
   41777 
   41778 	Fix nanosleep decoding: second argument was not shown after success.
   41779 	* time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check.
   41780 	* syscall.c (is_restart_error): Remove redundant check.
   41781 
   41782 2012-01-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41783 
   41784 	Use process_vm_readv instead of PTRACE_PEEKDATA to read data blocks.
   41785 	Currently, we use PTRACE_PEEKDATA to read things like filenames and
   41786 	data passed by I/O syscalls.
   41787 	PTRACE_PEEKDATA gets one word per syscall. This is VERY expensive.
   41788 	For example, in order to print fstat syscall, we need to perform
   41789 	more than twenty trips into kernel to fetch one struct stat!
   41790 
   41791 	Kernel 3.2 got a new syscall, process_vm_readv(), which can be used to
   41792 	copy data blocks out of process' address space.
   41793 
   41794 	This change uses it in umoven() and umovestr() functions if possible,
   41795 	with fallback to old method if process_vm_readv() fails.
   41796 	If it returns ENOSYS, we don't try to use it anymore, eliminating
   41797 	overhead of trying it on older kernels.
   41798 
   41799 	Result of "time strace -oLOG ls -l /usr/lib >/dev/null":
   41800 	before patch: 0.372s
   41801 	After patch:  0.262s
   41802 
   41803 	* util.c (process_vm_readv): Wrapper to call process_vm_readv syscall.
   41804 	(umoven): Use process_vm_readv for block reads of tracee memory.
   41805 	(umovestr): Likewise.
   41806 	* linux/syscall.h: Declare new function sys_process_vm_readv.
   41807 	* process.c (sys_process_vm_readv): Decoder for new syscall.
   41808 	* linux/i386/syscallent.h: Add process_vm_readv, process_vm_writev syscalls.
   41809 	* linux/x86_64/syscallent.h: Likewise.
   41810 	* linux/powerpc/syscallent.h: Likewise.
   41811 
   41812 2012-01-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41813 
   41814 	Fix a case of broken output if last seen syscall was exit.
   41815 	* defs.h: Rename tcp_last to printing_tcp. Explain what it means.
   41816 	Remove printtrailer() function.
   41817 	* process.c (sys_exit): Convert printtrailer() call to "printing_tcp = NULL".
   41818 	* strace.c: Add new variable printing_tcp.
   41819 	(cleanup): Convert printtrailer() call to "printing_tcp = NULL".
   41820 	(trace): Likewise.
   41821 	(trace): Fix checks for incomplete line - it was working wrongly if last syscall was exit.
   41822 	(printleader): Set printing_tcp.
   41823 	(printtrailer): Remove this function.
   41824 	* syscall.c: Remove tcp_last variable.
   41825 	(trace_syscall_entering): Don't set printing_tcp, printleader call now does it.
   41826 	(trace_syscall_exiting): Convert printtrailer() call to "printing_tcp = NULL".
   41827 
   41828 2012-01-28  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41829 
   41830 	Fix handling of test/threaded_execve.c testcase.
   41831 	Since 3.0, Linux has a way to identify which thread execve'ed.
   41832 	This patch makes use of it in order to properly dispose
   41833 	of disappeared ("superseded") thread leader,
   41834 	and replace it with execve'ed thread.
   41835 
   41836 	Before this patch, strace was "leaking" thread which exec'ed.
   41837 	It was thinking that it still runs. It would look like this:
   41838 
   41839 	18460 pause( <unfinished ...>     <=== thread leader
   41840 	18466 execve("/proc/self/exe", ["exe", "exe"], [/* 47 vars */] <unfinished ...>
   41841 	18465 +++ exited with 0 +++       <=== exits from other threads
   41842 	18460 <... pause resumed> )             = 0
   41843 
   41844 	The last line is wrong: it's not pause resumed, it's execve resumed.
   41845 	If thread leader would do exit instead of pause, it is much worse:
   41846 	strace panics because it thinks it sees return from exit syscall!
   41847 
   41848 	And strace isn't aware 18466 (exec'ed thread) is gone.
   41849 	It still thinks it's executes execve syscall.
   41850 
   41851 	* strace.c: New variable "static char *os_release".
   41852 	(get_os_release): New static function.
   41853 	(main): Call get_os_release to retrieve Linux version.
   41854 	(trace): If we see PTRACE_EVENT_EXEC, retrieve old pid, and if it
   41855 	differs from new one, free one of tcbs and print correct messages.
   41856 
   41857 2012-01-27  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41858 
   41859 	Fix readlink result display - was printing bogus "..." semi-randomly.
   41860 	* file.c (decode_readlink): Use printstr() instead of printpathn().
   41861 
   41862 	Add new test program: test/threaded_execve.c.
   41863 
   41864 	Make pid2tcb static.
   41865 	* defs.h: Remove pid2tcb declaration.
   41866 	* strace.c (pid2tcb): Make this function static.
   41867 
   41868 2012-01-24  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41869 
   41870 	Per Dmitry's request, remove paranoid check in verror_msg()
   41871 	* strace.c (verror_msg): Remove redundant check for msg != NULL.
   41872 
   41873 	More robust error check for vasprintf.
   41874 	* strace.c (verror_msg): More robust error check for vasprintf.
   41875 
   41876 2012-01-24  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41877 
   41878 	Slightly more compact handling of argv[]
   41879 	   text	   data	    bss	    dec	    hex	filename
   41880 	 238274	    672	  20484	 259430	  3f566	strace.before
   41881 	 238226	    672	  20484	 259382	  3f536	strace
   41882 
   41883 	* strace.c (main): Slightly more compact handling of argv[]
   41884 
   41885 2012-01-24  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41886 
   41887 	Trivial optimization.
   41888 	* strace.c: Set default interactive = 1 statically instead
   41889 	of doing it in main().
   41890 
   41891 2012-01-24  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41892 
   41893 	Allocate -o OUTFILE buffer only if needed.
   41894 	   text	   data	    bss	    dec	    hex	filename
   41895 	 238258	    668	  28676	 267602	  41552	strace.before
   41896 	 238274	    668	  20484	 259426	  3f562	strace
   41897 
   41898 	* strace.c (main): Allocate -o OUTFILE buffer only if needed:
   41899 	unused buffer in bss is not entirely free.
   41900 
   41901 2012-01-24  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41902 
   41903 	Use single fprintf in verror_msg()
   41904 	This change partially reverts commit 44d0532.
   41905 
   41906 	In code before commit 44d0532, single fprintf was used on purpose:
   41907 	we want to send entire message as one write() call. Since stderr
   41908 	is unbuffered, separate fprintf's to it always result in separate
   41909 	writes, they are not coalesced. If we aren't the only program
   41910 	which writes to this particular stderr, this may result
   41911 	in interleaved messages.
   41912 
   41913 	Since this function is not performance critical, I guess
   41914 	it's ok to make it less efficient.
   41915 
   41916 	* strace.c (verror_msg): Attempt to print the message in single
   41917 	write operation. Use separate fprintfs as a fallback if malloc fails.
   41918 
   41919 2012-01-21  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41920 
   41921 	Improve code readability (logic is unchanged)
   41922 	* util.c (umoven): Move assignment out of function call. Make assignment
   41923 	to a flag variable later, closer to the place where it will be used.
   41924 	(umovestr): Likewise.
   41925 	(uload): Likewise.
   41926 
   41927 2012-01-20  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41928 
   41929 	Change umovestr API: return > 0 instead of 0 if NUL was seen.
   41930 	* pathtrace.c (upathmatch): Adjust umovestr return value check for new API.
   41931 	* util.c (printpathn): Use umovestr() > 0 return value for more efficient
   41932 	(and robust - we don't depend on "no overwrote past NUL" behavior anymore)
   41933 	handling of terminating NUL.
   41934 	(printstr): Remove useless NUL placement before umovestr() call.
   41935 	Allocate 1 byte more to outstr[] array - for NUL.
   41936 	(umovestr): Change to return 1 if NUL was seen.
   41937 
   41938 	umovestr result may have no NUL, use "%.*s" instead of "%s" to print it.
   41939 	* system.c (sys_mount): Be careful when printing umovestr result,
   41940 	it may have no terminating NUL.
   41941 	(sys_sysmips): Likewise.
   41942 
   41943 2012-01-20  Denys Vlasenko  <vda.linux (a] googlemail.com>
   41944 
   41945 	Eliminate code duplication in time printing, reduce a few static buffers
   41946 	   text	   data	    bss	    dec	    hex	filename
   41947 	 238454	    664	  28772	 267890	  41672	strace.before
   41948 	 238106	    664	  28676	 267446	  414b6	strace
   41949 
   41950 	* defs.h: Add TIMESPEC_TEXT_BUFSIZE and TIMEVAL_TEXT_BUFSIZE defines.
   41951 	Add 'int special' parameter to sprinttv().
   41952 	* time.c (sprinttv): Add 'int special' parameter, and use it
   41953 	similarly to 'int special' parameter of printtv_bitness().
   41954 	(printtv_bitness): Use sprinttv() instead of duplicating its code.
   41955 	(print_timespec): Use sprint_timespec() instead of duplicating
   41956 	its code.
   41957 	* desc.c (decode_select): Use TIMEVAL_TEXT_BUFSIZE instead of 128
   41958 	when checking remaining buffer size.
   41959 	* net.c (sys_recvmsg): Use TIMESPEC_TEXT_BUFSIZE instead of 128
   41960 	for static buffer size.
   41961 	* stream.c (decode_poll): Use TIMESPEC_TEXT_BUFSIZE instead of 128
   41962 	when checking remaining buffer size.
   41963 
   41964 2012-01-19  Denys Vlasenko  <dvlasenk (a] redhat.com>
   41965 
   41966 	Reduce bss usage and speed up string printing.
   41967 	   text	   data	    bss	    dec	    hex	filename
   41968 	 237913	    660	  49284	 287857	  46471	strace.before
   41969 	 237973	    660	  28772	 267405	  4148d	strace
   41970 
   41971 	This reduces L1 D-cache pressure a bit: instead of dirtying
   41972 	20k of bss, we will reuse already dirty stack area.
   41973 
   41974 	* util.c (printpathn): Use on-stack buffers instead of static ones.
   41975 	Saves 5*MAXPATHLEN in bss.
   41976 	(printstr): Use tprints() instead of tprintf("%s") when printing
   41977 	formatted string. May be a bit faster, depending on libc.
   41978 
   41979 2012-01-18  Andreas Schwab  <schwab (a] linux-m68k.org>
   41980 
   41981 	Add support for compat_statfs64.
   41982 	* file.c (struct compat_statfs64, printcompat_statfs64): Define.
   41983 	(sys_statfs64, sys_fstatfs64): Use it.
   41984 
   41985 	Add support for statfs64.f_flags.
   41986 	* file.c (printstatfs64): Print f_flags if available.
   41987 
   41988 	Fix missing parens.
   41989 	* signal.c (sys_sigreturn): Add missing parens.
   41990 
   41991 2012-01-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   41992 
   41993 	Get rid of TCB_SIGTRAPPED.
   41994 	On attempts to block or set SIGTRAP handler,
   41995 	for example, using sigaction syscall, we generate
   41996 	an additional SIGSTOP.
   41997 
   41998 	This change gets rid of this SIGSTOP sending/ignoring.
   41999 	It appears to work just fine.
   42000 
   42001 	It also works if I force strace to not use PTRACE_O_TRACESYSGOOD,
   42002 	which means strace stops will be marked with SIGTRAP,
   42003 	not (SIGTRAP | 0x80) - I wondered maybe that's when
   42004 	this hack is needed.
   42005 
   42006 	So, why we even have TCB_SIGTRAPPED? No one knows. It predates
   42007 	version control: this code was present in the initial commit,
   42008 	in 1999. No adequate comments, either.
   42009 
   42010 	Moreover, TCB_SIGTRAPPED is not set in sys_rt_sigaction
   42011 	and sys_sigprocmask syscalls - the ones which are most usually
   42012 	used to implement signal blocking, it is only set in obsolete
   42013 	sys_signal, sys_sigaction, sys_sigsetmask, and in some dead
   42014 	non-Linux code.
   42015 
   42016 	I think whatever bug it was fixing is gone long ago -
   42017 	at least as long as sys_rt_sigaction is used by glibc.
   42018 	Again, since glibc (and uclibc) uses sys_rt_sigaction
   42019 	and sys_sigprocmask, modified code paths are not used
   42020 	by most programs anyway.
   42021 
   42022 	* defs.h: Remove definition of TCB_SIGTRAPPED.
   42023 	* signal.c (sys_sigvec): Don't set TCB_SIGTRAPPED and don't send SIGSTOP.
   42024 	(sys_sigsetmask): Likewise.
   42025 	(sys_sigaction): Likewise.
   42026 	(sys_signal): Likewise.
   42027 	* strace.c (trace): Remove code which executes if TCB_SIGTRAPPED is set.
   42028 
   42029 2012-01-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42030 
   42031 	When we write log, flush output buffers in a few more cases.
   42032 	I observed a case when signal delivery message was buffered
   42033 	by stdio until it was flushed along with the next syscall
   42034 	entry message.
   42035 
   42036 	* strace.c (trace): Flush output buffers in a few more cases.
   42037 
   42038 2012-01-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42039 
   42040 	Fix old sigaction display.
   42041 	* signal.c (sys_sigaction): Fix display of sigaction with
   42042 	SIG_DFL/SIG_IGN handlers.
   42043 
   42044 	Change x86_64_regs struct type from pt_regs to user_regs_struct.
   42045 	* syscall.c: Change x86_64_regs struct type from
   42046 	pt_regs to user_regs_struct, and explain the change in comment.
   42047 
   42048 2012-01-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   42049 
   42050 	Fix struct pt_regs declaration on i386 and x86-64.
   42051 	* defs.h [I386] (i386_regs): Replace definition with declaration.
   42052 	[X86_64] (x86_64_regs): Remove.
   42053 	* syscall.c [X86_64] (x86_64_regs): Make static.
   42054 
   42055 2012-01-12  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42056 
   42057 	Make ERESTARTxyz messages more descriptive.
   42058 	There is widespread confusion about exact meaning
   42059 	of ERESTARTxyz codes. Before this change, we were showing
   42060 	all four of them the same: as "(To be restarted)".
   42061 
   42062 	This change prints better explanations for these codes,
   42063 	and contains verbose comments which explain *why* we display
   42064 	codes that way - or else someone confused
   42065 	is bound to come later and mangle them again.
   42066 	New messages are:
   42067 
   42068 	ERESTARTSYS (To be restarted if SA_RESTART is set)
   42069 	ERESTARTNOINTR (To be restarted)
   42070 	ERESTARTNOHAND (Interrupted by signal)
   42071 	ERESTART_RESTARTBLOCK (Interrupted by signal)
   42072 
   42073 	* syscall.c (trace_syscall_exiting): Make ERESTARTxyz messages
   42074 	more descriptive.
   42075 
   42076 2012-01-10  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42077 
   42078 	Fix sigreturn arg count from 1 to 0 on all architectures.
   42079 	* linux/alpha/syscallent.h: Change [rt_]sigreturn's arg count to 0.
   42080 	* linux/arm/syscallent.h: Likewise.
   42081 	* linux/avr32/syscallent.h: Likewise.
   42082 	* linux/bfin/syscallent.h: Likewise.
   42083 	* linux/m68k/syscallent.h: Likewise.
   42084 	* linux/microblaze/syscallent.h: Likewise.
   42085 	* linux/mips/syscallent.h: Likewise.
   42086 	* linux/powerpc/syscallent.h: Likewise.
   42087 	* linux/sh/syscallent.h: Likewise.
   42088 	* linux/sh64/syscallent.h: Likewise.
   42089 	* linux/sparc/syscallent.h: Likewise.
   42090 	* linux/tile/syscallent.h: Likewise.
   42091 
   42092 2012-01-10  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42093 
   42094 	Display mask on enter to sigreturn, not on exit.
   42095 	sys_sigreturn() performs ugly manipulations in order to show
   42096 	signal mask which is restored by this syscall: on syscall entry,
   42097 	fetches it from the stack, saves it in tcp->u_arg[]
   42098 	(where it used to overflow this array - fixed sometime ago),
   42099 	then retrieves the mask and displays it on syscall exit.
   42100 
   42101 	Apparently, the motivation is to make it slightly more obvious
   42102 	to user that signal mask is restored only when this syscall returns.
   42103 	IMO, this hardly justifies the necessary hacks. It is much easier
   42104 	to display the mask at the point when we fetch it - on syscall entry.
   42105 
   42106 	While at it, I made it so that we do display returned value/errno.
   42107 	I see no point in hiding it and showing uninformative "= ?" instead.
   42108 
   42109 	Example of pause() being interrupted by ALRM which has installed handler
   42110 	which re-arms ALRM:
   42111 
   42112 	Before the patch:
   42113 
   42114 	rt_sigsuspend([INT])                    = ? ERESTARTNOHAND (To be restarted)
   42115 	--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
   42116 	alarm(1)                                = 0
   42117 	sigreturn()                             = ? (mask now [INT])
   42118 
   42119 	After:
   42120 
   42121 	rt_sigsuspend([INT])                    = ? ERESTARTNOHAND (To be restarted)
   42122 	--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
   42123 	alarm(1)                                = 0
   42124 	sigreturn() (mask [INT])                = -1 EINTR (Interrupted system call)
   42125 
   42126 	* defs.h: Declare struct pt_regs i386_regs and struct pt_regs x86_64_regs.
   42127 	* syscall.c: Remove "static" keywork from these structures' definitions.
   42128 	* signal.c (sys_sigreturn): Display mask on enter, not on exit.
   42129 
   42130 2012-01-04  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42131 
   42132 	Do not detach from tracee which experienced ptrace error.
   42133 	Before this patch, if a thread got nuked by exit in another thread
   42134 	and we happened to poke it at the same time, we print "????(" thingy
   42135 	and detach the thread. Since we removed "detach before death" logic,
   42136 	this no longer matches the behavior of other threads.
   42137 	Before patch:
   42138 	[pid  1780] exit_group(1)               = ?
   42139 	[pid  1778] ????( <unfinished ...>
   42140 	Process 1778 detached
   42141 	[pid  5860] +++ exited with 1 +++
   42142 	After:
   42143 	[pid 17765] exit_group(1)               = ?
   42144 	[pid 21680] ????( <unfinished ...>
   42145 	[pid 17791] +++ exited with 1 +++
   42146 	[pid 21680] +++ exited with 1 +++
   42147 
   42148 	* strace (trace): Do not detach from tracee which experienced ptrace error.
   42149 
   42150 2012-01-04  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42151 
   42152 	Remove sig parameter from detach()
   42153 	* strace.c (detach): Drop sig parameter - it is zero in all calls.
   42154 	(cleanup): Don't pass sig = 0 to detach() call.
   42155 	(detach): Ditto.
   42156 
   42157 2011-12-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   42158 
   42159 	Enhance decoding for personalities with small wordsize.
   42160 	* util.c (umoven, umovestr) [SUPPORTED_PERSONALITIES > 1]: If current
   42161 	personality's wordsize is less than sizeof(long), use only significant
   42162 	bits of the given address.
   42163 
   42164 2011-12-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   42165 
   42166 	Enhance personality switching.
   42167 	On syscall entry, save current personality in the tcb structure
   42168 	along with scno.
   42169 	On syscall exit, restore current personality from the tcb structure.
   42170 	* defs.h (struct tcb) [SUPPORTED_PERSONALITIES > 1]: Add currpers
   42171 	field.
   42172 	* strace.c (alloc_tcb) [SUPPORTED_PERSONALITIES > 1]: Initialize
   42173 	tcp->currpers.
   42174 	* syscall.c (update_personality) [SUPPORTED_PERSONALITIES > 1]: New
   42175 	function.
   42176 	(get_scno, trace_syscall_exiting): Use it.
   42177 
   42178 	Reported-by: Michael A Fetterman <mafetter (a] nvidia.com>
   42179 
   42180 2011-12-01  Dmitry V. Levin  <ldv (a] altlinux.org>
   42181 
   42182 	* net.c (socktcpoptions): Add more TCP_* constants from linux/tcp.h.
   42183 	Reported-by: Rick Jones <rick.jones2 (a] hp.com>
   42184 
   42185 2011-12-01  Heiko Carstens  <heiko.carstens (a] de.ibm.com>
   42186 
   42187 	Fix sys_ipc/sys_semtimedop decoding on s390.
   42188 	The s390 kernel sys_ipc system call only takes five arguments instead of
   42189 	six arguments which the common code sys_ipc implementation takes.
   42190 	One of the arguments of the sys_semtimedop subcall is therefore passed in
   42191 	a different register than in the common code implementation.
   42192 	This leads to broken decoding of the timespec argument:
   42193 
   42194 	semtimedop(0, 0x3ffffb43832, 1, {...})  = -1 EAGAIN
   42195 
   42196 	Fixed it looks like this:
   42197 
   42198 	semtimedop(0, 0x3ffffc2c842, 1, {0, 10000000}) = -1 EINTR
   42199 
   42200 	* linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390.
   42201 
   42202 2011-11-29  Dmitry V. Levin  <ldv (a] altlinux.org>
   42203 
   42204 	strace.c (trace): Fix compilation warning.
   42205 
   42206 2011-11-28  Dmitry V. Levin  <ldv (a] altlinux.org>
   42207 
   42208 	linux/syscall.h: Remove redundant function declarations.
   42209 	Remove 51 function declarations aliased to other declarations in
   42210 	linux/dummy.h file.
   42211 
   42212 	linux/syscall.h: Sort function declarations.
   42213 
   42214 	linux/syscall.h: Place one function declaration per line.
   42215 
   42216 	Remove redundant parsers.
   42217 	* desc.c (sys_dup): Remove.
   42218 	* file.c (sys_pivotroot, sys_rmdir, sys_fchdir, sys_chroot, sys_fchroot,
   42219 	sys_unlink, sys_symlink, sys_rename): Remove.
   42220 	* linux/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_pivotroot,
   42221 	sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
   42222 	* linux/dummy.h: Add aliases for sys_chroot, sys_dup, sys_pivotroot,
   42223 	sys_rename, sys_rmdir, sys_symlink, sys_unlink.
   42224 	* pathtrace.c (pathtrace_match): Update.
   42225 	* sunos4/dummy.h: Add aliases for sys_chroot, sys_dup, sys_fchdir,
   42226 	sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink.
   42227 	* svr4/dummy.h: Likewise.
   42228 	* sunos4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot,
   42229 	sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
   42230 	* svr4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot,
   42231 	sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
   42232 
   42233 	Reflect the fact that nfsservctl syscall was removed from linux kernels.
   42234 	linux/dummy.h: Move nfsservctl to "unimplemented" section.
   42235 
   42236 2011-11-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   42237 
   42238 	x86_64: add getcpu syscall entry.
   42239 	* linux/x86_64/syscallent.h: Add syscall entry for getcpu.
   42240 
   42241 2011-11-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   42242 
   42243 	Add syscall entries for new linux syscalls.
   42244 	* linux/dummy.h: Add printargs parsers for new syscalls.
   42245 	* linux/arm/syscallent.h: Add entries for sys_clock_adjtime,
   42246 	sys_name_to_handle_at, sys_open_by_handle_at, sys_sendmmsg, sys_setns
   42247 	and sys_syncfs.
   42248 	* linux/i386/syscallent.h: Likewise.
   42249 	* linux/ia64/syscallent.h: Likewise.
   42250 	* linux/mips/syscallent.h: Likewise.
   42251 	* linux/powerpc/syscallent.h: Likewise.
   42252 	* linux/sh/syscallent.h: Likewise.
   42253 	* linux/sh64/syscallent.h: Likewise.
   42254 	* linux/sparc/syscallent.h: Likewise.
   42255 	* linux/x86_64/syscallent.h: Likewise.
   42256 	* linux/alpha/syscallent.h: Add entries for sys_clock_adjtime,
   42257 	sys_name_to_handle_at, sys_open_by_handle_at, sys_setns and sys_syncfs.
   42258 	* linux/m68k/syscallent.h: Likewise.
   42259 	* linux/microblaze/syscallent.h: Likewise.
   42260 	* linux/s390/syscallent.h: Likewise.
   42261 	* linux/s390x/syscallent.h: Likewise.
   42262 	* linux/avr32/syscallent.h: Add entry for sys_setns.
   42263 	* linux/bfin/syscallent.h: Add entries for sys_sendmmsg and sys_setns.
   42264 	* linux/hppa/syscallent.h: Add entries for sys_clock_adjtime,
   42265 	fanotify_init, fanotify_mark, sys_name_to_handle_at,
   42266 	sys_open_by_handle_at, sys_sendmmsg, sys_setns and sys_syncfs.
   42267 
   42268 	Fix prctl syscall entries.
   42269 	* linux/mips/syscallent.h: Fix prctl handler.
   42270 	* linux/tile/syscallent.h: Likewise.
   42271 
   42272 	arm: fix io_* syscall entries.
   42273 	* linux/arm/syscallent.h: Fix handlers for io_setup, io_destroy,
   42274 	io_getevents, io_submit and io_cancel.
   42275 
   42276 	Fix mincore syscall entries.
   42277 	* linux/arm/syscallent.h: Fix mincore handler.
   42278 	* linux/avr32/syscallent.h: Likewise.
   42279 	* linux/mips/syscallent.h: Likewise.
   42280 	* linux/sh/syscallent.h: Likewise.
   42281 	* linux/sh64/syscallent.h: Likewise.
   42282 
   42283 2011-11-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   42284 
   42285 	Fix sendmsg syscall entries.
   42286 	* linux/arm/syscallent.h: Fix number of sendmsg arguments.
   42287 	* linux/avr32/syscallent.h: Likewise.
   42288 	* linux/bfin/syscallent.h: Likewise.
   42289 	* linux/hppa/syscallent.h: Likewise.
   42290 	* linux/i386/syscallent.h: Likewise.
   42291 	* linux/m68k/syscallent.h: Likewise.
   42292 	* linux/microblaze/syscallent.h: Likewise.
   42293 	* linux/powerpc/syscallent.h: Likewise.
   42294 	* linux/s390/syscallent.h: Likewise.
   42295 	* linux/s390x/syscallent.h: Likewise.
   42296 	* linux/sh/syscallent.h: Likewise.
   42297 	* linux/sh64/syscallent.h: Likewise.
   42298 	* linux/sparc/syscallent.h: Likewise.
   42299 	* linux/tile/syscallent.h: Likewise.
   42300 	* linux/x86_64/syscallent.h: Likewise.
   42301 
   42302 	Fix epoll_wait syscall entries.
   42303 	* linux/arm/syscallent.h: Fix epoll_wait flags and handler.
   42304 	* linux/m68k/syscallent.h: Fix epoll_wait flags.
   42305 	* linux/microblaze/syscallent.h: Fix number of epoll_wait arguments.
   42306 	* linux/sh/syscallent.h: Likewise.
   42307 	* linux/sh64/syscallent.h: Likewise.
   42308 	* linux/x86_64/syscallent.h: Likewise.
   42309 
   42310 	Fix epoll_ctl syscall entries.
   42311 	* linux/arm/syscallent.h: Fix epoll_ctl flags and handler.
   42312 	* linux/m68k/syscallent.h: Fix epoll_ctl flags.
   42313 	* linux/x86_64/syscallent.h: Fix number of epoll_ctl arguments.
   42314 
   42315 	arm: fix epoll_create syscall entry.
   42316 	* linux/arm/syscallent.h: Fix epoll_create handler.
   42317 
   42318 	Fix mlockall syscall entries.
   42319 	* linux/arm/syscallent.h: Fix number of mlockall arguments.
   42320 	* linux/avr32/syscallent.h: Likewise.
   42321 	* linux/bfin/syscallent.h: Likewise.
   42322 	* linux/i386/syscallent.h: Likewise.
   42323 	* linux/m68k/syscallent.h: Likewise.
   42324 	* linux/microblaze/syscallent.h: Likewise.
   42325 	* linux/s390/syscallent.h: Likewise.
   42326 	* linux/s390x/syscallent.h: Likewise.
   42327 	* linux/sh/syscallent.h: Likewise.
   42328 	* linux/sh64/syscallent.h: Likewise.
   42329 	* linux/sparc/syscallent.h: Likewise.
   42330 	* linux/tile/syscallent.h: Likewise.
   42331 	* linux/x86_64/syscallent.h: Likewise.
   42332 
   42333 	Fix epoll_pwait syscall entries.
   42334 	* linux/alpha/syscallent.h: Fix number of epoll_pwait arguments.
   42335 	* linux/arm/syscallent.h: Likewise.
   42336 	* linux/avr32/syscallent.h: Likewise.
   42337 	* linux/bfin/syscallent.h: Likewise.
   42338 	* linux/i386/syscallent.h: Likewise.
   42339 	* linux/ia64/syscallent.h: Likewise.
   42340 	* linux/m68k/syscallent.h: Likewise.
   42341 	* linux/microblaze/syscallent.h: Likewise.
   42342 	* linux/mips/syscallent.h: Likewise.
   42343 	* linux/powerpc/syscallent.h: Likewise.
   42344 	* linux/s390/syscallent.h: Likewise.
   42345 	* linux/s390x/syscallent.h: Likewise.
   42346 	* linux/sh/syscallent.h: Likewise.
   42347 	* linux/sh64/syscallent.h: Likewise.
   42348 	* linux/sparc/syscallent.h: Likewise.
   42349 	* linux/tile/syscallent.h: Likewise.
   42350 	* linux/x86_64/syscallent.h: Likewise.
   42351 
   42352 	Fix reboot syscall entries.
   42353 	* linux/alpha/syscallent.h: Fix number of reboot arguments.
   42354 	* linux/arm/syscallent.h: Likewise.
   42355 	* linux/avr32/syscallent.h: Likewise.
   42356 	* linux/bfin/syscallent.h: Likewise.
   42357 	* linux/hppa/syscallent.h: Likewise.
   42358 	* linux/i386/syscallent.h: Likewise.
   42359 	* linux/ia64/syscallent.h: Likewise.
   42360 	* linux/m68k/syscallent.h: Likewise.
   42361 	* linux/microblaze/syscallent.h: Likewise.
   42362 	* linux/mips/syscallent.h: Likewise.
   42363 	* linux/powerpc/syscallent.h: Likewise.
   42364 	* linux/s390/syscallent.h: Likewise.
   42365 	* linux/s390x/syscallent.h: Likewise.
   42366 	* linux/sh/syscallent.h: Likewise.
   42367 	* linux/sh64/syscallent.h: Likewise.
   42368 	* linux/sparc/syscallent.h: Likewise.
   42369 	* linux/tile/syscallent.h: Likewise.
   42370 	* linux/x86_64/syscallent.h: Likewise.
   42371 
   42372 	Fix swapon syscall entries.
   42373 	* linux/arm/syscallent.h: Fix number of swapon arguments.
   42374 	* linux/avr32/syscallent.h: Likewise.
   42375 	* linux/bfin/syscallent.h: Likewise.
   42376 	* linux/i386/syscallent.h: Likewise.
   42377 	* linux/m68k/syscallent.h: Likewise.
   42378 	* linux/microblaze/syscallent.h: Likewise.
   42379 	* linux/mips/syscallent.h: Likewise.
   42380 	* linux/powerpc/syscallent.h: Likewise.
   42381 	* linux/s390/syscallent.h: Likewise.
   42382 	* linux/s390x/syscallent.h: Likewise.
   42383 	* linux/sh/syscallent.h: Likewise.
   42384 	* linux/sh64/syscallent.h: Likewise.
   42385 	* linux/sparc/syscallent.h: Likewise.
   42386 	* linux/tile/syscallent.h: Likewise.
   42387 	* linux/x86_64/syscallent.h: Likewise.
   42388 	* linux/alpha/syscallent.h: Fix number of swapon arguments, add TF flag.
   42389 	* linux/hppa/syscallent.h: Likewise.
   42390 	* linux/ia64/syscallent.h: Likewise.
   42391 
   42392 	Fix sgetmask and ssetmask syscall entries.
   42393 	* linux/hppa/syscallent.h: Fix sgetmask and ssetmask entries.
   42394 	* linux/powerpc/syscallent.h: Likewise.
   42395 	* linux/sparc/syscallent.h: Likewise.
   42396 	* linux/tile/syscallent.h: Likewise.
   42397 
   42398 	Rename siggetmask to sgetmask and sigsetmask to ssetmask.
   42399 	* linux/arm/syscallent.h: Rename siggetmask to sgetmask and
   42400 	sigsetmask to ssetmask.
   42401 	* linux/bfin/syscallent.h: Likewise.
   42402 	* linux/i386/syscallent.h: Likewise.
   42403 	* linux/m68k/syscallent.h: Likewise.
   42404 	* linux/microblaze/syscallent.h: Likewise.
   42405 	* linux/mips/syscallent.h: Likewise.
   42406 	* linux/sh/syscallent.h: Likewise.
   42407 	* linux/sh64/syscallent.h: Likewise.
   42408 	* linux/ia64/syscallent.h: Rename sys_sgetmask to sys_siggetmask,
   42409 	sys_ssetmask to sys_sigsetmask.
   42410 
   42411 	Add TRACE_IPC flag to sys_ipc syscall entries.
   42412 	* linux/arm/syscallent.h: Add TI flag to sys_ipc entry.
   42413 	* linux/avr32/syscallent.h: Likewise.
   42414 	* linux/bfin/syscallent.h: Likewise.
   42415 	* linux/i386/syscallent.h: Likewise.
   42416 	* linux/m68k/syscallent.h: Likewise.
   42417 	* linux/microblaze/syscallent.h: Likewise.
   42418 	* linux/mips/syscallent.h: Likewise.
   42419 	* linux/powerpc/syscallent.h: Likewise.
   42420 	* linux/s390/syscallent.h: Likewise.
   42421 	* linux/s390x/syscallent.h: Likewise.
   42422 	* linux/sh/syscallent.h: Likewise.
   42423 	* linux/sh64/syscallent.h: Likewise.
   42424 	* linux/sparc/syscallent.h: Likewise.
   42425 
   42426 2011-11-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   42427 
   42428 	gitlog-to-changelog: update from gnulib.
   42429 	* gitlog-to-changelog: Update from gnulib.
   42430 	* Makefile.am: Add --append-dot to gitlog-to-changelog invocation.
   42431 
   42432 2011-10-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42433 
   42434 	Decode TIOCSCTTY's third parameter.
   42435 	* term.c (term_ioctl): Decode TIOCSCTTY's third parameter.
   42436 
   42437 2011-10-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   42438 
   42439 	Remove useless and obsolete "#if DONE" sections.  No code changes.
   42440 	* linux/dummy.h: Remove "#if DONE" section.
   42441 	* linux/sparc/dummy2.h: Likewise.
   42442 	* linux/sparc64/dummy2.h: Likewise.
   42443 	* sunos4/dummy.h: Likewise.
   42444 	* svr4/dummy.h: Likewise.
   42445 
   42446 	Add names for dummy parsers.  No code changes.
   42447 	* linux/dummy.h: Add aliases to printargs() for those of dummy parsers
   42448 	that had no own names before.
   42449 	* linux/*/syscallent.h: Use these new names instead of printargs.
   42450 
   42451 	Sort definitions of dummy parsers.  No code changes.
   42452 	* linux/dummy.h: Sort definitions of parsers implemented as aliases
   42453 	to printargs().
   42454 
   42455 2011-10-14  Mike Frysinger  <vapier (a] gentoo.org>
   42456 
   42457 	sys_epoll_create1: decode flag arguments correctly.
   42458 	* desc.c (epollflags): Define.
   42459 	(sys_epoll_create1): Use epollflags to printflags. Change "O" to "EPOLL".
   42460 
   42461 	Reported-by:   <socketpair (a] gmail.com>
   42462 
   42463 2011-10-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   42464 
   42465 	Implement decoding of splice, tee and vmsplice(2) syscalls.
   42466 	* io.c (print_loff_t): New function.
   42467 	(sys_sendfile64): Use it.
   42468 	(splice_flags): New xlat structure.
   42469 	(sys_tee, sys_splice, sys_vmsplice): New functions.
   42470 	* linux/syscall.h (sys_tee, sys_splice, sys_vmsplice): Declare them.
   42471 	* linux/*/syscallent.h: Use them.
   42472 
   42473 2011-10-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   42474 
   42475 	Fix epoll_wait and epoll_pwait decoding.
   42476 	* desc.c (epoll_wait_common): Print "maxevents" and "timeout" arguments
   42477 	as integers.
   42478 
   42479 	Reported-by:   <socketpair (a] gmail.com>
   42480 
   42481 2011-10-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   42482 
   42483 	Decode EPOLLRDHUP.
   42484 	* desc.c (epollevents): Add EPOLLRDHUP.
   42485 
   42486 	Reported-by:   <socketpair (a] gmail.com>
   42487 
   42488 2011-10-11  Dmitry V. Levin  <ldv (a] altlinux.org>
   42489 
   42490 	Remove unreachable code in umoven() and umovestr().
   42491 	* util.c (umoven, umovestr): Remove unreachable code.
   42492 
   42493 	Reported-by: Weichuan Yan <wchyan (a] marvell.com>
   42494 
   42495 2011-09-05  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42496 
   42497 	Do post-attach initialization earlier; fix "we ignore SIGSTOP on NOMMU" bug
   42498 	We set ptrace options when we see post-attach SIGSTOP.
   42499 	This is wrong: it's better to set them right away on the very first
   42500 	stop (whichever it will be). It also will make adding SEIZE support easier,
   42501 	since SEIZE has no post-attach SIGSTOP.
   42502 
   42503 	We do it by adding a new bit, TCB_IGNORE_ONE_SIGSTOP, and treating
   42504 	TCB_STARTUP and TCB_IGNORE_ONE_SIGSTOP as two slightly different things.
   42505 
   42506 	* defs.h: Add a new flag bit, TCB_IGNORE_ONE_SIGSTOP.
   42507 	* process.c (internal_fork): Set TCB_IGNORE_ONE_SIGSTOP on a newly added child.
   42508 	* strace.c (startup_attach): Set TCB_IGNORE_ONE_SIGSTOP after attach.
   42509 	Fix a case when "strace -p PID" found PID dead but sone other of its threads
   42510 	still alive.
   42511 	(startup_child): Set TCB_IGNORE_ONE_SIGSTOP after attach, _if needed_.
   42512 	This fixes a bogus case where we can ignore a _real_ SIGSTOP on NOMMU.
   42513 	(detach): Perform anti-SIGSTOP dance only if TCB_IGNORE_ONE_SIGSTOP is set,
   42514 	not if TCB_STARTUP is set.
   42515 	(trace): Set TCB_IGNORE_ONE_SIGSTOP after attach.
   42516 	Clear TCB_STARTUP and initialize tracee on the very first tracee stop.
   42517 	Clear TCB_IGNORE_ONE_SIGSTOP when SIGSTOP is seen.
   42518 
   42519 2011-09-05  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42520 
   42521 	Get rid of TCB_ATTACH_DONE.
   42522 	* defs.h: Remove TCB_ATTACH_DONE constant.
   42523 	* strace.c (startup_attach): Use TCB_STARTUP instead of TCB_ATTACH_DONE
   42524 	to distinquish attached from not-yet-attached threads.
   42525 
   42526 2011-09-05  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42527 
   42528 	Set TCB_STARTUP only _after_ we attached.
   42529 	This fixes logic in detach() which thinks that TCB_STARTUP
   42530 	means that we are already attached, but did not see SIGSTOP yet.
   42531 	This also allows to get rid of TCB_ATTACH_DONE flag.
   42532 
   42533 	* process.c (internal_fork): Set TCB_STARTUP after attach.
   42534 	* strace.c (startup_attach): Likewise.
   42535 	(startup_child): Likewise.
   42536 	(alloc_tcb): Do not set TCB_STARTUP on tcb allocation - we are
   42537 	not attached yet.
   42538 	(trace): Set TCB_STARTUP when we detech an auto-attached child.
   42539 
   42540 2011-09-02  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42541 
   42542 	Simple optimizations in trace()
   42543 	* strace.c (trace): Calculate WSTOPSIG(status) once,
   42544 	unify code paths to ptrace(PTRACE_SYSCALL).
   42545 
   42546 	Trivial fixes on error paths.
   42547 	* strace.c (startup_attach): Emit message on fork() failure.
   42548 	(startup_child): Remove non-informative comment.
   42549 	* util.c (ptrace_restart): use perror_msg() on error instead of fprintf().
   42550 
   42551 2011-09-01  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42552 
   42553 	Fix compile failure introduced by last commit.
   42554 	* desc.c (decode_select): Fix double definition of nfds.
   42555 
   42556 2011-09-01  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42557 
   42558 	Roll back "die on malloc failure" behaviour a bit.
   42559 	After recent change, select(2^31-1, NULL, NULL, NULL)
   42560 	would make strace exit. This change caps fdsize so that
   42561 	it is always in [0, 1025*1024], IOW: we will try to allocate at most
   42562 	1 megabyte, which in practice will almost always work,
   42563 	unlike malloc(2Gig).
   42564 
   42565 	* desc.c (decode_select): Cap fdsize to 1024*1024.
   42566 	* pathtrace.c (pathtrace_match): Cap fdsize to 1024*1024.
   42567 	* file.c (sys_getdents): Cap len to 1024*1024.
   42568 	(sys_getdents64): Cap len to 1024*1024.
   42569 	* util.c (dumpiov): Refuse to process iov with more than 1024*1024
   42570 	elements. Don't die on malloc failure.
   42571 	(dumpstr): Don't die on malloc failure.
   42572 
   42573 2011-09-01  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42574 
   42575 	Add stpcpy to autoconf machinery.
   42576 	* configure.ac: Add stpcpy to AC_CHECK_FUNCS.
   42577 	* defs.h: Frame stpcpy with "if !defined HAVE_STPCPY".
   42578 	* util.c: Likewise.
   42579 
   42580 	Simplify sprinttv()
   42581 	* time.c (sprinttv): Trivial simplifications.
   42582 
   42583 	* desc.c (decode_select): Set tcp->auxstr as late as possible.
   42584 
   42585 2011-09-01  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42586 
   42587 	Reformat setuid-ing code in startup_child()
   42588 	New code does the same as old one, but is more readable (I hope).
   42589 
   42590 	* strace.c (startup_child): Reformat setuid-ing code.
   42591 
   42592 2011-09-01  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42593 
   42594 	Minor tweaks in startup_child(). Logic isn't changed (but code is)
   42595 	* strace.c (startup_attach): Tweak comment.
   42596 	(startup_child): Move common code out of ifdef.
   42597 	Indent nested ifdefs. Tweak comments. Remove two
   42598 	unnecessary calls to getpid().
   42599 
   42600 	Use tprints with literal strings, it may be faster than tprintf.
   42601 	* bjm.c: Replace tprintf("str") with tprints("str").
   42602 	* block.c: Likewise.
   42603 	* desc.c: Likewise.
   42604 	* file.c: Likewise.
   42605 	* io.c: Likewise.
   42606 	* ipc.c: Likewise.
   42607 	* mem.c: Likewise.
   42608 	* net.c: Likewise.
   42609 	* proc.c: Likewise.
   42610 	* process.c: Likewise.
   42611 	* quota.c: Likewise.
   42612 	* resource.c: Likewise.
   42613 	* scsi.c: Likewise.
   42614 	* signal.c: Likewise.
   42615 	* sock.c: Likewise.
   42616 	* strace.c: Likewise.
   42617 	* stream.c: Likewise.
   42618 	* syscall.c: Likewise.
   42619 	* system.c: Likewise.
   42620 	* term.c: Likewise.
   42621 	* time.c: Likewise.
   42622 	* util.c: Likewise.
   42623 
   42624 	Fix "format not a string literal" warning caused by tprintf(str)
   42625 	* defs.h: Declare tprints().
   42626 	* strace.c: Define tprints().
   42627 	(tabto): Use tprints(str), since tprintf(str) was throwing a warning.
   42628 	* desc.c: Use tprints(str) instead of tprintf("%s", str).
   42629 	* file.c: Likewise.
   42630 	* io.c: Likewise.
   42631 	* net.c: Likewise.
   42632 	* process.c: Likewise.
   42633 	* signal.c: Likewise.
   42634 	* syscall.c: Likewise.
   42635 	* util.c: Likewise.
   42636 
   42637 2011-08-31  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42638 
   42639 	Add README-linux-ptrace file.
   42640 	I tried to push this doc to Michael Kerrisk <mtk.manpages (a] gmail.com>,
   42641 	but got no reply. To avoid losing the document, let it live
   42642 	in strace tree for now.
   42643 
   42644 2011-08-31  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42645 
   42646 	Make out-of-memory handling more uniform.
   42647 	This fixes one real bug in dumpstr().
   42648 
   42649 	* defs.h: Declare die_out_of_memory().
   42650 	* strace.c (die_out_of_memory): New function.
   42651 	(strace_popen): If allocation fails, call die_out_of_memory().
   42652 	(main): Likewise.
   42653 	(expand_tcbtab): Likewise.
   42654 	(rebuild_pollv): Likewise.
   42655 	* count.c (count_syscall): Likewise.
   42656 	(call_summary_pers): Likewise.
   42657 	* desc.c (decode_select): Likewise.
   42658 	* file.c (sys_getdents): Likewise.
   42659 	(sys_getdents64): Likewise.
   42660 	(sys_getdirentries): Likewise.
   42661 	* pathtrace.c (pathtrace_match): Likewise.
   42662 	* syscall.c (qualify): Likewise.
   42663 	* util.c (printstr): Likewise.
   42664 	(dumpiov): Likewise.
   42665 	(dumpstr): Likewise.
   42666 	(fixvfork): Likewise.
   42667 	* mem.c (sys_mincore): Don't check free() parameter for NULL.
   42668 
   42669 2011-08-31  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42670 
   42671 	Optimization: eliminate all remaining usages of strcat()
   42672 	After this change, we don't use strcat() anywhere.
   42673 
   42674 	* defs.h: Change sprinttv() return type to char *.
   42675 	* time.c (sprinttv): Return pointer past last stored char.
   42676 	* desc.c (decode_select): Change printing logic in order to eliminate
   42677 	usage of strcat() - use stpcpy(), *outptr++ = ch, sprintf() instead.
   42678 	Also reduce usage of strlen().
   42679 	* stream.c (decode_poll): Likewise.
   42680 
   42681 2011-08-31  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42682 
   42683 	Optimize string_quote() for speed.
   42684 	* util.c (string_quote): Speed up check for terminating NUL.
   42685 	Replace strintf() with open-coded binary to hex/oct conversions -
   42686 	we potentially do them for every single byte, need to be fast.
   42687 
   42688 	Optimization: eliminate some usages of strcat()
   42689 	* defs.h: Declare stpcpy().
   42690 	* util.c: Define stpcpy().
   42691 	* file.c: Remove static str_append().
   42692 	(sprint_open_modes): Use stpcpy() instead of str_append().
   42693 	(sprintflags): Use stpcpy() instead of strcat().
   42694 	(printpathn): Eliminate usage of strcat().
   42695 	(printstr): Eliminate usage of strcat().
   42696 
   42697 2011-08-30  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42698 
   42699 	Small optimization on AVR32.
   42700 	* syscall.c (syscall_enter): Optimize tcp->u_arg[i] setting
   42701 	from regs.FOO for AVR32.
   42702 
   42703 2011-08-30  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42704 
   42705 	On X86_64 and I386, use PTRACE_GETREGS to fetch all registers.
   42706 	Before this change, registers were read with PTRACE_PEEKUSER
   42707 	ptrace operation, one per register. This is slower than
   42708 	fetching them all in one ptrace operation.
   42709 
   42710 	* defs.h: include asm/ptrace.h on X86_64 and I386.
   42711 	* syscall.c: New static variables i386_regs and x86_64_regs.
   42712 	Remove static eax/rax variables.
   42713 	(get_scno): Fetch all registers with single PTRACE_GETREGS operation.
   42714 	(get_syscall_result): Likewise.
   42715 	(syscall_fixup_on_sysenter): Use PTRACE_GETREGS results in i386/x86_64_regs.
   42716 	(syscall_enter): Set tcp->u_arg[i] from PTRACE_GETREGS results.
   42717 	(get_error): Set tcp->u_rval, tcp->u_error from PTRACE_GETREGS results.
   42718 
   42719 2011-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   42720 
   42721 	Do not include <limits.h>
   42722 	* strace.c: Do not include <limits.h> explicitly, it is already included
   42723 	implicitly by <sys/param.h>.
   42724 
   42725 2011-08-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   42726 
   42727 	Include <sys/param.h> to get PATH_MAX definition.
   42728 	* pathtrace.c: Include <sys/param.h> instead of <limits.h> to get
   42729 	PATH_MAX definition.
   42730 
   42731 	Reported-by: Steve Bennett <steveb (a] workware.net.au>
   42732 
   42733 2011-08-26  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42734 
   42735 	Indent a large set of nested ifdefs/endifs. No code changes.
   42736 	* defs.h: Indent a large set of nested ifdefs/endifs
   42737 
   42738 	Rename syscall_fixup to syscall_fixup_on_sysenter.
   42739 	* defs.h: Tweak comment.
   42740 	* syscall.c: Rename syscall_fixup to syscall_fixup_on_sysenter.
   42741 	(trace_syscall_entering): Use new finction name.
   42742 
   42743 	Make syscall result reading more consistent among different arches.
   42744 	* syscall.c: Eliminate static flags variable for POWERPC.
   42745 	(syscall_fixup): Don't fetch syscall results. Affected arches:
   42746 	POWERPC, BFIN, HPPA.
   42747 	(syscall_fixup_on_sysexit): Move syscall results fetching code
   42748 	for this function to get_syscall_result. Affected arches:
   42749 	S390X, POWERPC, BFIN, M68K, HPPA, CRIS, MICROBLAZE.
   42750 	(get_syscall_result): Add syscall results fetching.
   42751 
   42752 2011-08-25  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42753 
   42754 	Simplify syscall_fixup[_on_sysexit]
   42755 	* syscall.c (syscall_fixup): Remove checks for entering(tcp).
   42756 	Remove code which executes if exiting(tcp).
   42757 	(syscall_fixup_on_sysexit): Remove code which executes
   42758 	if entering(tcp). Remove checks for exiting(tcp).
   42759 
   42760 	Split syscall_fixup into enter/exit pair of functions.
   42761 	* syscall.c: Create syscall_fixup_on_sysexit() which is a copy of
   42762 	syscall_fixup().
   42763 	(trace_syscall_exiting): Call syscall_fixup_on_sysexit() instead of
   42764 	syscall_fixup().
   42765 
   42766 	Remove stray commas in struct initializers. No code changes.
   42767 	* process.c: Remove stray commas in struct initializers.
   42768 
   42769 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42770 
   42771 	Optimize tabto()
   42772 	tabto is used in many lines of strace output.
   42773 	On glibc, tprintf("%*s", col - curcol, "") is noticeably slow
   42774 	compared to tprintf("                 "). Use the latter.
   42775 	Observed ~15% reduction of time spent in userspace.
   42776 
   42777 	* defs.h: Drop extern declaration of acolumn. Make tabto()
   42778 	take no parameters.
   42779 	* process.c (sys_exit): Call tabto() with no parameters.
   42780 	* syscall.c (trace_syscall_exiting): Call tabto() with no parameters.
   42781 	* strace.c: Make acolumn static, add static char *acolumn_spaces.
   42782 	(main): Allocate acolumn_spaces as a string of spaces.
   42783 	(printleader): Call tabto() with no parameters.
   42784 	(tabto): Use simpler method to print lots of spaces.
   42785 
   42786 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42787 
   42788 	* syscall.c (sys_indir): Use %ld for printing long, not %u.
   42789 
   42790 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42791 
   42792 	Opotimize "scno >= 0 && scno < nsyscalls" check.
   42793 	gcc can't figure out on its own that this check can be done with
   42794 	single compare, and does two compares. We can help it by casting
   42795 	scno to unsigned long: ((unsigned long)(scno) < nsyscalls)
   42796 
   42797 	* defs.h: New macro SCNO_IN_RANGE(long_var).
   42798 	* count.c (count_syscall): Use SCNO_IN_RANGE() instead of open-coded check.
   42799 	* syscall.c (getrval2): Use SCNO_IN_RANGE() instead of open-coded check.
   42800 	This fixes a bug: missing check for scno < 0 and scno > nsyscalls
   42801 	instead of scno >= nsyscalls.
   42802 	(get_scno): Use SCNO_IN_RANGE() instead of open-coded check.
   42803 	This fixes a bug: scno > nsyscalls instead of scno >= nsyscalls.
   42804 	(known_scno): Use SCNO_IN_RANGE() instead of open-coded check.
   42805 	(internal_syscall): Likewise.
   42806 	(syscall_enter): Likewise.
   42807 	(trace_syscall_entering): Likewise.
   42808 	(get_error): Likewise.
   42809 	(trace_syscall_exiting): Likewise.
   42810 
   42811 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42812 
   42813 	Remove scno_good logic in syscall exit.
   42814 	* syscall.c (trace_syscall_exiting): Remove scno_good logic,
   42815 	it can't trigger in syscall exit.
   42816 
   42817 	Remove redundant assignments.
   42818 	* syscall.c (get_error): Remove redundant "u_error = 0" and redundant
   42819 	and unclear comments.
   42820 
   42821 	Group int-sized fields together in struct tcb.
   42822 	* defs.h: Group int-sized fields together in struct tcb.
   42823 
   42824 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42825 
   42826 	Reorder functions in syscall.c. No code changes.
   42827 	Old order (basically "in no particular order"):
   42828 	    dumpio
   42829 	    decode_subcall
   42830 	    internal_syscall
   42831 	    get_scno
   42832 	    get_syscall_result
   42833 	    known_scno
   42834 	    syscall_fixup
   42835 	    is_negated_errno
   42836 	    get_error
   42837 	    syscall_enter
   42838 	    trace_syscall_entering
   42839 	    trace_syscall_exiting
   42840 	    trace_syscall
   42841 	    printargs
   42842 	    getrval2
   42843 	    sys_indir
   42844 	    is_restart_error
   42845 
   42846 	New order:
   42847 	various utility functions:
   42848 	    decode_subcall
   42849 	    printargs
   42850 	    getrval2
   42851 	    sys_indir
   42852 	    is_restart_error
   42853 	syscall enter handling functions:
   42854 	    get_scno
   42855 	    known_scno
   42856 	    syscall_fixup (also used in syscall exit code)
   42857 	    internal_syscall (also used in syscall exit code)
   42858 	    syscall_enter
   42859 	    trace_syscall_entering
   42860 	syscall exit handling functions:
   42861 	    get_syscall_result
   42862 	    is_negated_errno
   42863 	    get_error
   42864 	    dumpio
   42865 	    trace_syscall_exiting
   42866 	main syscall enter/exit function:
   42867 	    trace_syscall
   42868 
   42869 	* syscall.c: Reorder functions so that related ones are closer
   42870 	in the source.
   42871 
   42872 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42873 
   42874 	Rename some functions, delete unused one. No code changes.
   42875 	* defs.h: Rename get_scno_on_sysenter() to get_scno();
   42876 	delete force_result() declaration.
   42877 	* strace.c (proc_open): Rename get_scno_on_sysenter() to get_scno().
   42878 	* syscall.c: Rename get_scno_on_sysenter() to get_scno().
   42879 	Rename get_scno_on_sysexit() to get_syscall_result().
   42880 	Delete unused force_result().
   42881 
   42882 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42883 
   42884 	Unify per-architecture post-execve SIGTRAP check.
   42885 	Move post-execve SIGTRAP check from get_scno_on_sysenter
   42886 	(multitude of places on many architectures) to a single location
   42887 	in trace_syscall_entering. This loosens the logic for some arches,
   42888 	since many of them had additional checks such as scno == 0.
   42889 	However, on non-ancient Linux kernels we should never have post-execve
   42890 	SIGTRAP in the first place, by virtue of using PTRACE_O_TRACEEXEC.
   42891 
   42892 	* syscall.c (get_scno_on_sysenter): Remove tcp->flags & TCB_WAITEXECVE checks.
   42893 	(trace_syscall_entering): Do tcp->flags & TCB_WAITEXECVE check here.
   42894 	(get_scno_on_sysexit): Tweak comment.
   42895 	(syscall_fixup): Likewise.
   42896 	(trace_syscall_exiting): Likewise.
   42897 
   42898 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42899 
   42900 	Speed up x86 by avoiding EAX read on syscall entry.
   42901 	on x86, EAX read on syscall entry is not necessary if we know
   42902 	that post-execve SIGTRAP is disabled by PTRACE_O_TRACEEXEC ptrace option.
   42903 	This patch (a) moves EAX retrieval from syscall_fixup
   42904 	to get_scno_on_sysexit, and (b) perform EAX retrieval in syscall_fixup
   42905 	only if we are in syscall entry and PTRACE_O_TRACEEXEC option is not on.
   42906 
   42907 	* syscall.c (get_scno_on_sysexit): On I386 and X86_64, read eax/rax
   42908 	which contain syscall return value.
   42909 	(syscall_fixup): On I386 and X86_64, read eax/rax only on syscall enter
   42910 	and only if PTRACE_O_TRACEEXEC is not in effect.
   42911 
   42912 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42913 
   42914 	Do not read syscall no in get_scno_on_sysexit.
   42915 	* syscall.c (get_scno_on_sysexit): Remove scno retrieval code, since
   42916 	we don't save it anyway. This is the first real logic change
   42917 	which should make strace faster: for example, on x64 ORIG_EAX
   42918 	is no longer read in each syscall exit.
   42919 
   42920 	Simplify get_scno_on_sysenter/sysexit.
   42921 	* syscall.c (get_scno_on_sysenter): Remove "if (exiting(tcp))" code,
   42922 	make "if (entering(tcp))" code unconditional.
   42923 	(get_scno_on_sysexit): Remove "if (entering(tcp))" code,
   42924 	make "if (exiting(tcp))" code unconditional.
   42925 
   42926 2011-08-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42927 
   42928 	get_scno is an unholy mess, make it less horrible.
   42929 	Currently, get_scno does *much* more than "get syscall no".
   42930 	It checks for post-execve SIGTRAP. It checks for changes
   42931 	in personality. It retrieves params on entry and registers on exit.
   42932 	Worse still, it is different in different architectures: for example,
   42933 	for AVR32 regs are fetched in get_scno(), while for e.g. I386
   42934 	it is done in syscall_enter().
   42935 
   42936 	Another problem is that get_scno() is called on both syscall entry and
   42937 	syscall exit, which is stupid: we don't need to know scno on syscall
   42938 	exit, it is already known from last syscall entry and stored in
   42939 	tcp->scno! In essence, get_scno() does two completely different things
   42940 	on syscall entry and on exit, they are just mixed into one bottle, like
   42941 	shampoo and conditioner.
   42942 
   42943 	The following patches will try to improve this situation.
   42944 
   42945 	This change duplicates get_scno into identical get_scno_on_sysenter,
   42946 	get_scno_on_sysexit functions. Call them in syscall enter and syscall
   42947 	exit, correspondingly.
   42948 
   42949 	* defs.h: Rename get_scno to get_scno_on_sysenter; declare it only
   42950 	if USE_PROCFS.
   42951 	* strace.c (proc_open): Call get_scno_on_sysenter instead of get_scno.
   42952 	* syscall.c (get_scno): Split into two (so far identical) functions
   42953 	get_scno_on_sysenter and get_scno_on_sysexit.
   42954 	(trace_syscall_entering): Call get_scno_on_sysenter instead of get_scno.
   42955 	(trace_syscall_exiting): Call get_scno_on_sysexit instead of get_scno.
   42956 
   42957 2011-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   42958 
   42959 	Reduce code redundancy in syscall_enter()
   42960 	* syscall.c [LINUX] (syscall_enter): Move tcp->u_nargs initialization
   42961 	from arch-specific ifdefs to common code.  Always cache tcp->u_nargs in
   42962 	a local variable and use it in for() loops.
   42963 	[IA64, AVR32] Rewrite tcp->u_arg[] initialization using a loop.
   42964 
   42965 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42966 
   42967 	Define MAX_ARGS to 6 for all Linux arches.
   42968 	* defs.h: Define MAX_ARGS to 6 for all Linux arches.
   42969 	* linux/ia64/syscallent.h: Change all 8-argument printargs
   42970 	to MA (MAX_ARGS).
   42971 	linux/mips/syscallent.h: Change all two 7-argument printargs
   42972 	to MA (MAX_ARGS).
   42973 
   42974 	Fix argument printing in sys_mmap64.
   42975 	* mem.c (sys_mmap64): Fix a bug where we used tcp->u_args[i]
   42976 	instead of argument values copied from memory.
   42977 
   42978 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42979 
   42980 	Cache tcp->u_nargs in a local variable for for() loops.
   42981 	Loops of the form "for (i = 0; i < tcp->u_nargs; i++) ..."
   42982 	need to fetch tcp->u_nargs from memory on every iteration
   42983 	if "..." part has a function call (gcc doesn't know that
   42984 	tcp->u_nargs won't change). This can be sped up
   42985 	by putting tcp->u_nargs in a local variable, which might
   42986 	go into a CPU register.
   42987 
   42988 	* syscall.c (decode_subcall): Cache tcp->u_nargs in a local variable
   42989 	as for() loop limit value.
   42990 	(syscall_enter): Likewise.
   42991 
   42992 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   42993 
   42994 	Drop checks for sysent[i].nargs == -1.
   42995 	* defs.h: Declare nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
   42996 	* syscall.c: Define nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
   42997 	(decode_subcall): Drop checks for sysent[i].nargs == -1.
   42998 	(syscall_enter): Likewise.
   42999 
   43000 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43001 
   43002 	Stop using nargs == -1 in syscallent tables.
   43003 	Usage -1 as argument count in syscallent tables
   43004 	necessitates the check for it, a-la:
   43005 	if (sysent[tcp->scno].nargs != -1)
   43006 	    tcp->u_nargs = sysent[tcp->scno].nargs;
   43007 	else
   43008 	    tcp->u_nargs = MAX_ARGS;
   43009 	which is stupid: we waste cycles checking something which
   43010 	is constant and known at compile time.
   43011 
   43012 	* defs.h: Make struct sysent::nargs unsigned.
   43013 	* freebsd/i386/syscallent.h: Replace nargs of -1 with MA.
   43014 	* linux/s390/syscallent.h: Likewise.
   43015 	* linux/s390x/syscallent.h: Likewise.
   43016 	* svr4/syscallent.h: Likewise.
   43017 	* freebsd/syscalls.pl: Likewise in generator script.
   43018 	* syscallent.sh: Likewise in generator script.
   43019 	* syscall.c: Add define MA MAX_ARGS / undef MA around includes
   43020 	of syscallent[N].h.
   43021 
   43022 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43023 
   43024 	Move trace_syscall_exiting below trace_syscall_entering. No code changes.
   43025 	Syscall enter happens before syscall exit. Having functions
   43026 	in opposite order in the source is confusing.
   43027 
   43028 	* syscall.c: Move trace_syscall_exiting below trace_syscall_entering.
   43029 
   43030 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43031 
   43032 	Fix -z display.
   43033 	Before this patch, the following:
   43034 	    open("qwerty", O_RDONLY)    = -1 ENOENT
   43035 	    write(2, "wc: qwerty: No such file or dire"..., 38) = 38
   43036 	was shown totally wrongly with -z:
   43037 	    open("qwerty", O_RDONLY)    = 38
   43038 	(yes, that's right, write syscall is lost!)
   43039 	Now it is shown "less wrongly" as:
   43040 	    open("qwerty", O_RDONLY <unfinished ...>
   43041 	    write(2, "wc: qwerty: No such file or dire"..., 38) = 38
   43042 
   43043 	* syscall.c (trace_syscall_exiting): Use common TCB_INSYSCALL clearing
   43044 	via "goto ret". This fixes totally broken display of -z, but even now
   43045 	it is not working as intended. Add a comment about that.
   43046 	(trace_syscall_entering): Use common TCB_INSYSCALL setting
   43047 	via "goto ret".
   43048 
   43049 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43050 
   43051 	Straighten up confused comments/messages about post-execve SIGTRAP handling
   43052 	* defs.h: Explain TCB_INSYSCALL and TCB_WAITEXECVE bits in detail.
   43053 	* strace.c (choose_pfd): Use entering/exiting macros instead of direct check
   43054 	for TCB_INSYSCALL.
   43055 	* syscall.c (get_scno): Use entering/exiting macros instead of direct check
   43056 	for TCB_INSYSCALL. Fix comments about post-execve SIGTRAP.
   43057 	(syscall_fixup): Use entering/exiting instead of direct check
   43058 	for TCB_INSYSCALL. Add a comment what "not a syscall entry" message
   43059 	usually means. Change wrong "stray syscall exit" messages into
   43060 	"not a syscall entry" ones.
   43061 
   43062 	count_syscall() always returns 0, optimize it.
   43063 	* defs.h (count_syscall): Change return type from int to void.
   43064 	* count.c (count_syscall): Change return type from int to void.
   43065 	* syscall.c (trace_syscall_exiting): Change code around call
   43066 	to count_syscall accordingly.
   43067 
   43068 	Optimize out dummy PC printing on signal delivery.
   43069 	* strace.c (trace): Optimize out dummy PC printing on signal delivery.
   43070 	While at it, tweak comments.
   43071 
   43072 	Conditionally optimize out unused code.
   43073 	* syscall.c (internal_syscall): Call internal_exec only if
   43074 	SUNOS4 || (LINUX && TCB_WAITEXECVE).
   43075 	* process.c (internal_exec): Define this function only if
   43076 	SUNOS4 || (LINUX && TCB_WAITEXECVE).
   43077 	(printwaitn): Don't check wordsize if SUPPORTED_PERSONALITIES == 1.
   43078 	* signal.c (sys_kill): Likewise.
   43079 	* syscall.c (is_negated_errno): Likewise.
   43080 	(trace_syscall_exiting): Fold a tprintf into tprintfs which follow it.
   43081 
   43082 	Cosmetic improvement in ifdefs. No code changes.
   43083 	* strace.c (proc_open): Change ifdefs so that braces are properly paired.
   43084 
   43085 	Exclude tcp->pfd from non-procfs systems.
   43086 	* defs.h: Make struct tcb::pfd fields conditional on USE_PROCFS.
   43087 	* strace.c (alloc_tcb): Use tcp->pfd only if USE_PROCFS.
   43088 	(droptcb): Likewise.
   43089 
   43090 	Small optimizations related to memory allocation.
   43091 	* strace (expand_tcbtab): Shorten "out of memory" message.
   43092 	(rebuild_pollv): Remove unnecessary NULL check before free().
   43093 	* util.c (dumpstr): Add a comment about likely bug.
   43094 
   43095 	Improve code readability by avoiding assignments inside if()
   43096 	* desc.c (decode_select): Move assignment out of if() condition.
   43097 	* file.c (sprinttime): Likewise.
   43098 	(sys_getdirentries): Likewise.
   43099 	* io.c (sys_ioctl): Likewise.
   43100 	* strace.c (test_ptrace_setoptions_followfork): Likewise.
   43101 	(main): Likewise.
   43102 	(proc_open): Likewise.
   43103 	(detach): Likewise.
   43104 	(proc_poll): Likewise.
   43105 	(trace): Likewise.
   43106 	* syscall.c (qualify): Likewise.
   43107 	(sys_indir): Likewise.
   43108 	* test/procpollable.c (main): Likewise.
   43109 	* test/sfd.c (main): Likewise.
   43110 	* time.c (printtv_bitness): Likewise.
   43111 	(sprinttv): Likewise.
   43112 	(print_timespec): Likewise.
   43113 	(void sprint_timespec): Likewise.
   43114 	(printitv_bitness): Likewise.
   43115 	* util.c (dumpstr): Likewise.
   43116 	(umovestr): Likewise.
   43117 	(fixvfork): Likewise.
   43118 
   43119 	Convert ioctl_next_match() to new-style C function definition.
   43120 	* ioctl.c (ioctl_next_match): Convert to new-style C function definition.
   43121 
   43122 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43123 
   43124 	Small optimization in signal and ioctl tables.
   43125 	Trivial shuffling of data tables puts them all in one file,
   43126 	allowing gcc to see their sizes and eliminate variables
   43127 	which store these sizes.
   43128 
   43129 	Surprisingly, in C mode gcc does not optimize out static const int
   43130 	variables. Help it by using enums instead.
   43131 
   43132 	* defs.h: Stop exporting ioctlent{0,1,2}, nioctlents{0,1,2},
   43133 	signalent{0,1,2}, nsignals{0,1,2}.
   43134 	* ioctl.c: Remove definitions of ioctlent{,0,1,2} and nioctlents{,0,1,2}.
   43135 	* signal.c: Remove definitions of signalent{,0,1,2} and nsignals{,0,1,2}.
   43136 	* syscall.c: Move above definitions to this file. Make them static const
   43137 	or enums if suitable.
   43138 
   43139 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43140 
   43141 	Don't return int from set_personality(), no one checks it.
   43142 	* defs.h (set_personality): Change return type to void.
   43143 	* syscall.c (set_personality): Change return type to void.
   43144 
   43145 	Remove unused declaration.
   43146 	* defs.h: Remove unused declaration of handle_new_child().
   43147 
   43148 	Use natural-sized integer field for tcb::flags.
   43149 	* defs: Change struct tcb::flags type from short to int.
   43150 	This results in smaller code at least on x86.
   43151 
   43152 	Make needlessly static data local.
   43153 	* syscall.c (get_scno): For POWERPC64 and X86-64, variable currpers
   43154 	is declared static. But its old data is never used. Convert it
   43155 	to ordinary local variable.
   43156 
   43157 	Optimize get_scno function.
   43158 	* syscall.c (get_scno): Make gpr_offset[] array static const.
   43159 
   43160 	Optimize iocb_cmd_lookup.
   43161 	* desc.c (iocb_cmd_lookup): Make command table constant.
   43162 	Reduce size of static char buffer.
   43163 
   43164 	Correct sys_sendfile[64] type and nargs.
   43165 	* freebsd/i386/syscallent.h: Correct sys_sendfile nargs 7->8
   43166 	* linux/mips/syscallent.h: Correct sys_sendfile64 nargs 5->4
   43167 	* linux/sh/syscallent.h: Correct sys_sendfile64 nargs 5->4
   43168 	* linux/sh64/syscallent.h: Correct sys_sendfile64 nargs 5->4
   43169 	* linux/m68k/syscallent.h: Correct sys_sendfile64 type TF->TD|TN
   43170 	* linux/microblaze/syscallent.h: Correct sys_sendfile64 type TF->TD|TN
   43171 	* linux/tile/syscallent.h: Correct sys_sendfile and sys_sendfile64 type TD->TD|TN
   43172 
   43173 	Make addflags return void.
   43174 	* defs.h (addflags): Change return type from int to void.
   43175 	* util.c (addflags): Change return type from int to void.
   43176 
   43177 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43178 
   43179 	Set saner MAX_ARGS (6 or 8) for X86_64 and I386.
   43180 	I noticed that tcp->u_args[MAX_ARGS] array is way larger than
   43181 	I'd expect: for all arches except HPPA it has 32 (!) elements.
   43182 
   43183 	I looked at the code and so far I spotted only one abuser of
   43184 	this fact: sys_sigreturn. On several arches, it saves sigset_t
   43185 	into tcp->u_args[1...N] on entry and prints it on exit, a-la
   43186 
   43187 	memcpy(&tcp->u_arg[1], &sc.oldmask[0], sizeof(sigset_t))
   43188 
   43189 	The problem here is that in glibc sigset_t is insanely large:
   43190 	128 bytes, and using sizeof(sigset_t) in memcpy will overrun
   43191 	&tcp->u_args[1] even with MAX_ARGS == 32:
   43192 	On 32 bits, sizeof(tcp->u_args) == 32*4 == 128 bytes!
   43193 	We may already have a bug there!
   43194 
   43195 	This commit changes the code to save NSIG / 8 bytes only.
   43196 	NSIG can't ever be > 256, and in practice is <= 129,
   43197 	thus NSIG / 8 is <= 16 bytes == 4 32-bit words,
   43198 	and even MAX_ARGS == 5 should be enough for saving signal masks.
   43199 
   43200 	* defs.h: Reduce MAX_ARGS for X86_64 and I386 from 32 to 8
   43201 	for FreeBSD and to 6 for everyone else. Add comment about current
   43202 	state of needed MAX_ARGS.
   43203 	* signal.c: Add comment about size of sigset_t.
   43204 	(sprintsigmask): Reduce static string buffer from 8k to 2k.
   43205 	(sys_sigreturn): Fix sigset saving to save only NSIG / 8 bytes,
   43206 	not sizeof(sigset_t) bytes.
   43207 	* linux/mips/syscallent.h: Reduce nargs of printargs-type syscall to 7.
   43208 	* linux/arm/syscallent.h: Reduce nargs of printargs-type syscall to 6.
   43209 	* linux/i386/syscallent.h: Likewise.
   43210 	* linux/m68k/syscallent.h: Likewise.
   43211 	* linux/powerpc/syscallent.h: Likewise.
   43212 	* linux/s390/syscallent.h: Likewise.
   43213 	* linux/s390x/syscallent.h: Likewise.
   43214 	* linux/sh/syscallent.h: Likewise.
   43215 	* linux/sh64/syscallent.h: Likewise.
   43216 	* linux/sparc/syscallent.h: Likewise.
   43217 
   43218 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43219 
   43220 	Optimize sys_old_mmap.
   43221 	* mem.c (sys_old_mmap): For Ia64 and 32-bit personality of x86-64,
   43222 	copy narrow parameters from userspace by single umove, not by six
   43223 	separate ones; then assign them to long u_arg[i]. For SH[64],
   43224 	avoid copying of tcp->u_arg.
   43225 	(sys_mmap): Add FIXME comment - SH64 and i386 seem to be handled
   43226 	differently for no apparent reason.
   43227 	* test/mmap_offset_decode.c: New test program, illustrates FIXME.
   43228 
   43229 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43230 
   43231 	Untangle ifdef forest in sys_mmap64. No code changes.
   43232 	After careful analysis, it looks like !LINUX and ALPHA
   43233 	pass all seven parameters in registers; and in all other cases
   43234 	parameters are on stack (pointed to by tcp->u_arg[0]).
   43235 	In light of this, reorganize ifdefs, making them simpler,
   43236 	without changing any logic.
   43237 	After this, it's apparent we use tcp->u_arg[4,5,6] and possibly
   43238 	[7] without checking that it's valid to do so.
   43239 	So far, just add a comment about this.
   43240 
   43241 	* mem.c (sys_mmap64): Rewrite ifdefs in a much simpler way.
   43242 	Add comments about apparent bugs.
   43243 
   43244 2011-08-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43245 
   43246 	Style and comment fixes, no code changes.
   43247 	* mem.c: Indent includes to show nesting better.
   43248 	  (addtileflags): Fix style of this function definition;
   43249 	  correct wrong endif comment, add another endif comment.
   43250 
   43251 	Use simpler rounding up to next multiple of 2.
   43252 	* util.c (printllval): simpler rounding up to next multiple of 2.
   43253 
   43254 	Cosmetic fixes, no code changes.
   43255 	* defs.h: Add/reformat comments.
   43256 	* signal.c: Remove wrong comment. Add warning directive
   43257 	when we detect that NSIG is undefined. Add comment about
   43258 	NSIG on ARM. Fix typo in comment.
   43259 	(signame): Reformat code a bit without changes to logic.
   43260 	Shorten static buffer.
   43261 	(sys_rt_sigprocmask): Remove stray empty line.
   43262 	* syscall.c: Add warning directive when we detect that
   43263 	NSIG is undefined. Add comment about NSIG on ARM.
   43264 
   43265 2011-08-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   43266 
   43267 	Fix PTRACE_SETOPTIONS tests.
   43268 	* strace.c [LINUX] (kill_save_errno): New function.
   43269 	(test_ptrace_setoptions_followfork): Change return type to void.
   43270 	Fix and harden error handling.  Use kill_save_errno() to avoid errno
   43271 	clobbering.  Treat EIO from ptrace() the same way as EINVAL.
   43272 	(test_ptrace_setoptions_for_all): Use kill_save_errno() to avoid errno
   43273 	clobbering.  Treat EIO from ptrace() the same way as EINVAL.
   43274 	(main): Update use of test_ptrace_setoptions_followfork().
   43275 
   43276 	Fix compilation on linux 2.4.x.
   43277 	* configure.ac: Check for BLKGETSIZE64.
   43278 	* block.c (block_ioctl): Check for HAVE_BLKGETSIZE64.
   43279 
   43280 2011-08-17  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43281 
   43282 	Remove tcp->parent and TCB_CLONE_THREAD.
   43283 	tcp->parent is used for only two things:
   43284 	(1) to send signal on detach via tgkill (need to know tgid).
   43285 	Solution: use tkill, it needs only tid.
   43286 	(2) to optimize out ptrace options setting for new tracees.
   43287 	Not a big deal if we drop this optimization: "set options" op is fast,
   43288 	doing it just one extra time once per each tracee is hardly measurable.
   43289 
   43290 	TCB_CLONE_THREAD is a misnomer. It used only to flag sibling we attached to
   43291 	in startup_attach. This is used to prevent infinite recursive rescanning
   43292 	of /proc/PID/task.
   43293 	Despite the name, there is no guarantee it is set only on non-leader:
   43294 	if one would run "strace -f -p THREAD_ID" and THREAD_ID is *not*
   43295 	a thread leader, strace will happily attach to it and all siblings
   43296 	and will think that THREAD_ID is the leader! Which is a bug, but
   43297 	since we no longer detach when we think tracee is going to die,
   43298 	this bug no longer matters, because we do not use the knowledge
   43299 	about thread group leaders for anything. (We used it to delay
   43300 	leader's exit).
   43301 
   43302 	IOW: after this patch strace has no need to know about threads, parents
   43303 	and children, and so on. Therefore it does not track that information.
   43304 	It treats all tracees as independent entities. Overall,
   43305 	this simplifies code a lot.
   43306 
   43307 	* defs.h: Add TCB_ATTACH_DONE flag, remove TCB_CLONE_THREAD flag
   43308 	and struct tcb::parent field.
   43309 	* process.c (internal_fork): Don't set tcpchild->parent.
   43310 	* strace.c (startup_attach): Use TCB_ATTACH_DONE flag instead of
   43311 	TCB_CLONE_THREAD to avoid attach attempts on already-attached threads.
   43312 	Unlike TCB_CLONE_THREAD, TCB_ATTACH_DONE bit is used only temporarily,
   43313 	and only in this function. We clear it on every tcb before we return.
   43314 	(detach): Use tkill instead of tgkill.
   43315 	(trace): Set ptrace options on new tracees unconditionally,
   43316 	not only when tcp->parent == NULL.
   43317 
   43318 2011-08-17  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43319 
   43320 	Remove TCB_SUSPENDED constant and related code.
   43321 	Since we no longer suspend waitpid'ing tracees, we have only one case when
   43322 	we suspend tracee: when we pick up a new tracee created by clone/fork/vfork.
   43323 
   43324 	Background: on some other OSes, attach to child is done this way:
   43325 	get fork's result (pid), loop ptrace(PTRACE_ATTACH) until you hook up
   43326 	new process/thread. This is ugly and not safe, but what matters for us
   43327 	is that it doesn't require suspending. Suspending is required
   43328 	on Linux only, because on Linux attach to child is done differently.
   43329 
   43330 	On Linux, we use two methods of catching new tracee:
   43331 	adding CLONE_THREAD bit to syscall (if needed, we change
   43332 	[v]fork into clone before that), or using ptrace options.
   43333 	In both cases, it may be so that new tracee appears before one which
   43334 	created it returns from syscall. In this case, current code
   43335 	suspends new tracee until its creator returns. Only then
   43336 	strace can determine who is its parent (it needs child's pid for this,
   43337 	which is visible in parent's [v]fork/clone result).
   43338 	This is inherently racy. For example, what if SIGKILL kills
   43339 	creator after it succeeded creating child, but before it returns?
   43340 	Looks like we will have child suspended forever.
   43341 
   43342 	But after previous commit, we DO NOT NEED parent<->child link for anything.
   43343 	Therefore we do not need suspending too. Bingo!
   43344 
   43345 	This patch removes suspending code. Now new tracees will be continued
   43346 	right away. Next patch will remove tcp->parent member.
   43347 
   43348 	* defs.h: Remove TCB_SUSPENDED constant
   43349 	* process.c (handle_new_child): Delete this function.
   43350 	  (internal_fork): Do not call handle_new_child on syscall exit.
   43351 	* strace.c (handle_ptrace_event): Delete this function.
   43352 	  (trace): Do not suspend new child; remove all handling
   43353 	  of now impossible TCB_SUSPENDED condition.
   43354 
   43355 2011-08-17  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43356 
   43357 	Do not detach when we think tracee is going to die.
   43358 	Current code plays some ungodly tricks, trying to not detach
   43359 	thread group leader until all threads exit.
   43360 
   43361 	Also, it detaches from a tracee when signal delivery is detected
   43362 	which will cause tracee to exit.
   43363 	This operation is racy (not to mention the determination
   43364 	whether signal is set to SIG_DFL is a horrible hack):
   43365 	after we determined that this signal is indeed fatal
   43366 	but before we detach and let process die,
   43367 	*other thread* may set a handler to this signal, and
   43368 	we will leak the process, falsely displaying it as killed!
   43369 
   43370 	I need to look in the past to figure out why we even do it.
   43371 	First guess is that it's a workaround for old kernel bugs:
   43372 	kernel used to deliver exit notifications to the tracer,
   43373 	not to real parent. These workarounds are ancient
   43374 	(internal_exit is from 1995).
   43375 
   43376 	The patch deletes the hacks. We no longer need tcp->nclone_threads,
   43377 	TCB_EXITING and TCB_GROUP_EXITING. We also lose a few rather
   43378 	ugly functions.
   43379 
   43380 	I also added a new message: "+++ exited with EXITCODE +++"
   43381 	which shows exact moment strace got exit notification.
   43382 	It is analogous to existing "+++ killed by SIG +++" message.
   43383 
   43384 	* defs.h: Delete struct tcb::nclone_threads field,
   43385 	  TCB_EXITING and TCB_GROUP_EXITING constants,
   43386 	  declarations of sigishandled() and internal_exit().
   43387 	* process.c (internal_exit): Delete this function.
   43388 	  (handle_new_child): Don't ++tcp->nclone_threads.
   43389 	* signal.c (parse_sigset_t): Delete this function.
   43390 	  (sigishandled): Delete this function.
   43391 	* strace.c (startup_attach): Don't tcbtab[tcbi]->nclone_threads++.
   43392 	  (droptcb): Don't delay dropping if tcp->nclone_threads > 0,
   43393 	  don't drop parent if its nclone_threads reached 0:
   43394 	  just drop (only) this tcb unconditionally.
   43395 	  (detach): don't drop parent.
   43396 	  (handle_group_exit): Delete this function.
   43397 	  (handle_ptrace_event): Instead of handle_group_exit, just drop tcb;
   43398 	  do not panic if we see WIFEXITED from an attached pid;
   43399 	  print "+++ exited with EXITCODE +++" for every WIFEXITED pid.
   43400 	* syscall.c (internal_syscall):	Do not treat sys_exit specially -
   43401 	  don't call internal_exit on it.
   43402 
   43403 2011-08-16  Sergei Trofimovich  <slyfox (a] gentoo.org>
   43404 
   43405 	Declare printrusage32() on Alpha.
   43406 	* defs.h [ALPHA] (printrusage32): New declaration.
   43407 
   43408 2011-08-15  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43409 
   43410 	Slight optimization and cleanup in trace()
   43411 	* strace.c (trace): Do not recalculate "cflag ? &ru : NULL"
   43412 	again and again. Do not clear errno unnecessarily.
   43413 	Consistently check wait errors as pid < 0, not pid == -1.
   43414 	Indent ifdefs for better readability.
   43415 	Remove comments after endif if ifdef/endif block is really tiny.
   43416 
   43417 	Fix compilation on 2.4.20 kernel based system.
   43418 	* block.c (block_ioctl): add ifdef/endif around BLKGETSIZE64 usage
   43419 	* strace.c (trace): add ifdef/endif around WIFCONTINUED usage
   43420 
   43421 2011-07-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   43422 
   43423 	Check for additional PTRACE_* constants.
   43424 	* configure.ac (AC_CHECK_DECLS): Add PTRACE_O_TRACESYSGOOD,
   43425 	PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_EVENT_EXEC,
   43426 	PTRACE_EVENT_VFORK_DONE and PTRACE_EVENT_EXIT.
   43427 	* defs.h [LINUX]: Define these PTRACE_* constants when they are not
   43428 	provided by <sys/ptrace.h>.
   43429 
   43430 	Reported-by: Douglas Mencken <dougmencken (a] gmail.com>
   43431 	Reported-by: Steve Bennett <steveb (a] workware.net.au>
   43432 
   43433 2011-07-19  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43434 
   43435 	Remove superfluous backslash-continuation in configure.ac.
   43436 	* configure.ac: remove superfluous backslash continuation
   43437 	in AC_CHECK_DECLS
   43438 
   43439 2011-06-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43440 
   43441 	Make IOCTL_WSTOP more readable.
   43442 	* defs.h: Make IOCTL_WSTOP more readable
   43443 
   43444 	Trivial cleanups.
   43445 	* strace.c (trace): Change ifdef LINUX to make a bit more sense,
   43446 	  remove wrong comment at its endif. Slightly optimize
   43447 	  "+++ killed by SIG +++" message for systems without WCOREDUMP macro.
   43448 
   43449 	Remove redundant include <stdarg.h>
   43450 	* strace.c: Remove redundant include <stdarg.h>
   43451 
   43452 	Clean up two old comments.
   43453 	* strace.c (startup_attach): Remove misplaced comment.
   43454 	  (trace) Remove incomplete part of a comment.
   43455 
   43456 	Make a few variables static.
   43457 	* defs.h: Remove tcbtab declaration.
   43458 	* strace.c: Make run_uid, run_gid, outf, tcbtab, progname
   43459 	  global variables static
   43460 
   43461 	Add debug output in initial attachment code.
   43462 	* strace.c (startup_attach): If -d, report pid and success/failure
   43463 	  of every attach attempt.
   43464 
   43465 	Better debug logging of allocations and waitpit results.
   43466 	* strace.c (alloc_tcb): Print number of allocated tcb's if -d.
   43467 	  (droptcb): Likewise.
   43468 	  (handle_ptrace_event): Remove PTRACE_EVENT_EXEC debug message.
   43469 	  (trace): Improve logging of waitpid: show WIFxxx, exitcode/signal,
   43470 	  ptrace event name, WCOREDUMP - all on one line.
   43471 
   43472 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43473 
   43474 	Optimize arrays of register indexes in syscall_enter.
   43475 	* syscall.c (syscall_enter) [BFIN]: Make register no array "static const".
   43476 	  [SH]: Make register no array "const", pre-multiply it by 4.
   43477 	  [SH64]: Make register no array "const".
   43478 	  [X86_64]: Make register no array "const", pre-multiply it by 8.
   43479 
   43480 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43481 
   43482 	Deindent syscall_enter by removing unnecessary braces. No code changes.
   43483 	syscall_enter has many long (>80 columns) lines.
   43484 	It is aggravated by the fact that it has a lot of {} blocks
   43485 	which are not necessary (the code is the same without them).
   43486 	This patch removes {}s and deindents affected lines.
   43487 	While at it, it indents ifdefs so that nesting is easier to track,
   43488 	and adds a few spaces in the expressions, such as
   43489 	"tcp->u_nargs*sizeof..." -> "tcp->u_nargs * sizeof...".
   43490 	There is no actual changes to the code here.
   43491 
   43492 	* syscall.c (syscall_enter): Remove unnecessary {} blocks.
   43493 
   43494 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43495 
   43496 	Remove dead "ifndef CLONE_PTRACE" branch.
   43497 	process.c defines CLONE_PTRACE for Linux, so it can't be undefined.
   43498 	Therefore ifndef CLONE_PTRACE code is dead (since at least 2004).
   43499 	This patch removes it.
   43500 
   43501 	* process.c (handle_new_child): Remove ifdef CLONE_PTRACE/endif (but not
   43502 	  the code inside) and entire ifndef CLONE_PTRACE/endif block.
   43503 
   43504 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43505 
   43506 	Add a comment about setbpt. No code changes.
   43507 	* defs.h: Add a comment about setbpt().
   43508 
   43509 	Untangle a particularly badly obfuscated bit of code. No logic changes.
   43510 	* util.c (setbpt): Calculate new arg0 in more readable way.
   43511 
   43512 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43513 
   43514 	Remove TCB_FOLLOWFORK.
   43515 	TCB_FOLLOWFORK flag seems to be unnecessary, because we either follow
   43516 	all [v]forks/clones or don't follow any, therefore global variable
   43517 	followfork is an already existing indicator of what we want to do.
   43518 	This patch drops all setting/clearing of TCB_FOLLOWFORK bit,
   43519 	and replaces checks for this bit by checks of followfork value.
   43520 	In internal_fork, check is moved to in front of if(), since
   43521 	the check is needed on both "entering" and "exiting" branch.
   43522 
   43523 	* defs.h: Remove TCB_FOLLOWFORK define.
   43524 	* process.c (internal_fork): Do not set/clear TCB_FOLLOWFORK,
   43525 	  test followfork instead of tcp->flags & TCB_FOLLOWFORK.
   43526 	  (handle_new_child): Likewise.
   43527 	* strace.c (startup_attach): Likewise.
   43528 
   43529 2011-06-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   43530 
   43531 	* system.c (sys_capget, sys_capset): Fix pointer arithmetics.
   43532 
   43533 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43534 
   43535 	Make initial tcb allocation more readable. No logic changes.
   43536 	* strace.c (main): Make initial tcb allocation more readable.
   43537 
   43538 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43539 
   43540 	Do not allocate tiny cap_user_header/data structures, place them on stack.
   43541 	This allows us to avoid having code to malloc them, and code to check
   43542 	for malloc failure. Resulting code decrease:
   43543 	   text	   data	    bss	    dec	    hex	filename
   43544 	  10175	      0	     16	  10191	   27cf	system.o.old
   43545 	   9797	      0	      0	   9797	   2645	system.o
   43546 
   43547 	* system.c (sys_capget): Put cap_user_header_t and cap_user_data_t
   43548 	  on stack, rather than allocating them in heap. These structures
   43549 	  are very small (a few integer fields), stack is a better place
   43550 	  for them.
   43551 	  (sys_capset): Likewise.
   43552 
   43553 2011-06-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43554 
   43555 	Use [p]error_msg[_and_die] where appropriate. No logic changes.
   43556 	Resulting size changes:
   43557 	   text    data     bss     dec     hex filename
   43558 	  17445      16    8572   26033    65b1 strace.o.old
   43559 	  16850      16    8572   25438    635e strace.o
   43560 
   43561 	* strace.c: Replace fprintf[+cleanup]+exit with [p]error_msg_and_die,
   43562 	  fprintf("progname: ...") with [p]error_msg where appropriate.
   43563 
   43564 2011-06-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43565 
   43566 	Whitespace cleanups. No code changes.
   43567 	* count.c: Place opening curly brace after if (),
   43568 	  not on the next line. Almost all strace code alredy
   43569 	  uses this style.
   43570 	* desc.c: Likewise.
   43571 	* file.c: Likewise.
   43572 	* net.c: Likewise.
   43573 	* pathtrace.c: Likewise.
   43574 	* process.c: Likewise.
   43575 	* quota.c: Likewise.
   43576 	* signal.c: Likewise.
   43577 	* strace.c: Likewise.
   43578 	* syscall.c: Likewise.
   43579 	* time.c: Likewise.
   43580 
   43581 2011-06-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43582 
   43583 	Make strace_fopen abort on error.
   43584 	Error from strace_fopen in main results in call to exit(1).
   43585 	Error from strace_fopen in newoutf is propagated to newoutf
   43586 	callers: startup_attach (where it results in exit(1))
   43587 	and alloc_tcb (where error is ignored). In second case,
   43588 	the behavior doesn't seem to be right: it means with -ff
   43589 	on open error for new LOGFILE.PID the output will continue
   43590 	to go into *the same file as the previous process* - which
   43591 	would be confusing. Moreover, on droptcb outf may be closed
   43592 	and the output of other, still running process outputting
   43593 	to the same outf will be lost. I don't think this is sane.
   43594 	IOW: in all cases, error in strace_fopen should be fatal.
   43595 
   43596 	* strace.c (strace_fopen): Abort on error instead of returning NULL.
   43597 	  (newoutf): Change return type to void.
   43598 	  (startup_attach): Remove error check on newoutf return value.
   43599 	  (main): Remove error check on strace_fopen return value.
   43600 
   43601 2011-06-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43602 
   43603 	Make set_cloexec_flag abort on error.
   43604 	set_cloexec_flag() may fail only if we pass it a bad fd,
   43605 	such as -1 or non-opened one. If we do, we have a bug
   43606 	in the caller. It makes no sense to try to continue
   43607 	running when we detect such a blatant bug in our own code.
   43608 
   43609 	* strace (set_cloexec_flag): Abort instead of returning error
   43610 	  indicator. Change function to return void.
   43611 	  (strace_fopen): Remove error check on set_cloexec_flag return value.
   43612 	  (proc_open): Likewise.
   43613 	  (proc_poll_open): Likewise.
   43614 
   43615 2011-06-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43616 
   43617 	Make strace_popen abort on error.
   43618 	It makes no sense to postpone abort on strace_popen error
   43619 	unti it returns. Moreover, out-of-memory error was exiting
   43620 	without any message.
   43621 	While at it, use 0 as "none" for popen_pid, as optimization.
   43622 
   43623 	* strace: Initialize popen_pid to 0 - this puts it in bss.
   43624 	  (trace): Reset popen_pid to 0 instead of -1.
   43625 	  (strace_popen): Never return NULL as error indicator,
   43626 	  abort with good error message instead.
   43627 	  (main): Remove NULL check of strace_popen result.
   43628 
   43629 2011-06-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43630 
   43631 	Delete fork_tcb()
   43632 	Get rid of fork_tcb() function. It used to do what the comment
   43633 	above it says, but now it doesn't do much:
   43634 	it only sets tcp->flags |= TCB_FOLLOWFORK and maybe calls
   43635 	expand_tcbtab(). The second operation is not necessary, since
   43636 	alloc_tcp() will do it itself when needed.
   43637 	This patch deletes fork_tcb(), open-coding tcp->flags |= TCB_FOLLOWFORK
   43638 	where it was formerly called. It also makes nprocs, tcbtabsize and
   43639 	expand_tcbtab() static. (While at it, I nuked redundant
   43640 	extern char **environ declaration: strace.c had *two* of them...)
   43641 
   43642 	* defs.h: Remove declarations of nprocs, tcbtabsize and
   43643 	  expand_tcbtab.
   43644 	* process.c (fork_tcb): Remove this function.
   43645 	  (internal_fork): Open-code fork_tcb.
   43646 	  (handle_new_child): Likewise.
   43647 	* strace.c: Remove redundant "extern char **environ". Declare
   43648 	  nprocs and tcbtabsize static.
   43649 	  (expand_tcbtab): Make it static.
   43650 
   43651 2011-06-22  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43652 
   43653 	Simplify expand_tcbtab and alloc_tcb.
   43654 	Get rid of a few intermediate variables, simplifies a few expressions,
   43655 	and uses error_msg_and_die instead of more verbose
   43656 	fprintf+cleanup+exit sequence.
   43657 	In alloc_tcp, I use memset to clear entire new tcp.
   43658 	This not only saves a few bytes of code, but lowers the chances
   43659 	of future bugs where some data "leaks out" into new tcb's
   43660 	from old ones because we forgot to re-initialize it.
   43661 
   43662 	* strace.c (expand_tcbtab): Simplify this function. No logic changes.
   43663 	  (alloc_tcb): Likewise.
   43664 
   43665 2011-06-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43666 
   43667 	Trivial fixes.
   43668 	* process.c (internal_fork): Remove conditionals which make no difference
   43669 	  (we return 0 on both branches of these ifs).
   43670 	* util.c: Fix indentation of an ifdef.
   43671 
   43672 2011-06-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   43673 
   43674 	Fix build when libaio-devel is not available.
   43675 	* desc.c: Do not compile code that uses struct iocb unless
   43676 	HAVE_LIBAIO_H is set.
   43677 
   43678 	Reported-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   43679 
   43680 2011-06-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   43681 
   43682 	tests: finish ptrace_setoptions_* merge.
   43683 	* tests/Makefile.am (TESTS): Merge ptrace_setoptions_*.
   43684 	* tests/ptrace_setoptions: Check for Linux kernel > 2.6.
   43685 
   43686 2011-06-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43687 
   43688 	Remove write-only nchildren member from struct tcb.
   43689 	* defs.h: Remove nchildren member from struct tcb.
   43690 	* process.c (handle_new_child): Remove inc/decrements of tcp->nchildren.
   43691 	  (internal_fork): Likewise.
   43692 	* strace.c (startup_attach): Likewise.
   43693 	  (droptcb): Likewise.
   43694 	  (alloc_tcb): Remove initialization of tcp->nchildren.
   43695 
   43696 	Fix tests/ptrace_setoptions_* to match last fix in ptrace options code.
   43697 
   43698 	Remove write-only nzombies member from struct tcb.
   43699 	* defs.h: Remove nzombies member from struct tcb.
   43700 	* strace.c (droptcb): Remove "tcp->parent->nzombies++".
   43701 	  (alloc_tcb): Remove "tcp->nzombies = 0".
   43702 
   43703 2011-06-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43704 
   43705 	Fix regression introduced by "Properly handle real SIGTRAPs" change.
   43706 	Commit 3454e4b463e6c22c7ea8c5461ef5a077f4650a54
   43707 	introduced a bug: sometimes, TRACECLONE/TRACE[V]FORK opts were not set.
   43708 	The check (tcp->parent == NULL) in old code was meant to check
   43709 	"if we are not a child created by auto-attach" - in this case,
   43710 	options need to be set on the child; otherwise they are inherited
   43711 	and do not need to be set.
   43712 	I misunderstood the check and if tcp->parent is not NULL, I was
   43713 	setting only ptrace_setoptions_for_all bits.
   43714 	This change fixes the problem. Since the fixed logic makes it
   43715 	unnecessary to keep two sets of options in separate variables,
   43716 	I merge them back into one variable, ptrace_setoptions.
   43717 
   43718 	* defs.h: Merge ptrace_setoptions_followfork and ptrace_setoptions_for_all
   43719 	  into one variable, ptrace_setoptions.
   43720 	* strace.c: Likewise.
   43721 	  (test_ptrace_setoptions_followfork): Use ptrace_setoptions variable.
   43722 	  (test_ptrace_setoptions_for_all): Likewise.
   43723 	  (main): Likewise.
   43724 	* process.c (internal_fork): Likewise.
   43725 	  (internal_exec): Likewise.
   43726 	* strace.c (trace): Fix the bug where different options were set
   43727 	  depending on "tcp->parent == NULL" condition. Add a comment
   43728 	  which makes it more clear why this condition is checked.
   43729 
   43730 2011-06-18  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43731 
   43732 	Do not suspend waitpid.
   43733 	strace used to suspend waitpid until there is a child
   43734 	for waitpid'ing process to collect status from.
   43735 	Apparently, it was done because in some very old kernels
   43736 	(circa 2002 or even earlier) there were ptrace bugs which
   43737 	were making waitpid in real parent to not see children.
   43738 	This kernel bug is fixed long ago. This change removes the workaround.
   43739 	test/wait_must_be_interruptible.c is a test program which
   43740 	illustrates why without this change strace changes
   43741 	programs's behavior.
   43742 
   43743 	* defs.h: Delete waitpid and nclone_waiting members from from struct tcb.
   43744 	  Remove declaration of internal_wait().
   43745 	* process.c (internal_wait): Remove this function.
   43746 	* strace.c (alloc_tcb): Do not set tcp->nclone_waiting.
   43747 	  (resume): Remove this function.
   43748 	  (resume_from_tcp): Remove this function.
   43749 	  (detach): Do not call resume_from_tcp().
   43750 	  (handle_group_exit): Do not call resume_from_tcp().
   43751 	* syscall.c (internal_syscall): Do not call internal_wait().
   43752 
   43753 2011-06-13  Andi Kleen  <ak (a] linux.intel.com>
   43754 
   43755 	Enhance io_submit() decoding.
   43756 	strace didn't decode important fields in the iocb passed to io_submit.
   43757 	This patch changes the code to dump them all.  Also it prefixes the fields
   43758 	with names to make it easier to read.
   43759 
   43760 	* desc.c (iocb_cmd_lookup, print_common_flags): New functions.
   43761 	(sys_io_submit): New iocb decoder.
   43762 
   43763 2011-06-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   43764 
   43765 	Add argument to tprint_iov() specifying whether to decode each iovec.
   43766 	* defs.h (tprint_iov): Add decode_iov argument.
   43767 	* io.c (tprint_iov): Implement new decode_iov argument.
   43768 	(sys_readv, sys_writev, sys_sendfile, sys_preadv, sys_pwritev): Update
   43769 	tprint_iov calls.
   43770 	* net.c (do_msghdr): Likewise.
   43771 
   43772 	Introduce ARRAY_SIZE() macro.
   43773 	* defs.h (ARRAY_SIZE): New macro.
   43774 	* ioctl.c: Use it.
   43775 	* pathtrace.c (pathmatch, storepath): Likewise.
   43776 	* process.c (printpriv): Likewise.
   43777 	* signal.c: Likewise.
   43778 	* syscall.c: Likewise.
   43779 
   43780 2011-06-13  Andi Kleen  <ak (a] linux.intel.com>
   43781 
   43782 	Fix decoding of timer id returned by timer_create.
   43783 	* time.c (sys_timer_create): The kernel returns a integer, not a
   43784 	pointer for the timer id in the memory pointed to by timer_id.
   43785 
   43786 2011-06-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   43787 
   43788 	Add test for PTRACE_O_TRACESYSGOOD.
   43789 	* tests/ptrace_setoptions_for_all: New file.
   43790 	* tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all.
   43791 
   43792 	tests: update test for linux kernel version.
   43793 	* tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6.
   43794 
   43795 2011-06-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   43796 
   43797 	Update ptrace_setoptions test.
   43798 	The test have to be adjusted after commit v4.6-5-g3454e4b.
   43799 
   43800 	* ptrace_setoptions: Update grep pattern, rename to
   43801 	ptrace_setoptions_followfork.
   43802 	* tests/Makefile.am (TESTS): Rename ptrace_setoptions to
   43803 	ptrace_setoptions_followfork.
   43804 
   43805 2011-06-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   43806 
   43807 	* strace.c (verror_msg): Rewrite without use of heap memory allocation.
   43808 
   43809 2011-06-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   43810 
   43811 	Fix MIPS syscall entries.
   43812 	* linux/mips/syscallent.h: Remove duplicate entries for 4336, 4337,
   43813 	and 4338 syscall numbers.
   43814 
   43815 	Reported-by: Denys Vlasenko <dvlasenk (a] redhat.com>
   43816 
   43817 2011-06-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43818 
   43819 	Don't display bogus parameter for sigreturn syscall.
   43820 	* linux/*/syscallent.h: For those arches which use sys_sigreturn,
   43821 	not printargs, to show [rt_]sigreturn syscall, change number of arguments
   43822 	from 1 to 0: sys_sigreturn function doesn't use syscall parameters.
   43823 	(I guess kernel doesn't actually _have_ any parameters for this syscall,
   43824 	at least on these architectures). Do the same change for I386 and x86-64
   43825 	even though they use printargs: I looked at kernel code and syscall
   43826 	definitely doesn't have any parameters on these arches.
   43827 	(I hesitate to change 1 to 0 params for arches I don't know -
   43828 	it is remotely possible some of them do have a parameter for this syscall).
   43829 
   43830 	Optimize sigreturn handling.
   43831 	* signal.c (sys_sigreturn): move stack pointer variables,
   43832 	and for SPARC and MIPS, stack pointer and sigmask reading code
   43833 	into "if (entering) ..." block, because it is only needed
   43834 	in this branch; load tcp->u_arg[1] into sigmask for display
   43835 	_after_ we know for sure u_arg[1] does contain valid sigmask
   43836 	(IOW: perform operation only when we know we will need the result)
   43837 
   43838 	Do not call umoven to fetch parameters if we have zero params.
   43839 	* syscall.c [I386] (syscall_enter): Do not call umoven
   43840 	to fetch zero bytes. This is just an optimization.
   43841 
   43842 	"Modernize" four old-style function parameter declarations.
   43843 	* signal.c (signame, long_to_sigset, printsigmask, printsignal):
   43844 	Convert old-style C function definitions to a "modern" form.
   43845 	This does not change any actual code.
   43846 
   43847 2011-06-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43848 
   43849 	Fix sigreturn decoding on MIPS.
   43850 	The "return 0" line was accidentally deleted circa 2007,
   43851 	which made sigreturn on MIPS always display "= 0" return
   43852 	instead of more informative " = ? (mask now [MASK])".
   43853 
   43854 	* strace.c (sys_sigreturn): Add wrongly deleted "return 0" line
   43855 
   43856 2011-06-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43857 
   43858 	Print at least one space between SYSCALL(ARGS) and = RESULT if tracee is killed
   43859 	We already do it in the normal case, but in rare code path where
   43860 	tracee is gone (SIGKILLed?) sometimes we were printing this:
   43861 	"SYSCALL(ARGS <unavailable>)= ? <unavailable>" - note jammed together ")=".
   43862 	test/sigkill_rain.c can be used to verify the fix.
   43863 
   43864 	* strace.c (printleader): add a space after ")" in " <unavailable>)"
   43865 
   43866 2011-06-08  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43867 
   43868 	Add fflush after printf in test/sigkill_rain.c.
   43869 
   43870 	Update test/* directory, it seem to be a bit bit-rotted.
   43871 	Added README; modified sigkill_rain.c to be more understandable,
   43872 	made clone.c compile; added wait_must_be_interruptible.c test;
   43873 	updated Makefile and .gitignore.
   43874 
   43875 2011-06-07  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43876 
   43877 	Whitespace cleanups. no code changes.
   43878 	* bjm.c: Fix tabulation (such as extra spaces before tabs),
   43879 	convert punctuation where it deviates from prevalent form
   43880 	elsewhere in strace code, convert sizeof and offsetof where
   43881 	it deviates from from prevalent form, remove space between
   43882 	function/macro/array names and (parameters) or [index],
   43883 	add space between "if" and (condition), correct non-standard
   43884 	or wrong indentaion.
   43885 	* defs.h: Likewise
   43886 	* desc.c: Likewise
   43887 	* file.c: Likewise
   43888 	* ipc.c: Likewise
   43889 	* linux/arm/syscallent.h: Likewise
   43890 	* linux/avr32/syscallent.h: Likewise
   43891 	* linux/hppa/syscallent.h: Likewise
   43892 	* linux/i386/syscallent.h: Likewise
   43893 	* linux/ioctlsort.c: Likewise
   43894 	* linux/m68k/syscallent.h: Likewise
   43895 	* linux/microblaze/syscallent.h: Likewise
   43896 	* linux/powerpc/syscallent.h: Likewise
   43897 	* linux/s390/syscallent.h: Likewise
   43898 	* linux/s390x/syscallent.h: Likewise
   43899 	* linux/sh/syscallent.h: Likewise
   43900 	* linux/sh64/syscallent.h: Likewise
   43901 	* linux/tile/syscallent.h: Likewise
   43902 	* linux/x86_64/syscallent.h: Likewise
   43903 	* mem.c: Likewise
   43904 	* net.c: Likewise
   43905 	* pathtrace.c: Likewise
   43906 	* process.c: Likewise
   43907 	* signal.c: Likewise
   43908 	* sock.c: Likewise
   43909 	* strace.c: Likewise
   43910 	* stream.c: Likewise
   43911 	* sunos4/syscall.h: Likewise
   43912 	* sunos4/syscallent.h: Likewise
   43913 	* svr4/syscall.h: Likewise
   43914 	* svr4/syscallent.h: Likewise
   43915 	* syscall.c: Likewise
   43916 	* system.c: Likewise
   43917 	* test/childthread.c: Likewise
   43918 	* test/leaderkill.c: Likewise
   43919 	* test/skodic.c: Likewise
   43920 	* time.c: Likewise
   43921 	* util.c: Likewise
   43922 
   43923 2011-05-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   43924 
   43925 	ARM EABI: fix 64-bit syscall's arguments decoding.
   43926 	ARM OABI and ARM EABI have different function parameters passing rules.
   43927 	With EABI, 64-bit function parameters passed in registers are aligned to
   43928 	an even-numbered register instead of using the next available pair, see
   43929 	http://lkml.org/lkml/2006/1/12/175
   43930 	This rule also applies to syscall's arguments.
   43931 
   43932 	* linux/arm/syscallent.h (pread, pwrite, truncate64, ftruncate64,
   43933 	readahead, preadv, pwritev): Fix number of arguments.
   43934 	* util.c (printllval): Align 64bit argument to 64bit boundary on
   43935 	__ARM_EABI__.
   43936 
   43937 	Reported-by: Damir Shayhutdinov <damir (a] altlinux.org>
   43938 
   43939 2011-05-30  Damir Shayhutdinov  <damir (a] altlinux.ru>
   43940 
   43941 	Linux: implement decoding of preadv and pwritev syscalls.
   43942 	* io.c [LINUX && HAVE_SYS_UIO_H] (sys_preadv, sys_pwritev): New functions.
   43943 	* linux/syscall.h (sys_preadv, sys_pwritev): Declare them.
   43944 	* linux/*/syscallent.h: Use them.
   43945 
   43946 2011-05-30  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43947 
   43948 	"Modernize" all old-style function parameter declarations.
   43949 	* bjm.c: Convert all remaining old-style C function definitions
   43950 	to a "modern" form. This does not change any actual code.
   43951 	* io.c: Likewise
   43952 	* ioctl.c: Likewise
   43953 	* net.c: Likewise
   43954 	* proc.c: Likewise
   43955 	* process.c: Likewise
   43956 	* signal.c: Likewise
   43957 	* sock.c: Likewise
   43958 	* strace.c: Likewise
   43959 	* stream.c: Likewise
   43960 	* syscall.c: Likewise
   43961 	* system.c: Likewise
   43962 	* time.c: Likewise
   43963 	* util.c: Likewise
   43964 
   43965 2011-05-27  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43966 
   43967 	Cleanups on top of "handle SIGTRAP properly" change, based on Dmitry's comments.
   43968 	* defs.h ([p]error_msg[_and_die]): Declare new functions.
   43969 	* strace.c (SYSCALLTRAP): Rename to syscall_trap_sig.
   43970 	([p]error_msg[_and_die]): Define new functions.
   43971 	(strace_tracer_pid): New variable, it controls which pid will
   43972 	do cleanup on exit via [p]error_msg_and_die.
   43973 	(main): Set strace_tracer_pid to our initial pid.
   43974 	(startup_attach): Change strace_tracer_pid if we are in -D mode.
   43975 	(test_ptrace_setoptions_for_all): Minor changes to logic,
   43976 	such as better diagnostic messages.
   43977 
   43978 2011-05-25  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43979 
   43980 	Identifier "errno" may be a macro, it's unsafe to use it.
   43981 	* strace.c (strerror): Rename parameter errno to err_no
   43982 
   43983 2011-05-24  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43984 
   43985 	Don't perform TCB_WAITEXECVE wait if not needed.
   43986 	* defs.h (ptrace_setoptions_for_all): Expose this variable.
   43987 	* strace.c (ptrace_setoptions_for_all): Remove "static".
   43988 	* process.c (internal_exec): Don't set TCB_WAITEXECVE bit
   43989 	if we know that post-execve SIGTRAP is not going to happen.
   43990 
   43991 2011-05-23  Denys Vlasenko  <dvlasenk (a] redhat.com>
   43992 
   43993 	Properly handle real SIGTRAPs.
   43994 	* defs.h (ptrace_setoptions): Variable renamed to ptrace_setoptions_followfork.
   43995 	* process.c (internal_fork): Ditto.
   43996 	* strace.c (ptrace_setoptions_for_all): New variable.
   43997 	(SYSCALLTRAP): New variable.
   43998 	(error_msg_and_die): New function.
   43999 	(test_ptrace_setoptions_for_all): New function.
   44000 	(main): Call test_ptrace_setoptions_for_all() at init.
   44001 	(handle_ptrace_event): Handle PTRACE_EVENT_EXEC (by ignoring it).
   44002 	(trace): Check events and set ptrace options without -f too.
   44003 	Check WSTOPSIG(status) not for SIGTRAP, but for SYSCALLTRAP.
   44004 
   44005 2011-04-24  Mike Frysinger  <vapier (a] gentoo.org>
   44006 
   44007 	Blackfin: update syscall list.
   44008 
   44009 	* linux/bfin/syscallent.h: Add name_to_handle_at, open_by_handle_at,
   44010 	clock_adjtime, and syncfs syscalls.
   44011 
   44012 2011-04-24  Mike Frysinger  <vapier (a] gentoo.org>
   44013 
   44014 	linux: add new EHWPOISON errno.
   44015 
   44016 	* linux/errnoent.h: Change ERRNO_133 to EHWPOISON.
   44017 
   44018 2011-04-08  Grant Edwards  <grant.b.edwards (a] gmail.com>
   44019 
   44020 	Add ability to print file descriptor paths and filter by those paths.
   44021 	* pathtrace.c: New file, implements matching syscall arguments to
   44022 	user-specified file paths.
   44023 	* Makefile.am (strace_SOURCES): Add pathtrace.c.
   44024 	* defs.h (TCB_FILTERED, filtered): New defines.
   44025 	(getfdpath, pathtrace_select, pathtrace_match, show_fd_path,
   44026 	tracing_paths): New declarations.
   44027 	* strace.c (show_fd_path, tracing_paths): New global variables.
   44028 	(usage, main): Implement handling of -y and -P options.
   44029 	* strace.1: Add descriptions of -y and -P options.
   44030 	* syscall.c (trace_syscall_entering): Add path matching logic to the
   44031 	print/noprint decision and set the TCB_FILTERED bit appropriately.
   44032 	(trace_syscall_exiting): Use filtered() macro that checks the
   44033 	TCB_FILTERED bit to determine print/noprint status.
   44034 	* util.c (printfd): Use getfdpath().
   44035 
   44036 2011-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   44037 
   44038 	Fix BLKTRACESTOP definition.
   44039 	* block.c: Fix typo in the check for BLKTRACESTOP.
   44040 	Reported by Gabor Z. Papp.
   44041 
   44042 2011-03-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   44043 
   44044 	Ensure that PTRACE_GETSIGINFO et al are always defined on Linux.
   44045 	* configure.ac (AC_CHECK_DECLS): Add PTRACE_* constants.
   44046 	* defs.h [LINUX]: Define those PTRACE_* constants that are not provided
   44047 	by <sys/ptrace.h>.
   44048 
   44049 	* CREDITS.in: Fix typo.
   44050 
   44051 2011-03-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   44052 
   44053 	Update PTRACE_* constants.
   44054 	* process.c (ptrace_cmds): Add PTRACE_GETREGSET and PTRACE_SETREGSET.
   44055 
   44056 	Prepare for 4.6 release.
   44057 	* NEWS: Update for 4.6 release.
   44058 	* configure.ac: Version 4.6.
   44059 	* debian/changelog: 4.6-1.
   44060 	* strace.spec: 4.6-1.
   44061 
   44062 2011-03-14  Mike Frysinger  <vapier (a] gentoo.org>
   44063 
   44064 	linux/ioctlent: unify them all.
   44065 	This unifies all the ioctlent.h's in the linux subdir while still
   44066 	allowing each arch to maintain its own minor list.
   44067 
   44068 	The basic method is:
   44069 	- each arch has linux/<arch>/ioctlent.h.in which defines only the
   44070 	arch-specific ioctls;
   44071 	- linux/ioctlent.h.in which defines only the common ioctls;
   44072 	- at build time, these two headers are combined and sorted to produce
   44073 	the linux/ioctlent.h file.
   44074 
   44075 	This also requires a little tweaking of the include files since the
   44076 	common ioctlent.h is a built file.
   44077 
   44078 	* linux/ioctlent.h: Split into linux/ioctlent.h.in and
   44079 	linux/i386/ioctlent.h.in, remove asm entries from the former, remove
   44080 	non-asm entries from the latter.
   44081 	* linux/alpha/ioctlent.h: Rename to linux/alpha/ioctlent.h.in, remove
   44082 	non-asm entries.
   44083 	* linux/bfin/ioctlent.h: Rename to linux/bfin/ioctlent.h.in, remove
   44084 	non-asm entries.
   44085 	* linux/hppa/ioctlent.h: Rename to linux/hppa/ioctlent.h.in, remove
   44086 	non-asm entries.
   44087 	* linux/ia64/ioctlent.h: Rename to linux/ia64/ioctlent.h.in, remove
   44088 	non-asm entries.
   44089 	* linux/mips/ioctlent.h: Rename to linux/mips/ioctlent.h.in, remove
   44090 	non-asm entries.
   44091 	* linux/powerpc/ioctlent.h: Rename to linux/powerpc/ioctlent.h.in,
   44092 	remove non-asm entries.
   44093 	* linux/s390/ioctlent.h: Rename to linux/s390/ioctlent.h.in, remove
   44094 	non-asm entries.
   44095 	* linux/sh/ioctlent.h: Rename to linux/sh/ioctlent.h.in, remove
   44096 	non-asm entries.
   44097 	* linux/sparc/ioctlent.h: Rename to linux/sparc/ioctlent.h.in, remove
   44098 	non-asm entries.
   44099 	* linux/arm/ioctlent.h.in: New file.
   44100 	* linux/avr32/ioctlent.h.in: Likewise.
   44101 	* linux/i386/ioctlent.h.in: Likewise.
   44102 	* linux/m68k/ioctlent.h.in: Likewise.
   44103 	* linux/microblaze/ioctlent.h.in: Likewise.
   44104 	* linux/tile/ioctlent.h.in: Likewise.
   44105 	* linux/x86_64/ioctlent.h.in: Likewise.
   44106 	* linux/s390x/ioctlent.h.in: Include ioctlent.h.in instead of
   44107 	ioctlent.h.
   44108 	* linux/sh64/ioctlent.h.in: Likewise.
   44109 	* linux/sparc64/ioctlent.h.in: Likewise.
   44110 	* linux/arm/ioctlent1.h: Update ioctlent.h include.
   44111 	* linux/powerpc/ioctlent1.h: Likewise.
   44112 	* linux/sparc/ioctlent1.h: Likewise.
   44113 	* linux/sparc64/ioctlent1.h: Likewise.
   44114 	* linux/x86_64/ioctlent1.h: Likewise.
   44115 	* Makefile.am (AM_CPPFLAGS): Add -I$(builddir)/$(OS).
   44116 	(EXTRA_DIST): Update.
   44117 	[MAINTAINER_MODE && LINUX]: Convert from ioctlent_h to ioctlent_h_in.
   44118 	[LINUX]: Add $(builddir)/$(OS)/ioctlent.h generation rules.
   44119 	* .gitignore: Add linux/ioctlent.h.
   44120 
   44121 2011-03-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   44122 
   44123 	Show more details about signals received by traced processess.
   44124 	* strace.c [!USE_PROCFS] (trace): Differentiate output format depending
   44125 	on PTRACE_GETSIGINFO success or failure.  In the former case, use
   44126 	printsiginfo() to show more details about received signal.
   44127 
   44128 	Get rid of PT_GETSIGINFO.
   44129 	* strace.c [!USE_PROCFS] (trace): Assume that PTRACE_GETSIGINFO is
   44130 	available.  Replace PT_GETSIGINFO with PTRACE_GETSIGINFO.  Use
   44131 	PTRACE_GETSIGINFO for all signals.
   44132 
   44133 	Enhance decoding of kernel-generated signals.
   44134 	* signal.c (printsiginfo) [LINUX]: Do not print uninteresting
   44135 	zero-initialized fields.
   44136 
   44137 	Fix decoding of user-generated signals.
   44138 	* signal.c [LINUX] (SI_FROMUSER): Define.
   44139 	[LINUX || SVR4] (printsiginfo) [SI_FROMUSER]: Enhance decoding.
   44140 
   44141 	Recognize SI_KERNEL and SI_ASYNCNL.
   44142 	* signal.c [LINUX] (SI_KERNEL, SI_ASYNCNL): Define.
   44143 	[LINUX || SVR4] (siginfo_codes): Add entries for SI_KERNEL and
   44144 	SI_ASYNCNL, reorder entries.
   44145 
   44146 2011-03-05  Sebastian Pipping  <sebastian (a] pipping.org>
   44147 
   44148 	Take all git branches into account for generation of CREDITS file.
   44149 	* Makefile.am: Make CREDITS target depend on all git branches.
   44150 
   44151 2011-03-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   44152 
   44153 	Fix decoding of file descriptors.
   44154 	* defs.h (printfd): New function prototype.
   44155 	* util.c (printfd): New function.
   44156 	* file.c (print_dirfd): Update prototype to use printfd().
   44157 	(sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat,
   44158 	sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat,
   44159 	sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd().
   44160 	(sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64,
   44161 	sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64,
   44162 	sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync,
   44163 	sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr,
   44164 	sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64,
   44165 	sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch,
   44166 	sys_fallocate): Use printfd() for decoding of file descriptors.
   44167 	* desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2,
   44168 	decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for
   44169 	decoding of file descriptors.
   44170 	* io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread,
   44171 	sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64,
   44172 	sys_ioctl): Likewise.
   44173 	* mem.c (print_mmap, sys_mmap64): Likewise.
   44174 	* signal.c (do_signalfd): Likewise.
   44175 	* stream.c (decode_poll): Likewise.
   44176 	* time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise.
   44177 	Based on patch from Grant Edwards <grant.b.edwards (a] gmail.com>.
   44178 
   44179 2011-03-03  Sebastian Pipping  <sebastian (a] pipping.org>
   44180 
   44181 	Print shutdown(2) modes as SHUT_* constants.
   44182 	* net.c (shutdown_modes): New xlat structure.
   44183 	(sys_shutdown): Use shutdown_modes to decode 2nd syscall argument.
   44184 
   44185 	Fix decoding of inotify_init1() flags.
   44186 	* file.c (inotify_init_flags): New xlat structure.
   44187 	(sys_inotify_init1): Use it instead of open_mode_flags.
   44188 
   44189 2011-03-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   44190 
   44191 	Fix struct xlat initialization bugs.
   44192 	* file.c (inotify_modes): Terminate with NULL entry.
   44193 	* net.c (sock_type_flags): Make this array static.
   44194 	(socketlayers): Add a comment that this array should remain not
   44195 	NULL-terminated.
   44196 
   44197 	tests: avoid SIGPIPE.
   44198 	* tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null".
   44199 	The former may result to strace being killed by SIGPIPE, which in
   44200 	certain configuratons may lead to generation of a core file.
   44201 	Suggested by Mike Frysinger.
   44202 
   44203 2011-03-01  Mike Frysinger  <vapier (a] gentoo.org>
   44204 
   44205 	tests: do not make missing /usr/bin/time a failure.
   44206 	* tests/init.sh (framework_skip_): New function.
   44207 	(check_prog): Use it instead of framework_failure_.
   44208 
   44209 2011-02-27  Dmitry V. Levin  <ldv (a] altlinux.org>
   44210 
   44211 	Generate an xz tar archive of the distribution.
   44212 	* configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with dist-xz.
   44213 	* Makefile.am: Update srpm target.
   44214 	* make-dist: Update for dist-xz.
   44215 	* strace.spec: Update Source tag.
   44216 	* debian/watch: Update regexp.
   44217 	* .gitignore: Add strace-*.tar.xz.
   44218 
   44219 	Use "make check" in debian/rules and strace.spec.
   44220 	* debian/control: Update Build-Depends.
   44221 	* debian/rules: Run "make check".
   44222 	* strace.spec: Update BuildRequires. Run "make check" in %check section.
   44223 
   44224 	Implement two basic "strace -f" tests.
   44225 	* Makefile.am (SUBDIRS): Add tests.
   44226 	* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
   44227 	* tests/.gitignore: New file.
   44228 	* tests/Makefile.am: Likewise.
   44229 	* tests/init.sh: Likewise.
   44230 	* tests/ptrace_setoptions: Likewise.
   44231 	* tests/strace-f: Likewise.
   44232 
   44233 2011-02-26  Dmitry V. Levin  <ldv (a] altlinux.org>
   44234 
   44235 	ppc, s390, sparc: regenerate ioctlent.h files.
   44236 	* linux/powerpc/ioctlent.h: Regenerated using Fedora 15 kernel headers.
   44237 	* linux/s390/ioctlent.h: Likewise.
   44238 	* linux/sparc/ioctlent.h: Likewise.
   44239 
   44240 	Remove redundant ioctlent.h files.
   44241 	* linux/s390x/ioctlent.h: Replace old contents with include of
   44242 	s390/ioctlent.h file.
   44243 	* linux/sparc64/ioctlent.h: Replace old contents with include of
   44244 	sparc/ioctlent.h file.
   44245 
   44246 2011-02-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   44247 
   44248 	ioctlsort: sync with ioctl_lookup()
   44249 	* linux/ioctlsort.c (main): Use NR and TYPE bits only, to sync with
   44250 	ioctl_lookup() which looks at these bits only.
   44251 
   44252 	Remove obsolete .cvsignore files.
   44253 	* test/.cvsignore: Rename to test/.gitignore.
   44254 	* */.cvsignore, */*/.cvsignore: Removed.
   44255 
   44256 	Ignore generated intermediate header files.
   44257 	* .gitignore: Add ioctls.h and ioctldefs.h.
   44258 
   44259 2011-02-24  Dmitry V. Levin  <ldv (a] altlinux.org>
   44260 
   44261 	Generate much of the CREDITS file from git log.
   44262 	* CREDITS.in: New file, derived from CREDITS, without names of
   44263 	those who are listed as git log 'Author:'s.
   44264 	* CREDITS: Remove file.
   44265 	* Makefile.am [MAINTAINER_MODE] (CREDITS): New rule.
   44266 	* .gitignore: Add CREDITS.
   44267 	* .mailmap: New file, required to map git author names and email
   44268 	addresses to canonical/preferred form.
   44269 
   44270 2011-02-23  Dmitry V. Levin  <ldv (a] altlinux.org>
   44271 
   44272 	sparc: fix compilation warning.
   44273 	* file.c [!HAVE_LONG_LONG_OFF_T] (realprintstat): Cast st_size
   44274 	to unsigned long.
   44275 
   44276 	Update the list of files that must be distributed.
   44277 	* Makefile.am (EXTRA_DIST): Add debian/source/format, debian/watch,
   44278 	linux/ia64/signalent.h, linux/powerpc/ioctlent1.h,
   44279 	linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h,
   44280 	linux/powerpc/signalent1.h.
   44281 
   44282 	Fix compilation warning reported by gcc -Wunused-but-set-variable.
   44283 	* process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable.
   44284 
   44285 2011-02-22  Mike Frysinger  <vapier (a] gentoo.org>
   44286 
   44287 	ioctlsort: zero pad ioctl codes to 4 places.
   44288 	Zero padding the ioctl number will allow simple sorting via shell scripts.
   44289 
   44290 	* linux/ioctlsort.c (main): Output ioctl codes zero padded.
   44291 	* linux/ioctlent.h: Regenerated.
   44292 
   44293 2011-02-22  Mike Frysinger  <vapier (a] gentoo.org>
   44294 
   44295 	Update mount flags to latest linux.
   44296 	* system.c (MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
   44297 	MS_STRICTATIME, MS_BORN): Define.
   44298 	(mount_flags): Add MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
   44299 	MS_STRICTATIME, MS_BORN.
   44300 
   44301 2011-02-22  Dmitry V. Levin  <ldv (a] altlinux.org>
   44302 
   44303 	Sync debian/changelog and strace.spec with packages.
   44304 	* debian/changelog: Sync with 4.5.20-2.
   44305 	* strace.spec: Likewise.
   44306 
   44307 2011-02-20  Dmitry V. Levin  <ldv (a] altlinux.org>
   44308 
   44309 	Add TRACE_DESC|TRACE_FILE flags to fanotify_* sysentries.
   44310 	* linux/*/syscallent.h: Add TD flag to fanotify_init.  Add TD|TF flags
   44311 	to fanotify_mark.
   44312 
   44313 	Fix flags of fallocate sysentries.
   44314 	* linux/*/syscallent.h: Fix sys_fallocate flags.
   44315 
   44316 	Add TRACE_DESC flag to epoll_create* sysentries.
   44317 	* linux/*/syscallent.h: Add TD flag to sys_epoll_create and
   44318 	sys_epoll_create1.
   44319 
   44320 	Add TRACE_DESC flag to fgetxattr, flistxattr, and fremovexattr sysentries
   44321 	* linux/*/syscallent.h: Add TD flag to sys_fgetxattr, sys_flistxattr,
   44322 	and fremovexattr.
   44323 
   44324 	Add TRACE_FILE flag to swapoff sysentries.
   44325 	* linux/*/syscallent.h: Add TF flag to sys_swapoff.
   44326 
   44327 	Add TRACE_DESC flag to fadvise64* sysentries.
   44328 	* linux/*/syscallent.h: Add TD flag to sys_fadvise64 and
   44329 	sys_fadvise64_64.
   44330 
   44331 	Add TRACE_DESC flag to mmap, mmap2, and old_mmap sysentries.
   44332 	* linux/*/syscallent.h: Add TD flag to sys_mmap and sys_old_mmap.
   44333 
   44334 	Do not initialize native_scno on platforms with only one personality.
   44335 	* linux/bfin/syscallent.h: Remove redundant native_scno initialization.
   44336 	* linux/m68k/syscallent.h: Likewise.
   44337 	* linux/microblaze/syscallent.h: Likewise.
   44338 
   44339 	Add LOOP_* ioctls defined in linux/loop.h.
   44340 	* linux/ioctlent.sh: Add LOOP_* ioctls (0x4C..) defined in linux/loop.h
   44341 	header file.
   44342 	* linux/ioctlent.h: Regenerated.
   44343 	Reported by Mike Frysinger.
   44344 
   44345 2011-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   44346 
   44347 	Fix PTRACE_GETEVENTMSG usage and enhance test_ptrace_setoptions()
   44348 	* strace.c (handle_ptrace_event): Fix PTRACE_GETEVENTMSG usage.
   44349 	(test_ptrace_setoptions): Test that PTRACE_GETEVENTMSG works properly.
   44350 
   44351 2011-02-19  Mike Frysinger  <vapier (a] gentoo.org>
   44352 
   44353 	linux/sparc: move to common syscall.h.
   44354 	Rather than constantly deal with the sparc/syscall.h going stale, merge
   44355 	the few sparc-specific pieces into the linux/syscall.h header.
   44356 
   44357 	* linux/syscall.h: Add sparc-specific pieces from sparc/syscall.h.
   44358 	* Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h and
   44359 	linux/sparc64/syscall.h.
   44360 	* linux/sparc/syscall.h, linux/sparc64/syscall.h: Deleted.
   44361 
   44362 2011-02-19  Mike Frysinger  <vapier (a] gentoo.org>
   44363 
   44364 	sparc: add new funcs to syscall.h.
   44365 	Sync missing defs from the common syscall.h here.
   44366 
   44367 	* linux/sparc/syscall.h: Add sys_setfsuid, sys_pread64, and
   44368 	sys_pwrite64 prototypes.
   44369 
   44370 2011-02-19  Mike Frysinger  <vapier (a] gentoo.org>
   44371 
   44372 	sparc: punt unused syscall.h.2.
   44373 	I can't find any mention of this header actually being used.
   44374 	Seems to be a really old copy of the common syscall.h.
   44375 
   44376 	* Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h.2.
   44377 	* linux/sparc/syscall.h.2: Deleted.
   44378 
   44379 2011-02-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   44380 
   44381 	Fix raw exit_group(2) decoding.
   44382 	* syscall.c (trace_syscall_entering): Check for sys_exit instead of
   44383 	SYS_exit to handle exit_group(2) as well as _exit(2).
   44384 
   44385 2011-02-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   44386 
   44387 	Optimize known_scno()
   44388 	* syscall.c (known_scno): Do not check for native_scno field on
   44389 	platforms that support only one personality.
   44390 
   44391 	* process.c (internal_exit) [IA64]: Remove redundant check.
   44392 
   44393 2011-02-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   44394 
   44395 	Fix biarch support in IO dumping.
   44396 	* syscall.c (dumpio): Switch on tcp->sys_func instead of tcp->scno
   44397 	for more reliable results.
   44398 
   44399 	Simplify tprintf() declaration.
   44400 	* defs.h (tprintf): Simplify declaration.
   44401 
   44402 2011-02-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   44403 
   44404 	* defs.h (SYSCALL_NEVER_FAILS): Fix typo.
   44405 
   44406 2011-01-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   44407 
   44408 	Fix decoding of get[ug]id, gete[ug]id and setfs[ug]id return values.
   44409 	* defs.h (SYSCALL_NEVER_FAILS): New syscall flag.
   44410 	* linux/dummy.h: Change redirection for sys_get[ug]id, sys_gete[ug]id
   44411 	and setfs[ug]id.
   44412 	* linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag for get[ug]id,
   44413 	gete[ug]id and setfs[ug]id syscalls.
   44414 	* process.c [LINUX] (sys_getuid, sys_setfsuid): New functions.
   44415 	* syscall.c (NF): New shorthand macro for use in syscallent.h files.
   44416 	(get_error): Check SYSCALL_NEVER_FAILS flag.
   44417 	Reported by   <socketpair (a] gmail.com>.
   44418 
   44419 	* linux/*/syscallent.h: Fix typo in sys_newfstatat syscall flags.
   44420 
   44421 2011-01-18  Mike Frysinger  <vapier (a] gentoo.org>
   44422 
   44423 	Blackfin: update ioctl list.
   44424 	* linux/bfin/ioctlent.h: Sync with latest kernel sources.
   44425 
   44426 2011-01-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   44427 
   44428 	Fix stat64 decoding on mips.
   44429 	* linux/mips/syscallent.h: Use sys_stat64() to decode stat64 syscall.
   44430 	This fixes Debian bug #599028.
   44431 
   44432 	Update linux/*/syscallent.h files to match Linux kernel v2.6.37.
   44433 	* linux/alpha/syscallent.h: Add hooks for fanotify_init, fanotify_mark,
   44434 	and prlimit64.
   44435 	* linux/i386/syscallent.h: Likewise.
   44436 	* linux/ia64/syscallent.h: Likewise.
   44437 	* linux/m68k/syscallent.h: Likewise.
   44438 	* linux/microblaze/syscallent.h: Likewise.
   44439 	* linux/mips/syscallent.h: Likewise.
   44440 	* linux/powerpc/syscallent.h: Likewise.
   44441 	* linux/s390/syscallent.h: Likewise.
   44442 	* linux/s390x/syscallent.h: Likewise.
   44443 	* linux/sh/syscallent.h: Likewise.
   44444 	* linux/sh64/syscallent.h: Likewise.
   44445 	* linux/sparc/syscallent.h: Likewise.
   44446 	* linux/x86_64/syscallent.h: Likewise.
   44447 	* linux/arm/syscallent.h: Add hooks for accept4, fanotify_init,
   44448 	fanotify_mark, and prlimit64.
   44449 	* linux/hppa/syscallent.h: Add hook for prlimit64.
   44450 
   44451 2011-01-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   44452 
   44453 	block.c: cleanup.
   44454 	* block.c: Include <inttypes.h>.
   44455 	(print_blkpg_req): Always decode struct blkpg_ioctl_arg.
   44456 	Robustify decoding of strings.
   44457 	(block_ioctl): Do not decode return values passed by pointers on exit
   44458 	from failed syscalls.
   44459 	Use format macros from inttypes.h to print values of type uint64_t.
   44460 
   44461 2011-01-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   44462 
   44463 	Add block ioctl support.
   44464 	* block.c: New file.
   44465 	* Makefile.am (strace_SOURCES): Add it.
   44466 	* defs.h [LINUX] (block_ioctl): New function.
   44467 	* ioctl.c (ioctl_decode) [LINUX]: Use it to decode HDIO_* and BLK*
   44468 	ioctls.
   44469 	Patch by Jeff Mahoney <jeffm (a] suse.com>
   44470 
   44471 2011-01-14  Holger Hans Peter Freyther  <zecke (a] selfish.org>
   44472 
   44473 	Parse SOL_SCTP socket options.
   44474 	* configure.ac (AC_CHECK_HEADERS): Add netinet/sctp.h.
   44475 	* net.c [HAVE_NETINET_SCTP_H]: Include <netinet/sctp.h>.
   44476 	[SOL_SCTP] (socksctpoptions): New xlat structure.
   44477 	(sys_getsockopt, printsockopt): Parse SOL_SCTP options.
   44478 
   44479 	* net.c (socketlayers): Add more SOL_* constants from linux/socket.h.
   44480 
   44481 2011-01-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   44482 
   44483 	strace.1: fix misleading italics.
   44484 	* strace.1: Use bold instead of italics for "-e trace=" keywords.
   44485 	This fixes Debian bug #589323.
   44486 
   44487 	Update linux/ioctlent.h.
   44488 	* linux/ioctlent.h: Regenerate using linux v2.6.37 headers.
   44489 
   44490 	Add HDIO_* ioctls defined in linux/hdreg.h.
   44491 	* linux/ioctlent.sh: Add HDIO_* ioctls (0x03..) defined in
   44492 	linux/hdreg.h header file.
   44493 	This fixes Debian bug #450953.
   44494 
   44495 2011-01-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   44496 
   44497 	Test PTRACE_O_TRACECLONE and PTRACE_O_TRACEVFORK along with PTRACE_O_TRACEFORK
   44498 	* strace.c (test_ptrace_setoptions): Add PTRACE_O_TRACECLONE and
   44499 	PTRACE_O_TRACEVFORK to PTRACE_SETOPTIONS call, to test exactly
   44500 	the same set of options that is going to be used later in trace().
   44501 
   44502 2011-01-10  Dmitry V. Levin  <ldv (a] altlinux.org>
   44503 
   44504 	* net.c (protocols): Add more IPPROTO_* constants defined in netinet/in.h
   44505 
   44506 2011-01-10  Holger Hans Peter Freyther  <holger (a] freyther.de>
   44507 
   44508 	* net.c (protocols): Add IPPROTO_GRE, IPPROTO_SCTP and IPPROTO_UDPLITE.
   44509 
   44510 2011-01-10  Carmelo AMOROSO  <carmelo.amoroso (a] st.com>
   44511 
   44512 	sh: Add entry for not-multiplexed accept4.
   44513 	* linux/sh/syscallent.h: Add specific entry for not-multiplexed accept4
   44514 	available in kernel mainline since v2.6.37-rc6, see
   44515 	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21b6e4c7106b2d68a6710506d8706608272fd78b
   44516 
   44517 2010-12-14  Carmelo AMOROSO  <carmelo.amoroso (a] st.com>
   44518 
   44519 	sh: Add entries for not-multiplexed socket calls.
   44520 	* linux/sh/syscallent.h: Add specific entries for not-multiplexed
   44521 	socket calls (available in kernel mainline since v2.6.37-rc1)
   44522 
   44523 	sh: Fix compilation warning in do_pipe due to missing prototype.
   44524 	* defs.h [SH]: Make getrval2 prototype visible to do_pipe
   44525 	and fix the following compiler warning:
   44526 	.../net.c: In function 'do_pipe':
   44527 	.../net.c:1632: warning: implicit declaration of function 'getrval2'
   44528 	.../net.c:1632: warning: format '%lu' expects type 'long unsigned int',
   44529 	but argument 3 has type 'int'
   44530 
   44531 2010-12-14  Dmitry V. Levin  <ldv (a] altlinux.org>
   44532 
   44533 	Fix build on uClibc.
   44534 	* defs.h [LINUX]: Define PTRACE_GETEVENTMSG macro.
   44535 	Patch by Douglas Mencken <dougmencken (a] gmail.com>.
   44536 
   44537 2010-12-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   44538 
   44539 	Fix strace -f -o '|command' hangup.
   44540 	* strace.c (main): Call test_ptrace_setoptions() before parsing
   44541 	-o option, otherwise a forked command will cause a hangup inside
   44542 	test_ptrace_setoptions().
   44543 
   44544 2010-12-03  Dmitry V. Levin  <ldv (a] altlinux.org>
   44545 
   44546 	Output diagnostics to stderr.
   44547 	* syscall.c (get_scno): Output information about changes in
   44548 	personality mode to stderr.  Reported by Pdraig Brady.
   44549 
   44550 	Recognize more clone flags.
   44551 	* process.c (CLONE_*): Define more flags from linux v2.6.25.
   44552 	(clone_flags): Add entries for them.
   44553 	Proposed by <zhangyanfei (a] cn.fujitsu.com>.
   44554 
   44555 	Decode struct ucred for getsockopt SO_PEERCRED.
   44556 	* net.c (sys_getsockopt): Decode SO_PEERCRED.
   44557 	Proposed by Arkadiusz Mikiewicz <arekm (a] maven.pl>.
   44558 
   44559 2010-12-03  Carmelo AMOROSO  <carmelo.amoroso (a] st.com>
   44560 
   44561 	sh: Add support for tracing sys_cacheflush system call.
   44562 	* linux/sh/syscallent.h: Update sys_cacheflush entry.
   44563 	* linux/syscall.h [SH] (sys_cacheflush): New function declaration.
   44564 	* system.c [SH] (cacheflush_flags): New xlat structure.
   44565 	[SH] (sys_cacheflush): New function.
   44566 
   44567 	Reviewed-by: Angelo Castello <angelo.castello (a] st.com>
   44568 
   44569 2010-11-30  Dmitry V. Levin  <ldv (a] altlinux.org>
   44570 
   44571 	Cleanup test_ptrace_setoptions()
   44572 	* strace.c (test_ptrace_setoptions): Cleanup.
   44573 	(main): Fix test_ptrace_setoptions() error diagnostics message.
   44574 	Print ptrace_setoptions value in debug mode.
   44575 
   44576 2010-11-30  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44577 
   44578 	Handle followfork using ptrace_setoptions if available.
   44579 	If PTRACE_O_TRACECLONE et al options are supported by kernel,
   44580 	use them to do followfork rather than the original setbpt
   44581 	method that changes registers ourselves.
   44582 
   44583 	* defs.h [LINUX] (handle_new_child): New function prototype.
   44584 	* process.c [LINUX] (handle_new_child): New function based on the
   44585 	code from internal_fork(), with a trivial change: do reparent only
   44586 	for sys_clone.
   44587 	[LINUX] (internal_fork): Use handle_new_child().  Do nothing if
   44588 	ptrace_setoptions is in effect.
   44589 	* strace.c [LINUX] (handle_ptrace_event): New function.
   44590 	[LINUX] (trace): If ptrace_setoptions is in effect, then
   44591 	call the new function to handle PTRACE_EVENT_* status, and
   44592 	set PTRACE_SETOPTIONS when we see the initial stop of tracee.
   44593 
   44594 2010-11-30  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44595 
   44596 	Test how PTRACE_SETOPTIONS support works.
   44597 	Currently test fork related options only.  Fork a child that uses
   44598 	PTRACE_TRACEME at startup and then does a fork so strace can test
   44599 	how the PTRACE_SETOPTIONS support works before it handles any real
   44600 	tracee.  Since PTRACE_O_TRACECLONE/*FORK were introduced to kernel
   44601 	at the same time, this test seems to be enough for these 3 options.
   44602 
   44603 	* defs.h [LINUX]: Define PTRACE_O_TRACECLONE et al macros here.
   44604 	(ptrace_setoptions): New variable declaration.
   44605 	* strace.c [LINUX] (test_ptrace_setoptions): New function, tests
   44606 	whether kernel supports PTRACE_O_CLONE/*FORK, the result is stored
   44607 	in the new variable ptrace_setoptions for later use.
   44608 	(main): Call test_ptrace_setoptions() if followfork option is set.
   44609 
   44610 2010-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   44611 
   44612 	Enable support for less verbose build rules.
   44613 	* configure.ac (AM_INIT_AUTOMAKE): Add silent-rules.
   44614 
   44615 2010-09-17  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44616 
   44617 	Do not trace children cloned with CLONE_UNTRACED flag.
   44618 	If clone is called with flag CLONE_UNTRACED, to be consistent with
   44619 	option PTRACE_O_TRACECLONE, we should not set CLONE_PTRACE flag on
   44620 	its arguments.
   44621 
   44622 	* process.c [LINUX] (internal_fork): Check the syscall and arguments.
   44623 
   44624 2010-09-17  Dmitry V. Levin  <ldv (a] altlinux.org>
   44625 
   44626 	Update the list of CLOCK_* constants to match Linux kernel v2.6.32+
   44627 	* time.c (struct xlat clocknames[]): Add more RT clock IDs.
   44628 	Reported by Tommi Rantala.
   44629 
   44630 2010-09-16  Dmitry V. Levin  <ldv (a] altlinux.org>
   44631 
   44632 	Update linux/hppa/syscallent.h to match Linux kernel v2.6.35.
   44633 	* linux/hppa/syscallent.h: Add hooks for recvmmsg and accept4.
   44634 
   44635 2010-09-15  Dmitry V. Levin  <ldv (a] altlinux.org>
   44636 
   44637 	Pass less information to qualify_one and qual_*
   44638 	* syscall.c (qualify_one, qual_syscall, qual_signal, qual_fault,
   44639 	qual_desc): Take just a bitflag argument instead of pointer to the whole
   44640 	qual_options structure.
   44641 	(struct qual_options): Update prototype of "qualify" field.
   44642 	(qualify): Update use of qualify_one and qual_options->qualify.
   44643 
   44644 2010-09-15  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44645 
   44646 	Fix -e option with only one value in qualifier statement.
   44647 	Fix regression introduced by commit v4.5.20-19-g30145dd:
   44648 	if -e option is used with only one value in qualifier statement,
   44649 	e.g. 'strace -e trace=open ls', syscall information would not be
   44650 	printed properly.
   44651 
   44652 	* syscall.c (qualify): Remove faulty optimization.
   44653 
   44654 2010-09-15  Mike Frysinger  <vapier (a] gentoo.org>
   44655 
   44656 	Fix off_t/rlim_t size checks when cross-compiling.
   44657 	The current off_t/rlim_t size checks (wrt size of long long) use AC_RUN
   44658 	which obviously doesn't work when cross-compiling.  While we don't hit
   44659 	any configure errors, the fall back code is pretty dumb (which is to say
   44660 	there isn't any).  Considering the code in question though, we can use
   44661 	some fun compiler tricks with sizeof and array lengths to turn it into
   44662 	a pure build test and avoid the RUN issue completely.
   44663 
   44664 	* m4/long_long.m4 (AC_OFF_T_IS_LONG_LONG, AC_RLIM_T_IS_LONG_LONG):
   44665 	Convert from AC_RUN_IFELSE to AC_COMPILE_IFELSE.
   44666 
   44667 2010-09-15  Mike Frysinger  <vapier (a] gentoo.org>
   44668 
   44669 	Fix long long little endian detection when cross-compiling.
   44670 	The long long endian detection code does an AC_TRY_RUN() and since that
   44671 	doesn't work when cross-compiling, it sets a fallback value.  However,
   44672 	rather than do any sort of default endian detection, the code simply
   44673 	sets it to "no".  This probably breaks most little endian systems out
   44674 	there when cross-compiling for them.  It certainly breaks Blackfin
   44675 	systems.  So use the common endian detection code provided by autoconf
   44676 	and key off of that when cross-compiling.
   44677 
   44678 	* configure.ac: Call AC_C_BIGENDIAN.
   44679 	* m4/long_long.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Set cross-compiling
   44680 	logic based on ac_cv_c_bigendian.
   44681 
   44682 2010-09-15  Mike Frysinger  <vapier (a] gentoo.org>
   44683 
   44684 	Blackfin: decode new syscalls.
   44685 	* linux/bfin/syscallent.h: Add fanotify/prlimit/cacheflush syscalls.
   44686 	* linux/syscall.h: Add sys_cacheflush() decl.
   44687 	* system.c: Decode Blackfin's cacheflush syscall.
   44688 
   44689 	* linux/ioctlent.sh: Search a few non-exported paths.
   44690 
   44691 2010-09-15  Roland McGrath  <roland (a] redhat.com>
   44692 
   44693 	Clean up pid2tcb usage.
   44694 	* strace.c (pid2tcb): Always match pid.  Fail for argument <= 0.
   44695 	[USE_PROCFS] (first_used_tcb): New function.
   44696 	[USE_PROCFS] (trace): Use that instead of pid2tcb(0).
   44697 
   44698 2010-09-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   44699 
   44700 	Turn on more compiler warnings.
   44701 	* configure.ac: Enable gcc -Wwrite-strings.
   44702 
   44703 	Import warnings.m4 from gnulib.
   44704 	* m4/warnings.m4: Replace with warnings.m4 from gnulib.
   44705 	* configure.ac: Use gl_WARN_ADD from new warnings.m4.
   44706 	* Makefile.am (AM_CFLAGS): Update for new warnings.m4.
   44707 
   44708 	Split acinclude.m4.
   44709 	* Makefile.am (ACLOCAL_AMFLAGS): Add "-I m4".
   44710 	* acinclude.m4: Remove.
   44711 	* m4/includedir.m4: New file, with definition of AC_INCLUDEDIR from
   44712 	acinclude.m4.
   44713 	* m4/long_long.m4: New file, with definitions of AC_OFF_T_IS_LONG_LONG,
   44714 	AC_RLIM_T_IS_LONG_LONG and AC_LITTLE_ENDIAN_LONG_LONG from acinclude.m4.
   44715 	* m4/procfs.m4: New file, with definitions of AC_MP_PROCFS,
   44716 	AC_POLLABLE_PROCFS and AC_STRUCT_PR_SYSCALL from acinclude.m4.
   44717 	* m4/stat.m4: New file, with definition of AC_STAT64 from acinclude.m4.
   44718 	* m4/statfs.m4: New file, with definition of AC_STATFS64 from
   44719 	acinclude.m4.
   44720 	* m4/warnings.m4: New file, with definition of AC_WARNFLAGS from
   44721 	acinclude.m4.
   44722 
   44723 	* process.c (sys_waitid): Remove unused variable.
   44724 
   44725 2010-09-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   44726 
   44727 	Fix const-correctness issues uncovered by gcc -Wwrite-strings.
   44728 	* defs.h (struct xlat): Add const qualifier to the field of
   44729 	type "char *".
   44730 	(set_sortby, qualify, printnum, printnum_int): Add const qualifier to
   44731 	arguments of type "char *".
   44732 	* count.c (set_sortby): Add const qualifier to the argument and
   44733 	automatic variable of type "char *".
   44734 	* desc.c (decode_select): Add const qualifier to automatic variables of
   44735 	type "char *".
   44736 	* ioctlsort.c (struct ioctlent): Add const qualifier to fields of
   44737 	type "char *".
   44738 	(main):  Add const qualifier to argv.
   44739 	* process.c (printargv): Add const qualifier to the argument and
   44740 	automatic variable of type "char *".
   44741 	(printargc) Add const qualifier to argument of type "char *".
   44742 	* signal.c (sprintsigmask, parse_sigset_t): Add const qualifier to
   44743 	arguments of type "char *".
   44744 	* strace.c (progname): Add const qualifier.
   44745 	(detach): Add const qualifier to automatic variable of type "char *".
   44746 	* stream.c (struct strbuf): Add const qualifier to the field of
   44747 	type "char *".
   44748 	* syscall.c (struct qual_options): Add const qualifier to fields of
   44749 	type "char *".
   44750 	(qual_syscall, qual_fault, qual_desc, lookup_class): Add const qualifier
   44751 	to arguments of type "char *".
   44752 	(qual_signal): Add const qualifier to the argument of type "char *",
   44753 	avoid modification of constant argument.
   44754 	(qualify): Likewise.
   44755 	* util.c (printflags): Add const qualifier to automatic variable of
   44756 	type "char *".
   44757 	(printnum, printnum_int): Add const qualifier to arguments of
   44758 	type "char *".
   44759 
   44760 2010-09-04  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44761 
   44762 	Fix printing clone flags.
   44763 	When we trace clone() syscall with only exit signal as clone
   44764 	flags, strace would print an unnecessary OR operator.
   44765 
   44766 	* process.c (sys_clone): Fix this.
   44767 
   44768 2010-08-28  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44769 
   44770 	Drop nclone_detached and related flags.
   44771 	Remove nclone_detached since CLONE_DETACHED flag was no-op for a very
   44772 	long time in kernel.
   44773 
   44774 	* defs.h (struct tcb): Remove nclone_detached field.
   44775 	Remove TCB_CLONE_DETACHED flag.
   44776 	* process.c: Remove CLONE_DETACHED flag.
   44777 	(clone_flags): Remove CLONE_DETACHED entry.
   44778 	(internal_fork, internal_wait): Remove code dealing with CLONE_DETACHED
   44779 	flag and nclone_detached.
   44780 	* strace.c (startup_attach, alloc_tcb, droptcb, handle_group_exit):
   44781 	Likewise.
   44782 
   44783 2010-08-09  Neil Campbell  <lists (a] thebatcave.org.uk>
   44784 
   44785 	Correct get/set_robust_list syscall numbers for powerpc.
   44786 	* linux/powerpc/syscallent.h: Swap positions of get_ and set_robust_list.
   44787 
   44788 2010-08-09  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44789 
   44790 	Handle CLONE_PARENT flag.
   44791 	* process.c (internal_fork): The parent of new cloned process is the
   44792 	same of the calling process when CLONE_PARENT is set.
   44793 
   44794 	Fix error when judging if process has children.
   44795 	* process.c (internal_wait): Processes counted in tcp->nclone_threads
   44796 	are tcp's threads, rather than tcp's children.
   44797 
   44798 2010-08-09  Wang Chao  <wang.chao (a] cn.fujitsu.com>
   44799 
   44800 	Forbid using mutually exclusive options -D and -p together.
   44801 	If we use -D and -p option together to trace a multi-thread program, in
   44802 	addition to the main thread, other threads could not be traced even if we
   44803 	present -f option. Moreover, when executing 'strace -D -p <non-exist pid>',
   44804 	strace could not terminate normally.
   44805 
   44806 	* strace.c (main): Check it.
   44807 
   44808 2010-08-05  David Daney  <ddaney (a] caviumnetworks.com>
   44809 
   44810 	Update Linux MIPS syscalls to match 2.6.35-rc6+
   44811 	* linux/mips/syscallent.h: Add and update 405 hooks.
   44812 
   44813 2010-08-05  Edgar E. Iglesias  <edgar.iglesias (a] gmail.com>
   44814 
   44815 	Add support for the MicroBlaze architecture.
   44816 	* configure.ac: Recognize MicroBlaze.
   44817 	* linux/microblaze/syscallent.h: New file.
   44818 	* Makefile.am (EXTRA_DIST): Add linux/microblaze/syscallent.h
   44819 	* process.c (change_syscall, struct_user_offsets): Add MicroBlaze
   44820 	support.
   44821 	* signal.c (sys_sigreturn): Likewise.
   44822 	* syscall.c (internal_syscall, get_scno, syscall_fixup, get_error,
   44823 	syscall_enter): Likewise.
   44824 
   44825 2010-08-05  Frederik Schler  <fs (a] debian.org>
   44826 
   44827 	linux/sparc: add missing syscall declarations.
   44828 	* linux/sparc/syscall.h: Sync with linux/syscall.h
   44829 
   44830 2010-07-17  Andreas Schwab  <schwab (a] linux-m68k.org>
   44831 
   44832 	Handle biarch get/setrlimit.
   44833 	* resource.c (print_rlimit32) [POWERPC64 || X86_64]: Define.
   44834 	(sys_getrlimit, sys_setrlimit) [POWERPC64 || X86_64]: Use it.
   44835 
   44836 2010-07-13  Andreas Schwab  <schwab (a] linux-m68k.org>
   44837 
   44838 	Add biarch support for powerpc64.
   44839 	* acinclude.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Use int instead of
   44840 	long.
   44841 	* configure.ac [$host_cpu = powerpc*]: Also define POWERPC64 if
   44842 	$host_cpu = powerpc64.
   44843 	* defs.h (SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE)
   44844 	(PERSONALITY1_WORDSIZE) [POWERPC64]: Define.
   44845 	* file.c: (struct stat_powerpc32, printstat_powerpc32) [POWERPC64]:
   44846 	Define.
   44847 	(printstat) [LINUX && POWERPC64]: Use printstat_powerpc32 in
   44848 	32-bit personality.
   44849 	(sys_newfstatat) [POWERPC64]: Handle personalities.
   44850 	* signal.c (sys_sigreturn) [POWERPC64]: Likewise.
   44851 	* util.c (printllval) [POWERPC64]: Likewise.
   44852 	(printcall) [POWERPC64]: Use wider format for IP prefix.
   44853 	* syscall.c (get_scno) [POWERPC64]: Check for 64/32 bit mode.
   44854 	* linux/powerpc/errnoent1.h: New file.
   44855 	* linux/powerpc/ioctlent1.h: New file.
   44856 	* linux/powerpc/signalent1.h: New file.
   44857 	* linux/powerpc/syscallent1.h: New file.
   44858 
   44859 2010-07-09  Andreas Schwab  <schwab (a] redhat.com>
   44860 
   44861 	Balance braces.
   44862 	* strace.c (proc_open): Avoid unbalanced braces.
   44863 	(trace): Likewise.
   44864 
   44865 2010-07-06  Andreas Schwab  <schwab (a] linux-m68k.org>
   44866 
   44867 	Remove extern declaration at file scope.
   44868 	* defs.h (force_result): Declare.
   44869 	* process.c (internal_wait): Don't declare force_result.
   44870 
   44871 2010-06-24  Andreas Schwab  <schwab (a] redhat.com>
   44872 
   44873 	Document -C/-D.
   44874 	* strace.c (usage): Document -C.
   44875 	* strace.1: Document -D.
   44876 
   44877 2010-06-13  Roland McGrath  <roland (a] redhat.com>
   44878 
   44879 	Fix sourceforge download URL.
   44880 
   44881 2010-06-05  Andreas Schwab  <schwab (a] linux-m68k.org>
   44882 
   44883 	M68K: Fix fetching syscall arguments.
   44884 	* syscall.c (syscall_enter) [M68K]: Properly handle more than five
   44885 	syscall arguments.
   44886 
   44887 2010-05-28  Andreas Schwab  <schwab (a] linux-m68k.org>
   44888 
   44889 	Decode TLS syscalls on m68k.
   44890 	* linux/m68k/syscallent.h: Add entries for get_thread_area,
   44891 	set_thread_area, atomic_comxchg_32, atomic_barrier.
   44892 	* linux/dummy.h (sys_get_thread_area, sys_set_thread_area) [M68K]:
   44893 	Don't redefine.
   44894 	* mem.c (sys_get_thread_area, sys_set_thread_area) [LINUX && M68K]: New.
   44895 
   44896 	Fix warning when compiling for m68k.
   44897 	* syscall.c (d0): Define as long.
   44898 
   44899 2010-04-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   44900 
   44901 	Prepare for 4.5.20 release.
   44902 	* NEWS: Update for 4.5.20 release.
   44903 	* configure.ac: Version 4.5.20.
   44904 	* debian/changelog: 4.5.20-1.
   44905 	* strace.spec: 4.5.20-1.
   44906 
   44907 2010-04-13  Frederik Schler  <fs (a] debian.org>
   44908 
   44909 	Update debian/* files for the upcoming release.
   44910 	* debian/control: update standards-version to 3.8.4.
   44911 	* debian/rules: allow parallel building.
   44912 	* debian/rules: comment out verbose build, only needed for debugging.
   44913 	* debian/rules: clean up clean: target, dh_clean does most of the work
   44914 	  already.
   44915 	* debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy
   44916 	  up for us.
   44917 
   44918 2010-04-13  Heiko Carstens  <heiko.carstens (a] de.ibm.com>
   44919 
   44920 	Fix s390 system call table list.
   44921 	* linux/s390/syscallent.h: Add the missing entries for preadv and
   44922 	pwritev to the system call table list.
   44923 	* linux/s390x/syscallent.h: Likewise.
   44924 
   44925 2010-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   44926 
   44927 	Update linux/ioctlent.h.
   44928 	* linux/ioctlent.sh: Search in asm-generic directory as well.
   44929 	* linux/ioctlent.h: Regenerated.
   44930 
   44931 	Update linux/*/syscallent.h files to match Linux kernel v2.6.33.
   44932 	* linux/alpha/syscallent.h: Add 47 hooks.
   44933 	* linux/arm/syscallent.h: Update hooks for pselect6, ppoll,
   44934 	epoll_pwait.  Add 11 hooks.
   44935 	* linux/bfin/syscallent.h: Update hooks for prctl, fallocate,
   44936 	signalfd4, eventfd2, epoll_create1, dup3, pipe2, perf_event_open.
   44937 	Hook up recvmmsg.
   44938 	* linux/hppa/syscallent.h: Update hooks for signalfd4, eventfd2,
   44939 	epoll_create1, dup3, pipe2, perf_event_open.
   44940 	* linux/i386/syscallent.h: Fix syscall name for the kexec_load hook.
   44941 	Add 5 hooks.
   44942 	* linux/ia64/syscallent.h: Fix syscall name for the kexec_load hook.
   44943 	Add 4 hooks.
   44944 	* linux/m68k/syscallent.h: Add 50 hooks.
   44945 	* linux/powerpc/syscallent.h: Fix hook for timerfd_create.  Fix
   44946 	6 syscall names to match the kernel.  Use sys_semop to parse semop.
   44947 	Add 14 hooks.
   44948 	* linux/s390/syscallent.h: Fix syscall name for the kexec_load hook.
   44949 	Add 14 hooks.
   44950 	* linux/s390x/syscallent.h: Likewise.
   44951 	* linux/sh/syscallent.h: Add 13 hooks.
   44952 	* linux/sh64/syscallent.h: Add 15 hooks.
   44953 	* linux/sparc/syscallent.h: Add 22 hooks.
   44954 	* linux/x86_64/syscallent.h: Add 5 hooks.
   44955 
   44956 	Enhance recvmmsg parser.
   44957 	* net.c (sys_recvmmsg): Decode mmsghdr structure on exit from the
   44958 	syscall.  Decode timespec structure both on entrance and on exit.
   44959 
   44960 2010-04-07  Andreas Schwab  <schwab (a] linux-m68k.org>
   44961 
   44962 	Decode recvmmsg syscall.
   44963 	* net.c (do_msghr): New function to print struct msghdr.
   44964 	(printmsghdr): Use it.
   44965 	(printmmsghdr, sys_recvmmsg): New.
   44966 	* linux/syscall.h: Declare sys_recvmmsg.
   44967 	(SYS_sub_recvmmsg): Define.
   44968 	(SYS_socket_nsubcalls): Bump.
   44969 	* linux/sparc/syscall.h: Likewise.
   44970 	* linux/arm/syscallent.h: Add sys_recvmmsg.
   44971 	* linux/bfin/syscallent.h: Likewise.
   44972 	* linux/i386/syscallent.h: Likewise.
   44973 	* linux/m68k/syscallent.h: Likewise.
   44974 	* linux/powerpc/syscallent.h: Likewise.
   44975 	* linux/s390/syscallent.h: Likewise.
   44976 	* linux/s390x/syscallent.h: Likewise.
   44977 	* linux/sh/syscallent.h: Likewise.
   44978 	* linux/sh64/syscallent.h: Likewise.
   44979 	* linux/sparc/syscallent.h: Likewise.
   44980 	* linux/ia64/syscallent.h: Adjust.
   44981 
   44982 2010-04-07  Dmitry V. Levin  <ldv (a] altlinux.org>
   44983 
   44984 	* strace.1: Fix quoting of hyphens and formatting of strace options.
   44985 
   44986 	Split trace_syscall() for better readability.
   44987 	* syscall.c (trace_syscall): Split into trace_syscall_exiting() and
   44988 	trace_syscall_entering().
   44989 
   44990 	Implement -C option to combine regular and -c output.
   44991 	* defs.h (cflag_t): New enum.
   44992 	* strace.1: Document -C option.
   44993 	* strace.c (cflag): Update type.
   44994 	(main): Handle -C option.
   44995 	(trace): Update use of cflag.
   44996 	* count.c (count_syscall): Move clearing of TCB_INSYSCALL to ...
   44997 	* syscall.c (trace_syscall): ... here.  Update use of cflag.
   44998 	Based on patch by Adrien Kunysz.
   44999 
   45000 	Fix "make dist" regression introduced by commit v4.5.19-12-g5078770.
   45001 	* Makefile.am (EXTRA_DIST): Rename linux/syscallent.h to linux/i386/syscallent.h
   45002 
   45003 	* desc.c (sys_epoll_pwait): Fix output formatting bug.
   45004 
   45005 	* desc.c (decode_select): Fix potential stack buffer overflow.
   45006 
   45007 2010-03-31  Dmitry V. Levin  <ldv (a] altlinux.org>
   45008 
   45009 	Fix msgsnd indirect ipccall decoding.
   45010 	This regression was introduced by commit v4.5.18-136-g783f5bc.
   45011 	* ipc.c (tprint_msgsnd): Add and use "flags" argument.
   45012 	(sys_msgsnd): Pass "flags" argument to tprint_msgsnd().
   45013 	Patch by Anton Blanchard.
   45014 
   45015 2010-03-23  Mark Wielaard  <mjw (a] redhat.com>
   45016 
   45017 	Hook up inotify_init1 open mode flags printer.
   45018 	* file.c [LINUX] (sys_inotify_init1): New function.
   45019 	* linux/syscall.h: Declare new sys_inotify_init1 handler.
   45020 	* linux/bfin/syscallent.h: Hook up new handler.
   45021 	* linux/hppa/syscallent.h: Likewise.
   45022 	* linux/i386/syscallent.h: Likewise.
   45023 	* linux/x86_64/syscallent.h: Likewise.
   45024 
   45025 2010-03-09  Andreas Schwab  <schwab (a] redhat.com>
   45026 
   45027 	Avoid spurious error when checking for linux/netlink.h.
   45028 	* configure.ac: Include <asm/types.h> when checking for
   45029 	linux/netlink.h.
   45030 
   45031 2010-02-23  Andreas Schwab  <schwab (a] linux-m68k.org>
   45032 
   45033 	Fix reporting signal mask by sigreturn on powerpc.
   45034 	* signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
   45035 	locating signal context.
   45036 
   45037 2010-02-09  David Daney  <ddaney (a] caviumnetworks.com>
   45038 
   45039 	Fix MIPS N32/N64 compile error.
   45040 	* syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
   45041 	tcp->pid to ptrace().
   45042 
   45043 2010-02-05  Chris Metcalf  <cmetcalf (a] tilera.com>
   45044 
   45045 	Add support for the TILE architecture.
   45046 	* configure.ac: Add TILE to the list of supported architectures.
   45047 	* defs.h: Define TCB_WAITEXECVE for TILE.
   45048 	* linux/tile/syscallent.h: New file.
   45049 	* Makefile.am (EXTRA_DIST): Add linux/tile/syscallent.h
   45050 	* process.c (change_syscall, struct_user_offsets): Add TILE support.
   45051 	* syscall.c (get_scno, get_error, syscall_enter): Likewise.
   45052 	* mem.c (mmap_flags, print_mmap): Add MAP_CACHE_xxx TILE extensions
   45053 	support.
   45054 	* signal.c (sigact_flags): Add SA_NOPTRACE.
   45055 	(sys_sigreturn): Add TILE support.
   45056 
   45057 2010-02-04  Dmitry V. Levin  <ldv (a] altlinux.org>
   45058 
   45059 	Remove dead code.
   45060 	* defs.h (tv_tv): Remove.
   45061 	* net.c (sys_xsetsockaddr): Remove commented out dead code.
   45062 	* process.c (setarg, sys_execv, sys_execve, struct_user_offsets):
   45063 	Likewise.
   45064 	* signal.c (sys_sigsuspend): Likewise.
   45065 	* strace.c (reaper, trace): Likewise.
   45066 	* stream.c (internal_stream_ioctl): Likewise.
   45067 	* syscall.c (trace_syscall): Likewise.
   45068 	* term.c (term_ioctl): Likewise.
   45069 	* util.c (tv_tv, umoven, uload, getpc, fixvfork, setbpt, clearbpt):
   45070 	Likewise.
   45071 
   45072 	Merge Linux internal_clone() into internal_fork()
   45073 	* defs.h (internal_clone): Remove.
   45074 	* process.c (internal_clone): Merge into internal_fork().
   45075 	(internal_fork) [!LINUX]: Remove dead code.
   45076 	* syscall.c (internal_syscall): Replace internal_clone() with
   45077 	internal_fork().
   45078 
   45079 	* Makefile.am (INCLUDES): Remove redundant search directories.
   45080 
   45081 2010-02-04  Frederik Schler  <fs (a] debian.org>
   45082 
   45083 	Update debian/* files.
   45084 	* debian/control: add sparc64 to the architectures list.
   45085 	This closes Debian bug #560062
   45086 	* Backport commit f0df31e71a58c6e79ba77c1a9d84b2f38d44bec7 to fix FTBFS.
   45087 	This closes Debian bug #560516
   45088 	* debian/control: Update standards-version to 3.8.3.
   45089 	* debian/control: Lower package priority to optional, matching
   45090 	the archive override.
   45091 	* debian/control: add ${misc:Depends} to Depends: lines where
   45092 	appropriate.
   45093 	* debian/watch: new file, allows automatic tracking of new
   45094 	upstream versions.
   45095 	* debian/source/format: new file, adapt to debian source format "quilt"
   45096 	* debian/rules: indentation cleanups; use dh_testroot and dh_prep
   45097 	in clean target.
   45098 
   45099 2010-01-25  Andreas Schwab  <schwab (a] redhat.com>
   45100 
   45101 	Fix spurious failure of AC_STAT64 test.
   45102 	* acinclude.m4 (AC_STAT64): Include <sys/types.h> first.
   45103 
   45104 2010-01-12  Andreas Schwab  <schwab (a] redhat.com>
   45105 
   45106 	Don't kill the process when detaching.
   45107 	* strace.c (detach): Call clearbpt when TCB_BPTSET is set.
   45108 
   45109 2009-12-25  Dmitry V. Levin  <ldv (a] altlinux.org>
   45110 
   45111 	Decode fifth argument of mremap syscall.
   45112 	* mem.c (sys_mremap): Decode fifth argument.
   45113 	* linux/*/syscallent.h: Update the number of mremap syscall arguments.
   45114 
   45115 2009-12-24  Chris Metcalf  <cmetcalf (a] tilera.com>
   45116 
   45117 	* mem.c (sys_mbind): Display first argument in hex.
   45118 
   45119 	* mem.c (mremap_flags): Add MREMAP_FIXED.
   45120 
   45121 2009-11-16  Mike Frysinger  <vapier (a] gentoo.org>
   45122 
   45123 	Move i386-specific files out of common linux dir.
   45124 	* linux/syscallent.h: Moved to ...
   45125 	* linux/i386/syscallent.h: ... here.
   45126 	* linux/ia64/syscallent.h: Update i386 syscallent.h include.
   45127 	* linux/sparc/gen.pl: Likewise.
   45128 	* linux/x86_64/syscallent1.h: Likewise.
   45129 
   45130 2009-11-16  Andreas Schwab  <schwab (a] redhat.com>
   45131 
   45132 	Remove support for pre-C89.
   45133 	* defs.h: Remove references to __STDC__ and P macros.
   45134 	* strace.c: Likewise.
   45135 
   45136 2009-11-13  Dmitry V. Levin  <ldv (a] altlinux.org>
   45137 
   45138 	Decode more SOL_PACKET socket options.
   45139 	* net.c (sockpacketoptions): Add more PACKET_* entries.
   45140 	(sys_getsockopt): Decode PACKET_STATISTICS.
   45141 	(printsockopt): Decode PACKET_RX_RING and PACKET_TX_RING.
   45142 	Patch by Gabor Gombas.
   45143 
   45144 2009-11-11  Andreas Schwab  <schwab (a] redhat.com>
   45145 
   45146 	Ignore errors if a thread is killed.
   45147 	* util.c (clearbpt): Ignore ESRCH error.
   45148 
   45149 2009-11-06  Bernhard Reutner-Fischer  <rep.dot.nop (a] gmail.com>
   45150 
   45151 	Fix handling of Linux systems without struct statfs64.
   45152 	* acinclude.m4 (AC_STATFS64): New macro to check for struct statfs64.
   45153 	* configure.ac: Call AC_STATFS64.
   45154 	* file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Compile only
   45155 	  if struct statfs64 is available.
   45156 
   45157 2009-11-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   45158 
   45159 	Fix getsockopt decoding on architectures where sizeof(long) > sizeof(int)
   45160 	* net.c (sys_getsockopt): Optimize output a bit.
   45161 	Decode integer argument using printnum_int(), patch by Gabor Gombas.
   45162 
   45163 	Check umove() return code.
   45164 	* bjm.c (sys_query_module): Print input parameters when entering
   45165 	syscall.  Fix handling of syscall error.  Handle unlikely umove()
   45166 	failures.
   45167 	* ipc.c (tprint_msgrcv): New function.  Move part of msgrcv parser code
   45168 	here, add check umove() return code.
   45169 	(sys_msgsnd): Print msqid parameter as int instead of long.
   45170 	(sys_msgrcv): Likewise.  Use tprint_msgrcv().
   45171 	* process.c (print_affinitylist): Check umove() return code.
   45172 	* sock.c (sock_ioctl): Handle unlikely umove() failure in the
   45173 	SIOCGIFCONF parser.
   45174 
   45175 	Fix check for linux/netlink.h on Linux 2.6.32-rc5+
   45176 	* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include
   45177 	sys/socket.h instead of linux/socket.h beforehand.
   45178 
   45179 2009-11-04  Andreas Schwab  <schwab (a] redhat.com>
   45180 
   45181 	Decode fallocate on PowerPC.
   45182 	* linux/powerpc/syscallent.h: Decode fallocate.
   45183 
   45184 	Factor out printing of 64bit syscall argument.
   45185 	* defs.h (ALIGN64): Remove.
   45186 	(printllval): Declare.
   45187 	* util.c (printllval): Define.
   45188 	* file.c (sys_readahead): Use printllval.
   45189 	(sys_lseek64): Likewise.
   45190 	(sys_truncate64): Likewise.
   45191 	(sys_ftruncate64): Likewise.
   45192 	(sys_fadvise64): Likewise.
   45193 	(sys_fadvise64_64): Likewise.
   45194 	(sys_fallocate): Likewise.
   45195 	* io.c (sys_pread): Likewise.
   45196 	(sys_pwrite): Likewise.
   45197 	(sys_pread64): Likewise.
   45198 	(sys_pwrite64): Likewise.
   45199 	* mem.c (sys_mmap64): Likewise.
   45200 
   45201 2009-11-03  Andreas Schwab  <schwab (a] redhat.com>
   45202 
   45203 	Correct decoding of readahead and fadvice64(_64) on PowerPC.
   45204 	* file.c (sys_readahead): Align 64bit argument.  Handle PowerPC64
   45205 	like other 64bit architectures.
   45206 	(sys_fadvise64): Likewise.
   45207 	(sys_fadvise64_64): Handle PowerPC like ARM.
   45208 	* linux/powerpc/syscallent.h (sys_readahead): Account for 64bit
   45209 	argument alignment on PowerPC32.
   45210 
   45211 2009-10-27  Andreas Schwab  <schwab (a] redhat.com>
   45212 
   45213 	Maintain separate print column for each process.
   45214 	* defs.h (struct tcp): Add curcol.
   45215 	* strace.c: (alloc_tcb): Initialize it.
   45216 	(trace): Use curcol from current process and save it before
   45217 	continuing.
   45218 	(tprintf): Don't modify curcol on output error.
   45219 
   45220 2009-10-21  Roland McGrath  <roland (a] redhat.com>
   45221 
   45222 	* strace.spec: 4.5.19-1 release.
   45223 
   45224 2009-10-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   45225 
   45226 	* file.c (printstat64): Cleanup trailing whitespace.
   45227 
   45228 2009-10-16  Andreas Schwab  <schwab (a] redhat.com>
   45229 
   45230 	Fix decoding of newfstatat syscall on x86-64.
   45231 	* file.c (printstat64) [LINUX && X68_64]: If tracing a 64-bit
   45232 	process redirect to printstat.
   45233 	Fixes RH#529316 "Field values shown for "newfstatat" system
   45234 	call are incorrect"
   45235 
   45236 2009-10-12  Dmitry V. Levin  <ldv (a] altlinux.org>
   45237 
   45238 	* configure.ac (AC_CHECK_HEADERS): Remove asm/reg.h.
   45239 
   45240 2009-10-12  Mike Frysinger  <vapier (a] gentoo.org>
   45241 
   45242 	sparc/linux: Rewrite to use asm/ptrace.h.
   45243 	The current sparc/linux code uses asm/reg.h, but recent Linux kernels
   45244 	dropped that header completely.  So switch over to the ptrace headers
   45245 	as those should stick around indefinitely as part of the ABI.
   45246 
   45247 	* defs.h [LINUXSPARC] (U_REG_G1, U_REG_O0, U_REG_O1): Define.
   45248 	* process.c: Drop asm/regs.h include.
   45249 	[SPARC || SPARC64] (change_syscall): Change struct regs to struct pt_regs.
   45250 	* signal.c: Drop asm/regs.h include.
   45251 	(m_siginfo_t): Unify [SPARC || SPARC64] and [MIPS].
   45252 	[SPARC || SPARC64] (sys_sigreturn): Change struct regs to struct pt_regs.
   45253 	* syscall.c: Drop asm/regs.h include.
   45254 	[SPARC || SPARC64] (internal_syscall, get_scno, get_error, force_result,
   45255 	syscall_enter): Change struct regs to struct pt_regs.
   45256 	* util.c: Drop asm/regs.h include.
   45257 	(_hack_syscall5, _ptrace): Delete.
   45258 	[SPARC || SPARC64] (getpc, printcall, arg_setup_state): Change
   45259 	struct regs to struct pt_regs.
   45260 
   45261 2009-10-11  Roland McGrath  <roland (a] redhat.com>
   45262 
   45263 	* make-dist: Clean up.
   45264 
   45265 	* configure.ac: Use AC_CONFIG_AUX_DIR([.]).
   45266 
   45267 2009-10-09  Dmitry V. Levin  <ldv (a] altlinux.org>
   45268 
   45269 	* make-dist: New script for preparing release tarballs.
   45270 
   45271 	* git-set-file-times: Import from rsync.
   45272 
   45273 	* Makefile.am [MAINTAINER_MODE]: Define and export TAR_OPTIONS.
   45274 
   45275 2009-10-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   45276 
   45277 	Enhance msgsnd() parser.
   45278 	* ipc.c (tprint_msgsnd): New function.  Move msgsnd parser code here,
   45279 	add check for umove() return code.
   45280 	(sys_msgsnd): Use tprint_msgsnd().
   45281 
   45282 	* NEWS: Update for 4.5.19 release.
   45283 
   45284 	Enhance semop()/semtimedop() sembuf parser.
   45285 	* ipc.c (tprint_sembuf): New function. Move sembuf parser code here,
   45286 	add abbrev() support.
   45287 	(sys_semop, sys_semtimedop): Use tprint_sembuf().
   45288 
   45289 2009-10-08  Jakub Bogusz  <qboosh (a] pld-linux.org>
   45290 
   45291 	Add pretty printing of sembuf argument to semop() and semtimedop()
   45292 	* ipc.c (semop_flags): New xlat structure.
   45293 	(sys_semop, sys_semtimedop): Add pretty printing of sembuf argument.
   45294 
   45295 2009-10-08  Mike Frysinger  <vapier (a] gentoo.org>
   45296 
   45297 	Add support for Linux/no-mmu with vfork.
   45298 	* configure.ac (AC_CHECK_FUNCS): Add fork.
   45299 	* strace.c (strace_vforked): Define.
   45300 	(startup_child): Do not raise SIGSTOP if vforked.
   45301 	(trace): Skip first exec when starting up after vforked.
   45302 	* syscall.c [BFIN] (get_scno): Drop waitexec checks.
   45303 
   45304 	Avoid malloc(0) in getdents parsers.
   45305 	On end of directory, getdents returns 0.  This return value is used to
   45306 	then try and do malloc(0), but on some systems this will always return
   45307 	NULL.  Since the code won't read the pointer in question if len is 0,
   45308 	then don't bother calling malloc(0) and set the pointer to NULL ourself.
   45309 	* file.c (sys_getdents, sys_getdents64): Avoid malloc(0) call.
   45310 
   45311 2009-10-07  Mike Frysinger  <vapier (a] gentoo.org>
   45312 
   45313 	Add sys_nanosleep() prototype for sparc.
   45314 	* linux/sparc/syscall.h (sys_nanosleep): New prototype.
   45315 	Reported by Frederik Schler.
   45316 
   45317 	Silence compiler warnings about implicit cast from pointer to integer.
   45318 	* util.c (do_ptrace): Cast ptrace() 4th arg to long.
   45319 	(ptrace_restart): Drop void* cast on ptrace() 4th arg.
   45320 
   45321 	Ignore .gdb files from FLAT toolchains.
   45322 	* .gitignore: Add /*.gdb.
   45323 
   45324 	* configure.ac (AC_CHECK_FUNCS): Sort and expand.
   45325 
   45326 	Blackfin: Update ioctl/syscall lists.
   45327 	* linux/bfin/ioctlent.h: Sync list with latest kernel sources.
   45328 	* linux/bfin/syscallent.h: Likewise.
   45329 
   45330 	ioctlsort: Check ppc hosts too.
   45331 	* linux/ioctlsort.c: Check for __powerpc__.
   45332 
   45333 2009-10-07  Andreas Schwab  <schwab (a] redhat.com>
   45334 
   45335 	Fix build on ia64.
   45336 	* linux/ia64/syscallent.h: Update for addition of accept4 syscall
   45337 	in ../syscallent.h.
   45338 
   45339 2009-10-07  Roland McGrath  <roland (a] redhat.com>
   45340 
   45341 	* strace.spec (%doc): Add ChangeLog-CVS.
   45342 
   45343 	* Makefile.am (srpm): New phony target.
   45344 
   45345 	* Makefile.am (EXTRA_DIST): Add ChangeLog.
   45346 	($(srcdir)/ChangeLog): New target, replaces gen-changelog phony target.
   45347 	Put it inside [MAINTAINER_MODE].
   45348 
   45349 2009-10-06  Dmitry V. Levin  <ldv (a] altlinux.org>
   45350 
   45351 	* NEWS: Update for 4.5.19 release.
   45352 
   45353 2009-10-05  Frederik Schler  <fs (a] debian.org>
   45354 
   45355 	Prepare debian/* files for release.
   45356 	* debian/rules: Do not ship ChangeLog anymore.
   45357 	* debian/control: Update to Debian standards version 3.8.1, and remove
   45358 	Roland from the Maintainers list.  This closes Debian bug #521458.
   45359 	* debian/changelog: Document changes and prepare for release.
   45360 
   45361 2009-10-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   45362 
   45363 	* defs.h [HPPA]: Lower MAX_ARGS from 32 to 6.
   45364 
   45365 	* ipc.c [LINUX] (sys_shmat): HPPA does not use an IPC multiplexer.
   45366 	Based on patch from Carlos O'Donell.
   45367 
   45368 2009-10-05  Carlos O'Donell  <carlos (a] systemhalted.org>
   45369 
   45370 	* linux/hppa/syscallent.h: Update syscalls.
   45371 	Based on work by Kyle McMartin and Helge Deller.
   45372 
   45373 	Fix SA_HANDLER function pointer comparisons for hppa.
   45374 	* signal.c (sys_sigaction): Cast SA_HANDLER function pointers to long.
   45375 	(sys_rt_sigaction): Likewise.
   45376 
   45377 2009-10-05  Edgar E. Iglesias  <edgar.iglesias (a] gmail.com>
   45378 
   45379 	CRIS: Correct first argument to upeek()
   45380 	This complements commit ea0e6e80260d2b1b7ad40282012b0e47869bcddf.
   45381 	* syscall.c [CRISV10 || CRISV32] (syscall_fixup, syscall_enter): Pass
   45382 	tcp pointer instead of pid to upeek().
   45383 	* util.c [CRISV10 || CRISV32] (printcall): Likewise.
   45384 
   45385 2009-10-05  Dmitry V. Levin  <ldv (a] altlinux.org>
   45386 
   45387 	* signal.c (do_signalfd): Fix typo in output format.
   45388 
   45389 2009-09-21  Dmitry V. Levin  <ldv (a] altlinux.org>
   45390 
   45391 	* Makefile.am (gen_changelog_start_date): Fix date.
   45392 
   45393 2009-09-19  Dmitry V. Levin  <ldv (a] altlinux.org>
   45394 
   45395 	Prepare for 4.5.19 release.
   45396 	* NEWS: Update for 4.5.19 release.
   45397 	* configure.ac: Version 4.5.19.
   45398 	* debian/changelog: 4.5.19-1.
   45399 	* strace.spec: 4.5.19-1.
   45400 
   45401 	Update debian/* to 4.5.18-1.
   45402 	* debian/changelog: Update to 4.5.18-1.
   45403 	* debian/compat: Set compatibility level to 7.
   45404 	* debian/control (Build-Depends): Update debhelper requirement.
   45405 	(strace, strace64): Add Section and Priority tags.
   45406 
   45407 2009-09-19  Kirill A. Shutemov  <kirill (a] shutemov.name>
   45408 
   45409 	Fix fadvise64 decoding on ARM.
   45410 	* file.c (sys_fadvise64_64) [ARM]: Fix argument ordering.
   45411 
   45412 2009-09-18  Dmitry V. Levin  <ldv (a] altlinux.org>
   45413 
   45414 	Fix follow fork/vfork on Linux ARM OABI.
   45415 	__NR_SYSCALL_BASE eis 0 for EABI and is 0x900000 for OABI.
   45416 	* process (change_syscall) [LINUX && ARM]: Mask off the high order bits
   45417 	when changing syscall.
   45418 
   45419 	Reviewed-by: Kirill A. Shutemov <kirill (a] shutemov.name>
   45420 
   45421 2009-09-18  Mike Frysinger  <vapier (a] gentoo.org>
   45422 
   45423 	Mark shell scripts as executable.
   45424 
   45425 	Ignore ioctlsort helper program.
   45426 	* .gitignore: Add ioctlsort.
   45427 
   45428 	linux/errno: Add ERFKILL.
   45429 	* linux/errnoent.h: Change ERRNO_132 to ERFKILL according to errno 132
   45430 	definition introduced in Linux 2.6.31.
   45431 
   45432 2009-09-01  Paolo Bonzini  <pbonzini (a] redhat.com>
   45433 
   45434 	Add accept4 socketcall.
   45435 	This second patch in the series adds support for accept4 as a socketcall
   45436 	sub-call.  Besides the need to renumber all system calls, this poses
   45437 	no problem.
   45438 	Tested on i686.
   45439 
   45440 	* linux/arm/syscallent.h: Add accept4 socketcall.
   45441 	* linux/m68k/syscallent.h: Likewise.
   45442 	* linux/powerpc/syscallent.h: Likewise.
   45443 	* linux/s390/syscallent.h: Likewise.
   45444 	* linux/s390x/syscallent.h: Likewise.
   45445 	* linux/sh/syscallent.h: Likewise.
   45446 	* linux/sh64/syscallent.h: Likewise.
   45447 	* linux/sparc/syscallent.h: Likewise.
   45448 	* linux/syscallent.h: Likewise.
   45449 
   45450 	* linux/sparc/syscall.h (SYS_sub_accept4): Declare.
   45451 	(SYS_socket_nsubcalls): Update.
   45452 	* linux/syscall.h: Likewise.
   45453 
   45454 2009-09-01  Paolo Bonzini  <pbonzini (a] redhat.com>
   45455 
   45456 	Replace x86-64 paccept with accept4.
   45457 	This patch changes the paccept syscall to accept4 for x86-64, since
   45458 	the former was dropped in Linux kernel commit v2.6.27-rc7-14-g2d4c826.
   45459 	At the same time, it adds support for pretty printing its arguments.
   45460 
   45461 	* linux/x86_64/syscallent.h: Replace paccept with accept4,
   45462 	hook in sys_accept4.
   45463 	* net.c (sys_accept): Leave a small stub calling the new...
   45464 	(do_accept): ... function, which also adds a flags_arg argument.
   45465 	(sys_accept4): New.
   45466 
   45467 2009-08-28  Andreas Schwab  <schwab (a] redhat.com>
   45468 
   45469 	Zero-extend 32-bit addresses when printing argv array.
   45470 	(printargv): Zero-extend 32-bit addresses.
   45471 	Fixes RH#519480 "64-bit strace is lazy on execve of 32-bit
   45472 	process".
   45473 
   45474 2009-08-12  Andreas Schwab  <schwab (a] redhat.com>
   45475 
   45476 	Add more futex decoding.
   45477 	* process.c (FUTEX_WAIT_REQUEUE_PI, FUTEX_CMP_REQUEUE_PI)
   45478 	(FUTEX_PRIVATE_FLAG, FUTEX_CLOCK_REALTIME): Define.
   45479 	(futexops): Add entries for them.
   45480 	(sys_futex): Decode FUTEX_CMP_REQUEUE_PI and
   45481 	FUTEX_WAIT_REQUEUE_PI.
   45482 
   45483 2009-07-08  Dmitry V. Levin  <ldv (a] altlinux.org>
   45484 
   45485 	Generate ChangeLog from git log.
   45486 	* .gitignore: Add ChangeLog
   45487 	* ChangeLog: Rename to ChangeLog-CVS.
   45488 	* Makefile.am (gen-changelog): New rule.
   45489 	(dist-hook): Depend on it.
   45490 	(EXTRA_DIST): Add ChangeLog-CVS.
   45491 	* README-hacking: Describe changes.
   45492 	* gitlog-to-changelog: Import from gnulib.
   45493 
   45494 
   45495 See ChangeLog-CVS for older changes.
   45496