[PATCH v4 1/7] PID namespace translation support
Ákos Uzonyi
uzonyi.akos at gmail.com
Thu Jul 30 16:00:02 UTC 2020
On Thu, 30 Jul 2020 at 16:28, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Mon, Jul 27, 2020 at 08:54:04PM +0200, Ákos Uzonyi wrote:
[...]
> > diff --git a/defs.h b/defs.h
> > index 21f8775d..4df21700 100644
> > --- a/defs.h
> > +++ b/defs.h
> > @@ -280,6 +280,9 @@ struct tcb {
> > struct timespec etime; /* Syscall entry time (CLOCK_MONOTONIC) */
> > struct timespec delay_expiration_time; /* When does the delay end */
> >
> > + uint64_t pid_ns;
> > + bool pid_ns_inited;
> > +
> > struct mmap_cache_t *mmap_cache;
> >
> > /*
>
> Hmm, this adds a hole between pid_ns and mmap_cache fields on 64-bit systems.
>
> I wonder whether we need pid_ns_inited field at all. If I read the kernel
> correctly, pid_ns is assigned from struct ns_common.inum of type unsigned int.
I'm not sure how you suggest replacing the functionality of
pid_ns_inited. It's there to distinguish the cases when pid_ns is not
initialized, and when initialization is failed with an error (in both
cases pid_ns is 0).
More information about the Strace-devel
mailing list