1*cda5da8dSAndroid Build Coastguard Worker /* 2*cda5da8dSAndroid Build Coastguard Worker * This file is auto-generated. Modifications will be lost. 3*cda5da8dSAndroid Build Coastguard Worker * 4*cda5da8dSAndroid Build Coastguard Worker * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5*cda5da8dSAndroid Build Coastguard Worker * for more information. 6*cda5da8dSAndroid Build Coastguard Worker */ 7*cda5da8dSAndroid Build Coastguard Worker #ifndef _UAPI_LINUX_SECCOMP_H 8*cda5da8dSAndroid Build Coastguard Worker #define _UAPI_LINUX_SECCOMP_H 9*cda5da8dSAndroid Build Coastguard Worker #include <linux/compiler.h> 10*cda5da8dSAndroid Build Coastguard Worker #include <linux/types.h> 11*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_MODE_DISABLED 0 12*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_MODE_STRICT 1 13*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_MODE_FILTER 2 14*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_SET_MODE_STRICT 0 15*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_SET_MODE_FILTER 1 16*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_GET_ACTION_AVAIL 2 17*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_GET_NOTIF_SIZES 3 18*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_FILTER_FLAG_TSYNC (1UL << 0) 19*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_FILTER_FLAG_LOG (1UL << 1) 20*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1UL << 2) 21*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_FILTER_FLAG_NEW_LISTENER (1UL << 3) 22*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_FILTER_FLAG_TSYNC_ESRCH (1UL << 4) 23*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV (1UL << 5) 24*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_KILL_PROCESS 0x80000000U 25*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_KILL_THREAD 0x00000000U 26*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_KILL SECCOMP_RET_KILL_THREAD 27*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_TRAP 0x00030000U 28*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_ERRNO 0x00050000U 29*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_USER_NOTIF 0x7fc00000U 30*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_TRACE 0x7ff00000U 31*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_LOG 0x7ffc0000U 32*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_ALLOW 0x7fff0000U 33*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_ACTION_FULL 0xffff0000U 34*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_ACTION 0x7fff0000U 35*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_RET_DATA 0x0000ffffU 36*cda5da8dSAndroid Build Coastguard Worker struct seccomp_data { 37*cda5da8dSAndroid Build Coastguard Worker int nr; 38*cda5da8dSAndroid Build Coastguard Worker __u32 arch; 39*cda5da8dSAndroid Build Coastguard Worker __u64 instruction_pointer; 40*cda5da8dSAndroid Build Coastguard Worker __u64 args[6]; 41*cda5da8dSAndroid Build Coastguard Worker }; 42*cda5da8dSAndroid Build Coastguard Worker struct seccomp_notif_sizes { 43*cda5da8dSAndroid Build Coastguard Worker __u16 seccomp_notif; 44*cda5da8dSAndroid Build Coastguard Worker __u16 seccomp_notif_resp; 45*cda5da8dSAndroid Build Coastguard Worker __u16 seccomp_data; 46*cda5da8dSAndroid Build Coastguard Worker }; 47*cda5da8dSAndroid Build Coastguard Worker struct seccomp_notif { 48*cda5da8dSAndroid Build Coastguard Worker __u64 id; 49*cda5da8dSAndroid Build Coastguard Worker __u32 pid; 50*cda5da8dSAndroid Build Coastguard Worker __u32 flags; 51*cda5da8dSAndroid Build Coastguard Worker struct seccomp_data data; 52*cda5da8dSAndroid Build Coastguard Worker }; 53*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_USER_NOTIF_FLAG_CONTINUE (1UL << 0) 54*cda5da8dSAndroid Build Coastguard Worker struct seccomp_notif_resp { 55*cda5da8dSAndroid Build Coastguard Worker __u64 id; 56*cda5da8dSAndroid Build Coastguard Worker __s64 val; 57*cda5da8dSAndroid Build Coastguard Worker __s32 error; 58*cda5da8dSAndroid Build Coastguard Worker __u32 flags; 59*cda5da8dSAndroid Build Coastguard Worker }; 60*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP (1UL << 0) 61*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_ADDFD_FLAG_SETFD (1UL << 0) 62*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_ADDFD_FLAG_SEND (1UL << 1) 63*cda5da8dSAndroid Build Coastguard Worker struct seccomp_notif_addfd { 64*cda5da8dSAndroid Build Coastguard Worker __u64 id; 65*cda5da8dSAndroid Build Coastguard Worker __u32 flags; 66*cda5da8dSAndroid Build Coastguard Worker __u32 srcfd; 67*cda5da8dSAndroid Build Coastguard Worker __u32 newfd; 68*cda5da8dSAndroid Build Coastguard Worker __u32 newfd_flags; 69*cda5da8dSAndroid Build Coastguard Worker }; 70*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOC_MAGIC '!' 71*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IO(nr) _IO(SECCOMP_IOC_MAGIC, nr) 72*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOR(nr,type) _IOR(SECCOMP_IOC_MAGIC, nr, type) 73*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOW(nr,type) _IOW(SECCOMP_IOC_MAGIC, nr, type) 74*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOWR(nr,type) _IOWR(SECCOMP_IOC_MAGIC, nr, type) 75*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOCTL_NOTIF_RECV SECCOMP_IOWR(0, struct seccomp_notif) 76*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOCTL_NOTIF_SEND SECCOMP_IOWR(1, struct seccomp_notif_resp) 77*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOW(2, __u64) 78*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOCTL_NOTIF_ADDFD SECCOMP_IOW(3, struct seccomp_notif_addfd) 79*cda5da8dSAndroid Build Coastguard Worker #define SECCOMP_IOCTL_NOTIF_SET_FLAGS SECCOMP_IOW(4, __u64) 80*cda5da8dSAndroid Build Coastguard Worker #endif 81