Skip to content

jailer: Ensure that bindmounts are propagated into the root#1093

Merged
alxiord merged 2 commits intofirecracker-microvm:masterfrom
mcastelino:topic/jailer_bindmount
May 20, 2019
Merged

jailer: Ensure that bindmounts are propagated into the root#1093
alxiord merged 2 commits intofirecracker-microvm:masterfrom
mcastelino:topic/jailer_bindmount

Conversation

@mcastelino
Copy link
Copy Markdown
Contributor

User can bind mount into the chroot location.
This is needed as hard links cannot cross file system boundaries.
Copy is not always feasible (e.g. block devices).

Change the bind mount to be slave, such that host to jail bind
mounts are properly propagated. However we do not want to jail
to host events to propgate back.

Fixes: #1089

Signed-off-by: Manohar Castelino manohar.r.castelino@intel.com

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mcastelino mcastelino force-pushed the topic/jailer_bindmount branch 2 times, most recently from 42e4f4c to fc99e0d Compare May 16, 2019 15:10
petreeftime
petreeftime previously approved these changes May 17, 2019
User can bind mount into the chroot location.
This is needed as hard links cannot cross file system boundaries.
Copy is not always feasible (e.g. block devices).

Change the bind mount to be slave, such that host to jail bind
mounts are properly propagated. However we do not want to jail
to host events to propgate back.

Fixes: firecracker-microvm#1089

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
@alxiord alxiord merged commit bfaf26c into firecracker-microvm:master May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jailer: Incorrect handling of bind mounts within the rootfs

4 participants