Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346456
b: refs/heads/master
c: 992fb6e
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Dec 18, 2012
1 parent 51251af commit 6989d21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 462e471107624fe9bd8b6353ac13e06305c3f3fd
refs/heads/master: 992fb6e170639b0849bace8e49bf31bd37c4123c
2 changes: 2 additions & 0 deletions trunk/include/linux/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#define PT_TRACE_EXIT PT_EVENT_FLAG(PTRACE_EVENT_EXIT)
#define PT_TRACE_SECCOMP PT_EVENT_FLAG(PTRACE_EVENT_SECCOMP)

#define PT_EXITKILL (PTRACE_O_EXITKILL << PT_OPT_FLAG_SHIFT)

/* single stepping state bits (used on ARM and PA-RISC) */
#define PT_SINGLESTEP_BIT 31
#define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT)
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/uapi/linux/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@
#define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT)
#define PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP)

#define PTRACE_O_MASK 0x000000ff
/* eventless options */
#define PTRACE_O_EXITKILL (1 << 20)

#define PTRACE_O_MASK (0x000000ff | PTRACE_O_EXITKILL)

#include <asm/ptrace.h>

Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,9 @@ void exit_ptrace(struct task_struct *tracer)
return;

list_for_each_entry_safe(p, n, &tracer->ptraced, ptrace_entry) {
if (unlikely(p->ptrace & PT_EXITKILL))
send_sig_info(SIGKILL, SEND_SIG_FORCED, p);

if (__ptrace_detach(tracer, p))
list_add(&p->ptrace_entry, &ptrace_dead);
}
Expand Down

0 comments on commit 6989d21

Please sign in to comment.