diff --git a/man2/ptrace.2 b/man2/ptrace.2 index 4d9a9c67e..d84e07d68 100644 --- a/man2/ptrace.2 +++ b/man2/ptrace.2 @@ -1034,33 +1034,26 @@ structure contains the following fields: .in +4n .EX struct ptrace_syscall_info { - __u8 op; /* PTRACE_SYSCALL_INFO_* value - describing the kind - of system call stop, - see */ - __u32 arch; /* AUDIT_ARCH_* value, - see seccomp(2) */ - __u64 instruction_pointer; /* CPU instruction pointer */ + __u8 op; /* Type of system call stop */ + __u32 arch; /* AUDIT_ARCH_* value; see seccomp(2) */ + __u64 instruction_pointer; /* CPU instruction pointer */ __u64 stack_pointer; /* CPU stack pointer */ union { - struct { + struct { /* op == PTRACE_SYSCALL_INFO_ENTRY */ __u64 nr; /* System call number */ __u64 args[6]; /* System call arguments */ - } entry; /* Information specific to - system call entry stops */ - struct { + } entry; + struct { /* op == PTRACE_SYSCALL_INFO_EXIT */ __s64 rval; /* System call return value */ __u8 is_error; /* System call error flag */ - } exit; /* Information specific to - system call exit stops */ - struct { + } exit; + struct { /* op == PTRACE_SYSCALL_INFO_SECCOMP */ __u64 nr; /* System call number */ __u64 args[6]; /* System call arguments */ - __u32 ret_data; /* The SECCOMP_RET_DATA portion + __u32 ret_data; /* SECCOMP_RET_DATA portion of SECCOMP_RET_TRACE return value */ - } seccomp; /* Information specific to - PTRACE_EVENT_SECCOMP stops */ + } seccomp; }; }; .EE @@ -1077,6 +1070,37 @@ The rest of the structure is a union; one should read only those fields that are meaningful for the kind of system call stop specified by the .IR op field. +.IP +The +.I op +field has one of the following values (defined in +.IR ) +indicating what type of stop occurred and +which part of the union is filled: +.RS +.TP +.BR PTRACE_SYSCALL_INFO_ENTRY +The +.I entry +component of the union contains information relating to a +system call entry stop. +.TP +.BR PTRACE_SYSCALL_INFO_EXIT +The +.I exit +component of the union contains information relating to a +system call exit stop. +.TP +.BR PTRACE_SYSCALL_INFO_SECCOMP +The +.I exit +component of the union contains information relating to a +.B PTRACE_EVENT_SECCOMP +stop. +.TP +.BR PTRACE_SYSCALL_INFO_NONE +No component of the union contains relevant information. +.RE .\" .SS Death under ptrace When a (possibly multithreaded) process receives a killing signal