Open sielicki opened 2 years ago
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?
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.
My branch is here to test: https://gitlab.com/brauner/linux/-/commits/fs.binfmt_misc
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.
@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
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.
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/20211028103114.2849140-2-brauner@kernel.org/ and setup all binfmt registrations in their own namespace.