Bug 944625 - B2G Emulator-x86: fix undeclared __NR_sendto, __NR_recvfrom. r=jld,kang
authorVicamo Yang <vyang@mozilla.com>
Thu, 13 Mar 2014 13:44:43 +0900
changeset 191576 c778c2a3fc0202050033c856c72b6b9cd89846a6
parent 191575 782b35c99abe8168bff2d5b54a056fd741a1abed
child 191577 3103bfd98c391f6efbc275f6dbcb0fd9caf78c36
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld, kang
bugs944625
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944625 - B2G Emulator-x86: fix undeclared __NR_sendto, __NR_recvfrom. r=jld,kang
security/sandbox/linux/seccomp_filter.h
--- a/security/sandbox/linux/seccomp_filter.h
+++ b/security/sandbox/linux/seccomp_filter.h
@@ -106,32 +106,40 @@
 #elif defined(__i386__)
 #define SECCOMP_WHITELIST_ARCH_DESKTOP_LINUX
 #elif defined(__x86_64__)
 #define SECCOMP_WHITELIST_ARCH_DESKTOP_LINUX
 #else
 #define SECCOMP_WHITELIST_ARCH_DESKTOP_LINUX
 #endif
 
+/* Architecture-specific syscalls for B2G */
+#if defined(__i386__)
+#define SECCOMP_WHITELIST_ARCH_B2G_LOW
+#else
+#define SECCOMP_WHITELIST_ARCH_B2G_LOW \
+  ALLOW_SYSCALL(sendto), \
+  ALLOW_SYSCALL(recvfrom),
+#endif
+
 /* B2G specific syscalls */
 #if defined(MOZ_B2G)
 
 #define SECCOMP_WHITELIST_B2G_HIGH \
   ALLOW_SYSCALL(clock_gettime), \
   ALLOW_SYSCALL(epoll_wait), \
   ALLOW_SYSCALL(gettimeofday),
 
 #define SECCOMP_WHITELIST_B2G_MED \
   ALLOW_SYSCALL(getpid), \
   ALLOW_SYSCALL(rt_sigreturn), \
   ALLOW_SYSCALL(poll),
 
 #define SECCOMP_WHITELIST_B2G_LOW \
-  ALLOW_SYSCALL(sendto), \
-  ALLOW_SYSCALL(recvfrom), \
+  SECCOMP_WHITELIST_ARCH_B2G_LOW \
   ALLOW_SYSCALL(getdents64), \
   ALLOW_SYSCALL(epoll_ctl), \
   ALLOW_SYSCALL(sched_yield), \
   ALLOW_SYSCALL(sched_getscheduler), \
   ALLOW_SYSCALL(sched_setscheduler),
 
 #else
 #define SECCOMP_WHITELIST_B2G_HIGH