1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI_LINUX_PTRACE_H 8 #define _UAPI_LINUX_PTRACE_H 9 #include <linux/types.h> 10 #define PTRACE_TRACEME 0 11 #define PTRACE_PEEKTEXT 1 12 #define PTRACE_PEEKDATA 2 13 #define PTRACE_PEEKUSR 3 14 #define PTRACE_POKETEXT 4 15 #define PTRACE_POKEDATA 5 16 #define PTRACE_POKEUSR 6 17 #define PTRACE_CONT 7 18 #define PTRACE_KILL 8 19 #define PTRACE_SINGLESTEP 9 20 #define PTRACE_ATTACH 16 21 #define PTRACE_DETACH 17 22 #define PTRACE_SYSCALL 24 23 #define PTRACE_SETOPTIONS 0x4200 24 #define PTRACE_GETEVENTMSG 0x4201 25 #define PTRACE_GETSIGINFO 0x4202 26 #define PTRACE_SETSIGINFO 0x4203 27 #define PTRACE_GETREGSET 0x4204 28 #define PTRACE_SETREGSET 0x4205 29 #define PTRACE_SEIZE 0x4206 30 #define PTRACE_INTERRUPT 0x4207 31 #define PTRACE_LISTEN 0x4208 32 #define PTRACE_PEEKSIGINFO 0x4209 33 struct ptrace_peeksiginfo_args { 34 __u64 off; 35 __u32 flags; 36 __s32 nr; 37 }; 38 #define PTRACE_GETSIGMASK 0x420a 39 #define PTRACE_SETSIGMASK 0x420b 40 #define PTRACE_SECCOMP_GET_FILTER 0x420c 41 #define PTRACE_SECCOMP_GET_METADATA 0x420d 42 struct seccomp_metadata { 43 __u64 filter_off; 44 __u64 flags; 45 }; 46 #define PTRACE_GET_SYSCALL_INFO 0x420e 47 #define PTRACE_SYSCALL_INFO_NONE 0 48 #define PTRACE_SYSCALL_INFO_ENTRY 1 49 #define PTRACE_SYSCALL_INFO_EXIT 2 50 #define PTRACE_SYSCALL_INFO_SECCOMP 3 51 struct ptrace_syscall_info { 52 __u8 op; 53 __u8 pad[3]; 54 __u32 arch; 55 __u64 instruction_pointer; 56 __u64 stack_pointer; 57 union { 58 struct { 59 __u64 nr; 60 __u64 args[6]; 61 } entry; 62 struct { 63 __s64 rval; 64 __u8 is_error; 65 } exit; 66 struct { 67 __u64 nr; 68 __u64 args[6]; 69 __u32 ret_data; 70 } seccomp; 71 }; 72 }; 73 #define PTRACE_GET_RSEQ_CONFIGURATION 0x420f 74 struct ptrace_rseq_configuration { 75 __u64 rseq_abi_pointer; 76 __u32 rseq_abi_size; 77 __u32 signature; 78 __u32 flags; 79 __u32 pad; 80 }; 81 #define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG 0x4210 82 #define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG 0x4211 83 struct ptrace_sud_config { 84 __u64 mode; 85 __u64 selector; 86 __u64 offset; 87 __u64 len; 88 }; 89 #define PTRACE_EVENTMSG_SYSCALL_ENTRY 1 90 #define PTRACE_EVENTMSG_SYSCALL_EXIT 2 91 #define PTRACE_PEEKSIGINFO_SHARED (1 << 0) 92 #define PTRACE_EVENT_FORK 1 93 #define PTRACE_EVENT_VFORK 2 94 #define PTRACE_EVENT_CLONE 3 95 #define PTRACE_EVENT_EXEC 4 96 #define PTRACE_EVENT_VFORK_DONE 5 97 #define PTRACE_EVENT_EXIT 6 98 #define PTRACE_EVENT_SECCOMP 7 99 #define PTRACE_EVENT_STOP 128 100 #define PTRACE_O_TRACESYSGOOD 1 101 #define PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK) 102 #define PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK) 103 #define PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE) 104 #define PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC) 105 #define PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE) 106 #define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT) 107 #define PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP) 108 #define PTRACE_O_EXITKILL (1 << 20) 109 #define PTRACE_O_SUSPEND_SECCOMP (1 << 21) 110 #define PTRACE_O_MASK (0x000000ff | PTRACE_O_EXITKILL | PTRACE_O_SUSPEND_SECCOMP) 111 #include <asm/ptrace.h> 112 #endif 113