-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support being used as a binfmt_misc handler. #54
base: main
Are you sure you want to change the base?
Support being used as a binfmt_misc handler. #54
Conversation
Unconditionally forward a range of ports to sockets named `$XDG_RUNTIME_DIR/krun/socket/port-$PORT`. This allows applications to dynamically bind to sockets at those paths and have them forwarded to the guest as vsock ports, after the krun VM is already running. The port range is currently hardcoded as 50000..50200. Signed-off-by: Asahi Lina <[email protected]> Signed-off-by: Sasha Finkelstein <[email protected]>
After launching a process via the server, krun immediately closes and the launched process' std{in,out,err} go nowhere. Add a --interactive flag that allocates a pseudo-terminal, routes it to the host and connects to it. Somewhat like '-it' in docker/podman exec. Signed-off-by: Sasha Finkelstein <[email protected]>
Aside from just being better UX, some commands are sensitive to it and will not work correctly without it. Signed-off-by: Sasha Finkelstein <[email protected]>
This is always what you want if running via binfmt Signed-off-by: Sasha Finkelstein <[email protected]>
Launches the initial command via the server too. Server is set to linger for 10 seconds after last command finishes. Signed-off-by: Sasha Finkelstein <[email protected]>
Change the approach to environment variables to delete ones that are likely to cause problems instead of only passing through a pre-approved list. This will be neccessary to correctly work as a binfmt handler Fixes: AsahiLinux#52 Signed-off-by: Sasha Finkelstein <[email protected]>
Closes: AsahiLinux#24 Signed-off-by: Sasha Finkelstein <[email protected]>
It would be nice to have this for box64 it runs the steam app via box32 now. For it to work on muvm there needs to be some work on binfmt and also some GPU fixes. |
I am not sure as to how this is relevant to the current PR, this one is about configuring the host to start muvm when a foregin binary is launched, not about what happens inside. If you wish to use box64 instead, the relevant file is https://github.com/AsahiLinux/muvm/blob/main/crates/muvm/src/guest/fex.rs . But anyway, thank you for reminding me that i probably should respin this patchset, since a certain issue that prevented it from being merged last time is resolved now. |
This series allows krun to be used as a binfmt_misc handler: it uses interactive launch mode to make sure stdin/stdout are going where users expect, passes through the current working directory, expands the number of environment variables that are passed through, and daemonizes the vm process, so a process that waits on the first process launched via krun is not prevented from progressing by others.