[Devel] Re: [RFC][PATCH 4/4] introduce proc_mnt for pid_ns

2007-02-01 Thread sukadev
Dave Hansen [EMAIL PROTECTED] wrote: | | The following patch completes the removal of proc_mnt. It fetches | the mnt on which to do dentry invalidations from the pid_namespace | in which the task appears. | | For now, there is only one pid namespace in mainline so this is | straightforward. In

[Devel] [PATCH 0] Miscellaneous pidspace patches

2007-02-22 Thread sukadev
Here are a few pidspace patches I have been working on and would like to seek comments on before sending them to LKML. Some of these were included in 2.6.20-rcX-mm1 but were dropped due to some collisions. Andrew wanted us to retest and send them out. Some were already reviewed earlier once

[Devel] [PATCH 2/2] Explicitly set pgid and sid of init

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 2/2] Explicitly set pgid and sid of init Explicitly set pgid and sid of init process to 1. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED] Cc: Serge Hallyn

[Devel] [PATCH] attach_pid() with struct pid parameter

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] attach_pid() with struct pid parameter attach_pid() currently takes a pid_t and then uses find_pid() to find the corresponding struct pid. Sometimes we already have the struct pid. We can then skip find_pid() if attach_pid() were

[Devel] [PATCH] Use struct pid parameter in copy_process()

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] Use struct pid parameter in copy_process() Modify copy_process() to take a struct pid * parameter instead of a pid_t. This simplifies the code a bit and also avoids having to call find_pid() to convert the pid_t to a struct pid. Signed

[Devel] [PATCH] Use task_pgrp() and task_session() in setpgid/setsid

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] Use task_pgrp() and task_session() in setpgid/setsid Use the container-friendly interfaces task_pgrp() and task_session() in getpgid() and setpgid(). Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL

[Devel] [PATCH] pidspace rocket driver

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] pidspace rocket driver The process_session() and process_group() values are not really used by the driver. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED

[Devel] [PATCH] Use task_pgrp() and task_session in binfmt

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] Use task_pgrp() and task_session in binfmt Use container friendly interfaces task_pgrp() and task_session() in binfmt files Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen

[Devel] [PATCH 2/4] Replace pid_t in autofs with struct pid reference

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 2/4] Replace pid_t in autofs with struct pid reference. Make autofs container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a task's pid_t. ChangeLog: - Fix Eric Biederman's comments

[Devel] [PATCH 3/4] Replace pid_t in autofs4 with struct pid reference.

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 3/4] Replace pid_t in autofs4 with struct pid reference. Make autofs4 container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a task's pid_t. ChangeLog: - Fix Eric Biederman's

[Devel] [PATCH 4/4] Use task_pgrp() in autofs/autofs4

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 4/4] Use task_pgrp() in autofs/autofs4 Replace process_group(tsk) with pid_nr(task_pgrp(tsk)) in autofs and autofs4. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL

[Devel] [PATCH] pidspace coda fs

2007-02-22 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] pidspace coda fs Use container-safe interfaces for pid and pgid in coda. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED] Cc: Serge Hallyn [EMAIL PROTECTED

[Devel] Re: [PATCH] Use struct pid parameter in copy_process()

2007-02-23 Thread sukadev
Eric W. Biederman [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] writes: | | From: Sukadev Bhattiprolu [EMAIL PROTECTED] | Subject: [PATCH] Use struct pid parameter in copy_process() | | Modify copy_process() to take a struct pid * parameter instead of a pid_t. | This simplifies the code a bit

[Devel] [PATCH 3/5] Use struct pid parameter in copy_process()

2007-02-28 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 3/5] Use struct pid parameter in copy_process() Modify copy_process() to take a struct pid * parameter instead of a pid_t. This simplifies the code a bit and also avoids having to call find_pid() to convert the pid_t to a struct pid

[Devel] [PATCH 2/5] Explicitly set pgid and sid of init process

2007-02-28 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 2/5] Explicitly set pgid and sid of init process Explicitly set pgid and sid of init process to 1. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED] Cc: Serge

[Devel] [PATCH] pidspace rocket driver

2007-02-28 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] pidspace rocket driver The process_session() and process_group() values are not really used by the driver. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED

[Devel] [PATCH 2/3] Replace pid_t in autofs with struct pid reference

