Skip to content

posix mqueue namespace (v14)

Serge E. Hallyn containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Changelog from the cover letter

	v14: (Jan 16 2009) port to linux-next
	v13: (Dec 28 2009)
	   1. addressed comments by Dave and Suka
	   2. ported Cedric's patch to make posix mq sysctls
	      per-namespace

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mqueue ns: move mqueue_mnt into struct ipc_namespaceinclude/linux/ipc_namespace.h init/Kconfig ipc/mqueue.c +4 more+131 -681 reply
2/3ipc namespaces: implement support for posix msqueuesinclude/linux/ipc_namespace.h ipc/mqueue.c ipc/msgutil.c +2 more+160 -512 replies
3/3mqueue namespace: adapt sysctlinclude/linux/ipc_namespace.h init/Kconfig ipc/Makefile +2 more+147 -640 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Patch 0/3] posix mqueue namespace (v14)

IPC namespaces are completely disjoint id->object mappings. A task can pass CLONE_NEWIPC to unshare and clone to get a new, empty, IPC namespace. Until now this has supported SYSV IPC.

Most Posix IPC is done in userspace. The posix mqueue support, however, is implemented on top of the mqueue fs.

This patchset implements multiple mqueue fs instances, one per IPC namespace to be precise.

To create a new ipc namespace with posix mq support, you should now:

	unshare(CLONE_NEWIPC|CLONE_NEWNS);
	umount /dev/mqueue
	mount -t mqueue mqueue /dev/mqueue

It's perfectly valid to do vfs operations on files in another ipc_namespace's /dev/mqueue, but any use of mq_open(3) and friends will act in your own ipc_ns. After the ipc namespace has exited, you can still unlink but no longer create files in that fs (since accounting is carried.

Changelog:

	v14: (Jan 16 2009) port to linux-next
	v13: (Dec 28 2009)
	   1. addressed comments by Dave and Suka
	   2. ported Cedric's patch to make posix mq sysctls
	      per-namespace

When convenient, it would be great to see this tested in -mm.

thanks,
-serge