summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: re-enable testing with the latest mainline kernel headersldv/linux-5.9Dmitry V. Levin2020-09-063-3/+0
| | | | | | | | | There should be no issues with v5.9-rc4. This reverts commit 1c84f0b04d0fd8d37afd29a4c959fb8c863bcfdb. * .github/workflows/ci.yml (env): Remove KBRANCH. * .gitlab-ci.yml (variables): Likewise. * .travis.yml (env:global): Likewise.
* types/v4l2.h: update definition of struct_v4l2_create_buffersDmitry V. Levin2020-09-061-1/+3
| | | | | | * types/v4l2.h (struct_v4l2_create_buffers): Add "flags" field and update "reserved" field to sync with changes introduced by Linux kernel commit v5.9-rc1~94^2~295.
* xlat: update V4L2_FMT_FLAG_* constantsDmitry V. Levin2020-09-063-4/+7
| | | | | | | | * xlat/v4l2_format_description_flags.in (V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL): New constant introduced by Linux kernel commit v5.9-rc1~94^2~283. * NEWS: Mention this change. * tests/ioctl_v4l2-success.c (fmtdesc_flags): Update expected output.
* xlat: update RTPROT_* constantsDmitry V. Levin2020-09-062-1/+3
| | | | | | * xlat/routing_protocols.in (RTPROT_KEEPALIVED): New constant introduced by Linux kernel commit v5.9-rc1~133^2~449. * NEWS: Mention this change.
* xlat: update PTP_PEROUT_* constantsDmitry V. Levin2020-09-062-1/+3
| | | | | | | | * xlat/rtnl_neigh_attrs.in (PTP_PEROUT_DUTY_CYCLE): New constant introduced by Linux kernel commit v5.9-rc1~133^2~199^2~2. (PTP_PEROUT_PHASE): New constant introduced by Linux kernel commit v5.9-rc1~133^2~199^2~1. * NEWS: Mention this change.
* xlat: update NDA_* constantsDmitry V. Levin2020-09-062-1/+2
| | | | | | * xlat/rtnl_neigh_attrs.in (NDA_FDB_EXT_ATTRS): New constant introduced by Linux kernel commit v5.9-rc1~133^2~430^2~2. * NEWS: Mention this change.
* xlat: update KVM_* constantsDmitry V. Levin2020-09-062-1/+4
| | | | | | | | | | * xlat/kvm_cap.in (KVM_CAP_LAST_CPU): New constant introduced by Linux kernel commit v5.9-rc1~121^2~108. (KVM_CAP_SMALLER_MAXPHYADDR): New constant introduced by Linux kernel commit v5.9-rc1~121^2~15. (KVM_CAP_S390_DIAG318): New constant introduced by Linux kernel commit v5.9-rc1~121^2^2. * NEWS: Mention this change.
* xlat: update IORING_FEAT_* constantsDmitry V. Levin2020-09-062-2/+3
| | | | | | * xlat/uring_setup_features.in (IORING_FEAT_POLL_32BITS): New constant introduced by Linux kernel commit v5.9-rc1~212^2~116. * NEWS: Mention this change.
* xlat: update INET_DIAG_REQ_* constantsDmitry V. Levin2020-09-064-3/+8
| | | | | | | | | * linux/inet_diag.h (INET_DIAG_REQ_SK_BPF_STORAGES): New constant introduced by Linux kernel commit v5.7-rc1~146^2~287^2^2. (INET_DIAG_REQ_PROTOCOL): New constant introduced by Linux kernel commit v5.9-rc1~133^2~292^2~3. * xlat/inet_diag_req_attrs.in: Likewise. * NEWS: Mention this change.
* xlat: update IFLA_* constantsDmitry V. Levin2020-09-062-1/+2
| | | | | | * xlat/rtnl_link_attrs.in (IFLA_PROTO_DOWN_REASON): New constant introduced by Linux kernel commit v5.9-rc1~133^2~77. * NEWS: Mention this change.
* xlat: update IPV6_* constantsDmitry V. Levin2020-09-062-1/+2
| | | | | | * xlat/sock_ip_options.in (IPV6_RECVERR_RFC4884): New constant introduced by Linux kernel commit v5.9-rc1~133^2~130^2. * NEWS: Mention this change.
* xlat: update IP_* constantsDmitry V. Levin2020-09-062-1/+2
| | | | | | * xlat/sock_ip_options.in (IP_RECVERR_RFC4884): New constant introduced by Linux kernel commit v5.9-rc1~133^2~200. * NEWS: Mention this change.
* xlat: update FAN_* constantsDmitry V. Levin2020-09-063-4/+7
| | | | | | | | | * xlat/fan_init_flags.in (FAN_REPORT_DIR_FID): New constant introduced by Linux kernel commit v5.9-rc1~110^2~6. (FAN_REPORT_NAME): New constant introduced by Linux kernel commit v5.9-rc1~110^2~4. * NEWS: Mention this change. * tests/fanotify_init.c (main): Update expected output.
* xlat: update CAP_* constantsDmitry V. Levin2020-09-066-3/+6
| | | | | | | | | | * caps1.h (CAP_CHECKPOINT_RESTORE): New constant introduced by Linux kernel commit v5.9-rc1~161^2~6. * xlat/cap.in (CAP_CHECKPOINT_RESTORE): Likewise. * xlat/cap_mask1.in (1<<CAP_CHECKPOINT_RESTORE): Likewise. * NEWS: Mention this change. * tests/caps.awk: Update expected output. * tests/caps-abbrev.awk: Likewise.
* xlat: update BPF_* constantsDmitry V. Levin2020-09-066-12/+19
| | | | | | | | | | | | | | | | | | * xlat/bpf_attach_type.in (BPF_CGROUP_INET_SOCK_RELEASE): New constant introduced by Linux kernel commit v5.9-rc1~133^2~259^2~18. (BPF_XDP_CPUMAP): New constant introduced by Linux kernel commit v5.9-rc1~133^2~164^2~22. (BPF_SK_LOOKUP): New constant introduced by Linux kernel commit v5.9-rc1~133^2~164^2~14^2~13. (BPF_XDP): New constant introduced by Linux kernel commit v5.9-rc1~133^2~23^2~28^2~5. * xlat/bpf_commands.in (BPF_LINK_DETACH): New constant introduced by Linux kernel commit v5.9-rc1~133^2~23^2~6^2~4. * xlat/bpf_prog_types.in (BPF_PROG_TYPE_SK_LOOKUP): New constant introduced by Linux kernel commit v5.9-rc1~133^2~164^2~14^2~13. * NEWS: Mention this change. * tests/bpf.c (BPF_PROG_LOAD_checks, BPF_PROG_QUERY_checks): Update. * tests/kernel_version.c (print_bpf_attr, main): Likewise.
* Implement decoding of close_range syscallDmitry V. Levin2020-09-0614-1/+203
| | | | | | | | | | | | | | | | | | | | | Introduced by Linux kernel commit v5.9-rc1~160. * close_range.c: New file. * Makefile.am (libstrace_a_SOURCES): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/close_range.h. * xlat/close_range_flags.in: New file. * pathtrace.c (pathtrace_match_set): Handle SEN_close_range. * linux/syscallent-common.h [BASE_NR + 436]: Wire up close_range. * NEWS: Mention this change. * tests/close_range.c: New file. * tests/close_range-P.c: Likewise. * tests/close_range-y.c: Likewise. * tests/close_range-yy.c: Likewise. * tests/gen_tests.in (close_range. close_range-P, close_range-y, close_range-yy): New entries. * tests/pure_executables.list: Add close_range, close_range-P, close_range-y, and close_range-yy. * tests/.gitignore: Likewise.
* tests: reduce looping_threads iteration duration to 1/16th of TIMEOUT_DURATIONEugene Syromyatnikov2020-09-031-3/+3
| | | | | | | | * tests/looping_threads.test (timeout_8): Rename to... (timeout_16): ...this, reduce value by half. Use $timeout_16 instead of $timeout_8. Complements: v5.7~4 "tests: increase default TIMEOUT_DURATION"
* strace.spec.in: use %make_build/%make_install macrosEugene Syromyatnikov2020-09-031-3/+9
| | | | | | | | | | | | | | | | As suggested in [1][2]. [1] https://src.fedoraproject.org/fork/tstellar/rpms/strace/c/c7358b588cb5f2893dec3b7daa84e63d9389773a.patch [2] https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro * strace.spec.in [?!__make] (%__make): New definition. [?!__install] (%__install): Likewise. [?!make_build] (%make_build): Likewise. [?!make_install] (%make_install): Likewise. (%build, %check): Use %make_build. (%install): Use %make_install. Co-authored-by: Tom Stellard <tstellar@redhat.com>
* mpers_test.sh: check proper handling of sized integer typesEugene Syromyatnikov2020-09-031-0/+17
| | | | | | | | | | | | | | The commit v5.6~62 ("v4l2: always decode VIDIOC_*_EXT_CTRLS ioctl commands") unraveled a possibility of buggy handling of sized integer types in some libc implementations[1][2]. Add checks for these types to mpers_test.sh to catch such issues early. [1] https://strace.io/logs/strace/2020-04-22#17477; [2] https://lists.strace.io/pipermail/strace-devel/2020-August/010213.html * mpers_test.sh: Add checks for (u)int{8,16,32,64}_t types. Complements: v5.6~62 "v4l2: always decode VIDIOC_*_EXT_CTRLS ioctl commands"
* Add tests for PID namespace translationAkosUzonyi/pidnsÁkos Uzonyi2020-08-2579-187/+1143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (CODE_COVERAGE_IGNORE_PATTERN): Add test directories. * tests/.gitignore: Add new test executables. * tests/Makefile.am (check_PROGRAMS): Add new test executables. (DECODER_TESTS) Add new test files. (libtests_a_SOURCES): Add trie_for_tests.c, xmalloc_for_tests.c. * tests/gen_tests.in: Add new tests. * tests/trie_test.c: New file. * tests/trie_for_tests.c: New file. * tests/xmalloc_for_tests.c: New file. * tests/pidns-cache.c: New file. * tests/pidns-cache.test: New file. * tests/fcntl--pidns-translation.c: New file. * tests/fcntl64--pidns-translation.c: New file. * tests/fork--pidns-translation.awk: New file. * tests/fork--pidns-translation.c: New file. * tests/fork--pidns-translation.test: New file. * tests/getpgrp--pidns-translation.c: New file. * tests/getpid--pidns-translation.c: New file. * tests/getsid--pidns-translation.c: New file. * tests/gettid--pidns-translation.c: New file. * tests/gettid--pidns-translation.test: New file. * tests/ioctl_block--pidns-translation.c: New file. * tests/ioctl_block--pidns-translation.test: New file. * tests/ioprio--pidns-translation.c: New file. * tests/kill--pidns-translation.c: New file. * tests/migrate_pages--pidns-translation.c: New file. * tests/move_pages--pidns-translation.c: New file. * tests/net-sockaddr--pidns-translation.c: New file. * tests/netlink_audit--pidns-translation.c: New file. * tests/netlink_audit--pidns-translation.test: New file. * tests/pidfd_open--pidns-translation.c: New file. * tests/pidfd_send_signal--pidns-translation.c: New file. * tests/prlimit64--pidns-translation.c: New file. * tests/process_vm_readv--pidns-translation.c: New file. * tests/process_vm_writev--pidns-translation.c: New file. * tests/rt_sigqueueinfo--pidns-translation.c: New file. * tests/rt_tgsigqueueinfo--pidns-translation.c: New file. * tests/sched_xetaffinity--pidns-translation.c: New file. * tests/sched_xetattr--pidns-translation.c: New file. * tests/sched_xetparam--pidns-translation.c: New file. * tests/sched_xetscheduler--pidns-translation.c: New file. * tests/signal_receive--pidns-translation.c: New file. * tests/so_peercred--pidns-translation.c: New file. * tests/tkill--pidns-translation.c: New file. * tests/tgkill--pidns-translation.c: New file. * tests/xet_robust_list--pidns-translation.c: New file. * tests/xetpgid--pidns-translation.c: New file. * tests/xetpriority--pidns-translation.c: New file. * tests/fcntl-common.c: Print PID translation string after PIDs. * tests/fcntl.c: Likewise. * tests/fcntl64.c: Likewise. * tests/getpgrp.c: Likewise. * tests/getpid.c: Likewise. * tests/getsid.c: Likewise. * tests/gettid.c: Likewise. * tests/ioctl_block.c: Likewise. * tests/ioprio.c: Likewise. * tests/kcmp.c: Likewise. * tests/kill.c: Likewise. * tests/migrate_pages.c: Likewise. * tests/move_pages.c: Likewise. * tests/net-sockaddr.c: Likewise. * tests/netlink_audit.c: Likewise. * tests/pidfd_open.c: Likewise. * tests/pidfd_send_signal.c: Likewise. * tests/prlimit64.c: Likewise. * tests/process_vm_readv_writev.c: Likewise. * tests/rt_sigqueueinfo.c: Likewise. * tests/rt_tgsigqueueinfo.c: Likewise. * tests/sched_xetaffinity.c: Likewise. * tests/sched_xetattr.c: Likewise. * tests/sched_xetparam.c: Likewise. * tests/sched_xetscheduler.c: Likewise. * tests/signal_receive.c: Likewise. * tests/so_peercred.c: Likewise. * tests/tgkill.c: Likewise. * tests/tkill.c: Likewise. * tests/xet_robust_list.c: Likewise. * tests/xetpgid.c: Likewise. * tests/xetpriority.c: Likewise.
* Implement testing framework for pidnsÁkos Uzonyi2020-08-254-0/+325
| | | | | | | * tests/pidns.c: New file. * tests/pidns.h: New file. * tests/Makefile.am (libtests_a_SOURCES): Add pidns.c, pidns.h. * tests/init.sh (test_pidns, test_pidns_run_strace): New functions.
* Use get_proc_pid for /proc pathsÁkos Uzonyi2020-08-254-5/+15
| | | | | | | | | * mmap_cache.c (mmap_cache_rebuild_if_invalid): Use proc pid instead of tcp->pid for /proc path. * util.c (getfdproto): Likewise. (pidfd_get_pid): Likewise. * pathtrace.c (getfdpath_pid): Likewise. * strace.c (attach_tcb): Likewise.
* Use printpid in decodersÁkos Uzonyi2020-08-2530-82/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * getpid.c: New file. * Makefile.am (libstrace_a_SOURCES): Add it. * linux/dummy.h (sys_getpid, sys_getppid, sys_gettid, sys_setpgid, sys_setpgrp): Remove. * util.c (printfd_pid_tracee_ns): Implement using translate_pid. * defs.h (printnum_pid): New function definition. (printfd_pid_tracee_ns): Update documentation * util.c: (printnum_pid): New function. * print_fields.h (PRINT_FIELD_TID): New macro. (PRINT_FIELD_TGID): Likewise. (PRINT_FIELD_PGID): Likewise. (PRINT_FIELD_SID): Likewise. * affinity.c: Print PIDs with printpid. * block.c: Likewise. * bpf.c: Likewise. * capability.c: Likewise. * clone.c: Likewise. * fcntl.c: Likewise. * get_robust_list.c: Likewise. * ioprio.c: Likewise. * kcmp.c: Likewise. * msghdr.c: Likewise. * net.c: Likewise. * netlink.c: Likewise. * numa.c: Likewise. * pidfd_open.c: Likewise. * printsiginfo.c: Likewise. * process.c: Likewise. * process_vm.c: Likewise. * resource.c: Likewise. * sched.c: Likewise. * signal.c: Likewise. * sockaddr.c: Likewise. * wait.c: Likewise. * kcmp.c (SYS_FUNC(kcmp)): Fix KCMP_FILE pid arguments. * tests/kcmp.c (printpidfd): Print path if VERBOSE_FD. (main): Use our real pid if real fds are used.
* PID namespace translation supportÁkos Uzonyi2020-08-2510-1/+1079
| | | | | | | | | | | | | | | | | | | | | | * defs.h (pidns_translation): New variable. (tcb): Add pid_ns field. (RVAL_MASK): Change value from 013 to 017. (RVAL_TID, RVAL_SID, RVAL_TGID, RVAL_PGID): New definitions. (pid_type): New enum. (pidns_init, translate_pid, get_proc_pid, printpid, printpid_tgid_pgid): New function declarations. * largefile_wrappers.h (fstat_fd): New macro. * pidns.c: New file. * trie.c: New file. * trie.h: New file. * Makefile.am (libstrace_a_SOURCES): Add trie.c, trie.h, pidns.c. * strace.c (pidns_translation): New variable. (init): Add --pidns-translation option. * syscall.c (syscall_exiting_trace): Handle RVAL_* return values. * NEWS: Mention this. * strace.1.in: Add description for new option. Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
* tests/mknod.c: add workaround for ppc bug in travisÁkos Uzonyi2020-08-251-16/+16
| | | | | | | | On ppc travis builds syscall(mknod) sometimes does not fail with EEXISTS as expected, but returns successfully. This commit uses sprintrc for errno printing, which handles successful return values too. * tests/mknod.c (main): Use sprintrc for printing errno.
* tests: check -n/--syscall-number optionElvira Khabirova2020-08-214-0/+43
| | | | | | | * tests/strace-n.c: New file. * tests/gen_tests.in (strace-n): New entry. * tests/pure_executables.list: Add strace-n. * tests/.gitignore: Likewise.
* strace: add an option for printing syscall numbersElvira Khabirova2020-08-218-3/+49
| | | | | | | | | | | | | * print_syscall_number.c: New file. * Makefile.am (libstrace_a_SOURCES): Add it. * defs.h (struct tcb): Add true_scno field. (print_syscall_number): New function declaration. * strace.c: Add -n/--syscall-number option. (printleader): Call print_syscall_number. * syscall.c (get_scno): Assign tcp->true_scno. * tests/options-syntax.test: Check with -c/--summary-only. * strace.1.in: Document new option. * NEWS: Mention the new option.
* Post-release administriviaDmitry V. Levin2020-08-063-0/+16
| | | | | | * NEWS: Add a header line for the next release. * debian/changelog.in: Add a changelog entry for 5.8-1. * strace.spec.in: Likewise.
* Prepare for 5.8 releasev5.8Dmitry V. Levin2020-08-061-1/+2
| | | | * NEWS: Update for 5.8 release.
* ci: use kernel headers from Linux kernel v5.8Dmitry V. Levin2020-08-043-0/+3
| | | | | | | | | | When Linux kernel merge window opens, changes of all sorts start to pour down, breaking UAPI in various ways. This does not work for strace, we need a stable UAPI. * .github/workflows/ci.yml (env): Add KBRANCH. * .gitlab-ci.yml (variables): Likewise. * .travis.yml (env:global): Likewise.
* Update copyright headersDmitry V. Levin2020-08-0349-47/+49
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* tests: check decoding of tgkill syscallDmitry V. Levin2020-08-014-0/+72
| | | | | | | * tests/tgkill.c: New file. * tests/gen_tests.in (tgkill): New entry. * tests/pure_executables.list: Add tgkill. * tests/.gitignore: Likewise.
* tests: check decoding of tkill syscallDmitry V. Levin2020-08-014-0/+63
| | | | | | | * tests/tkill.c: New file. * tests/gen_tests.in (tkill): New entry. * tests/pure_executables.list: Add tkill. * tests/.gitignore: Likewise.
* Introduce SYS_FUNC(tkill)Ákos Uzonyi2020-08-0126-25/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is going to be needed to implement pidns support in tkill syscall decoder. syscallent*.h files are updated automatically by: git grep -l 'SEN(kill).*"tkill"' | xargs sed -i '/"tkill"/ s/SEN(kill)/SEN(tkill)/' * signal.c (SYS_FUNC(tkill)): New syscall decoder. * linux/32/syscallent.h: Use SEN(tkill) for "tkill" syscall. * linux/64/syscallent.h: Likewise. * linux/alpha/syscallent.h: Likewise. * linux/arm/syscallent.h: Likewise. * linux/avr32/syscallent.h: Likewise. * linux/bfin/syscallent.h: Likewise. * linux/hppa/syscallent.h: Likewise. * linux/i386/syscallent.h: Likewise. * linux/ia64/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/microblaze/syscallent.h: Likewise. * linux/mips/syscallent-n32.h: Likewise. * linux/mips/syscallent-n64.h: Likewise. * linux/mips/syscallent-o32.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/powerpc64/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/s390x/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/sparc64/syscallent.h: Likewise. * linux/x32/syscallent.h: Likewise. * linux/x86_64/syscallent.h: Likewise. * linux/xtensa/syscallent.h: Likewise.
* Add "struct tcb *" parameters to various functionsÁkos Uzonyi2020-08-0110-40/+47
| | | | | | | | | | | | | | | | | This is going to be needed to implement pidns support. * defs.h (print_sockaddr): Add a "struct tcb *" parameter. * printsiginfo.h (printsiginfo): Likewise. * fcntl.c (print_struct_flock64): Likewise. All callers updated. * print_fields.h (PRINT_FIELD_SOCKADDR): Likewise. All callers updated. * printsiginfo.c (printsigsource, print_si_info, printsiginfo): Likewise. All callers updated. * sockaddr.c (print_sockaddr_data_un, print_sockaddr_data_in, print_sockaddr_data_in6, print_sockaddr_data_ax25, print_sockaddr_data_ipx, print_sockaddr_data_x25, print_sockaddr_data_nl, print_sockaddr_data_ll, print_sockaddr_data_bt, sockaddr_printer, print_sockaddr): Likewise. All callers updated.
* Use tprints instead of tprintf in a few more placesDmitry V. Levin2020-07-306-19/+19
| | | | | | | | | | | | | * bpf.c (BPF_PROG_LOAD, BPF_OBJ_PIN, BPF_OBJ_GET_INFO_BY_FD, BPF_RAW_TRACEPOINT_OPEN, BPF_TASK_FD_QUERY, BPF_MAP_LOOKUP_BATCH, BPF_MAP_UPDATE_BATCH, BPF_MAP_DELETE_BATCH): Replace tprintf with tprints for printing strings without format specifiers. * btrfs.c (btrfs_ioctl): Likewise. * ioctl.c (evdev_decode_number): Likewise. * perf_ioctl.c (perf_ioctl): Likewise. * rtnl_addr.c (decode_ifa_cacheinfo): Likewise. * v4l2.c (print_v4l2_capability, print_v4l2_requestbuffers, print_v4l2_streamparm): Likewise.
* s390x: sthyi: Fix section size requirement and errorJanosch Frank2020-07-242-28/+30
| | | | | | | | | | | | | Some old z/VM instances report only 40 bytes for the partition section, as they don't report the last three struct members. Let's lower the size check of that section to 40 to accommodate them. Also we expect a section to be at least x bytes, so we should make that clear in the error message. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Eugene Syromyatnikov <evgsyr@gmail.com>
* Remove tcb parameter of read_int_from_fileÁkos Uzonyi2020-07-213-3/+3
| | | | | | * defs.h (read_int_from_file): Remove tcb parameter. * util.c (read_int_from_file): Likewise. * msghdr.c (get_optmem_max): Remove tcb parameter of read_int_from_file.
* Consistently print process ids as signed integersDmitry V. Levin2020-07-1812-24/+24
| | | | | | | | | | | | | | | | | | | | | * block.c (block_ioctl): Print struct_blk_user_trace_setup.pid using PRINT_FIELD_D instead of PRINT_FIELD_U. * bpf.c (BPF_TASK_FD_QUERY): Print task_fd_query.pid using PRINT_FIELD_D instead of PRINT_FIELD_U. * ipc_msgctl.c (print_msqid_ds): Print msqid_ds.msg_lspid and msqid_ds.msg_lrpid using PRINT_FIELD_D. * ipc_shmctl.c (print_shmid_ds): Print shmid_ds.shm_cpid and shm_lpid using PRINT_FIELD_D. * msghdr.c (print_scm_creds): Print ucred.pid using PRINT_FIELD_D instead of PRINT_FIELD_U. * netlink.c (print_nlmsghdr): Print nlmsghdr.nlmsg_pid using %d format instead of %u. * tests/bpf.c (BPF_TASK_FD_QUERY_checks): Update expected output. * tests/ioctl_block.c (main): Update expected output. * tests/ipc_msg.c (main): Likewise. * tests/ipc_shm.c (main): Likewise. * tests/net-yy-netlink.c (main): Likewise. * tests/netlink_protocol.c (test_nlmsgerr): Likewise.
* Introduce PRINT_FIELD_NUMERIC_UMODE_TDmitry V. Levin2020-07-184-8/+11
| | | | | | | * print_fields.h (PRINT_FIELD_NUMERIC_UMODE_T): New macro. * ipc_msgctl.c (print_msqid_ds): Use it instead of print_numeric_umode_t. * ipc_shmctl.c (print_shmid_ds): Likewise. * open.c (print_open_how): Use it instead of print_numeric_ll_umode_t.
* Fix printing of syscall return value in octal modeDmitry V. Levin2020-07-183-9/+9
| | | | | | | | * defs.h (print_numeric_long_umask): Remove. * printmode.c (print_numeric_long_umask): Likewise. * syscall.c (syscall_exiting_trace) <case RVAL_OCTAL>: Fix printing of tcp->u_rval when sizeof(tcp->u_rval) > sizeof(long) or when sizeof(tcp->u_rval) > current_klongsize.
* Rename print_numeric_umode_t_64 to print_numeric_ll_umode_tDmitry V. Levin2020-07-183-4/+4
| | | | | | | | | * printmode.c (print_numeric_umode_t_64): Rename to print_numeric_ll_umode_t, change the type of its argument to unsigned long long. * defs.h: Likewise. * open.c (print_open_how): Use print_numeric_ll_umode_t instead of print_numeric_umode_t_64.
* Use PRINT_FIELD_UID instead of printuid where appropriateDmitry V. Levin2020-07-173-12/+12
| | | | | | | | * ipc_msgctl.c: Include "print_fields.h". (print_msqid_ds): Use PRINT_FIELD_UID instead of printuid. * ipc_shmctl.c: Include "print_fields.h". (print_shmid_ds): Use PRINT_FIELD_UID instead of printuid. * statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_UID instead of printuid.
* printsiginfo: fix printing of siginfo_t.si_pid and siginfo_t.si_uidDmitry V. Levin2020-07-179-22/+21
| | | | | | | | | | | | | * printsiginfo.c (printsigsource): Print siginfo_t.si_pid using PRINT_FIELD_D, print siginfo_t.si_uid using PRINT_FIELD_UID. * tests/clone_ptrace.c (main): Update expected output. * tests/orphaned_process_group.c (main): Likewise. * tests/pidfd_send_signal.c (main): Likewise. * tests/ptrace.c (test_peeksiginfo): Likewise. * tests/rt_sigqueueinfo.c (main): Likewise. * tests/rt_tgsigqueueinfo.c (main): Likewise. * tests/siginfo.c (main): Likewise. * tests/waitid.c (sprint_siginfo): Likewise.
* statx: use PRINT_FIELD_FLAGSDmitry V. Levin2020-07-171-9/+6
| | | | | * statx.c (SYS_FUNC(statx)): Use PRINT_FIELD_FLAGS instead of printflags.
* kcmp: fix KCMP_FILE decodingÁkos Uzonyi2020-07-171-1/+1
| | | | | | * kcmp.c (SYS_FUNC(kcmp)): Fix KCMP_FILE pid arguments. Fixes: v4.20~66 ("kcmp: output fds using a separate function")
* fcntl: use print_fields.h macrosDmitry V. Levin2020-07-131-10/+9
| | | | | | * fcntl.c: Include "print_fields.h". (print_struct_flock64, print_f_owner_ex): Use PRINT_FIELD_* macros from print_fields.h.
* evdev_mpers: use print_fields.h macrosDmitry V. Levin2020-07-132-44/+29
| | | | | | | * evdev_mpers.c: Include "print_fields.h". (decode_envelope, ff_effect_ioctl): Use PRINT_FIELD_* macros from print_fields.h. * tests/ioctl_evdev.c (print_ffe_common): Update expected output.
* ustat: use print_fields.h macrosDmitry V. Levin2020-07-121-4/+7
| | | | | * ustat.c: Include "print_fields.h". (SYS_FUNC(ustat)): Use PRINT_FIELD_* macros from print_fields.h.
* file_ioctl: use print_fields.h macrosDmitry V. Levin2020-07-121-39/+29
| | | | | | * file_ioctl.c: Include "print_fields.h". (print_file_dedupe_range_info, print_fiemap_extent, file_ioctl): Use PRINT_FIELD_* macros from print_fields.h.