-
Notifications
You must be signed in to change notification settings - Fork 2
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
Porting VMMAP to RawPOSIX #56
base: main
Are you sure you want to change the base?
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.
Awesome! Minor changes requested.
Would it make more sense to move LIND_ROOT
in fs_calls.rs and net_calls.rs to corresponding constant files as well?
@ChinmayShringi add address checking and conversion:
|
@ChinmayShringi additional tasks
|
…ent-squash Enhance RawPOSIX Dispatcher with Memory Validation and Improved Syscall Handling in Nacl
I met this error while compiling the newest vmmap: error[E0308]: `match` arms have incompatible types
--> src/safeposix/dispatcher.rs:312:13
|
204 | let ret = match call_number {
| _______________-
205 | | WRITE_SYSCALL => {
206 | | // Handles writing data from user buffer to file descriptor
... |
233 | | cage.write_syscall(fd, buf, count)
| | ---------------------------------- this is found to be of type `i32`
... |
269 | | cage.writev_syscall(fd, iov_base, iovcnt)
| | ----------------------------------------- this is found to be of type `i32`
... |
286 | | interface::munmap_handler(cageid, addr, length)
| | ----------------------------------------------- this is found to be of type `i32`
... |
312 | | interface::mmap_handler(cageid, addr, len, prot, flags, fd, off)
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
... |
1624 | | _ => -1, // Return -1 for unknown syscalls
1625 | | };
| |_____- `match` arms have incompatible types
|
help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit |
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.
Added a few notes.
Also Im not sure but think the vmmap branch needs to be updated against main because I think there's stuff showing up thats already been merged?
I think this is ready to merge once the tests are straightened out. |
The test cases are fixed and it builds and runs, test cases do fail but now they run without errors. |
Which test cases are you refering to? RawPOSIX testsuite or lind-wasm unit test? |
Rawposix test suite |
Can you also test the lind-wasm test cases? Especially those mmap tests. They are under |
Please note this is taken from RawPosix: (Lind-Project/RawPOSIX#87)
Description
Issue # 45
Type of change
Porting pranav-bhatt and ruchjoshi-nyu implementation of VMMAP to RawPOSIX. Request review for porting location and if more comments are needed.
I also added few comments to make things more clear. That would be great if ruchjoshi-nyu could review their correctness.
How Has This Been Tested?
Checklist: