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 190551 c778c2a3fc0202050033c856c72b6b9cd89846a6
parent 190550 782b35c99abe8168bff2d5b54a056fd741a1abed
child 190552 3103bfd98c391f6efbc275f6dbcb0fd9caf78c36
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [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