aboutsummaryrefslogtreecommitdiffstats
path: root/man2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2019-09-12 10:30:57 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2019-09-12 10:49:56 +0200
commitf04534d22c69a947c3cfee82b9a683e772e913b4 (patch)
tree8e5b333332323d146a844f04fbae15d87d9df210 /man2
parent93c37f08be5d6276cbb3b7fc6a2d96de120ce0ae (diff)
downloadman-pages-f04534d22c69a947c3cfee82b9a683e772e913b4.tar.gz
ptrace.2: Describe the PTRACE_GET_SYSCALL_INFO 'op' value in more detail
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2')
-rw-r--r--man2/ptrace.258
1 files changed, 41 insertions, 17 deletions
diff --git a/man2/ptrace.2 b/man2/ptrace.2
index 4d9a9c67e6..d84e07d687 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 <linux/ptrace.h> */
- __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 <linux/ptrace.h>)
+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