| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h" | 5 #include "content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
| 11 #include <sys/stat.h> | 11 #include <sys/stat.h> |
| 12 #include <sys/types.h> | 12 #include <sys/types.h> |
| 13 #include <unistd.h> | 13 #include <unistd.h> |
| 14 | 14 |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "base/bind.h" | 18 #include "base/bind.h" |
| 19 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
| 20 #include "base/logging.h" | 20 #include "base/logging.h" |
| 21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
| 22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
| 23 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h" | 23 #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h" |
| 24 #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h" | 24 #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h" |
| 25 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 25 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
| 26 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" | 26 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" |
| 27 #include "sandbox/linux/services/linux_syscalls.h" | |
| 28 #include "sandbox/linux/syscall_broker/broker_file_permission.h" | 27 #include "sandbox/linux/syscall_broker/broker_file_permission.h" |
| 28 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 29 | 29 |
| 30 using sandbox::bpf_dsl::Allow; | 30 using sandbox::bpf_dsl::Allow; |
| 31 using sandbox::bpf_dsl::Arg; | 31 using sandbox::bpf_dsl::Arg; |
| 32 using sandbox::bpf_dsl::Error; | 32 using sandbox::bpf_dsl::Error; |
| 33 using sandbox::bpf_dsl::If; | 33 using sandbox::bpf_dsl::If; |
| 34 using sandbox::bpf_dsl::ResultExpr; | 34 using sandbox::bpf_dsl::ResultExpr; |
| 35 using sandbox::syscall_broker::BrokerFilePermission; | 35 using sandbox::syscall_broker::BrokerFilePermission; |
| 36 using sandbox::SyscallSets; | 36 using sandbox::SyscallSets; |
| 37 | 37 |
| 38 namespace content { | 38 namespace content { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Preload the Tegra V4L2 (video decode acceleration) library. | 168 // Preload the Tegra V4L2 (video decode acceleration) library. |
| 169 dlopen("/usr/lib/libtegrav4l2.so", dlopen_flag); | 169 dlopen("/usr/lib/libtegrav4l2.so", dlopen_flag); |
| 170 // Resetting errno since platform-specific libraries will fail on other | 170 // Resetting errno since platform-specific libraries will fail on other |
| 171 // platforms. | 171 // platforms. |
| 172 errno = 0; | 172 errno = 0; |
| 173 | 173 |
| 174 return true; | 174 return true; |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace content | 177 } // namespace content |
| OLD | NEW |