For kernels >= 5.11, switch the default value of --allow-trusted-xattr to false
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 3.9k
- Forks
- 230
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 3
Description
As described in the Sysbox’s documentation, by default sysbox-mgr is allowing all the *xattr() syscalls generated within a sysbox container to be intercepted and (some of them) partially emulated.
The goal is to workaround a kernel limitation that prevented trusted.*xattributes to be set within a user-namespace. This limitation has now been waived with the introduction of user.xattr.opaquexattributes in kernel 5.11+, along the utilization of this attribute by dockerd (in v20.10.9+) for whiteout handling purposes.
Taking the above into account, we should now modify sysbox-mgr’s default behavior to something like this:
If kernel-version < 5.11, then set --allow-trusted-xattr=true as the default configuration
if kernel-version >= 5.11, then set --allow-trusted-xattr=false as the default configuration
The above doesn’t address the scenario in which the user is relying on a 5.11+ kernel AND a dockerd-version < 20.10.9 within his/her containers, but this is something that we can always address by asking them to update the docker version in their inner images – definitely a better scenario than being hit by the performance penalties associated with the current default approach.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked configuration documentation and inspect sysbox-mgr's handling of --allow-trusted-xattr and kernel-version detection. The change is complete when kernels below 5.11 default to true and kernels 5.11 or newer default to false, while the documented configuration remains accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, linux
- Domain
- devops, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100