blob: 5b7ffd9567df3766be90d269c5c29f97acac3491 [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 _UAPICN_PROC_H
20#define _UAPICN_PROC_H
21#include <linux/types.h>
22enum proc_cn_mcast_op {
Tao Baod7db5942015-01-28 10:07:51 -080023 PROC_CN_MCAST_LISTEN = 1,
24 PROC_CN_MCAST_IGNORE = 2
Ben Cheng655a7c02013-10-16 16:09:24 -070025};
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070026#define PROC_EVENT_ALL (PROC_EVENT_FORK | PROC_EVENT_EXEC | PROC_EVENT_UID | PROC_EVENT_GID | PROC_EVENT_SID | PROC_EVENT_PTRACE | PROC_EVENT_COMM | PROC_EVENT_NONZERO_EXIT | PROC_EVENT_COREDUMP | PROC_EVENT_EXIT)
27enum proc_cn_event {
28 PROC_EVENT_NONE = 0x00000000,
29 PROC_EVENT_FORK = 0x00000001,
30 PROC_EVENT_EXEC = 0x00000002,
31 PROC_EVENT_UID = 0x00000004,
32 PROC_EVENT_GID = 0x00000040,
33 PROC_EVENT_SID = 0x00000080,
34 PROC_EVENT_PTRACE = 0x00000100,
35 PROC_EVENT_COMM = 0x00000200,
36 PROC_EVENT_NONZERO_EXIT = 0x20000000,
37 PROC_EVENT_COREDUMP = 0x40000000,
38 PROC_EVENT_EXIT = 0x80000000
39};
40struct proc_input {
41 enum proc_cn_mcast_op mcast_op;
42 enum proc_cn_event event_type;
43};
Ben Cheng655a7c02013-10-16 16:09:24 -070044struct proc_event {
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070045 enum proc_cn_event what;
Tao Baod7db5942015-01-28 10:07:51 -080046 __u32 cpu;
47 __u64 __attribute__((aligned(8))) timestamp_ns;
48 union {
49 struct {
Tao Baod7db5942015-01-28 10:07:51 -080050 __u32 err;
51 } ack;
52 struct fork_proc_event {
53 __kernel_pid_t parent_pid;
Tao Baod7db5942015-01-28 10:07:51 -080054 __kernel_pid_t parent_tgid;
55 __kernel_pid_t child_pid;
56 __kernel_pid_t child_tgid;
57 } fork;
Tao Baod7db5942015-01-28 10:07:51 -080058 struct exec_proc_event {
59 __kernel_pid_t process_pid;
60 __kernel_pid_t process_tgid;
61 } exec;
Tao Baod7db5942015-01-28 10:07:51 -080062 struct id_proc_event {
63 __kernel_pid_t process_pid;
64 __kernel_pid_t process_tgid;
65 union {
Tao Baod7db5942015-01-28 10:07:51 -080066 __u32 ruid;
67 __u32 rgid;
68 } r;
69 union {
Tao Baod7db5942015-01-28 10:07:51 -080070 __u32 euid;
71 __u32 egid;
72 } e;
73 } id;
Tao Baod7db5942015-01-28 10:07:51 -080074 struct sid_proc_event {
75 __kernel_pid_t process_pid;
76 __kernel_pid_t process_tgid;
77 } sid;
Tao Baod7db5942015-01-28 10:07:51 -080078 struct ptrace_proc_event {
79 __kernel_pid_t process_pid;
80 __kernel_pid_t process_tgid;
81 __kernel_pid_t tracer_pid;
Tao Baod7db5942015-01-28 10:07:51 -080082 __kernel_pid_t tracer_tgid;
83 } ptrace;
84 struct comm_proc_event {
85 __kernel_pid_t process_pid;
Tao Baod7db5942015-01-28 10:07:51 -080086 __kernel_pid_t process_tgid;
87 char comm[16];
88 } comm;
89 struct coredump_proc_event {
Tao Baod7db5942015-01-28 10:07:51 -080090 __kernel_pid_t process_pid;
91 __kernel_pid_t process_tgid;
Christopher Ferrisa981e2e2018-10-25 12:11:39 -070092 __kernel_pid_t parent_pid;
93 __kernel_pid_t parent_tgid;
Tao Baod7db5942015-01-28 10:07:51 -080094 } coredump;
95 struct exit_proc_event {
Tao Baod7db5942015-01-28 10:07:51 -080096 __kernel_pid_t process_pid;
97 __kernel_pid_t process_tgid;
98 __u32 exit_code, exit_signal;
Christopher Ferrisa981e2e2018-10-25 12:11:39 -070099 __kernel_pid_t parent_pid;
100 __kernel_pid_t parent_tgid;
Tao Baod7db5942015-01-28 10:07:51 -0800101 } exit;
Tao Baod7db5942015-01-28 10:07:51 -0800102 } event_data;
Ben Cheng655a7c02013-10-16 16:09:24 -0700103};
104#endif