blob: 4a6873861dbef3bab8c44c1d64901bbd0a073acc [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_PTRACE_H
20#define _UAPI_LINUX_PTRACE_H
21#include <linux/types.h>
22#define PTRACE_TRACEME 0
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define PTRACE_PEEKTEXT 1
24#define PTRACE_PEEKDATA 2
25#define PTRACE_PEEKUSR 3
26#define PTRACE_POKETEXT 4
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define PTRACE_POKEDATA 5
28#define PTRACE_POKEUSR 6
29#define PTRACE_CONT 7
30#define PTRACE_KILL 8
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define PTRACE_SINGLESTEP 9
32#define PTRACE_ATTACH 16
33#define PTRACE_DETACH 17
34#define PTRACE_SYSCALL 24
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define PTRACE_SETOPTIONS 0x4200
36#define PTRACE_GETEVENTMSG 0x4201
37#define PTRACE_GETSIGINFO 0x4202
38#define PTRACE_SETSIGINFO 0x4203
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define PTRACE_GETREGSET 0x4204
40#define PTRACE_SETREGSET 0x4205
41#define PTRACE_SEIZE 0x4206
42#define PTRACE_INTERRUPT 0x4207
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define PTRACE_LISTEN 0x4208
44#define PTRACE_PEEKSIGINFO 0x4209
45struct ptrace_peeksiginfo_args {
Tao Baod7db5942015-01-28 10:07:51 -080046 __u64 off;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u32 flags;
48 __s32 nr;
Ben Cheng655a7c02013-10-16 16:09:24 -070049};
Christopher Ferris38062f92014-07-09 15:33:25 -070050#define PTRACE_GETSIGMASK 0x420a
Christopher Ferris38062f92014-07-09 15:33:25 -070051#define PTRACE_SETSIGMASK 0x420b
Christopher Ferris05d08e92016-02-04 13:16:38 -080052#define PTRACE_SECCOMP_GET_FILTER 0x420c
Christopher Ferris76a1d452018-06-27 14:12:29 -070053#define PTRACE_SECCOMP_GET_METADATA 0x420d
54struct seccomp_metadata {
55 __u64 filter_off;
56 __u64 flags;
57};
Christopher Ferris38062f92014-07-09 15:33:25 -070058#define PTRACE_PEEKSIGINFO_SHARED (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define PTRACE_EVENT_FORK 1
Christopher Ferris05d08e92016-02-04 13:16:38 -080060#define PTRACE_EVENT_VFORK 2
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define PTRACE_EVENT_CLONE 3
62#define PTRACE_EVENT_EXEC 4
63#define PTRACE_EVENT_VFORK_DONE 5
Christopher Ferris05d08e92016-02-04 13:16:38 -080064#define PTRACE_EVENT_EXIT 6
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define PTRACE_EVENT_SECCOMP 7
66#define PTRACE_EVENT_STOP 128
67#define PTRACE_O_TRACESYSGOOD 1
Christopher Ferris05d08e92016-02-04 13:16:38 -080068#define PTRACE_O_TRACEFORK (1 << PTRACE_EVENT_FORK)
Ben Cheng655a7c02013-10-16 16:09:24 -070069#define PTRACE_O_TRACEVFORK (1 << PTRACE_EVENT_VFORK)
70#define PTRACE_O_TRACECLONE (1 << PTRACE_EVENT_CLONE)
71#define PTRACE_O_TRACEEXEC (1 << PTRACE_EVENT_EXEC)
Christopher Ferris05d08e92016-02-04 13:16:38 -080072#define PTRACE_O_TRACEVFORKDONE (1 << PTRACE_EVENT_VFORK_DONE)
Ben Cheng655a7c02013-10-16 16:09:24 -070073#define PTRACE_O_TRACEEXIT (1 << PTRACE_EVENT_EXIT)
74#define PTRACE_O_TRACESECCOMP (1 << PTRACE_EVENT_SECCOMP)
75#define PTRACE_O_EXITKILL (1 << 20)
Christopher Ferris05d08e92016-02-04 13:16:38 -080076#define PTRACE_O_SUSPEND_SECCOMP (1 << 21)
77#define PTRACE_O_MASK (0x000000ff | PTRACE_O_EXITKILL | PTRACE_O_SUSPEND_SECCOMP)
Ben Cheng655a7c02013-10-16 16:09:24 -070078#include <asm/ptrace.h>
79#endif