-
Notifications
You must be signed in to change notification settings - Fork 0
Portalcall initialization #14
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,51 @@ | ||||||||||||
| use libc::{syscall, SYS_sendto}; | ||||||||||||
|
|
||||||||||||
|
||||||||||||
| // PORTAL_MAGIC is a magic number used to identify portal calls via the syscall interface. | |
| // The value 0xc1d1e1f1 is chosen to be unique and unlikely to conflict with other syscall usages. | |
| // It acts as a signature for the portal call protocol, ensuring that only intended calls are processed. |
Copilot
AI
Oct 24, 2025
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.
The argc parameter is passed as an i32 but the function doesn't validate that args.len() matches argc. This could lead to buffer overruns or incorrect behavior if the caller passes mismatched values. Consider using args.len() directly or adding validation: assert_eq!(argc as usize, args.len()).
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.
The
INDIV_DEBUG_PORTALCALL_MAGICconstant lacks documentation explaining its purpose and relationship to theindiv_debug.pyinterface mentioned in the PR description. Consider adding a comment documenting this magic number's meaning.