-
Notifications
You must be signed in to change notification settings - Fork 16
Managed file descriptors, loading dynamic executables #31
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces basic support for managing file descriptors in TinyKVM. Key changes include replacing and adding header includes to support Linux-specific functionality, adding new methods in Machine for file descriptor handling, and implementing file descriptor management in new files (fds.hpp and fds.cpp).
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
lib/tinykvm/machine.hpp | Replaced signals include with linux-specific ones and added declarations for file descriptor accessors |
lib/tinykvm/machine.cpp | Updated inclusion of thread headers |
lib/tinykvm/linux/threads.hpp & .cpp | Updated relative paths to headers |
lib/tinykvm/linux/signals.hpp & .cpp | Updated relative paths to headers and implemented sigaction |
lib/tinykvm/linux/fds.hpp | New header providing file descriptor management definitions |
lib/tinykvm/linux/fds.cpp | New implementation for managing file descriptors |
Files not reviewed (1)
- lib/CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (1)
lib/tinykvm/linux/fds.cpp:88
- [nitpick] The variable name 'gucci_path' is overly informal and may be unclear to other developers. Consider renaming it to 'allowed_path'.
for (const auto& gucci_path : this->m_allowed_paths)
7311ce3
to
6c6a8a7
Compare
New FileDescriptors class that manages files and paths MMAP with fd support Implemented writev for files
6c6a8a7
to
ca39a75
Compare
At this point, it's enough to load a simple glibc hello world! A C++ shared executable is failing on something, which looks to be a trashed stack. However, Rust programs only depend on glibc, which in theory means that Rust default builds should now be loadable in TinyKVM. |
8c89894
to
9815137
Compare
This allows managing file descriptors from TinyKVM. More work is needed to cover all use-cases.