| 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 e54cb210909d11b6ec2ee8cc3a3cbbe8564d4de8..28290888ffb5656c2eb40d04098fade66d1fd3f5 100644
|
| --- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
|
| +++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
|
| @@ -26,6 +26,7 @@
|
| #include "content/common/set_process_title.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h"
|
| +#include "sandbox/linux/seccomp-bpf/kernel_return_value_helpers.h"
|
| #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
|
| #include "sandbox/linux/services/broker_process.h"
|
| #include "sandbox/linux/services/linux_syscalls.h"
|
| @@ -100,11 +101,11 @@ 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 {
|
| - return -EPERM;
|
| + return sandbox::ErrnoToKernelRet(EPERM);
|
| }
|
| default:
|
| RAW_CHECK(false);
|
| - return -ENOSYS;
|
| + return sandbox::ErrnoToKernelRet(ENOSYS);
|
| }
|
| }
|
|
|
| @@ -171,7 +172,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:
|
|
|