-
Notifications
You must be signed in to change notification settings - Fork 68
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
bwrap broken #303
Comments
Bedrock has to balance making processes from different strata see different things (so they each see what they need to work without conflicting) and making them see the same thing (so they interact and everything feels like one cohesive system). In 0.7 Poki, all processes see the same mount namespace, so they can all mount/unmount each other's items. However, they have different root directories ( In Poki, your choices are to:
I need to document this on https://bedrocklinux.org/0.7/feature-compatibility.html. |
Thank you, I will probably use setuid. What exactly is that sanity check? |
Happy to help
From
Mount namespaces have their own concept of a root directory, and the virtual filesystem has its own concept (which one usually changes with |
Sadly, this did not work either...
|
|
I wonder if you could simply replace the chroot operation in |
It definitely works to some degree - I've had this issue come up elsewhere; the fact I haven't had the time to update the website accordingly since then is slightly concerning. Looks like it's:
from
I see the mount point being created in your strace log, so I don't think this is it.
It's unlikely bwrap made this mistake
Bedrock should be ensuring this isn't a concern, but you could double check that's the case on your machine just in case.
This isn't a rootfs, probably not relevant
IIRC Bedrock doesn't set this on stratum roots or anything parent directory, but this is also something you could double check
Also something you could double check
This is a very deep change and unsuitable for Poki. As mentioned before, I've already got a firm plan here for Naga. You clearly have enough technical acumen to be able to assist with Bedrock and I really don't want to scare you off, but you've also found Bedrock at an awkward time between when effort on Poki is more or less done, and Naga isn't at a good point for this kind of dynamically-discovered contribution. |
I'm like 99% sure it's this - the same exact thing that made the unshare check fail.
Yeah I figured this out in the process of attempting to implement it :P after realizing that to pivot_root without making everything explode, Perhaps what I can do is build this version of |
Wait, the check is slightly different? pivot_root requires a mount, unshare requires the root mount? In that case, worth looking closer... because |
Learned about kprobes (holy shit what a tool!) and, well...the checks in the kernel source don't perfectly line up with the man page
and the manpage says
only one of these is the same! wow... thinking about this, the kernel checks actually make sense for the goal of preventing pivot_root from affecting other namespaces, so it's the manpage that's wrong. this always happens... the third IS_MNT_SHARED is what's failing here. bwrap remembers to remount / as MS_SLAVE, but its / is /bedrock/strata/debian and there is a different mount above it which is still shared. idk why no one has run into this before |
gives
However, bwrap installed in the arch linux arm stratum I have (from hijacking, used as init) worked fine.
The text was updated successfully, but these errors were encountered: