Skip to content

RFC Object creation with a specified id

Nadia.Derbey-6ktuUTfB/[email protected] containers 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 26 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Provide a new procfs interface to set next ipc idfs/proc/base.c include/linux/sched.h include/linux/sysids.h +2 more+121 -10 replies
2/4Provide a new procfs interface to set next upid nr(s)fs/proc/base.c include/linux/sysids.h kernel/set_nextid.c+254 -30 replies
3/4IPC: use the target ID specified in procfsipc/util.c+31 -80 replies
4/4PID: use the target ID specified in procfskernel/fork.c kernel/pid.c+73 -1214 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC][PATCH 0/4] Object creation with a specified id

A couple of weeks ago, a discussion has started after Pierre's proposal for a new syscall to change an ipc id (see thread
http://lkml.org/lkml/2008/1/29/209).

Oren's suggestion was to force an object's id during its creation, rather than 1. create it, 2. change its id.

So here is an implementation of what Oren has suggested.

2 new files are defined under /proc/self:
. next_ipcid --> next id to use for ipc object creation . next_pids --> next upid nr(s) to use for next task to be forked
(see patch #2 for more details).

When one of these files (or both of them) is filled, a structure pointed to by the calling task struct is filled with these ids.

Then, when the object is created, the id(s) present in that structure are used, instead of the default ones.

The patches are against 2.6.25-rc3-mm1, in the following order:

[PATCH 1/4] adds the procfs facility for next ipc to be created. [PATCH 2/4] adds the procfs facility for next task to be forked. [PATCH 3/4] makes use of the specified id (if any) to allocate the new IPC
object (changes the ipc_addid() path).
[PATCH 4/4] uses the specified id(s) (if any) to set the upid nr(s) for a newly
allocated process (changes the alloc_pid()/alloc_pidmap() paths).

Any comment and/or suggestions are welcome.

Cc-ing Pavel and Sukadev, since they are the pid namespace authors.

Regards,
Nadia

--

--