Skip to content

Chroot Grate #9

@rennergade

Description

@rennergade

After some discussion with Justin and Rishabh we realized that converting relative paths is very difficult in our current model and that either we have to bloat our TCB or do this in a grate. We're hoping to do the latter.

If we crate a chroot/relative paths grate that lives at the base of lind ie is always the first cage launched: lind-wasm chroot-grate --chroot-dir "lindfs" bash, we can handle both of these scenarios and isolate the filesystems. This is an awesome basic example for the paper as well.

This can just be a stack type grate which makes implementation a bit easier.

Things we'll need:

  • initial getcwd call in child before launch to store initial cwd
  • hashmap? of cageid's to cwd's for any child cages
  • interpose on fork to add new cageids to hashmap
  • interpose on chdir/fchdir to update hashmap cwds
  • relative path normalization function
  • chrooted path as arg to grate
  • register handlers for all fs-related path calls to effectively chroot and normalize any paths (see list here: Filesystem Namespace Grate #7 (comment))

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions