Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 1 | # This file is used to populate seccomp's allowlist policy in combination with SYSCALLS.TXT. |
Paul Lawrence | 3dd3d55 | 2017-04-12 10:02:54 -0700 | [diff] [blame] | 2 | # Note that the resultant policy is applied only to zygote spawned processes. |
| 3 | # |
Victor Hsieh | 4f02dd5 | 2017-12-20 09:19:22 -0800 | [diff] [blame] | 4 | # This file is processed by a python script named genseccomp.py. |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 5 | |
Robert Sesek | 866387d | 2020-01-13 14:05:31 -0500 | [diff] [blame] | 6 | # Needed for debugging 32-bit Chrome |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 7 | int pipe:pipe(int pipefd[2]) lp32 |
Robert Sesek | 866387d | 2020-01-13 14:05:31 -0500 | [diff] [blame] | 8 | |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 9 | # b/34651972 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 10 | int access:access(const char *pathname, int mode) lp32 |
| 11 | int stat64:stat64(const char*, struct stat64*) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 12 | |
Robert Sesek | 866387d | 2020-01-13 14:05:31 -0500 | [diff] [blame] | 13 | # b/34813887 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 14 | int open:open(const char *path, int oflag, ... ) lp32,x86_64 |
| 15 | int getdents:getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int count) lp32,x86_64 |
Robert Sesek | 866387d | 2020-01-13 14:05:31 -0500 | [diff] [blame] | 16 | |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 17 | # b/34719286 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 18 | int eventfd:eventfd(unsigned int initval, int flags) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 19 | |
| 20 | # b/34817266 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 21 | int epoll_wait:epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 22 | |
| 23 | # b/34908783 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 24 | int epoll_create:epoll_create(int size) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 25 | |
| 26 | # b/34979910 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 27 | int creat:creat(const char *pathname, mode_t mode) lp32 |
| 28 | int unlink:unlink(const char *pathname) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 29 | |
| 30 | # b/35059702 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 31 | int lstat64:lstat64(const char*, struct stat64*) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 32 | |
| 33 | # b/35217603 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 34 | int fcntl:fcntl(int fd, int cmd, ... /* arg */ ) lp32 |
| 35 | pid_t fork:fork() lp32 |
| 36 | int poll:poll(struct pollfd *fds, nfds_t nfds, int timeout) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 37 | |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 38 | # b/35906875 |
| 39 | int inotify_init() lp32 |
| 40 | uid_t getuid() lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 41 | |
| 42 | # b/36435222 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 43 | int remap_file_pages(void *addr, size_t size, int prot, size_t pgoff, int flags) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 44 | |
| 45 | # b/36449658 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 46 | int rename(const char *oldpath, const char *newpath) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 47 | |
| 48 | # b/36726183. Note arm does not support mmap |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 49 | void* mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) x86 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 50 | |
| 51 | # b/37769298 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 52 | int dup2(int oldfd, int newfd) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 53 | |
| 54 | # b/62779795 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 55 | int compat_select:_newselect(int n, unsigned long* inp, unsigned long* outp, unsigned long* exp, struct timeval* timeout) lp32 |
Victor Hsieh | 1afb40c | 2018-03-30 16:48:36 +0000 | [diff] [blame] | 56 | |
| 57 | # b/62090571 |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 58 | int mkdir(const char *pathname, mode_t mode) lp32 |
Elliott Hughes | f4cace6 | 2022-10-21 20:46:46 +0000 | [diff] [blame] | 59 | |
| 60 | # Not used by bionic in U because riscv64 doesn't have it, but still |
| 61 | # used by legacy apps (http://b/254179267). |
Elliott Hughes | c8bf923 | 2022-11-08 02:52:29 +0000 | [diff] [blame] | 62 | int renameat(int, const char*, int, const char*) arm,x86,arm64,x86_64 |