aboutsummaryrefslogtreecommitdiffstats
path: root/man5
diff options
context:
space:
mode:
authorKeno Fischer <keno@juliacomputing.com>2018-08-02 20:07:14 -0400
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-08-04 09:15:56 +0200
commit0aae409212db2668945afec2da783e60c80e1b21 (patch)
tree05be622404c5796a39f97120db301492fb4767fd /man5
parent04ad9324263d830ed7a76a762bca32f34943fdf2 (diff)
downloadman-pages-0aae409212db2668945afec2da783e60c80e1b21.tar.gz
proc.5: Correct description of NStgid
The left-most pid namespace in a given procfs' `NStgid` does not change based on the pid namespace of the reading process. Rather, each procfs has an associated outer-most namespace, which gets set when the procfs is mounted: ``` static struct dentry *proc_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { struct pid_namespace *ns; if (flags & MS_KERNMOUNT) { ns = data; data = NULL; } else { ns = task_active_pid_ns(current); } return mount_ns(fs_type, flags, data, ns, ns->user_ns, proc_fill_super); } ``` i.e. either the root namespace for kernel mounts or the namespace of the mounting process. This ns then gets saved in the fs' super block and is the basis for most operations. It is this ns that the left-most value of `NStgid` is relative to, not the reading process. Reported-by: Robert O'Callahan <robert@ocallahan.org> Signed-off-by: Keno Fischer <keno@juliacomputing.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man5')
-rw-r--r--man5/proc.53
1 files changed, 2 insertions, 1 deletions
diff --git a/man5/proc.5 b/man5/proc.5
index c01aed2b18..34cb957dd0 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -2356,7 +2356,8 @@ Thread group ID (i.e., PID) in each of the PID namespaces of which
.I [pid]
is a member.
The leftmost entry shows the value with respect to the PID namespace
-of the reading process,
+of the process that mounted this procfs (or the root namespace
+if mounted by the kernel),
followed by the value in successively nested inner namespaces.
.\" commit e4bc33245124db69b74a6d853ac76c2976f472d5
(Since Linux 4.1.)