Merge "Greatly reduce the space used by properties filenames." into main
diff --git a/libc/SECCOMP_ALLOWLIST_COMMON.TXT b/libc/SECCOMP_ALLOWLIST_COMMON.TXT
index aba8303..1d58475 100644
--- a/libc/SECCOMP_ALLOWLIST_COMMON.TXT
+++ b/libc/SECCOMP_ALLOWLIST_COMMON.TXT
@@ -11,7 +11,7 @@
 # Syscalls used internally by bionic, but not exposed directly.
 pid_t	gettid()	all
 int	futex(int*, int, int, const timespec*, int*, int)	all
-int	clone(int (*)(void*), void*, int, void*, ...) all
+pid_t	clone(int (*)(void*), void*, int, void*, ...) all
 int	sigreturn(unsigned long)	lp32
 int	rt_sigreturn(unsigned long)	all
 int	rt_tgsigqueueinfo(pid_t, pid_t, int, siginfo_t*)	all
@@ -77,3 +77,8 @@
 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.3, not in glibc. Not used by bionic, but increasingly
+# likely to be useful as new features are added. In particular, cgroups
+# support seems potentially useful for Android (though the struct that
+# changes size over time is obviously problematic).
+pid_t clone3(clone_args*, size_t) all
diff --git a/tests/unistd_test.cpp b/tests/unistd_test.cpp
index b639a4e..ac39f96 100644
--- a/tests/unistd_test.cpp
+++ b/tests/unistd_test.cpp
@@ -1166,7 +1166,7 @@
   VERIFY_SYSCONF_UNKNOWN(666);
 }
 
-static void show_cache(const char* name, long size, long assoc, long line_size) {
+[[maybe_unused]] static void show_cache(const char* name, long size, long assoc, long line_size) {
   printf("%s cache size: %ld bytes, line size %ld bytes, ", name, size, line_size);
   if (assoc == 0) {
     printf("fully");
@@ -1177,6 +1177,9 @@
 }
 
 TEST(UNISTD_TEST, sysconf_cache) {
+#if defined(ANDROID_HOST_MUSL)
+  GTEST_SKIP() << "musl does not have _SC_LEVEL?_?CACHE_SIZE";
+#else
   // It's not obvious we can _test_ any of these, but we can at least
   // show the output for humans to inspect.
   show_cache("L1D", sysconf(_SC_LEVEL1_DCACHE_SIZE), sysconf(_SC_LEVEL1_DCACHE_ASSOC), sysconf(_SC_LEVEL1_DCACHE_LINESIZE));
@@ -1184,6 +1187,7 @@
   show_cache("L2", sysconf(_SC_LEVEL2_CACHE_SIZE), sysconf(_SC_LEVEL2_CACHE_ASSOC), sysconf(_SC_LEVEL2_CACHE_LINESIZE));
   show_cache("L3", sysconf(_SC_LEVEL3_CACHE_SIZE), sysconf(_SC_LEVEL3_CACHE_ASSOC), sysconf(_SC_LEVEL3_CACHE_LINESIZE));
   show_cache("L4", sysconf(_SC_LEVEL4_CACHE_SIZE), sysconf(_SC_LEVEL4_CACHE_ASSOC), sysconf(_SC_LEVEL4_CACHE_LINESIZE));
+#endif
 }
 
 TEST(UNISTD_TEST, dup2_same) {