Skip to content

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

Pavel Emelyanov containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5The config option itselfinit/Kconfig+9 -03 replies
2/5Move the UTS namespace under the optioninclude/linux/utsname.h init/Kconfig kernel/Makefile+30 -12 replies
3/5Move the IPC namespace under the optioninclude/linux/ipc.h include/linux/ipc_namespace.h init/Kconfig +9 more+162 -1100 replies
4/5Move the user namespace under the optioninit/Kconfig kernel/Makefile kernel/user.c +1 more+21 -230 replies
5/5Move the PID namespace under the optioninclude/linux/pid.h include/linux/pid_namespace.h init/Kconfig +3 more+237 -1870 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/5] A config option to compile out some namespaces code (v3)

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).

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".

I do not introduce the NAMESPACES_EXPERIMENTAL config option, that switches all the namespaces we consider experimental, but each namespace has its own config that can be mrked with "depends on EXPERIMENTAL" on demand.

This is mainly done because some people consider pid namespaces broken ant will probably want to make them depend on BROKEN. In this case we'll have to introduce the NAMESPACES_BROKEN option which is not that good.