[PATCH v3 0/6] pidfd_getfd: fix decoder
Dmitry V. Levin
ldv at altlinux.org
Sun May 31 17:46:13 UTC 2020
On Sun, May 24, 2020 at 12:41:32PM +0200, Ákos Uzonyi wrote:
> 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.
>
> Changes in v3:
> Restore optimization of printpidfd
> Use dup (not dup2) in test
> Use pipe (not sleep) for synchronization in test
> Changes in v2:
> Check pid validity by ">0" instead of ">=0"
> Use different fd number in test
>
> Ákos Uzonyi (6):
> pathtrace.c: add getfdpath_pid
> util.c: add printfd_pid
> Rename print_pid_fd -> printfd_pid_tracee_ns
> util.c: add pidfd_get_pid
> 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/gen_tests.in | 6 ++---
> tests/pidfd_getfd.c | 35 ++++++++++++++++++++++++-----
> util.c | 54 +++++++++++++++++++++++++++------------------
> 7 files changed, 108 insertions(+), 43 deletions(-)
Merged, thanks!
--
ldv
More information about the Strace-devel
mailing list