Skip to content

sys::ptrace: adding ::syscall_info() for linux/glibc. #2627

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Apr 9, 2025

to retrieve the very system call which stopped the process. Can be found the type of calls and their related informations. e.g. on exit we get the return value of the call.

What does this PR do

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@devnexen devnexen force-pushed the ptrace_syscall_info branch 4 times, most recently from da407b8 to 838b236 Compare April 9, 2025 20:55
use nix::unistd::fork;
use nix::unistd::ForkResult::*;

require_capability!("test_ptrace_interrupt", CAP_SYS_PTRACE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
require_capability!("test_ptrace_interrupt", CAP_SYS_PTRACE);
require_capability!("test_ptrace_syscall_info", CAP_SYS_PTRACE);

to retrieve the very system call which stopped the process.
Can be found the type of calls and their related informations.
e.g. on exit we get the return value of the call.
@devnexen devnexen force-pushed the ptrace_syscall_info branch from 838b236 to 98692cc Compare April 10, 2025 05:26
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SteveLauC SteveLauC added this pull request to the merge queue Apr 10, 2025
Merged via the queue into nix-rust:master with commit 525c74d Apr 10, 2025
40 checks passed
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.

2 participants