2007-02-28 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 2/3] Replace pid_t in autofs with struct pid reference. Make autofs container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a task's pid_t. ChangeLog: - Fix Eric Biederman's comments

[Devel] [PATCH 3/3] Replace pid_t in autofs4 with struct pid reference.

2007-02-28 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 3/3] Replace pid_t in autofs4 with struct pid reference. Make autofs4 container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a task's pid_t. ChangeLog: - Fix Eric Biederman's

[Devel] [RFC][PATCH 2/6] Reimplement pid_nr() using struct pid_nr

2007-03-09 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject [RFC][PATCH 2/6] Reimplement pid_nr() using struct pid_nr Replace the pid_nr() stub with a version that uses struct pid_nr and returns the pid_t based on the pid namespace of the caller. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc

[Devel] [RFC][PATCH] Define/use task_pid_ns() wrapper

2007-03-09 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH] Define/use task_pid_ns() wrapper Use a wrapper to access/set pid_namespace of a task. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED] Cc: Serge Hallyn

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

2007-03-09 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] 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

[Devel] [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list

2007-03-09 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 3/5] Use pid namespace from struct pid_nrs list Stop using task-nsproxy-pid_ns. Use pid_namespace from pid-pid_nrs list instead. To simplify error handling, this patch moves processing of CLONE_NEWPID flag, currently

[Devel] [RFC][PATCH] Remove copy_pid_ns()

2007-03-09 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH] Remove copy_pid_ns() as its no longer needed. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc: Dave Hansen [EMAIL PROTECTED] Cc: Serge Hallyn [EMAIL PROTECTED] Cc: [EMAIL PROTECTED

[Devel] Re: [RFC][PATCH 5/5] Remove copy_pid_ns()

2007-03-09 Thread sukadev
This is actually PATCH 5/5. [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: | | From: Sukadev Bhattiprolu [EMAIL PROTECTED] | Subject: [RFC][PATCH 5/5] Remove copy_pid_ns() | | Remove copy_pid_ns() as its no longer needed. | | Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] | Cc: Cedric Le

[Devel] Re: [RFC][PATCH 6/6]: Enable unsharing pid namespace.

2007-03-12 Thread sukadev
struct pid_nrs per | process, one for each namespace. | | Signed-off-by: Cedric Le Goater [EMAIL PROTECTED] | Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] | | --- | include/linux/sched.h |1 + | kernel/fork.c | 22 ++ | kernel/nsproxy.c |5

[Devel] [PATCH 4/5] Remove the likely(pid) check in copy_process

2007-03-12 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 4/5] Remove the likely(pid) check in copy_process Now that we pass in a struct pid parameter to copy_process() and even the swapper (pid_t == 0) has a valid struct pid, we no longer need this check. Changelog: Per Eric

[Devel] [PATCH] Kill unused sesssion and group values in rocket driver

2007-03-12 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] Kill unused sesssion and group values in rocket driver The process_session() and process_group() values are not really used by the driver. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le Goater [EMAIL PROTECTED] Cc

[Devel] [PATCH 1/2] Fix some coding-style errors in autofs

2007-03-12 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 1/2] Fix some coding-style errors in autofs Fix coding style errors (extra spaces, long lines) in autofs and autofs4 files being modified for container/pidspace issues. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc: Cedric Le

[Devel] [PATCH 2/2] Replace pid_t in autofs with struct pid reference

2007-03-12 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 2/2] Replace pid_t in autofs with struct pid reference. Make autofs container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a task's pid_t. ChangeLog: - Fix Eric Biederman's comments

[Devel] Re: [PATCH 1/2] Fix some coding-style errors in autofs

2007-03-13 Thread sukadev
of this. --- From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 1/2] Fix some coding-style errors in autofs Fix coding style errors (extra spaces, long lines) in autofs and autofs4 files being modified for container/pidspace issues. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] Cc

[Devel] [RFC][PATCH 02/14] Move alloc_pid call to copy_process

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 02/14] Move alloc_pid call to copy_process Move alloc_pid() into copy_process(). This will help in code to support cloning of pid namespace. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- kernel/fork.c | 31

[Devel] [RFC][PATCH 03/14] use pid_nr in procfs

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 03/14] use pid_nr in procfs With containers, a process can have different pid_t values in different pid namespaces. To ensure we get the correct pid_t value in any context, we should use pid_nr() function rather than directly

