From 13b1d974068487e273b6ed712a79dc2de712462e Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 13 Jul 2023 15:54:32 -0700 Subject: [PATCH] Add riscv_hwprobe to the seccomp allowlist. We're not ready to add a syscall wrapper to bionic for this (see https://www.openwall.com/lists/libc-coord/2023/07/13/1 for more), but it's useful for writing a CTS test ensuring that misaligned accesses are fast. (I've also moved userfaultfd() next to membarrier() where it belongs: the existing comment was incorrect.) Bug: https://github.com/google/android-riscv64/issues/87 Test: treehugger Change-Id: Ibe691e461c564caebfed295e7acda73cb9b97618 --- libc/SECCOMP_ALLOWLIST_COMMON.TXT | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libc/SECCOMP_ALLOWLIST_COMMON.TXT b/libc/SECCOMP_ALLOWLIST_COMMON.TXT index efbf28b88..4a8d5014b 100644 --- a/libc/SECCOMP_ALLOWLIST_COMMON.TXT +++ b/libc/SECCOMP_ALLOWLIST_COMMON.TXT @@ -53,6 +53,7 @@ int sched_setattr(pid_t, sched_attr*, unsigned, unsigned) all int execveat(int, const char*, char* const*, char* const*, int) all # Since Linux 4.3, not in glibc. Probed for and conditionally used by ART. int membarrier(int, int) all +int userfaultfd(int) all # Since Linux 5.1, not in glibc. Not used by bionic, and not likely ever # to be (because the last thing anyone needs is a new 32-bit ABI in the # 2020s!) but http://b/138781460 showed cuttlefish needed at least the @@ -73,5 +74,5 @@ int recvmmsg_time64(int, mmsghdr*, unsigned int, int, const timespec64*) lp32 int rt_sigtimedwait_time64(const sigset64_t*, siginfo_t*, const timespec64*, size_t) lp32 int futex_time64(int*, int, int, const timespec64*, int*, int) lp32 int sched_rr_get_interval_time64(pid_t, timespec64*) lp32 -# Since Linux 5.4, not in glibc. Probed for and conditionally used by ART. -int userfaultfd(int) all +# Since Linux 6.4, not in glibc (https://www.openwall.com/lists/libc-coord/2023/07/13/1). +int riscv_hwprobe(riscv_hwprobe*, size_t, size_t, unsigned long*, unsigned) riscv64