| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After der Strauss awareness has been raised sufficiently[1][2], it is
time for den Strauss itself to raise the awareness about strace,
and to do so, the most modern and contemporary method has been elected:
displaying tips, tricks and tweaks on each run.
[1] https://lists.strace.io/pipermail/strace-devel/2019-April/008701.html
[2] https://gitlab.com/strace/strace/commit/e8194a46d619
* strace.c (init) <enum>: Add GETOPT_TIPS.
<longopts>: Add "no-tips" option.
(init) <case GETOPT_TIPS>: Set show_tips to false.
(terminate): Call print_totd.
(usage): Document --no-tips.
* strace.1.in (.SS Miscellaneous): Likewise.
* straus.c (STRAUS_BODY_LINES, MAX_TIP_LINES): New enums.
(tips_tricks_tweaks, tip_top, tip_bottom, tip_left, tip_right): New
static constants.
(show_tips): New variable.
(print_totd): New function.
* straus.h (show_tips, print_totd): New declarations.
* tests/bexecve.test: Supply --no-tips to strace invocations.
* tests/clone_ptrace.test: Likewise.
* tests/fflush.test: Likewise.
* tests/first_exec_failure.test: Likewise.
* tests/options-syntax.test: Likewise.
Suggested-by: Elvira Khabirova <lineprinter0@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As Der Strauss is the strace's mascot and also an endangered species,
it is a strace's responsibility now to raise awareness about it.
* straus.c: New file.
* straus.h: New header.
* Makefile.am (strace_SOURCES): Add them.
* strace.c: Include "straus.h".
(version_verbosity): New static variable.
(print_version): Add verbosity argument, call print_straus.
(increase_version_verbosity): New function.
(init) <case 'V'>: Call increase_version_verbosity.
(init): Call print_version and exit if version_verbosity is non-zero.
* tests/straus_body.exp: New file.
* tests/straus_head.exp: Likewise.
* tests/Makefile.am (EXTRA_DIST): Add them.
* tests/strace-V.test: Update expected output, add checks.
* strace.1.in: Document it.
* NEWS: Mention it.
|
|
|
|
|
|
|
|
| |
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/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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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"
|
|
|
|
|
|
|
| |
* tests/strace-n.c: New file.
* tests/gen_tests.in (strace-n): New entry.
* tests/pure_executables.list: Add strace-n.
* tests/.gitignore: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 5.8-1.
* strace.spec.in: Likewise.
|
|
|
|
| |
* NEWS: Update for 5.8 release.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Headers updated automatically using maint/update_copyright_years.sh
script.
|
|
|
|
|
|
|
| |
* tests/tgkill.c: New file.
* tests/gen_tests.in (tgkill): New entry.
* tests/pure_executables.list: Add tgkill.
* tests/.gitignore: Likewise.
|
|
|
|
|
|
|
| |
* tests/tkill.c: New file.
* tests/gen_tests.in (tkill): New entry.
* tests/pure_executables.list: Add tkill.
* tests/.gitignore: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.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.c (SYS_FUNC(statx)): Use PRINT_FIELD_FLAGS instead of
printflags.
|
|
|
|
|
|
| |
* kcmp.c (SYS_FUNC(kcmp)): Fix KCMP_FILE pid arguments.
Fixes: v4.20~66 ("kcmp: output fds using a separate function")
|
|
|
|
|
|
| |
* fcntl.c: Include "print_fields.h".
(print_struct_flock64, print_f_owner_ex): Use PRINT_FIELD_* macros
from print_fields.h.
|
|
|
|
|
|
|
| |
* 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.c: Include "print_fields.h".
(SYS_FUNC(ustat)): Use PRINT_FIELD_* macros from print_fields.h.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* evdev.c (abs_ioctl, keycode_V2_ioctl): Use PRINT_FIELD_* macros
from print_fields.h.
|
|
|
|
|
| |
* evdev.c (getid_ioctl): Use PRINT_FIELD_U.
* tests/ioctl_evdev.c (main): Update expected output.
|
|
|
|
|
|
|
|
|
|
| |
* types/btrfs.h: New file.
* btrfs.c: Include "types/btrfs.h".
(btrfs_ioctl): Use struct_btrfs_ioctl_logical_ino_args and
PRINT_FIELD_X_ARRAY.
* configure.ac (AC_CHECK_MEMBERS): Remove
struct btrfs_ioctl_search_args_v2.buf_size and
struct btrfs_ioctl_logical_ino_args.flags.
|
|
|
|
|
|
|
|
| |
Let's give travis another chance.
This reverts commits 86a53f791ad34a825b8633eb0272d954647ce705
and 36f32a255db09886f7f9ba08ec712b8742f0c312.
* .travis.yml (arch: ppc64le, arch: s390x): New entries.
|
| |
|
|
|
|
|
| |
* evdev.c (keycode_V2_ioctl): Use PRINT_FIELD_X_ARRAY.
* tests/ioctl_evdev.c (main): Update expected output.
|
|
|
|
| |
* linux/x86_64/arch_kvm.c (arch_print_kvm_sregs): Use PRINT_FIELD_X_ARRAY.
|
|
|
|
|
|
|
|
|
| |
* types/loop.h: New file.
* loop.c: Include it instead of <linux/ioctl.h> and <linux/loop.h>.
(ecode_loop_config): New function.
(loop_ioctl): Use it to decode LOOP_CONFIGURE ioctl command.
* NEWS: Mention this change.
* tests/ioctl_loop.c: Check it.
|
|
|
|
|
|
|
| |
It is going to be used to implement LOOP_CONFIGURE decoding.
* loop.c (print_loop_info64): New function.
(decode_loop_info64): Use it.
|
|
|
|
|
| |
* loop.c (decode_loop_info, decode_loop_info64): Use PRINT_FIELD_*
macros from print_fields.h.
|
|
|
|
|
|
|
| |
* print_fields.h: Include "static_assert.h".
(PRINT_FIELD_UINT_ARRAY, PRINT_FIELD_U_ARRAY, PRINT_FIELD_X_ARRAY):
New macros.
(PRINT_FIELD_COOKIE): Rewrite using PRINT_FIELD_U_ARRAY.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* linux/32/ioctls_inc_align16.h: Update from linux v5.8-rc4
using ioctls_gen.sh.
* linux/32/ioctls_inc_align32.h: Likewise.
* linux/32/ioctls_inc_align64.h: Likewise.
* linux/64/ioctls_inc.h: Likewise.
* linux/x32/ioctls_inc0.h: Likewise.
* linux/powerpc/ioctls_arch0.h: Likewise.
* NEWS: Mention this.
* tests/ioctl_loop.c (main): Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced by Linux kernel commit v5.8-rc1~203^2.
* xlat/faccessat_flags.in: New file.
* access.c: Include "xlat/faccessat_flags.h".
(decode_access): Change return type to void.
(SYS_FUNC(access)): Return RVAL_DECODED.
(decode_faccessat): New function.
(SYS_FUNC(faccessat)): Use it.
(SYS_FUNC(faccessat2)): New function.
* pathtrace.c (pathtrace_match_set): Handle SEN_faccessat2.
* linux/syscallent-common.h [BASE_NR + 439]: Wire up faccessat2.
* NEWS: Mention this change.
* tests/faccessat2.c: New file.
* tests/faccessat2-P.c: Likewise.
* tests/faccessat2-y.c: Likewise.
* tests/faccessat2-yy.c: Likewise.
* tests/faccessat2.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add faccessat2.test.
* tests/gen_tests.in (faccessat2-P, faccessat2-y, faccessat2-yy): New
entries.
* tests/pure_executables.list: Add faccessat2, faccessat2-P,
faccessat2-y, and faccessat2-yy.
* tests/.gitignore: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since faccessat2 syscall has both "mode" and "flags" arguments,
rename access_flags to access_modes to avoid confusion.
* xlat/access_flags.in: Rename to ...
* xlat/access_modes.in: ... this file, add fallback definitions.
(EFF_ONLY_OK, EX_OK): Remove non-Linux constants.
* access.c: Include "xlat/access_modes.h" instead of
"xlat/access_flags.h".
(decode_access): Replace access_flags woth access_modes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/faccessat.c: Rewrite.
* tests/faccessat-P.c: New file.
* tests/faccessat-y.c: Likewise.
* tests/faccessat-yy.c: Likewise.
* tests/faccessat.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add faccessat.test.
* tests/gen_tests.in (faccessat): Remove.
(faccessat-P, faccessat-y, faccessat-yy): New entries.
* tests/pure_executables.list: Add faccessat-P, faccessat-y,
and faccessat-yy.
* tests/.gitignore: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* xlat/bpf_attach_type.in (BPF_TRACE_ITER): New constant introduced
by Linux kernel commit v5.8-rc1~165^2~185^2~16^2~19.
(BPF_CGROUP_INET4_GETPEERNAME, BPF_CGROUP_INET6_GETPEERNAME,
BPF_CGROUP_INET4_GETSOCKNAME, BPF_CGROUP_INET6_GETSOCKNAME): New
constants introduced by Linux kernel commit v5.8-rc1~165^2~130^2~8^2~3.`
(BPF_XDP_DEVMAP): New constant introduced by Linux kernel commit
v5.8-rc1~165^2~6^2~9^2~3.
* xlat/bpf_commands.in (BPF_LINK_GET_FD_BY_ID, BPF_LINK_GET_NEXT_ID):
New constants introduced by Linux kernel commit
v5.8-rc1~165^2~343^2~16^2~7.
(BPF_ENABLE_STATS): New constant introduced by Linux kernel commit
v5.8-rc1~165^2~343^2~3^2~2.
(BPF_ITER_CREATE): New constant introduced by Linux kernel commit
v5.8-rc1~165^2~185^2~16^2~15.
* xlat/bpf_map_types.in (BPF_MAP_TYPE_RINGBUF): New constant introduced
by Linux kernel commit v5.8-rc1~165^2~6^2~12^2~4.
* NEWS: Mention this change.
* tests/bpf.c: Update.
|
|
|
|
|
| |
* .gitignore: Add .dirstamp.
* tests/.gitignore: Add setpgrp-exec and stack-fcall-attach.
|
|
|
|
|
|
|
|
|
| |
* xlat/statx_attrs.in (STATX_ATTR_MOUNT_ROOT): New constant introduced
by Linux kernel commit v5.8-rc1~203^2~4.
* xlat/statx_masks.in (STATX_MNT_ID): New constant introduced by Linux
kernel commit v5.8-rc1~203^2~5.
* NEWS: Mention this change.
* tests/xstatx.c (main): Update expected output.
|
|
|
|
|
|
|
| |
* xlat/rtnl_tc_attrs.in (TCA_DUMP_FLAGS): New constant introduced
by Linux kernel commit v5.8-rc1~165^2~183^2~3.
* rtnl_tc.c (tcmsg_nla_decoders): Add TCA_DUMP_FLAGS.
* NEWS: Mention this change.
|