Conversation
|
As we discussed #9, removed blocking punchthrough futex (which will be reimplemented in Litebox) |
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.
| 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.
jaybosamiya-ms
left a comment
There was a problem hiding this comment.
Added a bunch of comments.
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.
|
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. |
|
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).