profile
viewpoint

strace/strace 1307

strace is a diagnostic, debugging and instructional userspace utility for Linux

besser82/libxcrypt 75

Extended crypt library for descrypt, md5crypt, bcrypt, and others

altlinux/gear 1

Get Every Archive from git package Repository

altlinux/girar 1

ALT build service

altlinux/hasher 1

Safe package building technology

altlinux/libutempter 1

A library for utmp/wtmp updates

altlinux/gitery 0

SSH interface for a git hosting

ldv-alt/flex 0

The Fast Lexical Analyzer - scanner generator for lexing in C and C++

ldv-alt/FreeGLUT 0

Copy of FreeGLUT's svn repo on sourceforge, for easy contribution

push eventstrace/strace

Dmitry V. Levin

commit sha 3db7fde24f8e70b727f5082e236cede2829625d9

Post-release administrivia * NEWS: Add a header line for the next release. * debian/changelog.in: Add a changelog entry for 5.15-1. * strace.spec.in: Likewise.

view details

Dmitry V. Levin

commit sha a8c50391d0e264e56be494f54803b8b5e655549d

ci: re-enable testing with the latest mainline kernel headers There should be no issues with v5.16-rc3. * .github/workflows/ci.yml (env): Remove KBRANCH. * .gitlab-ci.yml (variables): Likewise. * .travis.yml (env:global): Likewise.

view details

push time in 10 minutes

release strace/strace

v5.15

released time in a day

created tagstrace/strace

tagv5.15

strace is a diagnostic, debugging and instructional userspace utility for Linux

created time in a day

push eventstrace/strace

Eugene Syromyatnikov

commit sha e27b06773eaf5c0307bcc5637d7457be9be1e6ea

print_ifindex: fix IFNAME_QUOTED_SZ definition sizeof(IFNAMSIZ) instead of IFNAMSIZ was mistakenly used for IFNAME_QUOTED_SZ initial definition in commit v4.23~87 "print_ifindex: respect xlat style settings". * src/print_ifindex.c (IFNAME_QUOTED_SZ): Use IFNAMSIZ instead of sizeof(IFNAMSIZ). * NEWS: Mention it. Reported-by: Paulo Andrade <pandrade@redhat.com> Suggested-by: Paulo Andrade <pandrade@redhat.com> Fixes: v4.23~87 "print_ifindex: respect xlat style settings" References: https://bugzilla.redhat.com/show_bug.cgi?id=2028146

view details

Dmitry V. Levin

commit sha e01f82bb348ba87e659c5cde78fcafa13c93f158

Prepare for 5.15 release * NEWS: Update for 5.15 release.

view details

push time in a day

push eventstrace/strace

Eugene Syromyatnikov

commit sha e27b06773eaf5c0307bcc5637d7457be9be1e6ea

print_ifindex: fix IFNAME_QUOTED_SZ definition sizeof(IFNAMSIZ) instead of IFNAMSIZ was mistakenly used for IFNAME_QUOTED_SZ initial definition in commit v4.23~87 "print_ifindex: respect xlat style settings". * src/print_ifindex.c (IFNAME_QUOTED_SZ): Use IFNAMSIZ instead of sizeof(IFNAMSIZ). * NEWS: Mention it. Reported-by: Paulo Andrade <pandrade@redhat.com> Suggested-by: Paulo Andrade <pandrade@redhat.com> Fixes: v4.23~87 "print_ifindex: respect xlat style settings" References: https://bugzilla.redhat.com/show_bug.cgi?id=2028146

view details

Dmitry V. Levin

commit sha e01f82bb348ba87e659c5cde78fcafa13c93f158

Prepare for 5.15 release * NEWS: Update for 5.15 release.

view details

push time in a day

push eventstrace/strace

Dmitry V. Levin

commit sha e01665f3df44d8a77f26333b5ed67c40db9e1126

upoken: workaround buggy process_vm_writev The upoken implementation assumed that process_vm_writev could perform partial writes, but in older Linux kernel versions (my guess is in Linux before v3.15) process_vm_writev could not do partial writes properly. * src/ucopy.c (upoken): Fall back to upoken_pokedata when process_vm_writev fails with EFAULT or EIO.

view details

Dmitry V. Levin

commit sha 2bf6aafbd4310390d8d745b24c6992c68a16b1e4

