Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Add syscall alias support for user-facing names

  • Understand common syscall aliases (e.g., sigaction -> rt_sigaction)
  • Modify declare_syscalls! macro to support alias mapping
  • Add alias definitions for well-known syscalls
  • Update syscall_nr_from_name() to check aliases
  • Add tests to verify alias resolution works
  • Test with actual examples (sigaction, sigprocmask, etc.)
  • Add documentation/examples of using aliases
  • Verify edge cases work correctly
  • Add aarch64-specific aliases for legacy syscalls (open, stat, etc.)
  • Add integration tests for aliases using existing workloads
  • Fix build failure by enabling nix "user" feature
Original prompt

This section details on the original issue you should resolve

<issue_title>We should add syscall aliases</issue_title>
<issue_description>There are some syscalls that are well known, are supported by libc but not by the kernel or have a different name in the kernel. Pinchy should still allow specifying those names and attach to the correct name on the kernel.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 7, 2026 23:37
- 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>
Copilot AI changed the title [WIP] Add syscall aliases for unsupported and differently named syscalls Add syscall alias support for user-facing names Feb 7, 2026
Copilot AI requested a review from kov February 7, 2026 23:40
Copy link
Owner

@kov kov left a 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>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

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 t...

Added support for aarch64-specific aliases in commit cb4cc8c. Users can now use pinchy -e open on aarch64, which will map to openat. Added 16 legacy syscall aliases (open, stat, lstat, poll, dup2, pipe, access, chmod, chown, link, mkdir, mknod, rename, rmdir, symlink, unlink) that work on both architectures.

Copilot AI requested a review from kov February 8, 2026 22:24
@kov
Copy link
Owner

kov commented Feb 11, 2026

@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>
Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@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 integration tests in commit d7ba54b. The tests reuse existing workloads and verify:

  • Signal aliases: sigprocmask and sigaction
  • aarch64 aliases: open and stat
  • Mixed aliases and canonical names in same command

Tests verify that aliases are accepted in -e filters and output shows canonical syscall names.

@kov
Copy link
Owner

kov commented Feb 11, 2026

@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>
Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot build is failing, looks like we need to enable the user feature in nix.

Fixed in commit d964570. Added the user feature to the nix dependency which is required for the User type used in server.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We should add syscall aliases

2 participants