Skip to content
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

feat(hypercall): introduce chdir and uhyve mountpoint restrictions #1485

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

n0toose
Copy link
Member

@n0toose n0toose commented Dec 1, 2024

Under heavy construction.

Related to: hermit-os/uhyve#820
Fixes: #1483
Succeeds: #1477

@n0toose n0toose marked this pull request as draft December 1, 2024 18:14
@n0toose n0toose changed the title feat(hypercall); introduce chdir and uhyve mountpoint restrictions feat(hypercall): introduce chdir and uhyve mountpoint restrictions Dec 1, 2024
@jounathaen
Copy link
Member

IMHO, we should merge #1393 first and put the definitions of the hypercalls directly in uhyve-interface.

@mkroening
Copy link
Member

Why would we need a chdir hypercall? The current working directory is a property of the currently running process, not of the operating system.

I think Hermit should manage the current working directory and only expose canonicalized paths to Uhyve (or virtiofsd via QEMU).

@jounathaen
Copy link
Member

Well, it is a property, but not an immutable one. POSIX defines calls to change it during a processes runtime. Also, Rust std has support for it.
Sure, it is a rare use-case, but whilst @n0toose is working on file-systems anyway, why not increase the compatibility.
The only question is, if this should be a hypercall, or something that Hermit keeps track of in the VM and resolves it before the hypercall. I guess I'm leaning towards the second approach.

@n0toose
Copy link
Member Author

n0toose commented Dec 9, 2024

Would a get_mount_point() like in the FUSE driver be a better / less controversial approach for now instead of a new chdir hypercall? It would serve the same purpose.

let mount_point = driver.lock().get_mount_point();

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.

Uhyve: Implement chdir
3 participants