[PATCH 0/7] pidfd_getfd: fix decoder

Ákos Uzonyi uzonyi.akos at gmail.com
Wed Apr 22 18:06:17 UTC 2020


From: Uzonyi Ákos <uzonyi.akos at gmail.com>

These patches fix pidfd_getfd decoder, which incorrectly assumed its
first argument being a pid, but actually that is a pidfd.

First, some functions are added to util.c, which makes the decoding possible.

Ákos Uzonyi (7):
  pathtrace.c: add getfdpath_pid
  util.c: add printfd_pid
  Rename print_pid_fd -> printfd_pid_tracee_ns
  util.c: add pidfd_get_pid
  util.c: pidfd_get_pid: check if pidfd refers to a non visible process
  pidfd_getfd: fix decoder
  tests/pidfd_getfd.c: test decoding of targetfd

 defs.h              | 13 ++++++++++-
 kcmp.c              |  8 +++----
 pathtrace.c         | 15 ++++++++++---
 pidfd_getfd.c       | 20 ++++++++++++-----
 tests/pidfd_getfd.c | 16 ++++++++++----
 util.c              | 53 ++++++++++++++++++++++++++++-----------------
 6 files changed, 87 insertions(+), 38 deletions(-)

--
2.26.1



More information about the Strace-devel mailing list