tests: disable tests for invalid msgctl and semctl commands on glibc >= 2.28 Starting with commit glibc-2.32.9000-149-gbe9b0b9a012780a403a2, glibc skips msgctl syscall invocations and returns EINVAL for invalid msgctl commands. Likewise, starting with commit glibc-2.32.9000-147-ga16d2abd496bd974a882, glibc skips semctl syscall invocations and returns EINVAL for invalid semctl commands. These changes were later backported to vendor packages, e.g.: * Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153 - Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands to semctl, msgctl, and shmctl. (#1912670) * tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 28)] (TEST_MSGCTL_BOGUS_CMD): Define to 0. * tests/ipc_sem.c [GLIBC_PREREQ_GE(2, 28)] (TEST_SEMCTL_BOGUS_CMD): Likewise.

view details

Dmitry V. Levin

commit sha 20a6e50cb077f44e240e95ebcd492a1ad31d4be6

tests: robustify ioctl_hdio tests * tests/ioctl_hdio.c (main): Do not assume 0xdeadbeef is an inaccessible pointer because sometimes this address is accessible, create an inaccessible pointer and use it instead of 0xdeadbeef.

view details

Dmitry V. Levin

commit sha 3478d7113bac458e85719fe31493b3be1be46e31

tests: fix net-sockaddr test on older systems * tests/net-sockaddr.c (check_ipx): Explicitly initialize ipx->sipx_zero before use. Fixes: v5.14-96-g8352a541f "sockaddr: print struct sockaddr_ipx.sipx_zero if it is non-zero"

view details

Dmitry V. Levin

commit sha d9763dca42b045328b2481fe793b7b5389430e29

Fix typos found using codespell tool * debian/changelog.in: Replace "archictectures" with "architectures". * tests/cur_audit_arch.h: Replace "arcitectures" with "architectures".

view details

Dmitry V. Levin

commit sha 17120d78150939170680ebf2d141d24a9d5b20ff

Fix preprocessor indentation Indent the C preprocessor directives to reflect their nesting using the following script: $ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' src tests |grep -v '\.sh$') |while read f; do cppi < "$f" > "$f".cppi; mv "$f".cppi "$f" done

view details

Dmitry V. Levin

commit sha fd92d526bedb512a0a01e5be305613cf9fb81d01

Update copyright headers Headers updated automatically using maint/update_copyright_years.sh script.

view details

Dmitry V. Levin

commit sha 562bc9c4bb2dd078bbfda7ca49d5657c451a1d54

tests/keyctl.c: make all global variables static * tests/keyctl.c (nul_terminated_buf, buf_in_arg): Add static qualifier.

view details

Dmitry V. Levin

commit sha ae419b38e06a9f453fc3a141d92f9835f49ae8b7

tests: move keyctl syscalls of keyctl tests into a subprocess For some mysterious reason, this helps to workaround the following resource starvation issue on some systems: $ ./keyctl >/dev/null && /bin/true -sh: fork: retry: Resource temporarily unavailable -sh: fork: retry: Resource temporarily unavailable -sh: fork: retry: Resource temporarily unavailable -sh: fork: retry: Resource temporarily unavailable -sh: fork: Resource temporarily unavailable * tests/keyctl.c: Include <sys/wait.h>. (pid): New variable. (do_keyctl): Update expected output. (main): Fork a subprocess and move all keyctl syscalls there, update expected output. * tests/gen_tests.in (keyctl, keyctl-Xabbrev, keyctl-Xraw, keyctl-Xverbose): Add options: -f --signal='!chld'.

view details

push time in a day

push eventstrace/strace

Dmitry V. Levin

commit sha 562bc9c4bb2dd078bbfda7ca49d5657c451a1d54

tests/keyctl.c: make all global variables static * tests/keyctl.c (nul_terminated_buf, buf_in_arg): Add static qualifier.

view details

Dmitry V. Levin

commit sha ae419b38e06a9f453fc3a141d92f9835f49ae8b7

tests: move keyctl syscalls of keyctl tests into a subprocess For some mysterious reason, this helps to workaround the following resource starvation issue on some systems: $ ./keyctl >/dev/null && /bin/true -sh: fork: retry: Resource temporarily unavailable -sh: fork: retry: Resource temporarily unavailable -sh: fork: retry: Resource temporarily unavailable -sh: fork: retry: Resource temporarily unavailable -sh: fork: Resource temporarily unavailable * tests/keyctl.c: Include <sys/wait.h>. (pid): New variable. (do_keyctl): Update expected output. (main): Fork a subprocess and move all keyctl syscalls there, update expected output. * tests/gen_tests.in (keyctl, keyctl-Xabbrev, keyctl-Xraw, keyctl-Xverbose): Add options: -f --signal='!chld'.

view details

push time in a day

push eventstrace/strace

Dmitry V. Levin

commit sha 3478d7113bac458e85719fe31493b3be1be46e31

tests: fix net-sockaddr test on older systems * tests/net-sockaddr.c (check_ipx): Explicitly initialize ipx->sipx_zero before use. Fixes: v5.14-96-g8352a541f "sockaddr: print struct sockaddr_ipx.sipx_zero if it is non-zero"

view details

Dmitry V. Levin

commit sha d9763dca42b045328b2481fe793b7b5389430e29

Fix typos found using codespell tool * debian/changelog.in: Replace "archictectures" with "architectures". * tests/cur_audit_arch.h: Replace "arcitectures" with "architectures".

view details

Dmitry V. Levin

commit sha 17120d78150939170680ebf2d141d24a9d5b20ff

Fix preprocessor indentation Indent the C preprocessor directives to reflect their nesting using the following script: $ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' src tests |grep -v '\.sh$') |while read f; do cppi < "$f" > "$f".cppi; mv "$f".cppi "$f" done

view details

Dmitry V. Levin

commit sha fd92d526bedb512a0a01e5be305613cf9fb81d01

Update copyright headers Headers updated automatically using maint/update_copyright_years.sh script.

view details

push time in 2 days

push eventstrace/strace

Dmitry V. Levin

commit sha 20a6e50cb077f44e240e95ebcd492a1ad31d4be6

tests: robustify ioctl_hdio tests * tests/ioctl_hdio.c (main): Do not assume 0xdeadbeef is an inaccessible pointer because sometimes this address is accessible, create an inaccessible pointer and use it instead of 0xdeadbeef.

view details

Dmitry V. Levin

commit sha 4816b1eac21fe2220e08f9792d5445bf6e599af7

Fix typos found using codespell tool * debian/changelog.in: Replace "archictectures" with "architectures". * tests/cur_audit_arch.h: Replace "arcitectures" with "architectures".

view details

Dmitry V. Levin

commit sha e81e30021ad07481ef8bff8a2939c5190cac795f

Fix preprocessor indentation Indent the C preprocessor directives to reflect their nesting using the following script: $ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' src tests |grep -v '\.sh$') |while read f; do cppi < "$f" > "$f".cppi; mv "$f".cppi "$f" done

view details

Dmitry V. Levin

commit sha 90bf5bac95a2569f27de22c43494178f5dd97de5

Update copyright headers Headers updated automatically using maint/update_copyright_years.sh script.

view details

push time in 2 days

push eventstrace/strace

Dmitry V. Levin

commit sha 2bf6aafbd4310390d8d745b24c6992c68a16b1e4

tests: disable tests for invalid msgctl and semctl commands on glibc >= 2.28 Starting with commit glibc-2.32.9000-149-gbe9b0b9a012780a403a2, glibc skips msgctl syscall invocations and returns EINVAL for invalid msgctl commands. Likewise, starting with commit glibc-2.32.9000-147-ga16d2abd496bd974a882, glibc skips semctl syscall invocations and returns EINVAL for invalid semctl commands. These changes were later backported to vendor packages, e.g.: * Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153 - Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands to semctl, msgctl, and shmctl. (#1912670) * tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 28)] (TEST_MSGCTL_BOGUS_CMD): Define to 0. * tests/ipc_sem.c [GLIBC_PREREQ_GE(2, 28)] (TEST_SEMCTL_BOGUS_CMD): Likewise.

view details

Dmitry V. Levin

commit sha 765f024f396bb3a9d27aca5f51a27b9a00645878

Fix typos found using codespell tool * debian/changelog.in: Replace "archictectures" with "architectures". * tests/cur_audit_arch.h: Replace "arcitectures" with "architectures".

view details

Dmitry V. Levin

commit sha 95ac1e1fe314814110fbeef127a023ede63e86ba

Fix preprocessor indentation Indent the C preprocessor directives to reflect their nesting using the following script: $ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' src tests |grep -v '\.sh$') |while read f; do cppi < "$f" > "$f".cppi; mv "$f".cppi "$f" done

view details

Dmitry V. Levin

commit sha 605ec1b1de4aff59930b1110e9aa5b6d5a4754d4

Update copyright headers Headers updated automatically using maint/update_copyright_years.sh script.

view details

push time in 2 days

push eventstrace/strace

Eugene Syromyatnikov

commit sha b87bfeee373a57f65a36841bd58ef490476980e2

tests/sockaddr_xlat: explicitly nest anonymous union member initialisation Unfortunately, gcc 4.4.7 from RHEL 6 does not support designated initialisation of members of anonymous unions/structs without additional nesting brackets. * tests/sockaddr_xlat.c (check_ieee802154): Add curly brackets around short_addr/hwaddr field initialisation, prepend with pan_id field initialisation where needed. Complements: v5.14-167-g87ba9609f "sockaddr: implement decoding of AF_IEEE802154 socket addresses"

view details

Eugene Syromyatnikov

commit sha 334265fe07e30009a7173df2fc3049c55ef842e5

sttaic_assert: disable -Wnested-externs when the fallback is used The fallback is only used with old compilers, and their diagnostics is less useful anyway. * src/static_assert.h [!HAVE_STATIC_ASSERT && !HAVE__STATIC_ASSERT && __GNUC__]: Disable "-Wnested-externs" diagnostics.

view details

Eugene Syromyatnikov

commit sha ec1cfe685f86f14fbb3bd62954bd31f2d1b3aabf

gcc_compat.h: bump required GCC version for diagnostic workarounds Diagnostic push/pop pragmas were added only in gcc 4.6. * src/gcc_compat.h [!GNUC_PREREQ(4, 6)] (DIAG_PUSH_IGNORE_OVERRIDE_INIT, DIAG_POP_IGNORE_OVERRIDE_INIT, DIAG_PUSH_IGNORE_NONNULL, DIAG_POP_IGNORE_NONNULL): Define as empty.

view details

Dmitry V. Levin

commit sha e01665f3df44d8a77f26333b5ed67c40db9e1126

upoken: workaround buggy process_vm_writev The upoken implementation assumed that process_vm_writev could perform partial writes, but in older Linux kernel versions (my guess is in Linux before v3.15) process_vm_writev could not do partial writes properly. * src/ucopy.c (upoken): Fall back to upoken_pokedata when process_vm_writev fails with EFAULT or EIO.

view details

Dmitry V. Levin

commit sha 165071e1b052f3f3e134d5492c938e9073491a3a

tests: disable tests for invalid msgctl and semctl commands on glibc >= 2.28 Starting with commit glibc-2.32.9000-149-gbe9b0b9a012780a403a2, glibc skips msgctl syscall invocations and returns EINVAL for invalid msgctl commands. Likewise, starting with commit glibc-2.32.9000-147-ga16d2abd496bd974a882, glibc skips semctl syscall invocations and returns EINVAL for invalid semctl commands. These changes were later backported to vendor packages, e.g.: * Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153 - Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands to semctl, msgctl, and shmctl. (#1912670) * tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 28)] (TEST_MSGCTL_BOGUS_CMD): Define to 0. * tests/ipc_sem.c [GLIBC_PREREQ_GE(2, 28)] (TEST_SEMCTL_BOGUS_CMD): Likewise.

view details

push time in 2 days

push eventstrace/strace

Dmitry V. Levin

commit sha 17bf9d9bc2ac2d80868c5f4e84cd496a6928eb19

tests/attach-f-p.c: fix race condition * tests/attach-f-p.c (thread): Allow read() to fail with EINTR.

view details

Dmitry V. Levin

commit sha 3fc392bb3830b74138adc0d82eb75fca9048bba4

tests/count-f.c: fix race condition * tests/count-f.c (main): Allow waitpid() to fail with EINTR.

view details

Dmitry V. Levin

commit sha 7fa64e9dcc6785cff20464c583e88596db64d2ab

exec_or_die: fix race condition * src/strace.c (exec_or_die): Repeat wait() invocation while it fails with EINTR.

view details

Dmitry V. Levin

commit sha 3b053537c9c160ca895d7d2f21ea723179566401

socketutils: fix protocol lookup in get_sockaddr_by_inode_lookup If getfdproto() fails to obtain system.sockprotoname attribute, it returns SOCK_PROTO_UNKNOWN. When this happens, get_sockaddr_by_inode_lookup() receives no hints about the protocol number and falls back to iterating over the protocols table. Apparently, it failed to implement this properly. * src/socketutils.c (get_sockaddr_by_inode_lookup): When iterating over protocols table, pass data from protocols[i] instead of protocols[SOCK_PROTO_UNKNOWN] to protocols[i].get(). Fixes: v4.25~37 "socketutils: store more information in protocols table"

view details

Eugene Syromyatnikov

commit sha b87bfeee373a57f65a36841bd58ef490476980e2

tests/sockaddr_xlat: explicitly nest anonymous union member initialisation Unfortunately, gcc 4.4.7 from RHEL 6 does not support designated initialisation of members of anonymous unions/structs without additional nesting brackets. * tests/sockaddr_xlat.c (check_ieee802154): Add curly brackets around short_addr/hwaddr field initialisation, prepend with pan_id field initialisation where needed. Complements: v5.14-167-g87ba9609f "sockaddr: implement decoding of AF_IEEE802154 socket addresses"

view details

Eugene Syromyatnikov

commit sha 334265fe07e30009a7173df2fc3049c55ef842e5

sttaic_assert: disable -Wnested-externs when the fallback is used The fallback is only used with old compilers, and their diagnostics is less useful anyway. * src/static_assert.h [!HAVE_STATIC_ASSERT && !HAVE__STATIC_ASSERT && __GNUC__]: Disable "-Wnested-externs" diagnostics.

view details

Eugene Syromyatnikov

commit sha ec1cfe685f86f14fbb3bd62954bd31f2d1b3aabf

gcc_compat.h: bump required GCC version for diagnostic workarounds Diagnostic push/pop pragmas were added only in gcc 4.6. * src/gcc_compat.h [!GNUC_PREREQ(4, 6)] (DIAG_PUSH_IGNORE_OVERRIDE_INIT, DIAG_POP_IGNORE_OVERRIDE_INIT, DIAG_PUSH_IGNORE_NONNULL, DIAG_POP_IGNORE_NONNULL): Define as empty.

view details

push time in 2 days

push eventstrace/strace

Dmitry V. Levin

commit sha 3b053537c9c160ca895d7d2f21ea723179566401

socketutils: fix protocol lookup in get_sockaddr_by_inode_lookup If getfdproto() fails to obtain system.sockprotoname attribute, it returns SOCK_PROTO_UNKNOWN. When this happens, get_sockaddr_by_inode_lookup() receives no hints about the protocol number and falls back to iterating over the protocols table. Apparently, it failed to implement this properly. * src/socketutils.c (get_sockaddr_by_inode_lookup): When iterating over protocols table, pass data from protocols[i] instead of protocols[SOCK_PROTO_UNKNOWN] to protocols[i].get(). Fixes: v4.25~37 "socketutils: store more information in protocols table"

view details

push time in 3 days

push eventstrace/strace

Dmitry V. Levin

commit sha 7fa64e9dcc6785cff20464c583e88596db64d2ab

exec_or_die: fix race condition * src/strace.c (exec_or_die): Repeat wait() invocation while it fails with EINTR.

view details

push time in 3 days

push eventstrace/strace

Dmitry V. Levin

commit sha 17bf9d9bc2ac2d80868c5f4e84cd496a6928eb19

tests/attach-f-p.c: fix race condition * tests/attach-f-p.c (thread): Allow read() to fail with EINTR.

view details

Dmitry V. Levin

commit sha 3fc392bb3830b74138adc0d82eb75fca9048bba4

tests/count-f.c: fix race condition * tests/count-f.c (main): Allow waitpid() to fail with EINTR.

view details

push time in 3 days

push eventstrace/strace

Dmitry V. Levin

commit sha bb1ca4961cc59a896ecd5304d1deba4261ddac85

m4: fix st_SELINUX check * m4/st_selinux.m4: Make sure selinux support is enabled only if all expected functions are provided by libselinux. Fixes: v5.12~49 "Implement --secontext[=full] option to display SELinux contexts"

view details

push time in 3 days

push eventstrace/strace

Eugene Syromyatnikov

commit sha 11b5d553104d684286bd5c2fa740329f1738a0df

Document AT_FDCWD path decoding feature * doc/strace.1.in (-e decode-fds, -y): Mention that current working directory is printed on AT_FDCWD occurrence in addition to fd path decoding. * NEWS: Mention it. Complements: v5.14-199-g48de116c2 "Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used"

view details

Eugene Syromyatnikov

commit sha 1897e0894a282c0f72fd0f75df7f412a8e951dbb

NEWS: mention --decode-fds={socket,dev,pidfd} behaviour fix Complements: v5.14-193-g8d83c8270 "Do not decode fd path unless --decode-fds=path is specified"

view details

Dmitry V. Levin

commit sha bb1ca4961cc59a896ecd5304d1deba4261ddac85

m4: fix st_SELINUX check * m4/st_selinux.m4: Make sure selinux support is enabled only if all expected functions are provided by libselinux. Fixes: v5.12~49 "Implement --secontext[=full] option to display SELinux contexts"

view details

push time in 3 days

push eventstrace/strace

Dmitry V. Levin

commit sha d00ccc6bbda8bcf5fc7987e048e3e271ffc1a484

Move printing of angle brackets from printfd_pid to individual printers This is required by the follow-up change. * src/defs.h (print_sockaddr_by_inode): Remove. * src/socketutils.c (print_sockaddr_by_inode_cached, print_sockaddr_by_inode_uncached, print_sockaddr_by_inode): Likewise. (get_sockaddr_by_inode_uncached): Rename to get_sockaddr_by_inode_lookup, implement get_sockaddr_by_inode_uncached on top of it. * src/util.c (printsocket): Rewrite using get_sockaddr_by_inode instead of print_sockaddr_by_inode, print angle brackets around the output string. (printdev, printpidfd): Print angle brackets around the output string. (printfd_pid): Do not print angle brackets around the output string.

view details

Dmitry V. Levin

commit sha 8d83c8270ba05878b389b1c646b3d2187d40ad4c

Do not decode fd path unless --decode-fds=path is specified Before this change, --decode-fds with any argument would result to the file path corresponding to the file descriptor being printed even when the descriptor type does not match the type specified by the --decode-fds argument. After this change, the file path corresponding to the file descriptor will be printed only when --decode-fds argument is not specified or contains "path". * src/util.c (print_quoted_string_in_angle_brackets): New function. (printfd_pid): Use it to print the file path when DECODE_FD_PATH is set. * tests/dev--decode-fds-all.c: New file. * tests/dev--decode-fds-none.c: Likewise. * tests/net--decode-fds-all-netlink.c: Likewise. * tests/pidfd_open--decode-fd-all.c: Likewise. * tests/pidfd_open--decode-fd-none.c: Likewise. * tests/dev--decode-fds-socket.c: Include "dev--decode-fds-none.c" instead of "dev-yy.c". (PRINT_DEVNUM): Remove. * tests/dev-yy.c: Add PRINT_PATH support. * tests/net--decode-fds-dev-netlink.c: Include "net--decode-fds-none-netlink.c" instead of net-yy-netlink.c. (PRINT_SOCK): Remove. * tests/pidfd_open--decode-fd-socket.c: Include "pidfd_open--decode-fd-none.c" instead of "pidfd_open-y.c". * tests/.gitignore: Add dev--decode-fds-all, dev--decode-fds-none, net--decode-fds-all-netlink, pidfd_open--decode-fd-all, and pidfd_open--decode-fd-none. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (dev--decode-fds-all, dev--decode-fds-none, net--decode-fds-all-netlink, pidfd_open--decode-fd-all, pidfd_open--decode-fd-none): New tests. (dev--decode-fds-socket): Update argument for -a option. (net--decode-fds-dev-netlink): Add -a option. Reported-by: Renaud Métrich <rmetrich@redhat.com> Fixes: v5.6~168 "strace: add a long option alias for -y"

view details

Alex Xu (Hello71)

commit sha 9e411b8c33e04876d9fc42db2f3ff45774efadac

tests: add shebang where necessary musl does not implement the shell fallback for execvp, causing tests to fail. It is also good practice to provide a shebang anyway. * tests/qual_fault-syscall.test: Add shebang. * tests/qual_inject-error-signal-syscall.test: Likewise. * tests/qual_inject-retval-syscall.test: Likewise. * tests/qual_inject-signal-syscall.test: Likewise. Resolves: https://github.com/strace/strace/issues/202

view details

Dmitry V. Levin

commit sha a16f5815c0b350e399f2e117c3fe61b4309361ba

tests: remove ATTRIBUTE_ALLOC_SIZE from tail_alloc and tail_memdup Many tests are intentionally feeding their target syscalls with garbage. Unfortunately, the compiler stands in the way, issuing tons of -Warray-bounds and -Wstringop-overread warnings when it is aware of the amount of memory allocated by tail_alloc and tail_memdup. * m4/st_broken_cc.m4: Remove. * configure.ac: Remove st_BROKEN_CC invocation. * tests/tests.h (tail_alloc, tail_memdup): Remove ATTRIBUTE_ALLOC_SIZE attribute. Resolves: https://github.com/strace/strace/issues/203

view details

Eugene Syromyatnikov

commit sha 8edc56b213e35ac9bdeaa13abc2009e9e5c132bd

src/strace.c: remove Yflag_qual It is used only once, contrary to {y,q,t}flag_qual variables. * src/strace.c (init) <Yflag_qual>: Remove. (init) <case 'Y'>: Replace Yflag_qual with "comm" in the argument to qualify_decode_pid. Complements: v5.14-180-g255a59247 "Implement -Y/--decode-pids=comm option for printing command names for PIDs"

view details

Eugene Syromyatnikov

commit sha 4510791737030c7f99638a72d813db0e13b0fa21

Make --decode-pids usage more in line with --decode-fds Enable -e decode-pids syntax and document it in the man page. * src/filter_qualify.c (qual_options): Add "decode-pid" and "decode-pids" that associated with qualify_decode_pid decoder. * tests/options-syntax.test: Add option syntax checks for --decode-pids and -e decode-pids. * doc/strace.1.in (.BI "\-e " expr): Document decode-pids/decode-pid as a possible argument. (.SS Output format): Document -e decode-pids/--decode-pids. Complements: v5.14-184-gbac60e6a0 "Use traditional parser for --decode-pids option"

view details

Eugene Syromyatnikov

commit sha 9d043d7491e246b1cc8bf2c537e1e0234ecfefbd

tests: fix bpf-obj_get_info_by_fd-prog-v expected output Since we cannot reliably predict the value of xlated_prog_len field returned by the kernel, do not hard-code it. * tests/bpf-obj_get_info_by_fd.c (main): Print the value of the xlated_prog_len field returned by the kernel instead of hard-coding an expected value. Fixes: v5.14-46-g835c65c0e "bpf: fix bpf_prog_info.map_ids array printing"

view details

Renaud Métrich

commit sha 48de116c270d011fc98feb3a01bbfe72eb2d3c88

Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used When syscalls use AT_FDCWD (e.g. openat()), the corresponding current working directory is not always obvious, one might need to search back for chdir() syscalls in the process or some of its parents. With this change, the current working directory corresponding to AT_FDCWD is printed when -y (--decode-fd=path) option is used, e.g.: openat(AT_FDCWD</home/rmetrich/GIT/strace>, "/lib64/libselinux.so.1" ...) * src/open.c: Include "number_set.h". (print_dirfd) <fd == AT_FDCWD>: Print the current working directory of tracee when DECODE_FD_PATH is set. * tests/dev-yy.c [!PRINT_AT_FDCWD_PATH] (PRINT_AT_FDCWD_PATH): New macro. (main): Update expected output. * tests/dev--decode-fds-all.c (PRINT_DEVNUM): New macro. Include "dev-yy.c" instead of "dev--decode-fds-dev.c". * tests/dev--decode-fds-dev.c (PRINT_AT_FDCWD_PATH): New macro. * tests/dev--decode-fds-path.c (PRINT_AT_FDCWD_PATH): Likewise. * tests/faccessat.c (AT_FDCWD_FMT, AT_FDCWD_ARG): New macros. (tests_with_existing_file, main): Update expected output. * tests/faccessat2.c (YFLAG): New macro. (main): Update expected output. * tests/fsconfig.c (test_fsconfig_set_path): Update expected output. * tests/fspick.c (main): Likewise. * tests/mount_setattr.c (main): Likewise. * tests/move_mount.c (main): Likewise. * tests/open_tree.c (main): Likewise. * tests/openat2.c (YFLAG, AT_FDCWD_FMT, AT_FDCWD_ARG): New macros. (main): Update expected output. Co-authored-by: Dmitry V. Levin <ldv@strace.io> Resolves: https://github.com/strace/strace/issues/194

view details

Renaud Métrich

commit sha c7b4ee7a65cab1a9d647110d9b25928992f2b854

tests: check corner cases of AT_FDCWD path decoding * tests/at_fdcwd-pathmax.c: New file. * tests/.gitignore: Add at_fdcwd-pathmax. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (at_fdcwd-pathmax): New test. Co-authored-by: Dmitry V. Levin <ldv@strace.io>

view details

Eugene Syromyatnikov

commit sha 11b5d553104d684286bd5c2fa740329f1738a0df

Document AT_FDCWD path decoding feature * doc/strace.1.in (-e decode-fds, -y): Mention that current working directory is printed on AT_FDCWD occurrence in addition to fd path decoding. * NEWS: Mention it. Complements: v5.14-199-g48de116c2 "Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used"

view details

Eugene Syromyatnikov

commit sha 1897e0894a282c0f72fd0f75df7f412a8e951dbb

NEWS: mention --decode-fds={socket,dev,pidfd} behaviour fix Complements: v5.14-193-g8d83c8270 "Do not decode fd path unless --decode-fds=path is specified"

view details

push time in 3 days

PR closed strace/strace

Print cwd path to AT_FDCWD when -y (--decode-fd=path) flag is used

When syscalls use AT_FDCWD (e.g. openat()), it's not always obvious to determine the current directory, one need to search back for any chdir() syscall, in the process or some parent.

This patch prints the path when -y (--decode-fd=path) flag is used, e.g.:

openat(AT_FDCWD</home/rmetrich/GIT/strace>, "/lib64/libselinux.so.1" ...)

Note the initial commit only printed when -y was specified, but it appears that apparently the path decoding for FDs is always performed, even when --decode-fd=dev only is specified for example, hence the final code proposes to keep this behaviour: as soon as --decode-fd is used, AT_FDCWD gets decoded.

This explains the 2 source code commits, all this can be merged if necessary later.

+288 -44

1 comment

16 changed files

rmetrich

pr closed time in 3 days

issue closedstrace/strace

all (gcc-compatible) compilers are reported as broken due to -Werror=missing-prototypes

conftest.c:31:17: error: no previous prototype for 'f' [-Werror=missing-prototypes]
   31 |           char *f(char c) {
      |                 ^

closed time in 3 days

Hello71

PR closed strace/strace

tests: add #!/bin/sh where necessary

musl does not implement the shell fallback for execvpe, causing tests to fail. it is also good practice to provide a shebang anyways.

+4 -0

1 comment

4 changed files

Hello71

pr closed time in 3 days

push eventstrace/strace

Dmitry V. Levin

commit sha 0532bfbdbbe4eb8306f5770b8a15ec5bd08f6ff6

m4: fix st_SELINUX check * m4/st_selinux.m4: Make sure selinux support is enabled only if all expected functions are provided by libselinux. Fixes: v5.12~49 "Implement --secontext[=full] option to display SELinux contexts"

view details

push time in 3 days

push eventstrace/strace

Eugene Syromyatnikov

commit sha 6fe9e2d2204ed83575538d3ee6bfd865c3aae829

Document AT_FDCWD path decoding feature * doc/strace.1.in (-e decode-fds, -y): Mention that current working directory is printed on AT_FDCWD occurrence in addition to fd path decoding. * NEWS: Mention it. Complements: v5.14-199-g48de116c2 "Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used"

view details

Eugene Syromyatnikov

commit sha 09e790337750d1aaadcd2104e3a703f1b0bfd662

NEWS: mention --decode-fds={socket,dev,pidfd} behaviour fix Complements: v5.14-193-g8d83c8270 "Do not decode fd path unless --decode-fds=path is specified"

view details

push time in 3 days

push eventstrace/strace

Renaud Métrich

commit sha c7b4ee7a65cab1a9d647110d9b25928992f2b854

tests: check corner cases of AT_FDCWD path decoding * tests/at_fdcwd-pathmax.c: New file. * tests/.gitignore: Add at_fdcwd-pathmax. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (at_fdcwd-pathmax): New test. Co-authored-by: Dmitry V. Levin <ldv@strace.io>

view details

Eugene Syromyatnikov

commit sha a508485931ffb4ac5911f509c3a1a4b5f206657d

Document AT_FDCWD path decoding feature * doc/strace.1.in (-e decode-fds, -y): Mention that current working directory is printed on AT_FDCWD occurrece in addition to fd path decoding. * NEWS: Mention it. Complements: v5.14-199-g48de116c2 "Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used"

view details

Eugene Syromyatnikov

commit sha faa0fca67f35b640d14a49c6ebf811ece6e57498

NEWS: mention --decode-fds={socket,dev,pidfd} behaviour fix Complements: v5.14-193-g8d83c8270 "Do not decode fd path unless --decode-fds=path is specified"

view details

push time in 3 days

push eventstrace/strace

Renaud Métrich

commit sha 48de116c270d011fc98feb3a01bbfe72eb2d3c88

Print cwd path for AT_FDCWD when -y (--decode-fd=path) option is used When syscalls use AT_FDCWD (e.g. openat()), the corresponding current working directory is not always obvious, one might need to search back for chdir() syscalls in the process or some of its parents. With this change, the current working directory corresponding to AT_FDCWD is printed when -y (--decode-fd=path) option is used, e.g.: openat(AT_FDCWD</home/rmetrich/GIT/strace>, "/lib64/libselinux.so.1" ...) * src/open.c: Include "number_set.h". (print_dirfd) <fd == AT_FDCWD>: Print the current working directory of tracee when DECODE_FD_PATH is set. * tests/dev-yy.c [!PRINT_AT_FDCWD_PATH] (PRINT_AT_FDCWD_PATH): New macro. (main): Update expected output. * tests/dev--decode-fds-all.c (PRINT_DEVNUM): New macro. Include "dev-yy.c" instead of "dev--decode-fds-dev.c". * tests/dev--decode-fds-dev.c (PRINT_AT_FDCWD_PATH): New macro. * tests/dev--decode-fds-path.c (PRINT_AT_FDCWD_PATH): Likewise. * tests/faccessat.c (AT_FDCWD_FMT, AT_FDCWD_ARG): New macros. (tests_with_existing_file, main): Update expected output. * tests/faccessat2.c (YFLAG): New macro. (main): Update expected output. * tests/fsconfig.c (test_fsconfig_set_path): Update expected output. * tests/fspick.c (main): Likewise. * tests/mount_setattr.c (main): Likewise. * tests/move_mount.c (main): Likewise. * tests/open_tree.c (main): Likewise. * tests/openat2.c (YFLAG, AT_FDCWD_FMT, AT_FDCWD_ARG): New macros. (main): Update expected output. Co-authored-by: Dmitry V. Levin <ldv@strace.io> Resolves: https://github.com/strace/strace/issues/194

view details

push time in 4 days

push eventstrace/strace

Dmitry V. Levin

commit sha 8d83c8270ba05878b389b1c646b3d2187d40ad4c

Do not decode fd path unless --decode-fds=path is specified Before this change, --decode-fds with any argument would result to the file path corresponding to the file descriptor being printed even when the descriptor type does not match the type specified by the --decode-fds argument. After this change, the file path corresponding to the file descriptor will be printed only when --decode-fds argument is not specified or contains "path". * src/util.c (print_quoted_string_in_angle_brackets): New function. (printfd_pid): Use it to print the file path when DECODE_FD_PATH is set. * tests/dev--decode-fds-all.c: New file. * tests/dev--decode-fds-none.c: Likewise. * tests/net--decode-fds-all-netlink.c: Likewise. * tests/pidfd_open--decode-fd-all.c: Likewise. * tests/pidfd_open--decode-fd-none.c: Likewise. * tests/dev--decode-fds-socket.c: Include "dev--decode-fds-none.c" instead of "dev-yy.c". (PRINT_DEVNUM): Remove. * tests/dev-yy.c: Add PRINT_PATH support. * tests/net--decode-fds-dev-netlink.c: Include "net--decode-fds-none-netlink.c" instead of net-yy-netlink.c. (PRINT_SOCK): Remove. * tests/pidfd_open--decode-fd-socket.c: Include "pidfd_open--decode-fd-none.c" instead of "pidfd_open-y.c". * tests/.gitignore: Add dev--decode-fds-all, dev--decode-fds-none, net--decode-fds-all-netlink, pidfd_open--decode-fd-all, and pidfd_open--decode-fd-none. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (dev--decode-fds-all, dev--decode-fds-none, net--decode-fds-all-netlink, pidfd_open--decode-fd-all, pidfd_open--decode-fd-none): New tests. (dev--decode-fds-socket): Update argument for -a option. (net--decode-fds-dev-netlink): Add -a option. Reported-by: Renaud Métrich <rmetrich@redhat.com> Fixes: v5.6~168 "strace: add a long option alias for -y"

view details

Alex Xu (Hello71)

commit sha 9e411b8c33e04876d9fc42db2f3ff45774efadac

tests: add shebang where necessary musl does not implement the shell fallback for execvp, causing tests to fail. It is also good practice to provide a shebang anyway. * tests/qual_fault-syscall.test: Add shebang. * tests/qual_inject-error-signal-syscall.test: Likewise. * tests/qual_inject-retval-syscall.test: Likewise. * tests/qual_inject-signal-syscall.test: Likewise. Resolves: https://github.com/strace/strace/issues/202

view details

Dmitry V. Levin

commit sha a16f5815c0b350e399f2e117c3fe61b4309361ba

tests: remove ATTRIBUTE_ALLOC_SIZE from tail_alloc and tail_memdup Many tests are intentionally feeding their target syscalls with garbage. Unfortunately, the compiler stands in the way, issuing tons of -Warray-bounds and -Wstringop-overread warnings when it is aware of the amount of memory allocated by tail_alloc and tail_memdup. * m4/st_broken_cc.m4: Remove. * configure.ac: Remove st_BROKEN_CC invocation. * tests/tests.h (tail_alloc, tail_memdup): Remove ATTRIBUTE_ALLOC_SIZE attribute. Resolves: https://github.com/strace/strace/issues/203

view details

Eugene Syromyatnikov

commit sha 8edc56b213e35ac9bdeaa13abc2009e9e5c132bd

src/strace.c: remove Yflag_qual It is used only once, contrary to {y,q,t}flag_qual variables. * src/strace.c (init) <Yflag_qual>: Remove. (init) <case 'Y'>: Replace Yflag_qual with "comm" in the argument to qualify_decode_pid. Complements: v5.14-180-g255a59247 "Implement -Y/--decode-pids=comm option for printing command names for PIDs"

view details

Eugene Syromyatnikov

commit sha 4510791737030c7f99638a72d813db0e13b0fa21

Make --decode-pids usage more in line with --decode-fds Enable -e decode-pids syntax and document it in the man page. * src/filter_qualify.c (qual_options): Add "decode-pid" and "decode-pids" that associated with qualify_decode_pid decoder. * tests/options-syntax.test: Add option syntax checks for --decode-pids and -e decode-pids. * doc/strace.1.in (.BI "\-e " expr): Document decode-pids/decode-pid as a possible argument. (.SS Output format): Document -e decode-pids/--decode-pids. Complements: v5.14-184-gbac60e6a0 "Use traditional parser for --decode-pids option"

view details

Eugene Syromyatnikov

commit sha 9d043d7491e246b1cc8bf2c537e1e0234ecfefbd

tests: fix bpf-obj_get_info_by_fd-prog-v expected output Since we cannot reliably predict the value of xlated_prog_len field returned by the kernel, do not hard-code it. * tests/bpf-obj_get_info_by_fd.c (main): Print the value of the xlated_prog_len field returned by the kernel instead of hard-coding an expected value. Fixes: v5.14-46-g835c65c0e "bpf: fix bpf_prog_info.map_ids array printing"

view details

push time in 4 days

push eventstrace/strace

Eugene Syromyatnikov

commit sha c5376adfce8e2f7434196968a75ddd01cf18ebc4

Make --decode-pids usage more in line with --decode-fds Enable -e decode-pids syntax and document it in the man page. * src/filter_qualify.c (qual_options): Add "decode-pid" and "decode-pids" that associated with qualify_decode_pid decoder. * tests/options-syntax.test: Add option syntax checks for --decode-pids and -e decode-pids. * doc/strace.1.in (.BI "\-e " expr): Document decode-pids/decode-pid as a possible argument. (.SS Output format): Document -e decode-pids/--decode-pids. Complements: v5.14-184-gbac60e6a0 "Use traditional parser for --decode-pids option"

view details

push time in 4 days

push eventstrace/strace

Alex Xu (Hello71)

commit sha 47b493eb685bf9714bcdce62727931e8a30ff145

tests: add shebang where necessary musl does not implement the shell fallback for execvp, causing tests to fail. It is also good practice to provide a shebang anyway. * tests/qual_fault-syscall.test: Add shebang. * tests/qual_inject-error-signal-syscall.test: Likewise. * tests/qual_inject-retval-syscall.test: Likewise. * tests/qual_inject-signal-syscall.test: Likewise. Resolves: https://github.com/strace/strace/issues/202

view details

Dmitry V. Levin

commit sha 9f3762741cf5b1b148e69678c971d49c42e9e73e

tests: remove ATTRIBUTE_ALLOC_SIZE from tail_alloc and tail_memdup Many tests are intentionally feeding their target syscalls with garbage. Unfortunately, the compiler stands in the way, issuing tons of -Warray-bounds and -Wstringop-overread warnings when it is aware of the amount of memory allocated by tail_alloc and tail_memdup. * m4/st_broken_cc.m4: Remove. * configure.ac: Remove st_BROKEN_CC invocation. * tests/tests.h (tail_alloc, tail_memdup): Remove ATTRIBUTE_ALLOC_SIZE attribute. Resolves: https://github.com/strace/strace/issues/203

view details

Eugene Syromyatnikov

commit sha 16a1aa56d2001abb35d83ca9b9dc99907ce19b05

src/strace.c: remove Yflag_qual It is used only once, contrary to {y,q,t}flag_qual variables. * src/strace.c (init) <Yflag_qual>: Remove. (init) <case 'Y'>: Replace Yflag_qual with "comm" in the argument to qualify_decode_pid. Complements: v5.14-180-g255a59247 "Implement -Y/--decode-pids=comm option for printing command names for PIDs"

view details

Eugene Syromyatnikov

commit sha 1e37fef7f36d7bf4e82b4310e96130b9b123312b

Make --decode-pids usage more in line with --decode-fds Enable -e decode-pids syntax and document it in the man page. * src/filter_qualify.c (qual_options): Add "decode-pid" and "decode-pids" that associated with qualify_decode_pid decoder. * tests/options-syntax.test: Add option syntax checks for --decode-pids and -e decode-pids. * doc/strace.1.in (.BI "\-e " expr): Document decode-pids/decode-pid as a possible argument. (.SS Output format): Document -e decode-pids/--decode-pids. Complements: v5.14-184-gbac60e6a0 "Use traditional parser for --decode-pids option"

view details

push time in 4 days

push eventstrace/strace

Dmitry V. Levin

commit sha d00ccc6bbda8bcf5fc7987e048e3e271ffc1a484

Move printing of angle brackets from printfd_pid to individual printers This is required by the follow-up change. * src/defs.h (print_sockaddr_by_inode): Remove. * src/socketutils.c (print_sockaddr_by_inode_cached, print_sockaddr_by_inode_uncached, print_sockaddr_by_inode): Likewise. (get_sockaddr_by_inode_uncached): Rename to get_sockaddr_by_inode_lookup, implement get_sockaddr_by_inode_uncached on top of it. * src/util.c (printsocket): Rewrite using get_sockaddr_by_inode instead of print_sockaddr_by_inode, print angle brackets around the output string. (printdev, printpidfd): Print angle brackets around the output string. (printfd_pid): Do not print angle brackets around the output string.

view details

Dmitry V. Levin

commit sha 08ff24b96a1092cb39bb3970ed600973dc713031

Do not decode fd path unless --decode-fds=path is specified Before this change, --decode-fds with any argument would result to the file path corresponding to the file descriptor being printed even when the descriptor type does not match the type specified by the --decode-fds argument. After this change, the file path corresponding to the file descriptor will be printed only when --decode-fds argument is not specified or contains "path". * src/util.c (print_quoted_string_in_angle_brackets): New function. (printfd_pid): Use it to print the file path when DECODE_FD_PATH is set. * tests/dev--decode-fds-all.c: New file. * tests/dev--decode-fds-none.c: Likewise. * tests/net--decode-fds-all-netlink.c: Likewise. * tests/pidfd_open--decode-fd-all.c: Likewise. * tests/pidfd_open--decode-fd-none.c: Likewise. * tests/dev--decode-fds-socket.c: Include "dev--decode-fds-none.c" instead of "dev-yy.c". (PRINT_DEVNUM): Remove. * tests/dev-yy.c: Add PRINT_PATH support. * tests/net--decode-fds-dev-netlink.c: Include "net--decode-fds-none-netlink.c" instead of net-yy-netlink.c. (PRINT_SOCK): Remove. * tests/pidfd_open--decode-fd-socket.c: Include "pidfd_open--decode-fd-none.c" instead of "pidfd_open-y.c". * tests/.gitignore: Add dev--decode-fds-all, dev--decode-fds-none, net--decode-fds-all-netlink, pidfd_open--decode-fd-all, and pidfd_open--decode-fd-none. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (dev--decode-fds-all, dev--decode-fds-none, net--decode-fds-all-netlink, pidfd_open--decode-fd-all, pidfd_open--decode-fd-none): New tests. (dev--decode-fds-socket): Update argument for -a option. (net--decode-fds-dev-netlink): Add -a option. Fixes: v5.6~168 "strace: add a long option alias for -y"

view details

push time in 5 days

PullRequestReviewEvent
more