[Devel] [RFC][PATCH 05/14] Initialize struct pid_nr for swapper

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 05/14] Initialize struct pid_nr for swapper. Statically initialize a struct pid_nr for the swapper process. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- include/linux/init_task.h | 10 ++ kernel/pid.c

[Devel] [RFC][PATCH 04/14] Add struct pid_nr and pid_nrs list

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 04/14] Add struct pid_nr and pid_nrs list A struct pid_nr associates a pid_t value with a pid namespace. We attach a list of struct pid_nr entries to a struct pid (pid-pid_nrs), allowing the struct pid to take different pid_t

[Devel] [RFC][PATCH 07/14] Remove unused pid_chain from struct pid

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 07/14] Remove unused pid_chain from struct pid Now that we use struct pid_nr entries in the pid_hash table, we no longer need pid_chain field in struct pid. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- include/linux

[Devel] [RFC][PATCH 10/14] Use pid ns from pid_nrs list

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 10/14] Use pid ns from pid_nrs list 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

[Devel] [RFC][PATCH 13/14] Define CLONE_NEWPID flag

2007-03-20 Thread sukadev
This was discussed on containers and we thought it would be useful to reserve this flag. --- From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 13/14] Define CLONE_NEWPID flag Define CLONE_NEWPID flag that will be used to clone pid namespaces. Signed-off-by: Sukadev Bhattiprolu

[Devel] [RFC][PATCH 06/14] Populate pid_nrs list with entry for init-pid-ns

2007-03-20 Thread sukadev
PROTECTED] Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- include/linux/pid.h |9 -- kernel/pid.c| 73 ++-- 2 files changed, 50 insertions(+), 32 deletions(-) Index: 2.6.21-rc3-mm2/kernel/pid.c

[Devel] [RFC][PATCH 12/14] Remove copy_pid_ns function

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 12/14] Remove copy_pid_ns function Remove the copy_pid_ns() function as we have decoupled pid namespace from nsproxy and also because we currently disallow unsharing of pid namespace. Signed-off-by: Sukadev Bhattiprolu [EMAIL

[Devel] [RFC][PATCH 09/14] Save leaders struct pid before detach_pid()

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 09/14] Save leaders struct pid before detach_pid() Save the struct pid of the thread group leader before detaching our pid. See comments in the code below for more details. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED

[Devel] [RFC][PATCH 14/14] Enable cloning pid namespace

2007-03-20 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 14/14] Enable cloning pid namespace When clone() is invoked with CLONE_NEWPID, create a new pid namespace and then create a new struct pid for the new process. Allocate pid_ts for the new process in the new pid namespace and all

[Devel] [PATCH] Define CLONE_NEWPID flag

