Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binfmt_misc namespacing #8203

Open
sielicki opened this issue Mar 29, 2022 · 6 comments
Open

binfmt_misc namespacing #8203

sielicki opened this issue Mar 29, 2022 · 6 comments
Assignees
Labels

Comments

@sielicki
Copy link

Is your feature request related to a problem? Please describe.
Current implementation of binfmt_misc/wslinterop allows one distro to break binfmt registrations on other distros. See discussion here

Describe the solution you'd like
Track https://lore.kernel.org/all/[email protected]/ and setup all binfmt registrations in their own namespace.

@benhillis
Copy link
Member

Agreed, this has been a pain point of binfmt_misc for a long time. Does it seem like that patch will actually be merged into the mainline kernel?

@sielicki
Copy link
Author

I emailed them off-list; author of the current series was on sabbatical until recently but he said he's going to try to get it in soon. I'm sure it would help if you can find someone doing kernel work at Microsoft to take an interest in the series.

@brauner
Copy link

brauner commented Mar 31, 2022

My branch is here to test:
https://gitlab.com/brauner/linux/-/commits/fs.binfmt_misc

@tyhicks
Copy link
Collaborator

tyhicks commented Mar 31, 2022

We'll be keeping an eye on this series. It is something that could be eligible to be backported to the WSL2 kernel once it is in linux-next.

@fredizzimo
Copy link

fredizzimo commented Aug 3, 2023

@tyhicks. @benhillis . It looks like it has been merged now https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/commit/?h=vfs.binfmt_misc&id=ecddcab2d1b15fea782889237093bd069979c8c7

@TBBle
Copy link

TBBle commented Oct 10, 2024

It landed in Linux mainline in 6.7, so should be in the next LTS release and hence flow naturally into WSL when WSL takes the next LTS release.

Backporting the two binfmt_misc commits (a cleanup, and the main commit) to the current WSL 6.6 tree should be fairly simple, if that's desired. In fact, the first one (a cleanup before the feature) already landed in the 6.6 stable tree, in 6.6.48, so I guess that will appear in the next WSL2 kernel regardless, leaving only the main change to be backported.

The CLI suport for this feature in unshare is not part of the latest release (2.40), although I guess WSL isn't relying on unshare for namespace management anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants