Skip to content

Conversation

@tych0
Copy link
Collaborator

@tych0 tych0 commented Mar 14, 2022

This code is somewhat imported from https://github.com/anuvu/atomfs, with
heavy modification (and some bug fixes) to support the new mount structure
with a verity device in the middle.

The idea here is that the Umount() function should be able to parse the
mountinfo entry and walk back and destroy things as necessary (being
careful not to destroy things that are in use by other atomfs things
entries). This gets kind of tricky because there is no namespace for
devicemapper or the loopback driver and thus the associated devices are
global resources that must be accounted for.

Finally, there are two unsafe FIXMEs introduced in this commit when we
decide to re-use a mountpoint or block dev. In these cases we should ask
the kernel what root hash it has for a block dev, however APIs for this are
still pending, so this patch is "incomplete" for now, but has a sketch of
where the checks would go (and I hope to merge it as-is and continue work
on these APIs).

Additionally, patch necessitated fair amount of new APIs for our
dependences, some of which have been merged upstream and some of which are
still pending, hence the additional replace directives.

Signed-off-by: Tycho Andersen tycho@tycho.pizza

This code is somewhat imported from https://github.com/anuvu/atomfs, with
heavy modification (and some bug fixes) to support the new mount structure
with a verity device in the middle.

The idea here is that the Umount() function should be able to parse the
mountinfo entry and walk back and destroy things as necessary (being
careful not to destroy things that are in use by other atomfs things
entries). This gets kind of tricky because there is no namespace for
devicemapper or the loopback driver and thus the associated devices are
global resources that must be accounted for.

Finally, there are two unsafe FIXMEs introduced in this commit when we
decide to re-use a mountpoint or block dev. In these cases we should ask
the kernel what root hash it has for a block dev, however APIs for this are
still pending, so this patch is "incomplete" for now, but has a sketch of
where the checks would go (and I hope to merge it as-is and continue work
on these APIs).

Additionally, patch necessitated fair amount of new APIs for our
dependences, some of which have been merged upstream and some of which are
still pending, hence the additional replace directives.

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
@tych0 tych0 merged commit e22e345 into project-stacker:master Mar 15, 2022
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.

1 participant