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

Create temporary directory under /tmp/uhyve instead of /tmp/ #942

Open
n0toose opened this issue Apr 1, 2025 · 1 comment
Open

Create temporary directory under /tmp/uhyve instead of /tmp/ #942

n0toose opened this issue Apr 1, 2025 · 1 comment
Labels
enhancement New feature or request File System

Comments

@n0toose
Copy link
Member

n0toose commented Apr 1, 2025

  • This will allow removing randomly generated directories in their entirety (their file contents are removed) after they are discarded, see: Introduce Landlock isolation support #816 (comment)
  • By giving R/W access to /tmp/uhyve/ (but explicitly retaining the 0o700 permission), it will be possible to create new temporary directories (with randomly generated names), which is useful for the multicore test and Landlock: Introduce Landlock isolation support #816 (review)
    • The multicore test starts multiple instances of Uhyve sequentially, thus attempts to generate more than one temporary directory and fails.
    • Another potential workaround is creating a series of tests that run sequentially, or using a macro to automatically generate them without adding lots of duplicate code.
    • Another potential workaround is exploring forking / spawning a new process inside of the test itself.
@n0toose
Copy link
Member Author

n0toose commented Apr 1, 2025

Alternative (perhaps much more viable) proposal: Do not create a new temporary directory if one has already been created. Remove the temporary directory's contents before "recycling it". That way, Landlock won't freak out (and everything remains stateless enough for the purposes of testing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request File System
Projects
None yet
Development

No branches or pull requests

1 participant