| 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> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 base::Bind(&SandboxSeccompBPF::StartSandboxWithExternalPolicy, | 173 base::Bind(&SandboxSeccompBPF::StartSandboxWithExternalPolicy, |
| 174 base::Passed(scoped_ptr<sandbox::SandboxBPFPolicy>( | 174 base::Passed(scoped_ptr<sandbox::SandboxBPFPolicy>( |
| 175 new CrosArmGpuBrokerProcessPolicy))), | 175 new CrosArmGpuBrokerProcessPolicy))), |
| 176 read_whitelist_extra, | 176 read_whitelist_extra, |
| 177 write_whitelist_extra); | 177 write_whitelist_extra); |
| 178 | 178 |
| 179 const int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; | 179 const int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; |
| 180 | 180 |
| 181 // Preload the Mali library. | 181 // Preload the Mali library. |
| 182 dlopen("/usr/lib/libmali.so", dlopen_flag); | 182 dlopen("/usr/lib/libmali.so", dlopen_flag); |
| 183 // Preload the Tegra V4L2 (video decode acceleration) library. |
| 184 dlopen("/usr/lib/libtegrav4l2.so", dlopen_flag); |
| 185 // Resetting errno since platform-specific libraries will fail on other |
| 186 // platforms. |
| 187 errno = 0; |
| 183 | 188 |
| 184 return true; | 189 return true; |
| 185 } | 190 } |
| 186 | 191 |
| 187 } // namespace content | 192 } // namespace content |
| OLD | NEW |