2007-03-21 Thread sukadev
This was discussed on containers and we thought it would be useful to reserve this flag. --- From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH] Define CLONE_NEWPID flag Define CLONE_NEWPID flag that will be used to clone pid namespaces. Signed-off-by: Sukadev Bhattiprolu [EMAIL

[Devel] IPC NS tests ?

2007-04-12 Thread sukadev
Kirill, We are working on getting a few UTS namespace tests included in Linux Testsuite Project (LTP) and were wondering if you (or anyone else) had any test cases for IPC namespace. If there are tests for IPC NS, can you share those tests with us ? And, do you have any plans to push the tests

[Devel] [RFC][PATCH 0/16] Enable cloning of pid namespace

2007-05-23 Thread sukadev
Dave, Serge, Here is my current pid namespace patchset. There are still a couple of issues I am investigating, but appreciate any feedback. Suka --- From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [RFC][PATCH 0/16] Enable clone pid namespace A pid namespace is a view of a particular set

[Devel] [RFC][PATCH 01/16] Define/use task_active_pid_ns() wrapper

2007-05-23 Thread sukadev
Subject: Define/use task_active_pid_ns() wrapper From: Sukadev Bhattiprolu [EMAIL PROTECTED] A process is visible in one or more pid namespaces, as it is known by some pid_t in every ancestor pid namespace. Every time the process forks, the child process also gets a pid_t in every ancestor

[Devel] [RFC][PATCH 02/16] Rename pid_nr function

2007-05-23 Thread sukadev
Subject: Rename pid_nr function From: Sukadev Bhattiprolu [EMAIL PROTECTED] Rename pid_nr() function to pid_to_nr() which is more descriptive and will hopefully cause less confusion with new structure/functions being added to support multiple pid namespaces. Signed-off-by: Sukadev Bhattiprolu

[Devel] [RFC][PATCH 03/16] Rename child_reaper function

2007-05-23 Thread sukadev
Subject: Rename child_reaper function. From: Sukadev Bhattiprolu [EMAIL PROTECTED] Rename the child_reaper() function to task_child_reaper() to be inline with other task_* functions and to distinguish the function from struct pid_namspace.child_reaper. Signed-off-by: Sukadev Bhattiprolu

[Devel] [RFC][PATCH 04/16] Use pid_to_nr() in process info functions

2007-05-23 Thread sukadev
Subject: Use pid_to_nr() in process info functions From: Sukadev Bhattiprolu [EMAIL PROTECTED] Use pid_to_nr() function in getppid(), getpgid() and getsid() functions so they return the correct pid_t for processes in multiple pid namespaces. Note: We don't need pid_to_nr() in getpid() because

[Devel] [RFC][PATCH 05/16] Use task_pid() to find leader's pid

2007-05-23 Thread sukadev
Subject: Use task_pid() to find leader's pid From: Sukadev Bhattiprolu [EMAIL PROTECTED] Use task_pid() to get leader's pid since find_pid() cannot be used after detach_pid(). See comments in the code below for more details. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- fs/exec.c

[Devel] [RFC][PATCH 06/16] Define is_global_init()

2007-05-23 Thread sukadev
namespace is the init_pid_ns. Changelog: 2.6.21-mm2-pidns2: - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc, ppc,avr32}/traps.c for the _exception() call to is_global_init(). This way, we kill only the container if the container's init has

[Devel] [RFC][PATCH 07/16] Move alloc_pid call to copy_process

2007-05-23 Thread sukadev
Subject: Move alloc_pid call to copy_process From: Sukadev Bhattiprolu [EMAIL PROTECTED] Move alloc_pid() into copy_process(). This will keep all pid and pid namespace code together and simplify error handling when we support multiple pid namespaces. Changelog: - [Eric Biederman] Move

[Devel] [RFC][PATCH 08/16] Define/use pid-upid_list list.

2007-05-23 Thread sukadev
Subject: Define/use pid-upid_list list. From: Sukadev Bhattiprolu [EMAIL PROTECTED] With multiple pid namespaces, a process would be known by several pid_t values, one in each pid namespace. To represent this, we introduce a 'struct upid' which associates a single pid_t value with a single pid

[Devel] [RFC][PATCH 09/16] Use pid ns from pid-upid_list

2007-05-23 Thread sukadev
Subject: Use pid ns from pid-upid_list From: Sukadev Bhattiprolu [EMAIL PROTECTED] 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

[Devel] [RFC][PATCH 10/16] Define CLONE_NEWPID flag

2007-05-23 Thread sukadev
Subject: Define CLONE_NEWPID flag From: Sukadev Bhattiprolu [EMAIL PROTECTED] This was discussed on containers and we thought it would be useful to reserve this flag. TODO: Merge this with the next patch ? Define CLONE_NEWPID flag that will be used to clone pid namespaces. Signed-off

[Devel] [RFC][PATCH 11/16] Enable cloning pid namespace

2007-05-23 Thread sukadev
Subject: Enable cloning pid namespace From: Sukadev Bhattiprolu [EMAIL PROTECTED] When clone() is invoked with CLONE_NEWPID, create a new pid namespace and then create a new struct pid for the new process. Allocate pid_t's for the new process in the new pid namespace and all ancestor pid

[Devel] [RFC][PATCH 12/16] Terminate processes in a ns when reaper is exiting.

2007-05-23 Thread sukadev
Subject: Terminate processes in a ns when reaper is exiting. From: Sukadev Bhattiprolu [EMAIL PROTECTED] This should actually be considered a part of the previous patch which enables cloning of pid namespace. Its been separated out for easier review. Terminate all processes in a namespace when

[Devel] [RFC][PATCH 13/16] Remove proc_mnt's use for killing inodes

2007-05-23 Thread sukadev
Subject: Remove proc_mnt's use for killing inodes From: Dave Hansen [EMAIL PROTECTED] We use proc_mnt as a shortcut to find a superblock on which to go killing /proc inodes. This will break if we ever have more than one /proc superblock. So, use the superblock list to go find each of the

