[PATCH v4 5/7] Use get_proc_pid for /proc paths
Dmitry V. Levin
ldv at altlinux.org
Fri Jul 31 11:34:07 UTC 2020
On Mon, Jul 27, 2020 at 08:54:08PM +0200, Ákos Uzonyi wrote:
> * defs.h (get_proc_pid): New function definition.
> * mmap_cache.c (mmap_cache_rebuild_if_invalid): Use proc pid instead of
> tcp->pid for /proc path.
> * util.c (getfdproto): Likewise.
> (pidfd_get_pid): Likewise.
> * pathtrace.c (getfdpath_pid): Likewise.
> * strace.c (attach_tcb): Likewise.
> ---
> defs.h | 2 +-
> mmap_cache.c | 2 +-
> pathtrace.c | 5 ++++-
> strace.c | 2 +-
> util.c | 7 +++++--
> 5 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/defs.h b/defs.h
> index 2a583906..ff3320c0 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -1002,7 +1002,7 @@ extern kernel_ulong_t *
> fetch_indirect_syscall_args(struct tcb *, kernel_ulong_t addr, unsigned int n_args);
>
> extern void pidns_init(void);
> -
> +extern int get_proc_pid(struct tcb *tcp);
> extern int translate_pid(struct tcb *tcp, int dest_id, enum pid_type type,
> int *proc_pid_ptr);
>
Let's move the declaration of this function to the commit that introduces
its definition.
--
ldv
More information about the Strace-devel
mailing list