blob: 7e1ecded11cae675681d1bbb3536c1430397896a [file] [log] [blame]
Victor Hsiehdbb86702020-06-15 09:29:07 -07001# This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT.
Paul Lawrence3dd3d552017-04-12 10:02:54 -07002# Note that the resultant policy is applied only to zygote spawned processes.
3#
Victor Hsieh4f02dd52017-12-20 09:19:22 -08004# This file is processed by a python script named genseccomp.py.
Victor Hsieh1afb40c2018-03-30 16:48:36 +00005
Robert Sesek866387d2020-01-13 14:05:31 -05006# Needed for debugging 32-bit Chrome
Elliott Hughes2b499042020-02-13 14:21:55 -08007int pipe:pipe(int pipefd[2]) lp32
Robert Sesek866387d2020-01-13 14:05:31 -05008
Victor Hsieh1afb40c2018-03-30 16:48:36 +00009# b/34651972
Elliott Hughes2b499042020-02-13 14:21:55 -080010int access:access(const char *pathname, int mode) lp32
11int stat64:stat64(const char*, struct stat64*) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000012
Robert Sesek866387d2020-01-13 14:05:31 -050013# b/34813887
Elliott Hughes2b499042020-02-13 14:21:55 -080014int open:open(const char *path, int oflag, ... ) lp32,x86_64
15int getdents:getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int count) lp32,x86_64
Robert Sesek866387d2020-01-13 14:05:31 -050016
Victor Hsieh1afb40c2018-03-30 16:48:36 +000017# b/34719286
Elliott Hughes2b499042020-02-13 14:21:55 -080018int eventfd:eventfd(unsigned int initval, int flags) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000019
20# b/34817266
Elliott Hughes2b499042020-02-13 14:21:55 -080021int epoll_wait:epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000022
23# b/34908783
Elliott Hughes2b499042020-02-13 14:21:55 -080024int epoll_create:epoll_create(int size) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000025
26# b/34979910
Elliott Hughes2b499042020-02-13 14:21:55 -080027int creat:creat(const char *pathname, mode_t mode) lp32
28int unlink:unlink(const char *pathname) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000029
30# b/35059702
Elliott Hughes2b499042020-02-13 14:21:55 -080031int lstat64:lstat64(const char*, struct stat64*) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000032
33# b/35217603
Elliott Hughes2b499042020-02-13 14:21:55 -080034int fcntl:fcntl(int fd, int cmd, ... /* arg */ ) lp32
35pid_t fork:fork() lp32
36int poll:poll(struct pollfd *fds, nfds_t nfds, int timeout) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000037
Elliott Hughes2b499042020-02-13 14:21:55 -080038# b/35906875
39int inotify_init() lp32
40uid_t getuid() lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000041
42# b/36435222
Elliott Hughes2b499042020-02-13 14:21:55 -080043int remap_file_pages(void *addr, size_t size, int prot, size_t pgoff, int flags) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000044
45# b/36449658
Elliott Hughes2b499042020-02-13 14:21:55 -080046int rename(const char *oldpath, const char *newpath) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000047
48# b/36726183. Note arm does not support mmap
Elliott Hughes2b499042020-02-13 14:21:55 -080049void* mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) x86
Victor Hsieh1afb40c2018-03-30 16:48:36 +000050
51# b/37769298
Elliott Hughes2b499042020-02-13 14:21:55 -080052int dup2(int oldfd, int newfd) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000053
54# b/62779795
Elliott Hughes2b499042020-02-13 14:21:55 -080055int compat_select:_newselect(int n, unsigned long* inp, unsigned long* outp, unsigned long* exp, struct timeval* timeout) lp32
Victor Hsieh1afb40c2018-03-30 16:48:36 +000056
57# b/62090571
Elliott Hughes2b499042020-02-13 14:21:55 -080058int mkdir(const char *pathname, mode_t mode) lp32
Elliott Hughesf4cace62022-10-21 20:46:46 +000059
60# Not used by bionic in U because riscv64 doesn't have it, but still
61# used by legacy apps (http://b/254179267).
Elliott Hughesc8bf9232022-11-08 02:52:29 +000062int renameat(int, const char*, int, const char*) arm,x86,arm64,x86_64