[Devel] [RFC][PATCH 14/16] Introduce proc_mnt for pid_ns

2007-05-23 Thread sukadev
-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- fs/proc/base.c| 32 - fs/proc/inode.c | 11 +++- fs/proc/root.c| 52 -- include/linux/pid_namespace.h |1 include/linux

[Devel] [RFC][PATCH 15/16] Enable signaling child reaper from parent ns.

2007-05-23 Thread sukadev
Subject: Enable signaling child reaper from parent ns. From: Sukadev Bhattiprolu [EMAIL PROTECTED] The reaper of a child namespace must receive signals from its parent pid namespace but not receive any signals from its own namespace. This is a very early draft :-) and following tests seem

Re: [Devel] [RFC][PATCH 06/16] Define is_global_init()

2007-05-24 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | Index: lx26-21-mm2/kernel/pid.c | === | --- lx26-21-mm2.orig/kernel/pid.c 2007-05-22 16:59:34.0 -0700 | +++ lx26-21-mm2/kernel/pid.c2007-05-22 16:59:46.0 -0700 |

Re: [Devel] [RFC][PATCH 07/16] Move alloc_pid call to copy_process

2007-05-24 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | Index: lx26-21-mm2/kernel/pid.c | === | --- lx26-21-mm2.orig/kernel/pid.c 2007-05-22 16:59:46.0 -0700 | +++ lx26-21-mm2/kernel/pid.c2007-05-22 17:06:48.0 -0700 |

Re: [Devel] [RFC][PATCH 08/16] Define/use pid-upid_list list.

