-
Notifications
You must be signed in to change notification settings - Fork 1
Add syscall alias support for user-facing names #123
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
base: main
Are you sure you want to change the base?
Conversation
- Modified declare_syscalls! macro to support alias definitions - Added aliases for signal syscalls (sigaction, sigprocmask, etc.) - Aliases map user-friendly names to kernel rt_* variants - Added unit tests to verify alias resolution Co-authored-by: kov <1271291+kov@users.noreply.github.com>
- Updated README with usage examples and alias documentation - Updated help text in client.rs to mention alias support - Documented all supported signal-related aliases Co-authored-by: kov <1271291+kov@users.noreply.github.com>
kov
left a comment
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 code structure looks good, but there are also many well known syscalls like open() on aarch64 that are not available kernel-side but are through glibc. The idea is to allow users to also be able to use pinchy -e open on aarch64, they would expect that to work, and alias that to the actual syscall that is used.
- Added aliases for syscalls that exist on x86_64 but not on aarch64 - Maps user-facing names (open, stat, poll, etc.) to *at variants - Includes aliases for: open, stat, lstat, poll, dup2, pipe, access, chmod, chown, link, mkdir, mknod, rename, rmdir, symlink, unlink - Updated documentation to explain architecture-specific aliases - Added architecture-specific unit tests Co-authored-by: kov <1271291+kov@users.noreply.github.com>
Added support for aarch64-specific aliases in commit cb4cc8c. Users can now use |
|
@copilot could you add a few integration tests for the aliases? we can reuse the existing workloads, but use the aliased names for pinchy -e |
- Added test for signal alias: sigprocmask -> rt_sigprocmask - Added test for signal alias: sigaction -> rt_sigaction - Added aarch64-specific test for open -> openat alias - Added aarch64-specific test for stat -> newfstatat alias - Added test for mixed aliases and canonical names - Tests reuse existing workloads to verify aliases work correctly Co-authored-by: kov <1271291+kov@users.noreply.github.com>
Added integration tests in commit d7ba54b. The tests reuse existing workloads and verify:
Tests verify that aliases are accepted in |
|
@copilot build is failing, looks like we need to enable the user feature in nix. |
The build was failing because nix::unistd::User requires the "user" feature to be enabled in the nix crate dependency. Co-authored-by: kov <1271291+kov@users.noreply.github.com>
Add syscall alias support for user-facing names
sigaction->rt_sigaction)declare_syscalls!macro to support alias mappingsyscall_nr_from_name()to check aliasesOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.