diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index a8d1082dda80e..a71468ea667a6 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -2226,10 +2226,16 @@ SCM_CREDENTIALS SCM_RIGHTS SCM_TIMESTAMP SCM_TIMESTAMPING +SECCOMP_ADDFD_FLAG_SEND +SECCOMP_ADDFD_FLAG_SETFD SECCOMP_FILTER_FLAG_LOG SECCOMP_FILTER_FLAG_NEW_LISTENER SECCOMP_FILTER_FLAG_SPEC_ALLOW SECCOMP_FILTER_FLAG_TSYNC +SECCOMP_FILTER_FLAG_TSYNC_ESRCH +SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV +SECCOMP_GET_ACTION_AVAIL +SECCOMP_GET_NOTIF_SIZES SECCOMP_MODE_DISABLED SECCOMP_MODE_FILTER SECCOMP_MODE_STRICT @@ -2245,6 +2251,9 @@ SECCOMP_RET_LOG SECCOMP_RET_TRACE SECCOMP_RET_TRAP SECCOMP_RET_USER_NOTIF +SECCOMP_SET_MODE_FILTER +SECCOMP_SET_MODE_STRICT +SECCOMP_USER_NOTIF_FLAG_CONTINUE SEEK_CUR SEEK_DATA SEEK_END diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index 7da77340eadf0..73414fc86baf4 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -2749,6 +2749,7 @@ SECCOMP_RET_KILL_THREAD SECCOMP_RET_LOG SECCOMP_RET_TRACE SECCOMP_RET_TRAP +SECCOMP_RET_USER_NOTIF SECCOMP_SET_MODE_FILTER SECCOMP_SET_MODE_STRICT SECCOMP_USER_NOTIF_FLAG_CONTINUE diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 5fdc072d9369a..8fb5f945cd6b6 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -2158,18 +2158,22 @@ pub const GRND_NONBLOCK: c_uint = 0x0001; pub const GRND_RANDOM: c_uint = 0x0002; pub const GRND_INSECURE: c_uint = 0x0004; +// pub const SECCOMP_MODE_DISABLED: c_uint = 0; pub const SECCOMP_MODE_STRICT: c_uint = 1; pub const SECCOMP_MODE_FILTER: c_uint = 2; -pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1; -pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 2; -pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 4; -pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 8; +pub const SECCOMP_SET_MODE_STRICT: c_uint = 0; +pub const SECCOMP_SET_MODE_FILTER: c_uint = 1; +pub const SECCOMP_GET_ACTION_AVAIL: c_uint = 2; +pub const SECCOMP_GET_NOTIF_SIZES: c_uint = 3; -pub const SECCOMP_RET_ACTION_FULL: c_uint = 0xffff0000; -pub const SECCOMP_RET_ACTION: c_uint = 0x7fff0000; -pub const SECCOMP_RET_DATA: c_uint = 0x0000ffff; +pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1 << 0; +pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 1 << 1; +pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 1 << 2; +pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 1 << 3; +pub const SECCOMP_FILTER_FLAG_TSYNC_ESRCH: c_ulong = 1 << 4; +pub const SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV: c_ulong = 1 << 5; pub const SECCOMP_RET_KILL_PROCESS: c_uint = 0x80000000; pub const SECCOMP_RET_KILL_THREAD: c_uint = 0x00000000; @@ -2181,6 +2185,15 @@ pub const SECCOMP_RET_TRACE: c_uint = 0x7ff00000; pub const SECCOMP_RET_LOG: c_uint = 0x7ffc0000; pub const SECCOMP_RET_ALLOW: c_uint = 0x7fff0000; +pub const SECCOMP_RET_ACTION_FULL: c_uint = 0xffff0000; +pub const SECCOMP_RET_ACTION: c_uint = 0x7fff0000; +pub const SECCOMP_RET_DATA: c_uint = 0x0000ffff; + +pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: c_ulong = 1; + +pub const SECCOMP_ADDFD_FLAG_SETFD: c_ulong = 1; +pub const SECCOMP_ADDFD_FLAG_SEND: c_ulong = 2; + pub const NLA_F_NESTED: c_int = 1 << 15; pub const NLA_F_NET_BYTEORDER: c_int = 1 << 14; pub const NLA_TYPE_MASK: c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index ee00d02587b6f..fdc17e3daf43a 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -3246,18 +3246,19 @@ pub const SECCOMP_SET_MODE_FILTER: c_uint = 1; pub const SECCOMP_GET_ACTION_AVAIL: c_uint = 2; pub const SECCOMP_GET_NOTIF_SIZES: c_uint = 3; -pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1; -pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 2; -pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 4; -pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 8; -pub const SECCOMP_FILTER_FLAG_TSYNC_ESRCH: c_ulong = 16; -pub const SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV: c_ulong = 32; +pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1 << 0; +pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 1 << 1; +pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 1 << 2; +pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 1 << 3; +pub const SECCOMP_FILTER_FLAG_TSYNC_ESRCH: c_ulong = 1 << 4; +pub const SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV: c_ulong = 1 << 5; pub const SECCOMP_RET_KILL_PROCESS: c_uint = 0x80000000; pub const SECCOMP_RET_KILL_THREAD: c_uint = 0x00000000; pub const SECCOMP_RET_KILL: c_uint = SECCOMP_RET_KILL_THREAD; pub const SECCOMP_RET_TRAP: c_uint = 0x00030000; pub const SECCOMP_RET_ERRNO: c_uint = 0x00050000; +pub const SECCOMP_RET_USER_NOTIF: c_uint = 0x7fc00000; pub const SECCOMP_RET_TRACE: c_uint = 0x7ff00000; pub const SECCOMP_RET_LOG: c_uint = 0x7ffc0000; pub const SECCOMP_RET_ALLOW: c_uint = 0x7fff0000;