Skip to content

A config option to compile out some namespaces code (v4)

Pavel Emelyanov containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Add the NAMESPACES config optioninit/Kconfig+9 -00 replies
2/6Move the UTS namespace under UTS_NS optioninclude/linux/utsname.h init/Kconfig kernel/Makefile+30 -10 replies
3/6Move the IPC namespace under IPC_NS optioninclude/linux/ipc.h include/linux/ipc_namespace.h init/Kconfig +9 more+164 -1120 replies
4/6Cleanup the code managed with the USER_NS optioninit/Kconfig kernel/Makefile kernel/user.c +1 more+21 -230 replies
5/6Cleanup the code managed with PID_NS optioninclude/linux/pid.h include/linux/pid_namespace.h init/Kconfig +3 more+220 -1940 replies
6/6Mark NET_NS with "depends on NAMESPACES"net/Kconfig+1 -10 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSerge Hallyn
SeriesA-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] A config option to compile out some namespaces code (v4)

Change against v3: rebased on 2.6.24-rc2-mm1

There were some questions like "do I need this on my cellphone" in reply to different namespaces patches. Indeed, the namespaces are not useful for most of the embedded systems, but the code creating and releasing them weights a lot.

So I propose to add a config option which will help embedded people to reduce the vmlinux size. This option simply compiles out the namespaces cloning and releasing code *only*, but keeps all the other logic untouched (e.g. the notion of init_ns).

Moreover, some of the namespaces might be not 100% ready by the time of Linux-2.6.xxx release (like user namespaces or pid namespaces are now). Since each namespace has its own option, which depends on the NAMESPACES, it can be mrked with "depends on EXPERIMENTAL/BROKEN/ANYTHING_ELSE" not to release the functionality that is not 100% ready yet.

When someone tries to clone some namespace with their support turned off, he will receive an EINVAL error.

This patchset can save more than 2KB from the vmlinux when turning the config option "NAMESPACES" to "n".