cgroups/cgfsng: do not change host-wide cgroup2 superblock options#703
Merged
Conversation
Signed-off-by: Xu Jihui <xujihui1985@gmail.com> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
56a071e to
3e3db7a
Compare
Currently, when LXCFS daemon starts it creates an isolated mount namespace and mounts its own cgroup2 mount. The problem is that cgroup2 implementation in the kernel has a catch. cgroup2-fs superblock-level mount options can be changed if privileged user in init_cgroup_ns mounts a new cgroup2 mount and specifies superblock options different from ones specified earlier. See: https://github.com/torvalds/linux/blob/18f7fcd5e69a04df57b563360b88be72471d6b62/kernel/cgroup/cgroup.c#L2047 Fixes: lxc#681 Reported-by: Emir Buljubašić <emirbuljubasic329@gmail.com> Signed-off-by: Xu Jihui <xujihui1985@gmail.com> [ alex: significant modifications and refactoring ] Co-authored-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
4ca06be to
b7efa05
Compare
Member
Author
|
Tests / Upgrade test (gcc, fuse3, ubuntu-24.04, main) (pull_request) failure is unrelated. We can ignore it here. I'll address this in a separate PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworked version of #692