mirror of
https://github.com/containers/youki
synced 2026-11-29 21:14:47 +01:00
* fix(libcontainer): mount cgroup2 without the SELinux mount label With a mount label, cgroup2 was mounted with context=, which the kernel refuses. The fallback then bind-mounted the cgroup path read inside the new cgroup namespace, which is the host's root, so the container saw the host's cgroup tree and none of its own limits. Give cgroup2 no label in mount_label_how(), as runc and crun do, and add a contest test that looks for the container's process in /sys/fs/cgroup/cgroup.procs. Fixes #3819 Signed-off-by: Asifur Rahaman Meeru <asifur.rahaman@meeru.dev> * test(contest): run the cgroup mount label test on cgroup v2 only The runtimetest check reads cgroup.procs at the top of the cgroup mount, which only cgroup v2 has. On a cgroup v1 or hybrid host the mount holds one directory per controller, so the check failed on the missing file. Signed-off-by: Asifur Rahaman Meeru <asifur.rahaman@meeru.dev> --------- Signed-off-by: Asifur Rahaman Meeru <asifur.rahaman@meeru.dev>