Index: content/common/sandbox_linux/bpf_gpu_policy_linux.cc |
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc |
index 1570114c012ac4dc5ddd563c6a4286ba5e6b1f82..5bc202a35d320dd82501562fc04a3d136da30d99 100644 |
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc |
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc |
@@ -96,11 +96,21 @@ intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args, |
broker_process->Open(reinterpret_cast<const char*>(args.args[1]), |
static_cast<int>(args.args[2])); |
} else { |
+#if defined(__mips__) |
+ // On MIPS, kernel returns errno (instead of -errno) |
+ return EPERM; |
jln (very slow on Chromium)
2014/05/02 20:42:04
Ohh, this is very unfortunate :(
Let's add a help
nedeljko
2014/05/07 15:40:05
Helper added.
I created RetValToKernel instead of
|
+#else |
return -EPERM; |
+#endif |
} |
default: |
RAW_CHECK(false); |
+#if defined(__mips__) |
+ // On MIPS, kernel returns errno (instead of -errno) |
+ return ENOSYS; |
+#else |
return -ENOSYS; |
+#endif |
} |
} |
@@ -167,7 +177,7 @@ ErrorCode GpuProcessPolicy::EvaluateSyscall(SandboxBPF* sandbox, |
int sysno) const { |
switch (sysno) { |
case __NR_ioctl: |
-#if defined(__i386__) || defined(__x86_64__) |
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) |
// The Nvidia driver uses flags not in the baseline policy |
// (MAP_LOCKED | MAP_EXECUTABLE | MAP_32BIT) |
case __NR_mmap: |