[Devel] Re: [PATCH 1/6] IPC namespace core
Cedric Le Goater
clg at fr.ibm.com
Fri Jun 9 08:20:15 PDT 2006
Kirill Korotaev wrote:
> This patch implements core IPC namespace changes:
> - ipc_namespace structure
> - new config option CONFIG_IPC_NS
> - adds CLONE_NEWIPC flag
> - unshare support
>
> Signed-Off-By: Pavel Emelianov <xemul at openvz.org>
> Signed-Off-By: Kirill Korotaev <dev at openvz.org>
>
>
> ------------------------------------------------------------------------
>
> --- ./include/linux/init_task.h.ipcns 2006-06-06 14:47:58.000000000 +0400
> +++ ./include/linux/init_task.h 2006-06-08 14:28:23.000000000 +0400
> @@ -73,6 +73,7 @@ extern struct nsproxy init_nsproxy;
> .count = ATOMIC_INIT(1), \
> .nslock = SPIN_LOCK_UNLOCKED, \
> .uts_ns = &init_uts_ns, \
> + .ipc_ns = &init_ipc_ns, \
> .namespace = NULL, \
> }
>
> --- ./include/linux/ipc.h.ipcns 2006-04-21 11:59:36.000000000 +0400
> +++ ./include/linux/ipc.h 2006-06-08 15:43:43.000000000 +0400
> @@ -2,6 +2,7 @@
> #define _LINUX_IPC_H
>
> #include <linux/types.h>
> +#include <linux/kref.h>
>
> #define IPC_PRIVATE ((__kernel_key_t) 0)
>
> @@ -68,6 +69,41 @@ struct kern_ipc_perm
> void *security;
> };
>
> +struct ipc_ids;
> +struct ipc_namespace {
> + struct kref kref;
> + struct ipc_ids *ids[3];
> +
> + int sem_ctls[4];
> + int used_sems;
> +
> + int msg_ctlmax;
> + int msg_ctlmnb;
> + int msg_ctlmni;
> +
> + size_t shm_ctlmax;
> + size_t shm_ctlall;
> + int shm_ctlmni;
> + int shm_tot;
> +};
you could probably simplify your patch by moving struct ipc_ids to ipc.h
and not allocating ids.
see patch bellow. I've been working all week on this patchset :)
C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namespaces-sysvipc-move-struct-ipc-ids.patch
Type: text/x-patch
Size: 1685 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/devel/attachments/20060609/0b85d981/attachment-0001.bin>
More information about the Devel
mailing list