[EXPERIMENTAL] Proof-of-Concept Custom LiteBox Kernel on Asterinas OSTD#517
Draft
jaybosamiya-ms wants to merge 30 commits intomainfrom
Draft
[EXPERIMENTAL] Proof-of-Concept Custom LiteBox Kernel on Asterinas OSTD#517jaybosamiya-ms wants to merge 30 commits intomainfrom
jaybosamiya-ms wants to merge 30 commits intomainfrom
Conversation
Apparently formatting changes on this old enough nightly -_- But more importantly, there are some newer features we're using that we need to enable, and naked functions had a slightly different attribute then.
|
🤖 SemverChecks 🤖 No breaking API changes detected Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This PR is NOT intended to be merged into
main. This is purely an experimentation/demonstration PR for a proof-of-concept prototype.Note
Any changes to existing crates in LiteBox are due to the fact that Asterinas OSTD does not work on latest
stableor recent-enoughnightlyRust. This is a fixable problem, but is punted in this PR by just forcing LiteBox to work with a version of nightly Rust that works with Asterinas OSTD. Thus, ignore the changes to existing crates when looking at this PR. These are incidental and are not the correct way we should handle them (for long-term maintainability), but this is a prototype PR after all :) Please focus on the new files inostd-test/.This PR prototypes what it would take to integrate LiteBox on top of Asterinas OSTD. This essentially means we have a custom kernel that can run unmodified Linux applications in userland on top of LiteBox.
Specifically, this PR sets up a runner and a platform specific to Asterinas OSTD to connect it to LiteBox. Currently the runner is hardcoded to run an unmodified Linux hello world binary (this is what prints the
hello world.in the example output below), but essentially anything supported by our Linux shim would fairly easily work.Testing
cargo-osdk(viacargo install cargo-osdk).cargo osdk runat the root of the repo on this branch (you may need to put your user into thekvmgroup if you want it to be faster; or you can delete the-enable-kvmline inOSDK.tomlif you're willing for it to run slower but don't want to bother setting up KVM things).Output: