[RFC][PATCH 0/5] Remove nsproxy->pid_ns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxx>
Subject [RFC][PATCH 0/5] Remove nsproxy->pid_ns

We need to decouple pid namespace from nsproxy to allow getting and
releasing pid namespace independently from other namespaces. This is
required since a process's reference to its pid namespace must exist
even after its references to other namespaces are dropped during
process exit.

This patchset accomplishes this by using the pid->pid_nrs list defined
in earlier patches. As noted from that patchset, pid->pid_nrs list
allows each process to have multiple pid_t values, one per each namespace.

We define a task's clone-pid-namespace as the pid namespace that the
process last unshared into. If the process never unshared its pid namespace,
then its clone-pid-namespace is same as its parent clone-pid-namespace
(possibly init-pid-ns), when the process was created.

When a process unshares its pid namespace, we allocate a new struct pid_nr
and attach this pid_nr at the head of the pid->pid_nrs list.

The task_pid_ns() wrapper always returns this clone-pid-ns of the task
and returns the pid namespace from the head of the pid->pid_nrs list.

This patch set includes following 5 patches:

[PATCH 1/5]
	Rename *namespaces() functions to *nsproxy() to reflect that
	these functions only operate on an nsproxy and not on all
	namespaces.

[PATCH 2/5]
	Define helper functions to use as we move pid namespace out of
	nsproxy 

[PATCH 3/5]
	Use pid_namespace in struct pid_nr rather than nsproxy->pid_ns.

[PATCH 4/5]
	Remove the struct pid_namespace * from struct nsproxy

[PATCH 5/5]
	Remove the now-unused function, copy_pid_ns().


Signed-off-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxx>
Cc: Cedric Le Goater <clg@xxxxxxxxxx>
Cc: Dave Hansen <haveblue@xxxxxxxxxx>
Cc: Serge Hallyn <serue@xxxxxxxxxx>
Cc: containers@xxxxxxxxxxxxxx
---
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux