Introduce temporary syscall number definitions under sysdefs/ to replace hardcoded values in Rust#887
Introduce temporary syscall number definitions under sysdefs/ to replace hardcoded values in Rust#887celinehoang177 wants to merge 2 commits intomainfrom
Conversation
End-to-End Test ReportTest PreviewUnified Test Report grate harness
Cases
wasm harnessTest ReportDeterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4f217d0 to
7887921
Compare
| @@ -0,0 +1,99 @@ | |||
| //! Syscall number constants for the Lind platform. | |||
There was a problem hiding this comment.
Was this manually copied over or is there a script, etc.? Is the same information in glibc? How does this + the kernel sync? Is it so slow moving that this doesn't matter?
There was a problem hiding this comment.
These were manually copied from the Linux x86_64 syscall table. The same numbers are already in glibc's lind_syscall_num.h, so this file is basically the Rust equivalent of that. Since the Linux syscall table is append-only (existing numbers never get reassigned), sync drift isn't really a concern in practice. But yeah, I think auto-generating both the C header and this Rust file from a single source would definitely be cleaner and is a good follow-up to do!
7887921 to
bb7fa77
Compare
| (292, dup3_syscall), | ||
| (293, pipe2_syscall), | ||
| (318, getrandom_syscall), | ||
| (syscall_const::READ_SYSCALL as u64, read_syscall), |
There was a problem hiding this comment.
Maybe this makes sense. Maybe it should be autogenerated. I'm not sure.
There was a problem hiding this comment.
Agreed. Auto-generation would be the cleaner long-term solution. For now this PR replaces the hardcoded magic numbers with named constants to unblock #612, and we can follow up with a generation script as a next step.
End-to-End Test ReportTest PreviewUnified Test Report grate harness
Cases
wasm harnessTest ReportDeterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yaxuan-w
left a comment
There was a problem hiding this comment.
Justin's comments are good points to think about next steps. Worth @celinehoang177 putting some attention on dividing into
Yaxuan-w
left a comment
There was a problem hiding this comment.
Also need to update exit/exec/fork in rawposix/src/sys_call.rs
bb7fa77 to
b04579e
Compare
End-to-End Test ReportTest PreviewUnified Test Report grate harness
Cases
wasm harnessTest ReportDeterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Closes #756. This PR introduces a unified syscall number definition file in the sysdefs library and updates the Rust codebase to eliminate hardcoded numeric values.
Changes