public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/5] Task references..
@ 2006-01-29  7:19 Eric W. Biederman
  2006-01-29  7:22 ` [PATCH 1/5] pid: Implement task references Eric W. Biederman
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Eric W. Biederman @ 2006-01-29  7:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: vserver, Herbert Poetzl, Serge E. Hallyn, Alan Cox, Dave Hansen,
	Arjan van de Ven, Suleiman Souhlal, Hubertus Franke,
	Cedric Le Goater, Kyle Moffett


In the pid virtualization thread it was noticed that currently in
the kernel we have a variables that hold pids of processes or
process groups that we later intend to send signals to.

It was suggest that we instead use pointers to struct task_struct
and reference count them to get around this problem.

The problem was that each file descriptor in the system has one of
these variables in f_owner an instance of struct fown_struct it would
allow user to bypass the limits on the number of processes and
type of megabytes of memory with invisible zombie processes.

For kernel threads where things are tightly coordinated this is not an
issue hand holding a reference to the task struct of a kernel thread
seems the sane thing to do.

The other problem was that pointers to struct task_struct don't map
well to process groups.

I believe the solution to these problems is to introduce a small data
structure that can be reference counted and holds a pointer to a
struct task_struct.   The struct task_struct holds a pointer to this
small data structure that will be used to remove the pointer to itself
when the struct task_struct is freed.

The following series of patches implement the data structure and
the routines for manipulating it.  As well as implementing this
data structure in two common cases in the kernel, that demonstrate
it's usefulness.

Eric

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2006-02-06 14:36 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-29  7:19 [RFC][PATCH 0/5] Task references Eric W. Biederman
2006-01-29  7:22 ` [PATCH 1/5] pid: Implement task references Eric W. Biederman
2006-01-29  7:24   ` [PATCH 2/5] pid: Add macros for interating through tasks by type Eric W. Biederman
2006-01-29  7:28     ` [PATCH 3/5] pid: Implement kill_tref Eric W. Biederman
2006-01-29  7:33       ` [PATCH 4/5] vt: Update spawnpid to use a task_ref Eric W. Biederman
2006-01-29  7:35         ` [PATCH 5/5] file: Modify struct fown_struct to contain a tref Eric W. Biederman
2006-01-29  8:43           ` Suleiman Souhlal
2006-01-29  9:18             ` Eric W. Biederman
2006-01-30 10:51         ` [PATCH 4/5] vt: Update spawnpid to use a task_ref Pavel Machek
2006-01-30 20:39           ` Eric W. Biederman
2006-01-30 21:05             ` Pavel Machek
2006-01-30 21:15               ` Eric W. Biederman
2006-01-29  8:46   ` [PATCH 1/5] pid: Implement task references Suleiman Souhlal
2006-01-29 19:05   ` Greg KH
2006-01-29 21:58     ` Eric W. Biederman
2006-01-30  4:51       ` Greg KH
2006-01-30  5:19         ` Eric Dumazet
2006-01-30  5:35           ` Kyle Moffett
2006-01-30  5:46             ` Eric Dumazet
2006-01-30  6:46               ` Kyle Moffett
2006-01-30 18:43           ` Greg KH
2006-01-30 19:58             ` Eric Dumazet
2006-01-30 20:45               ` Eric W. Biederman
2006-01-30 21:32                 ` Eric Dumazet
2006-01-30 21:51                   ` Eric W. Biederman
2006-01-30 20:13         ` Eric W. Biederman
2006-01-31  6:58           ` Greg KH
2006-01-31 16:04             ` Eric W. Biederman
2006-01-29  8:05 ` [RFC][PATCH 0/5] Task references Kyle Moffett
2006-02-06  8:09 ` Eric W. Biederman
2006-02-06 14:36   ` Serge E. Hallyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox