Uh oh!
There was an error while loading. Please reload this page.
Platform for Kernel - #10
Conversation
Weiteng Chen (CvvT)
commented
Feb 12, 2025
As we discussed #9, removed blocking punchthrough futex (which will be reimplemented in Litebox) |
Weidong Cui (wdcui)
left a comment
There was a problem hiding this comment.
I focused on the high-level interfaces and structures in this round of review.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| uint64_t ret; | ||
| } __attribute__((__packed__)); | ||
| #define SNP_SANDBOX_IOCTL_DEBUG 0x6300 // _IO('c', 0) |
There was a problem hiding this comment.
TODO: maybe split this header file to two parts and only copy the part related to litebox here? For instance, litebox platform doesn't need to know the driver's IOCTL code.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Jay Bosamiya (Microsoft) (jaybosamiya-ms)
left a comment
There was a problem hiding this comment.
Added a bunch of comments.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Modulo the two remaining comments that I have (one regarding a comment that needs to be updated, and the other regarding cpu-mhz), I think this is reasonable enough to merge; we can postpone other improvements (e.g., linux-common etc) to future PRs.
Weiteng Chen (CvvT)
commented
Feb 14, 2025
Removed Task trait from this PR. My initial thought was that we need it to help convert a kernel pointer to a pointer accessible to the host. However, I can also change the sandbox driver to do it. |
Uh oh!
There was an error while loading. Please reload this page.
58dec05 to
8ad1533CompareWeiteng Chen (CvvT)
commented
Feb 15, 2025
Rebase on the main branch and add implementation for Another change I did due to fn rt_sigprocmask(
how: i32,
- set: Option<*const crate::host::linux::sigset_t>,- oldset: Option<*mut crate::host::linux::sigset_t>,+ set: UserConstPtr<sigset_t>,+ oldset: UserMutPtr<sigset_t>,
sigsetsize: usize,
) -> Result<usize, error::Errno> {Also, instead of passing user space pointer to host, I believe it is preferable to do some extra copy and pass kernel memory instead. See more comments here: https://github.com/MSRSSP/litebox/blob/8ad1533d8031851fa42f5438701c0c458dea3d6c/litebox_platform_linux_kernel/src/host/snp/snp_impl.rs#L185-L195 |
Implement a platform running in kernel mode that supports different hosts * implement kernel platform LinuxKernel * define platform-host interface HostInterface * implement HostInterface for snp
Per our discussion,
LinuxKernelis the provider/platform which depends onHostInterface(host specific interface) andTask(for per task storage).