Skip to content

RFC Pid namespaces

Pavel Emelyanov containers 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest15 patches 88 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15Move exit_task_namespaces()kernel/exit.c+0 -020 replies
2/15Introduce MS_KERNMOUNT flagfs/namespace.c fs/super.c include/linux/fs.h+0 -00 replies
3/15kern_siginfo helperinclude/linux/signal.h kernel/signal.c+0 -03 replies
4/15Make proc_flust_task() flush entries from multiple proc treesfs/proc/base.c include/linux/proc_fs.h kernel/exit.c+0 -00 replies
5/15Introduce struct upidinclude/linux/init_task.h include/linux/pid.h+1 -32 replies
6/15Make alloc_pid(), free_pid() and put_pid() work with struct upidinclude/linux/pid.h kernel/pid.c+0 -02 replies
7/15Helpers to obtain pid numbersinclude/linux/pid.h include/linux/sched.h kernel/pid.c+0 -04 replies
8/15Helpers to find the task by its numerical idsinclude/linux/pid.h include/linux/sched.h kernel/pid.c+0 -04 replies
9/15Move alloc_pid() after the namespace is clonedkernel/fork.c+0 -04 replies
10/15Make each namespace has its own proc treefs/proc/base.c fs/proc/inode.c fs/proc/root.c +5 more+0 -05 replies
11/15Signal semanticsinclude/linux/pid.h include/linux/signal.h kernel/pid.c +1 more+0 -011 replies
12/15Miscelaneous stuff for pid namespacesinclude/linux/pid_namespace.h include/linux/sched.h kernel/pid.c+1 -12 replies
13/15Clone the pid namespaceinclude/linux/pid_namespace.h include/linux/sched.h kernel/nsproxy.c +1 more+0 -00 replies
14/15Destroy pid namespace on init's deathinclude/linux/pid.h include/linux/wait.h kernel/exit.c +1 more+0 -023 replies
15/15Hooks over the code to show correct values to userarch/ia64/kernel/signal.c arch/parisc/kernel/signal.c arch/sparc/kernel/sys_sunos.c +26 more+0 -05 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchPavel Emelyanov
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15A-b A-b A-b A-b
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC][PATCH 0/15] Pid namespaces

(Comment is taken from Sukadev's patchset-v3)

A pid namespace is a "view" of a particular set of tasks on the system.
They work in a similar way to filesystem namespaces. A file (or a process)
can be accessed in multiple namespaces, but it may have a different name in each. In a filesystem, this name might be /etc/passwd in one namespace, but /chroot/etc/passwd in another.

For processes, a process may have pid 1234 in one namespace, but be pid 1 in another. This allows new pid namespaces to have basically arbitrary pids, and not have to worry about what pids exist in other namespaces. This is essential for checkpoint/restart where a restarted process's pid might collide with an existing process on the system's pid.

In this particular implementation, pid namespaces have a parent-child relationship, just like processes. A process in a pid namespace may see all of the processes in the same namespace, as well as all of the processes in all of the namespaces which are children of its namespace. Processes may not, however, see others which are in their parent's namespace, but not in their own. The same goes for sibling namespaces.

This set is based on my patches, I sent before, but it includes some comments and patches that I received from Sukadev. Sukadev, please, add your Acked-by, Signed-off-by or From, to patches you want (everybody is also welcome :) ).

The set is based on 2.6.23-rc1-mm1, which already has some preparation patches
for pid namespaces. After the review and fixing all the comments, this set will be benchmarked and sent to Andrew for inclusion in -mm tree.