use super::{allow_list, sys, ArgCmp};
allow_list! {
pub static RUST_BASICS = [
sigaltstack,
getrandom,
clone, clone3, futex,
sched_yield,
set_robust_list,
sched_getaffinity,
madvise, mprotect,
#[cfg(debug_assertions)]
fcntl,
prctl if [ ArgCmp::Equal { arg_idx: 0, value: sys::PR_SET_NAME.into() } ], prctl if [ ArgCmp::Equal { arg_idx: 0, value: sys::PR_GET_SECCOMP.into() } ] ]
}
allow_list! {
pub static SERVICE_BASICS = [
..RUST_BASICS,
exit,
exit_group,
kill if [ ArgCmp::Equal { arg_idx: 0, value: std::process::id().into() } ],
tgkill if [ ArgCmp::Equal { arg_idx: 0, value: std::process::id().into() } ],
getpid,
gettid,
rt_sigprocmask,
read,
write,
close,
brk,
mmap,
munmap,
mremap,
fstat,
statx,
#[cfg(target_arch = "x86_64")]
stat,
#[cfg(target_arch = "x86_64")]
lstat,
newfstatat,
lseek,
rseq
]
}
allow_list! {
pub static ASYNC = [
#[cfg(target_arch = "x86_64")]
epoll_wait,
epoll_pwait,
epoll_ctl,
#[cfg(target_arch = "x86_64")]
epoll_create,
epoll_create1
]
}
allow_list! {
pub static NET_SOCKET_API = [
socket,
connect,
shutdown,
accept,
accept4,
sendto,
sendmsg,
sendmmsg,
recvfrom,
recvmsg,
recvmmsg,
socketpair,
setsockopt,
getsockopt,
getsockname,
bind,
ioctl
]
}
allow_list! {
pub static FS_WATCH = [
#[cfg(target_arch = "x86_64")]
inotify_init,
inotify_init1,
inotify_add_watch,
inotify_rm_watch,
getdents64
]
}
allow_list! {
pub static VECTORED_IO = [
readv,
writev,
preadv,
pwritev
]
}
allow_list! {
pub static SENTRY_EXTRAS = [
#[cfg(target_arch = "x86_64")]
readlink,
uname
]
}