OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] Add pspace to task_struct
[RFC][PATCH] Add pspace to task_struct [message #16593] Thu, 07 September 2006 00:46 Go to next message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Add a notion of pid space to task_struct. Currently there is only one
pid space, init_pspace and all tasks belong to this pspace. When a new
task is created, it inherits its parent's pid space (in copy_process()).

This is based on Eric Biederman's patch: http://lkml.org/lkml/2006/2/6/285

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: containers@lists.osdl.org

 include/linux/init_task.h |    2 ++
 include/linux/sched.h     |    1 +
 2 files changed, 3 insertions(+)

Index: lx26-18-rc5/include/linux/init_task.h
===================================================================
--- lx26-18-rc5.orig/include/linux/init_task.h	2006-08-29 14:03:07.000000000 -0700
+++ lx26-18-rc5/include/linux/init_task.h	2006-09-06 12:36:55.000000000 -0700
@@ -5,6 +5,7 @@
 #include <linux/rcupdate.h>
 #include <linux/irqflags.h>
 #include <linux/lockdep.h>
+#include <linux/pspace.h>
 
 #define INIT_FDTABLE \
 {							\
@@ -115,6 +116,7 @@ extern struct group_info init_groups;
 	.thread		= INIT_THREAD,					\
 	.fs		= &init_fs,					\
 	.files		= &init_files,					\
+	.pspace		= &init_pspace,					\
 	.signal		= &init_signals,				\
 	.sighand	= &init_sighand,				\
 	.pending	= {						\
Index: lx26-18-rc5/include/linux/sched.h
===================================================================
--- lx26-18-rc5.orig/include/linux/sched.h	2006-08-31 12:46:42.000000000 -0700
+++ lx26-18-rc5/include/linux/sched.h	2006-09-06 12:33:59.000000000 -0700
@@ -816,6 +816,7 @@ struct task_struct {
 	/* ??? */
 	unsigned long personality;
 	unsigned did_exec:1;
+	struct pspace *pspace;	/* process id namespace */
 	pid_t pid;
 	pid_t tgid;
 	/* 
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
Re: [RFC][PATCH] Add pspace to task_struct [message #16605 is a reply to message #16593] Thu, 07 September 2006 19:29 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Sukadev Bhattiprolu <sukadev@us.ibm.com> writes:

> Add a notion of pid space to task_struct. Currently there is only one
> pid space, init_pspace and all tasks belong to this pspace. When a new
> task is created, it inherits its parent's pid space (in copy_process()).

That needs to go into nsproxy please.

Eric
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
Previous Topic: Re: Re: [RFC][PATCH 0/2] user namespace [try #2]
Next Topic: Re: [RFC][PATCH] Add child reaper to struct pspace
Goto Forum:
  


Current Time: Mon Sep 02 04:21:25 GMT 2024

Total time taken to generate the page: 0.06660 seconds