| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Otherwise RVAL_STR may print auxstr remained from a previous syscall.
* syscall.c (syscall_entering_trace); Set tcp->auxstr to NULL.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/bpf_filter.c (print_bpf_filter_code): Replace tprints("|") calls
with tprint_or().
* src/bpf_seccomp_filter.c (print_seccomp_filter_k): Likewise.
* src/capability.c (print_cap_bits): Likewise.
* src/clone.c (SYS_FUNC(clone)): Likewise.
* src/fanotify.c (SYS_FUNC(fanotify_init)): Likewise.
* src/ipc_defs.h (PRINTCTL): Likewise.
* src/ipc_msg.c (SYS_FUNC(msgget)): Likewise.
* src/ipc_sem.c (SYS_FUNC(semget)): Likewise.
* src/ipc_shm.c (SYS_FUNC(shmget)): Likewise.
* src/kexec.c (SYS_FUNC(kexec_load)): Likewise.
* src/mount.c (SYS_FUNC(mount)): Likewise.
* src/net.c (tprint_sock_type): Likewise.
* src/nlattr.c (print_nlattr): Likewise.
* src/numa.c (print_mode): Likewise.
* src/personality.c (SYS_FUNC(personality)): Likewise.
* src/scsi.c (scsi_ioctl): Likewise.
* src/statx.c (SYS_FUNC(statx)): Likewise.
* src/swapon.c (SYS_FUNC(swapon)): Likewise.
* src/v4l2.c (print_v4l2_buffer_flags, print_v4l2_cid): Likewise.
* src/xlat.c (printflags_ex): Likewise.
* src/futex.c (do_futex): Replace tprints("|") calls with tprint_or();
replace tprints("<<_NUMBER_|") calls with a combination
of tprint_shift, PRINT_VAL_U, and tprint_or calls.
* src/ipc.c (SYS_FUNC(ipc)): Likewise.
* src/kd_ioctl.c (kd_mk_tone): Likewise.
* src/netlink.c (decode_nlmsg_type_netfilter): Likewise.
* src/perf.c (print_perf_event_attr): Likewise.
* src/mem.c (print_mmap_flags): Replace tprints("|") call
with tprint_or(); replace trpintf("%u<<_XVAL_") with a combination
of PRINT_VAL_U, print_shift, and print_xlat_abbrev calls.
* src/memfd_create.c (SYS_FUNC(memfd_create)): Likewise.
* src/tee.c (tee_print_param_fn): Replace
tprints("|TEE_IOCTL_PARAM_ATTR_META") with a combination of tprint_or
and print_xlat calls.
|
|
|
|
|
|
|
| |
* src/s390.c (print_sthyi_machine, print_sthyi_partition,
print_sthyi_buf): Use tprints_pre_comment.
(print_sthyi_hypervisor, print_sthyi_guest): Use tprintf_pre_comment.
* src/util.c (print_nonzero_bytes): Use tprintf_pre_comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the situations when a comment precedes the thing it comments upon.
* src/defs.h (tprintf_pre_comment, tprints_pre_comment): New
declarations.
* src/print_fields.h (tprint_pre_comment_begin, tprint_pre_comment_end):
New functions.
* src/strace.c (tprints_comment): Use tprint_comment_begin
and tprint_comment_end.
(tprints_pre_comment, tprintf_pre_comment): New functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some error and signal constants that are defined as a synonyms
for other errors/sugnals. Let's support their qualification.
* filter_qualify.c (struct alt_name): New type definition.
(alt_signames, alt_errnames): New variables.
(sigstr_to_uint): Check alt_signames for possible alternative signal
name usage.
(find_errno_by_name): Check alt_errnames for possible alternative error
name usage.
* linux/alpha/alt_errnoent.h: New file.
* linux/alpha/alt_signalent.h: Likewise.
* linux/alt_errnoent.h: Likewise.
* linux/alt_signalent.h: Likewise.
* linux/hppa/alt_errnoent.h: Likewise.
* linux/mips/alt_errnoent.h: Likewise.
* linux/mips/alt_signalent.h: Likewise.
* linux/powerpc/alt_errnoent.h: Likewise.
* linux/powerpc64/alt_errnoent.h: Likewise.
* linux/sparc/alt_errnoent.h: Likewise.
* linux/sparc/alt_signalent.h: Likewise.
* linux/sparc64/alt_signalent.h: Likewise.
* tests/qual_signal.test: Add some checks for alternative signal names.
|
|
|
|
|
| |
* filter_qualify.c (signame_eq): New function.
(sigstr_to_uint): Use signame_eq for comparing signame.
|
|
|
|
|
| |
* filter_qualify.c (sigstr_to_uint): Use nsig.
* prctl.c (SYS_FUNC(prctl)) <case PR_SET_PDEATHSIG>: Use nsig.
|
|
|
|
|
| |
* defs.h (nsig): New declaration.
* signal.c (nsig): New constant.
|
|
|
|
|
|
|
| |
So far there's only UID that has a specific routine.
* ioprio.c (print_ioprio_who): New function.
(SYS_FUNC(ioprio_get), SYS_FUNC(ioprio_set)): Use it.
|
|
|
|
|
|
| |
* printmode.c (print_symbolic_mode_t): Rewrite.
* xlat/modetypes.in: Add fallback values.
* xlat/modeflags.in: New file.
|
|
|
|
|
|
| |
* xlat.h (enum xlat_style): Add XLAT_STYLE_FMT_O.
* xlat.c (sprint_xlat_val): Handle XLAT_STYLE_FMT_O, reorder switch
branches in accordance with enum constant order.
|
|
|
|
| |
* xlat/sigact_flags.in: Add fallback definitions.
|
|
|
|
|
| |
* xlat/setsock_ip_options.in: Add fallback definitions, sort, add
"#sorted".
|
|
|
|
|
| |
* xlat/ptrace_events.in: Provide fallback definitions, define
PTRACE_EVENT_MIGRATE only on tile.
|
|
|
|
| |
* xlat/dirent_types.in: Provide fallback definitions.
|
|
|
|
|
|
|
| |
* xlat/getsock_ip_options.in: Provide fallback values.
* xlat/getsock_ipv6_options.in: Likewise.
Closes: https://github.com/strace/strace/issues/87
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced by Linux commit v4.13-rc1~212^2~51.
* xlat/fcntl_rw_hints.in: New file.
* fcntl.c: Include "xlat/fcntl_rw_hints.h".
(print_rwhint): New function.
(print_fcntl) <case F_SET_RW_HINT, case F_SET_FILE_RW_HINT, case
F_GET_RW_HINT, case F_GET_FILE_RW_HINT>: New fcntl command handlers.
* xlat/fcntlcmds.in (F_GET_RW_HINT, F_SET_RW_HINT, F_GET_FILE_RW_HINT,
F_SET_FILE_RW_HINT): New constants.
|
|
|
|
|
|
| |
* fcntl.c (print_owner_uids): New function.
(print_fcntl) <case F_GETOWNER_UIDS>: Decode command using
print_owner_uids.
|
|
|
|
|
|
| |
Per Linux commit v4.19-rc1-28-gdddde68b8f06.
* xlat/fsmagic.in (XFS_SUPER_MAGIC): Rename from XFS_SB_MAGIC.
|
|
|
|
|
| |
* src/printsiginfo.c (print_si_code): Consolidate xlat pointers
into an array, dispatch over it using si_code.
|
|
|
|
| |
si_band/si_fd
|
|
|
|
|
| |
* printsiginfo.c (print_si_info) [SIGEMT] <case SIGEMT>: Add
to the SIGILL/SIGFPE/SIGSEGV/SIGBUS case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* linux/powerpc64/syscallent.h ([192]): Remove, add a comment about
powerpc32-only mmap2.
([193]): Remove, add a comment about powerpc32-only truncate64.
([194]): Remove, add a comment about powerpc32-only ftruncate64.
([195]): Remove, add a comment about powerpc32-only stat64.
([196]): Remove, add a comment about powerpc32-only lstat64.
([197]): Remove, add a comment about powerpc32-only fstat64.
([204]): Remove, add a comment about powerpc32-only fcntl64.
([224]): Remove, add a comment about unused slot for security syscall.
([226]): Remove, add a comment about powerpc32-only sendfile64.
([254]): Remove, add a comment about powerpc32-only fadvise64_64.
* linux/powerpc64/syscallent.h ([224]): Remove, add a comment about
unused slot for security syscall.
|
|
|
|
|
|
|
| |
* xlat/rtnl_neigh_attrs.in (NDA_PROTOCOL): New constant, introduced by
Linux commit v4.20-rc6-1429-gdf9b0e30d44c.
* rtnl_neigh.c (ndmsg_nla_decoders) <[NDA_PROTOCOL]>: Decode as an IP
protocol.
|
|
|
|
|
| |
* xlat/sysctl_kern.in (KERN_PANIC_PRINT): New constant, introduced
by Linux commit v5.0-rc1~38^2~16.
|
|
|
|
|
|
| |
* prctl.c (SYS_FUNC(prctl)) <case PR_GET_SPECULATION_CTRL,
case PR_SET_SPECULATION_CTRL>: Call print_prctl_args for printing the rest
of the arguments, since non-zero values there lead to EINVAL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* linux/sparc/syscallent.h ([52]): Remove, add a comment that it is
memory_ordering on sparc64.
([164]): Remove, add a comment that it is utrap_install on sparc64.
* linux/sparc64/syscallent.h ([31]): Remove, add a comment that it is
lchown32 on sparc32.
([32]): Remove, add a comment that it is fchown32 on sparc32.
([35]): Remove, add a comment that it is chown32 on sparc32.
([44]): Remove, add a comment that it is getuid32 on sparc32.
([53]): Remove, add a comment that it is getgid32 on sparc32.
([56]): Remove, add a comment that it is mmap2 on sparc32.
([69]): Remove, add a comment that it is geteuid32 on sparc32.
([70]): Remove, add a comment that it is getegid32 on sparc32.
([72]): Remove, add a comment that it is setreuid32 on sparc32.
([77]): Remove, add a comment that it is truncate64 on sparc32.
([82]): Remove, add a comment that it is setgroups32 on sparc32.
([84]): Remove, add a comment that it is ftruncate64 on sparc32.
([87]): Remove, add a comment that it is setuid32 on sparc32.
([89]): Remove, add a comment that it is setgid32 on sparc32.
([91]): Remove, add a comment that it is setfsuid32 on sparc32.
([94]): Remove, add a comment that it is setfsgid32 on sparc32.
([112]): Remove, add a comment that it is setregid32 on sparc32.
([115]): Remove, add a comment that it is getgroups32 on sparc32.
([155]): Remove, add a comment that it is fcntl64 on sparc32.
([231]): Remove, add a comment that it is time on sparc32.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This old compiler was provided by the old version of the OS that is
currently being deprecated by github actions.
* .github/workflows/ci.yml (gcc7-x86_64-kheaders, gcc7-x86_64-dw,
gcc7-x86_64-unwind): Remove.
Link: https://github.com/actions/runner-images/issues/6002
|
|
|
|
|
|
| |
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 5.19-1.
* strace.spec.in: Likewise.
|
|
|
|
| |
* NEWS: Update for 5.19 release.
|
|
|
|
|
| |
* .mailmap: Add both email addresses of Sergei Trofimovich to avoid
duplication in CREDITS file.
|
|
|
|
| |
Resolves: https://github.com/strace/strace/pull/218
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-purpose prct-sme.c for that, since these commands identical
to PR_SME_[GS]ET_VL so far, save for s/SME/SVE/ in identifier names.
Retain the original prct-sve.c to retain test coverage diversity.
* tests/.gitignore: Add prctl-sve-Xabbrev, prctl-sve-Xraw,
prctl-sve-Xverbose, prctl-sve-success, prctl-sve-success-Xabbrev,
prctl-sve-success-Xraw, and prctl-sve-success-Xverbose.
* tests/Makefile.am (check_PROGRAMS): Add prctl-sve-success,
prctl-sve-success-Xabbrev, prctl-sve-success-Xraw,
and prctl-sve-success-Xverbose.
* tests/gen_tests.in (prctl-sve-Xabbrev, prctl-sve-Xraw,
prctl-sve-Xverbose, prctl-sve-success, prctl-sve-success-Xabbrev,
prctl-sve-success-Xraw, prctl-sve-success-Xverbose): New tests.
* tests/prctl-sme.c [!EXT] (EXT): New macro.
(EXT_STR, GLUE_, GLUE, _): New macros.
(print_sme_vl_arg, main): Use _ and EXT_STR macros.
* tests/prctl-sve-Xabbrev.c: New file.
* tests/prctl-sve-Xraw.c: Likewise.
* tests/prctl-sve-Xverbose.c: Likewise.
* tests/prctl-sve-success-Xabbrev.c: Likewise.
* tests/prctl-sve-success-Xraw.c: Likewise.
* tests/prctl-sve-success-Xverbose.c: Likewise.
* tests/prctl-sve-success.c: Likewise.
* tests/pure_executables.list: Add prctl-sve-Xabbrev, prctl-sve-Xraw,
and prctl-sve-Xverbose.
|
|
|
|
|
|
| |
Check decoding with various optlen values.
* tests/so_error.c: Add checks.
|
|
|
|
|
|
|
|
|
| |
Since it makes little sence to print ASCII character codes when we know
that the bytes are part of a number.
* src/net.c (print_get_error, print_txrehash, print_getsockopt): Use
printstr_ex with QUOTE_FORCE_HEX parameter instead of printstrn.
* tests/sockopt-sol_socket.c: Update expected output.
|
|
|
|
|
|
|
|
|
| |
The data returned by getsockopt SO_ERROR is an integer. If the buffer
size specified by userspace is less than sizeof(int), the data written
by the kernel should not be interpreted as an integer.
* src/net.c (print_get_error): Print the buffer as a string if its
length is less than sizeof(int).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/xlat/sock_options.in (SO_TXREHASH): New constant, introduced
by Linux commit v5.18-rc1~136^2~484^2~3.
* src/xlat/sockopt_txrehash_vals.in: New file.
* src/net.c: Include "xlat/sockopt_txrehash_vals.h".
(print_txrehash): New function.
(print_getsockopt, print_setsockopt) <case SO_TXREHASH>: Call
print_txrehash.
* tests/sockopt-sol_socket.c: Add checks for SO_TXREHASH decoding.
* NEWS: Mention it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced by Linux commit v5.19-rc1~251^2~10.
* src/xlat/uring_register_opcodes.in (IORING_REGISTER_PBUF_RING,
IORING_UNREGISTER_PBUF_RING): New constants.
* src/io_uring.c (print_io_uring_buf_reg): New function.
(SYS_FUNC(io_uring_register)) <case IORING_REGISTER_PBUF_RING,
case IORING_UNREGISTER_PBUF_RING>: Call print_io_uring_buf_reg
for decoding.
* tests/io_uring_register.c: Update expected output, add checks.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced by Linux commit v5.19-rc1~251^2~20.
* configure.ac: Remove struct io_uring_rsrc_register.resv check.
* src/xlat/uring_register_rsrc_flags.in: New file.
* src/io_uring.c: Include "xlat/uring_register_rsrc_flags.h".
(print_io_uring_register_rsrc): Remove CHECK_TYPE_SIZE for arg.resv,
decode flags field using PRINT_FIELD_FLAGS instead of optional decoding
of no longer existing resv field.
* tests/io_uring_register.c: Update expected output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux commit v5.19-rc2-1-g94dfc73e7cf4 replaced the zero-length array
dm_target_msg.sector field declaration with a flexible-array declaration,
which led to the following error when compiled with clang:
../../../tests/ioctl_dm.c:53:25: error: field 'target_msg' with variable
sized type 'struct dm_target_msg' not at the end of a struct or class
is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
struct dm_target_msg target_msg;
^
1 error generated.
Work around it by removing the following field and adjusting
the untyped message size.
* tests/ioctl_dm.c (struct s): Remove tm.target_string field, adjust
string field size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/xlat/archvals.in (ARCH_GET_XCOMP_SUPP, ARCH_GET_XCOMP_PERM,
ARCH_REQ_XCOMP_PERM): New constants, introduced by Linux commit
v5.16-rc1~195^2~21.
(ARCH_GET_XCOMP_GUEST_PERM, ARCH_REQ_XCOMP_GUEST_PERM): New constants,
introduced by Linux commit v5.17-rc1~15^2~70.
* src/xlat/x86_xfeature_bits.in: New file.
* src/xlat/x86_xfeatures.in: Likewise.
* src/prctl.c [X86_64 || X32 || I386]: Include
"xlat/x86_xfeature_bits.h", "xlat/x86_xfeatures.h".
* tests/.gitignore: Add arch_prctl, arch_prctl-Xabbrev, arch_prctl-Xraw,
arch_prctl-Xverbose, arch_prctl-success, arch_prctl-success-Xabbrev,
arch_prctl-success-Xraw, and arch_prctl-success-Xverbose.
* tests/Makefile.am (check_PROGRAMS): Add arch_prctl-success,
arch_prctl-success-Xabbrev, arch_prctl-success-Xraw,
and arch_prctl-success-Xverbose.
* tests/arch_prctl.c: New file.
* tests/arch_prctl-Xabbrev.c: Likewise.
* tests/arch_prctl-Xraw.c: Likewise.
* tests/arch_prctl-Xverbose.c: Likewise.
* tests/arch_prctl-success.c: Likewise.
* tests/arch_prctl-success-Xabbrev.c: Likewise.
* tests/arch_prctl-success-Xraw.c: Likewise.
* tests/arch_prctl-success-Xverbose.c: Likewise.
* tests/arch_prctl.sh: Likewise.
* tests/gen_tests.in (arch_prctl, arch_prctl-Xabbrev, arch_prctl-Xraw,
arch_prctl-Xverbose, arch_prctl-success, arch_prctl-success-Xabbrev,
arch_prctl-success-Xraw, arch_prctl-success-Xverbose): New tests.
* tests/prctl-success.sh (PRCTL_SYSCALL, PRCTL_MARKER_RE): New vaiables.
Handle "ARCH_PRCTL_INJECT_RETVALS" in addition to "PRCTL_INJECT_RETVALS",
set PRCTL_SYSCALL and PRCTL_MARKER_RE accordingly; use $PRCTL_SYSCALL
and $PRCTL_MARKER_RE in run_strace and sed calls.
* tests/pure_executables.list: Add arch_prctl, arch_prctl-Xabbrev,
arch_prctl-Xraw, and arch_prctl-Xverbose.
* NEWS: Mention it.
|