[PATCH v4 1/7] PID namespace translation support
Dmitry V. Levin
ldv at altlinux.org
Sat Aug 1 13:51:29 UTC 2020
On Mon, Jul 27, 2020 at 08:54:04PM +0200, Ákos Uzonyi wrote:
[...]
> @@ -983,6 +1001,11 @@ print_local_array_ex(struct tcb *tcp,
> 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 translate_pid(struct tcb *tcp, int dest_id, enum pid_type type,
> + int *proc_pid_ptr);
> +
> extern void
> dumpiov_in_msghdr(struct tcb *, kernel_ulong_t addr, kernel_ulong_t data_size);
>
> @@ -1058,6 +1081,8 @@ printfd(struct tcb *tcp, int fd)
> * of the tracee the descriptor tcp). This is a stub.
> */
> extern void printfd_pid_tracee_ns(struct tcb *tcp, pid_t pid, int fd);
> +extern void printpid(struct tcb *tcp, int pid, enum pid_type type);
> +extern void printpid_translation(struct tcb *tcp, int pid, enum pid_type type);
> extern void print_sockaddr(const void *sa, int len);
> extern bool
> print_inet_addr(int af, const void *addr, unsigned int len, const char *var_name);
There is no strict rule, but in general we prefer "struct tcb *"
to "struct tcb *tcp" in function declarations because the former
is 3 symbols shorter and the latter does not add any more clarity.
--
ldv
More information about the Strace-devel
mailing list