Skip to content
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

ptrace: add PTRACE_O_EXITKILL option #771

Merged
merged 2 commits into from
Nov 8, 2017
Merged

Conversation

bpowers
Copy link
Contributor

@bpowers bpowers commented Sep 24, 2017

It is a somewhat newer option -- it requires Linux 3.8. Is there a
more precise way to specify that?

@asomers asomers requested a review from Susurrus October 7, 2017 04:53
@asomers
Copy link
Member

asomers commented Oct 7, 2017

@bpowers no, there's no way to conditionally build stuff based on kernel version. It's up to the application to check for EINVAL. Also, could you please add a CHANGELOG entry?

@@ -116,6 +116,10 @@ libc_bitflags! {
/// Stop tracee when a SECCOMP_RET_TRACE rule is triggered. See `man seccomp` for more
/// details.
PTRACE_O_TRACESECCOMP;
/// Send a SIGKILL to the tracee if the tracer exits. This is useful
/// for ptrace jailers to prevent tracees from escaping their control.
#[cfg(target_os = "linux")]
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be available on Android as well. Please keep the OSes listed in alphabetical order here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch! updated diff.

@bpowers
Copy link
Contributor Author

bpowers commented Oct 30, 2017

@asomers added a changelog entry, and enabled under android as @Susurrus recommended.

@bpowers
Copy link
Contributor Author

bpowers commented Oct 31, 2017

that errored Travis test is unrelated to this -- seems to be some NetBSD problem?

@Susurrus
Copy link
Contributor

Susurrus commented Nov 8, 2017

bors r+

bors bot added a commit that referenced this pull request Nov 8, 2017
771: ptrace: add PTRACE_O_EXITKILL option r=Susurrus a=bpowers

It is a somewhat newer option -- it requires Linux 3.8. Is there a
more precise way to specify that?
@bors
Copy link
Contributor

bors bot commented Nov 8, 2017

@bors bors bot merged commit 313d2e3 into nix-rust:master Nov 8, 2017
@bpowers
Copy link
Contributor Author

bpowers commented Nov 12, 2017

awesome, thanks!!

@Susurrus
Copy link
Contributor

Thank you for your contribution to nix!

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.

3 participants