[PATCH RFC v3 87/90] cells: add CONFIG_CELLS

From: Josef Bacik

Date: Thu Nov 05 2026 - 10:42:14 EST


Everything is in place now. Add the config symbol, and build kernel/cell/,
kernel/embryo.c and fs/cellfs.c if it is set.

Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
---
fs/Makefile | 2 ++
init/Kconfig | 16 ++++++++++++++++
kernel/Makefile | 1 +
3 files changed, 19 insertions(+)

diff --git a/fs/Makefile b/fs/Makefile
index 16f1108b64e1..6a15893003e3 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -127,3 +127,5 @@ obj-$(CONFIG_VBOXSF_FS) += vboxsf/
obj-$(CONFIG_ZONEFS_FS) += zonefs/
obj-$(CONFIG_BPF_LSM) += bpf_fs_kfuncs.o
obj-$(CONFIG_RESCTRL_FS) += resctrl/
+
+obj-$(CONFIG_CELLS) += cellfs.o
diff --git a/init/Kconfig b/init/Kconfig
index 4013781e0a02..78690b74e6cb 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1264,6 +1264,22 @@ config USER_NS_MAP_KUNIT_TEST

If unsure, say N.

+config CELLS
+ bool "Cells"
+ depends on USER_NS && PID_NS && NET_NS && IPC_NS && UTS_NS && CGROUPS
+ depends on UNIX
+ help
+ A cell is a container as one kernel object. It is built from the
+ outside by filling slots from file descriptors, sealed, and has
+ tasks spawned into it. A task never changes cell and nothing can
+ enter one.
+
+ This reserves the upper half of the uid and gid space for the
+ kernel to hand out to cells: with it enabled no file on a filesystem
+ of the host can be given to an id from 2147483648 to 4294901759.
+
+ If unsure, say N.
+
config PID_NS
bool "PID Namespaces"
default y
diff --git a/kernel/Makefile b/kernel/Makefile
index da712b4399ff..ba60039affdb 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -90,6 +90,7 @@ obj-$(CONFIG_COMPAT) += compat.o
obj-$(CONFIG_CGROUPS) += cgroup/
obj-$(CONFIG_UTS_NS) += utsname.o
obj-$(CONFIG_USER_NS) += user_namespace.o
+obj-$(CONFIG_CELLS) += cell/ embryo.o
obj-$(CONFIG_PID_NS) += pid_namespace.o
obj-$(CONFIG_IKCONFIG) += configs.o
obj-$(CONFIG_IKHEADERS) += kheaders.o

--
2.55.0