Support all architectures in seccomp
Test: Make sure arm, x86, x86_64, mips, mips64 emulators boot
Make sure sailfish still boots
Ran CTS test from
https://android-review.googlesource.com/#/c/348671/3 and it passed
The instructions for how to run mips emulators above worked, but
the CTS tests did not seem to actually run.
Change-Id: Iddee5acdb19ed32c7bd4657573313ca439cf6a49
diff --git a/libc/SECCOMP_WHITELIST.TXT b/libc/SECCOMP_WHITELIST.TXT
index 4cb6620..7cae1e1 100644
--- a/libc/SECCOMP_WHITELIST.TXT
+++ b/libc/SECCOMP_WHITELIST.TXT
@@ -25,73 +25,72 @@
# This file is processed by a python script named gensyscalls.py.
# syscalls needed to boot android
-int pivot_root:pivot_root(const char *new_root, const char *put_old) arm64
-int ioprio_get:ioprio_get(int which, int who) arm64
-int ioprio_set:ioprio_set(int which, int who, int ioprio) arm64
-pid_t gettid:gettid() arm64,arm
-int futex:futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, int *uaddr2, int val3) arm64,arm
-int clone:clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ..) arm64,arm
-int rt_sigreturn:rt_sigreturn(unsigned long __unused) arm64,arm
-int rt_tgsigqueueinfo:int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo) arm64,arm
-int restart_syscall:int restart_syscall() arm64,arm
-int getrandom:int getrandom(void *buf, size_t buflen, unsigned int flags) arm64,arm
+int pivot_root:pivot_root(const char *new_root, const char *put_old) arm64,x86_64,mips64
+int ioprio_get:ioprio_get(int which, int who) arm64,x86_64,mips64
+int ioprio_set:ioprio_set(int which, int who, int ioprio) arm64,x86_64,mips64
+pid_t gettid:gettid() all
+int futex:futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, int *uaddr2, int val3) all
+int clone:clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ..) all
+int rt_sigreturn:rt_sigreturn(unsigned long __unused) all
+int rt_tgsigqueueinfo:int rt_tgsigqueueinfo(pid_t tgid, pid_t tid, int sig, siginfo_t *uinfo) all
+int restart_syscall:int restart_syscall() all
+int getrandom:int getrandom(void *buf, size_t buflen, unsigned int flags) all
# Needed for performance tools
-int perf_event_open:perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags) arm64,arm
+int perf_event_open:perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags) all
# Needed for strace
-int tkill:tkill(int tid, int sig) arm64,arm
+int tkill:tkill(int tid, int sig) all
# b/35034743
-int syncfs:syncfs(int fd) arm64,arm
+int syncfs:syncfs(int fd) all
# b/34763393
-int seccomp:seccomp(unsigned int operation, unsigned int flags, void *args) arm64,arm
+int seccomp:seccomp(unsigned int operation, unsigned int flags, void *args) all
# syscalls needed to boot android
-int sigreturn:sigreturn(unsigned long __unused) arm
+int sigreturn:sigreturn(unsigned long __unused) arm,x86,mips
# Syscalls needed to run GFXBenchmark
-pid_t vfork:vfork() arm
+pid_t vfork:vfork() arm,x86,x86_64
# Needed for debugging 32-bit Chrome
-int pipe:pipe(int pipefd[2]) arm
+int pipe:pipe(int pipefd[2]) arm,x86,mips
# b/34651972
-int access:access(const char *pathname, int mode) arm
-int stat64:stat64(const char *restrict path, struct stat64 *restrict buf) arm
+int access:access(const char *pathname, int mode) arm,x86,mips
+int stat64:stat64(const char *restrict path, struct stat64 *restrict buf) arm,x86,mips
# b/34813887
-int open:open(const char *path, int oflag, ... ) arm
-int getdents:getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int count) arm
-int getdents64:getdents64(unsigned int fd, struct linux_dirent64 *dirp, unsigned int count) arm
+int open:open(const char *path, int oflag, ... ) arm,x86,mips
+int getdents:getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int count) arm,x86,mips
# b/34719286
-int eventfd:eventfd(unsigned int initval, int flags) arm
+int eventfd:eventfd(unsigned int initval, int flags) arm,x86,mips
# b/34817266
-int epoll_wait:epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) arm
+int epoll_wait:epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) arm,x86,mips
# Needed by sanitizers (b/34606909)
# 5 (__NR_open) and 195 (__NR_stat64) are also required, but they are
# already allowed.
-ssize_t readlink:readlink(const char *path, char *buf, size_t bufsiz) arm
+ssize_t readlink:readlink(const char *path, char *buf, size_t bufsiz) arm,x86,mips
# b/34908783
-int epoll_create:epoll_create(int size) arm
+int epoll_create:epoll_create(int size) arm,x86,mips
# b/34979910
-int creat:creat(const char *pathname, mode_t mode) arm
-int unlink:unlink(const char *pathname) arm
+int creat:creat(const char *pathname, mode_t mode) arm,x86,mips
+int unlink:unlink(const char *pathname) arm,x86,mips
# b/35059702
-int lstat64:lstat64(const char *restrict path, struct stat64 *restrict buf) arm
+int lstat64:lstat64(const char *restrict path, struct stat64 *restrict buf) arm,x86,mips
# b/35217603
-int fcntl:fcntl(int fd, int cmd, ... /* arg */ ) arm
-pid_t fork:fork() arm
-int poll:poll(struct pollfd *fds, nfds_t nfds, int timeout) arm
+int fcntl:fcntl(int fd, int cmd, ... /* arg */ ) arm,x86,mips
+pid_t fork:fork() arm,x86,mips
+int poll:poll(struct pollfd *fds, nfds_t nfds, int timeout) arm,x86,mips
-# b/35906875
-int inotify_init() arm
-uid_t getuid() arm
+# b/35906875. Note mips already has getuid from SYSCALLS.TXT
+int inotify_init() arm,x86,mips
+uid_t getuid() arm,x86