2007-05-24 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | +/* | + * Return the pid_t by which the process @pid is known in the pid | + * namespace @ns. | + * | + * Return 0 if: | + * - @pid is NULL (eg: procfs calls this for task_pgrp(init_task) | + * which is NULL). | + * | + *

Re: [Devel] [RFC][PATCH 07/16] Move alloc_pid call to copy_process

2007-05-24 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Pavel Emelianov [EMAIL PROTECTED] wrote: | | Index: lx26-21-mm2/kernel/pid.c | | === | | --- lx26-21-mm2.orig/kernel/pid.c 2007-05-22

[Devel] Re: [RFC][PATCH 06/16] Define is_global_init()

2007-05-25 Thread sukadev
Dave Hansen [EMAIL PROTECTED] wrote: | On Thu, 2007-05-24 at 13:24 +0400, Pavel Emelianov wrote: | | +int is_global_init(struct task_struct *tsk) | | +{ | | + return (task_active_pid_ns(tsk) == init_pid_ns tsk-pid == 1); | | | | This can OOPS if you pass arbitrary task to this

[Devel] Re: [RFC][PATCH 06/16] Define is_global_init()

2007-05-29 Thread sukadev
Dave Hansen [EMAIL PROTECTED] wrote: | On Fri, 2007-05-25 at 13:44 -0700, [EMAIL PROTECTED] wrote: | Dave Hansen [EMAIL PROTECTED] wrote: | | On Thu, 2007-05-24 at 13:24 +0400, Pavel Emelianov wrote: | | | +int is_global_init(struct task_struct *tsk) | | | +{ | | | + return

Re: [Devel] [RFC][PATCH 14/16] Introduce proc_mnt for pid_ns

2007-05-31 Thread sukadev
Dave Hansen [EMAIL PROTECTED] wrote: | On Thu, 2007-05-31 at 15:48 +0400, Pavel Emelianov wrote: | +void proc_flush_task(struct task_struct *task) | +{ | + int i; | + struct pid *pid; | + struct upid* upid; | + | + pid = task_pid(task); | + if (!pid) | +

[Devel] release_task(), procfs dependency

2007-06-04 Thread sukadev
Like we discussed earlier and Pavel/others had pointed out, proc_flush_task() in its current place in release_task() is useless with the new pid namespace code, because task_pid() for the task is already NULL before the call to proc_flush_task(). So as a simple change I tried to move

[Devel] [PATCH 00/17] Pid-NS(V3) Enable multiple pid namespaces

2007-06-16 Thread sukadev
Date: Sat, 16 Jun 2007 15:29:14 -0700 From: [EMAIL PROTECTED] Subject: [PATCH 00/17] Pid-NS(V3) Enable multiple pid namespaces -- See Changelog below for changes since Pid-NS(V2) (2.6.21-mm2-pidns3). --- From: Sukadev Bhattiprolu [EMAIL PROTECTED] A pid namespace is a view of a particular

[Devel] [PATCH 01/17] Pid-NS(V3) Define and use task_active_pid_ns() wrapper

2007-06-16 Thread sukadev
Date: Sat, 16 Jun 2007 15:29:15 -0700 From: [EMAIL PROTECTED] Cc: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 01/17] Pid-NS(V3) Define and use task_active_pid_ns() wrapper From: Sukadev Bhattiprolu [EMAIL PROTECTED] A process is visible in one or more pid namespaces, as it is known

[Devel] [PATCH 02/17] Pid-NS(V3) Rename pid_nr function

2007-06-16 Thread sukadev
Date: Sat, 16 Jun 2007 15:29:16 -0700 From: [EMAIL PROTECTED] Cc: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 02/17] Pid-NS(V3) Rename pid_nr function From: Sukadev Bhattiprolu [EMAIL PROTECTED] Rename pid_nr() function to pid_to_nr() which is more descriptive and will hopefully cause

[Devel] [PATCH 05/17] Pid-NS(V3) Use task_pid() to find leaders pid

2007-06-16 Thread sukadev
Subject: [PATCH 05/17] Pid-NS(V3) Use task_pid() to find leaders pid From: Sukadev Bhattiprolu [EMAIL PROTECTED] Use task_pid() to get leader's pid since find_pid() cannot be used after detach_pid(). See comments in the code below for more details. Signed-off-by: Sukadev Bhattiprolu [EMAIL

[Devel] [PATCH 06/17] Pid-NS(V3) Define is_global_init() and is_container_init().

2007-06-16 Thread sukadev
-pidns1: - Use 'init_pid_ns.child_reaper' to determine if a given task is the global init (/sbin/init) process. This would improve performance and remove dependence on the task_pid(). 2.6.21-mm2-pidns2: - [Sukadev Bhattiprolu] Changed is_container_init() calls

[Devel] [PATCH 07/17] Pid-NS(V3) Move alloc_pid call to copy_process

2007-06-16 Thread sukadev
Subject: [PATCH 07/17] Pid-NS(V3) Move alloc_pid call to copy_process From: Sukadev Bhattiprolu [EMAIL PROTECTED] Move alloc_pid() into copy_process(). This will keep all pid and pid namespace code together and simplify error handling when we support multiple pid namespaces. Changelog

[Devel] [PATCH 10/17] Pid-NS(V3) Define CLONE_NEWPID flag

2007-06-16 Thread sukadev
Subject: [PATCH 10/17] Pid-NS(V3) Define CLONE_NEWPID flag From: Sukadev Bhattiprolu [EMAIL PROTECTED] This was discussed on containers and we thought it would be useful to reserve this flag. TODO: Merge this with the next patch ? Define CLONE_NEWPID flag that will be used to clone pid

[Devel] [PATCH 14/17] Pid-NS(V3) [PATCH] Allow task_active_pid_ns() to be NULL

2007-06-16 Thread sukadev
From: Sukadev Bhattiprolu [EMAIL PROTECTED] Subject: [PATCH 14/17] Pid-NS(V3) [PATCH] Allow task_active_pid_ns() to be NULL In earlier patches we get the pid_t or active pid namespace of a task/process from its 'task_pid()'. But when a process is exiting, the task_pid() can be NULL and we

[Devel] [PATCH 15/17] Pid-NS(V3) Address signals in pid namespaces.

2007-06-16 Thread sukadev
(), the signal originated from an ancestor namespace and so the container- init honors the signal. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- include/linux/pid.h|1 include/linux/sched.h | 11 + include/linux/signal.h |1 kernel/pid.c | 22

[Devel] [PATCH 16/17] Pid-NS(V3) Remove proc_mnts use for killing inodes

2007-06-16 Thread sukadev
/proc pid entries. Those are a different beast. Changelog: 2.6.22-rc4-mm2-pidns1: - [Sukadev Bhattiprolu] Initialize proc_fs_type.fs_supers. Signed-off-by: Dave Hansen [EMAIL PROTECTED] Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] --- fs/proc/generic.c | 28

Re: [Devel] [PATCH 08/17] Pid-NS(V3) Define/use pid-upid_list list.

2007-06-18 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Subject: [PATCH 08/17] Pid-NS(V3) Define/use pid-upid_list list. | | From: Sukadev Bhattiprolu [EMAIL PROTECTED] | | | With multiple pid namespaces, a process would be known by several pid_t | values, one in each pid

Re: [Devel] [PATCH 12/17] Pid-NS(V3) Terminate processes in a ns when reaper is exiting.

2007-06-18 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Subject: [PATCH 12/17] Pid-NS(V3) Terminate processes in a ns when reaper is exiting. | | From: Sukadev Bhattiprolu [EMAIL PROTECTED] | | This should actually be considered a part of the previous patch which | enables

[Devel] Re: [PATCH 22/28] [MULTI 1/6] Changes in data structures for multilevel model

2007-06-19 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | This patch opens the multilevel model patches. | | The multilevel model idea is basically the same as for the flat one, | but in this case task may have many virtual pids - one id for each | sub-namespace this task is visible in. The struct pid carries

Re: [Devel] [PATCH 08/17] Pid-NS(V3) Define/use pid-upid_list list.

2007-06-19 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Pavel Emelianov [EMAIL PROTECTED] wrote: | | [EMAIL PROTECTED] wrote: | | Subject: [PATCH 08/17] Pid-NS(V3) Define/use pid-upid_list list. | | | | From: Sukadev Bhattiprolu [EMAIL PROTECTED

[Devel] Re: [PATCH 16/28] [FLAT 1/6] Changes in data structures for flat model

2007-06-19 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Pavel Emelianov [EMAIL PROTECTED] wrote: | | This patch opens the flat model patches. | | | | The flat model idea is that struct pid has two numbers. The first one | | (pid-nr) is a global one and is unique in the system.

Re: [Devel] [PATCH 17/17] Pid-NS(V3) Introduce proc_mnt for pid_ns

2007-06-19 Thread sukadev
namespace when mounting/remounting /proc. |Put this reference when unmounting. | | Signed-off-by: Dave Hansen [EMAIL PROTECTED] | Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED] | --- | | fs/proc/base.c| 30 ++- | fs/proc/inode.c | 12

[Devel] Re: [PATCH 13/28] [PREP 13/14] Miscellaneous preparations in pid namespaces

2007-06-25 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Pavel Emelianov [EMAIL PROTECTED] wrote: | | The most important one is moving exit_task_namespaces behind exit_notify | | in do_exit() to make it possible to see the task's pid namespace to | | properly notify the parent. |

[Devel] [PATCH 1/6] Define and use task_active_pid_ns() wrapper

2007-07-05 Thread sukadev
Subject: [PATCH 1/6] Define and use task_active_pid_ns() wrapper From: Sukadev Bhattiprolu [EMAIL PROTECTED] With multiple pid namespaces, a process is known by some pid_t in every ancestor pid namespace. Every time the process forks, the child process also gets a pid_t in every ancestor pid

[Devel] [PATCH 2/6] Rename pid_nr function

2007-07-05 Thread sukadev
Subject: [PATCH 2/6] Rename pid_nr function From: Sukadev Bhattiprolu [EMAIL PROTECTED] Rename pid_nr() function to pid_to_nr() which is more descriptive and will hopefully cause less confusion with new structure/functions being added to support multiple pid namespaces. Signed-off-by: Sukadev

[Devel] [PATCH 3/6] Rename child_reaper function.

2007-07-05 Thread sukadev
Subject: [PATCH 3/6] Rename child_reaper function. From: Sukadev Bhattiprolu [EMAIL PROTECTED] Rename the child_reaper() function to task_child_reaper() to be similar to other task_* functions and to distinguish the function from 'struct pid_namspace.child_reaper'. Signed-off-by: Sukadev

[Devel] [PATCH 4/6] Use pid_to_nr() in process info functions

2007-07-05 Thread sukadev
Subject: [PATCH 4/6] Use pid_to_nr() in process info functions From: Sukadev Bhattiprolu [EMAIL PROTECTED] Use pid_to_nr() function in getppid(), getpgid() and getsid() functions so they return the correct pid_t for processes in multiple pid namespaces. Note: We don't need pid_to_nr

[Devel] [PATCH 5/6] Use task_pid() to find leader's pid

2007-07-06 Thread sukadev
Subject: [PATCH 5/6] Use task_pid() to find leader's pid From: Sukadev Bhattiprolu [EMAIL PROTECTED] Use task_pid() to get leader's pid since find_pid() cannot be used after detach_pid(). See comments in the code below for more details. Signed-off-by: Sukadev Bhattiprolu [EMAIL PROTECTED

[Devel] [PATCH 6/6] Define is_global_init() and is_container_init()

2007-07-06 Thread sukadev
: - Use 'init_pid_ns.child_reaper' to determine if a given task is the global init (/sbin/init) process. This would improve performance and remove dependence on the task_pid(). 2.6.21-mm2-pidns2: - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc

[Devel] Re: [PATCH 0/16] Pid namespaces

2007-07-09 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | This is submition for inclusion of hierarchical, not kconfig | configurable, zero overheaded ;) pid namespaces. | | The overall idea is the following: | | The namespace are organized as a tree - once a task is cloned | with CLONE_NEWPIDS (yes, I've

[Devel] Re: [PATCH 0/16] Pid namespaces

2007-07-09 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | This is submition for inclusion of hierarchical, not kconfig | configurable, zero overheaded ;) pid namespaces. | | The overall idea is the following: | | The namespace are organized as a tree - once a task is cloned | with CLONE_NEWPIDS (yes, I've also

[Devel] Re: [PATCH 7/16] Helpers to find the task by its numerical ids

2007-07-09 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | When searching the task by numerical id on may need to find | it using global pid (as it is done now in kernel) or by its | virtual id, e.g. when sending a signal to a task from one | namespace the sender will specify the task's virtual id. | |

[Devel] Re: [PATCH 8/16] Masquerade the siginfo when sending a pid to a foreign namespace

2007-07-09 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | When user send signal from (say) init namespace to any task in a sub | namespace the siginfo struct must not carry the sender's pid value, as | this value may refer to some task in the destination namespace and thus | may confuse the application. Also,

[Devel] Re: [PATCH 0/16] Pid namespaces

2007-07-09 Thread sukadev
I am not able to find a specific patch that this might be in, but what happens when the child-reaper of a container exits ? Do you terminate all processes in the container ? I thought that was discussed earlier and the consensus was to terminate all processes in that container and its subordinate

[Devel] Re: [PATCH 4/16] Change data structures for pid namespaces

2007-07-09 Thread sukadev
Cedric Le Goater [EMAIL PROTECTED] wrote: | Pavel Emelianov wrote: | struct pid_namespace will have the kmem_cache to allocate | the pids from, the parent, as they are hierarchical, and | the level of nesting value. | | struct pid will have a variable length array of pid_number-s | one for

[Devel] Re: [PATCH 6/16] Helpers to obtain pid numbers

2007-07-09 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | When showing pid to user or getting the pid numerical id for in-kernel | use the value of this id may differ depending on the namespace. | | This set of helpers is used to get the global pid nr, the virtual (i.e. | seen by task in its namespace) nr and

[Devel] Re: [PATCH 0/16] Pid namespaces

2007-07-11 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Pavel Emelianov [EMAIL PROTECTED] wrote: | | This is submition for inclusion of hierarchical, not kconfig | | configurable, zero overheaded ;) pid namespaces. | | | | The overall idea is the following: | | | | The

Re: [Devel] [PATCH 2/6] Rename pid_nr function

2007-07-12 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | [EMAIL PROTECTED] wrote: | Subject: [PATCH 2/6] Rename pid_nr function | | From: Sukadev Bhattiprolu [EMAIL PROTECTED] | | Rename pid_nr() function to pid_to_nr() which is more descriptive | and will hopefully cause less confusion with new

Re: [Devel] [PATCH 2/6] Rename pid_nr function

2007-07-13 Thread sukadev
Pavel Emelianov [EMAIL PROTECTED] wrote: | Serge E. Hallyn wrote: | Quoting Pavel Emelianov ([EMAIL PROTECTED]): | [EMAIL PROTECTED] wrote: | Pavel Emelianov [EMAIL PROTECTED] wrote: | | [EMAIL PROTECTED] wrote: | | Subject: [PATCH 2/6] Rename pid_nr function | | | | From: Sukadev

  1   2   3   4   5   6   7   8   9   10   >