| 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_gpu_policy_linux.h" | 5 #include "content/common/sandbox_linux/bpf_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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 if (IsArchitectureX86_64()) { | 227 if (IsArchitectureX86_64()) { |
| 228 I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so"; | 228 I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so"; |
| 229 } else if (IsArchitectureI386()) { | 229 } else if (IsArchitectureI386()) { |
| 230 I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so"; | 230 I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so"; |
| 231 } | 231 } |
| 232 | 232 |
| 233 dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); | 233 dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); |
| 234 dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); | 234 dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); |
| 235 dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); | 235 dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); |
| 236 dlopen("libva-drm.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); |
| 236 } | 237 } |
| 237 } | 238 } |
| 238 | 239 |
| 239 return true; | 240 return true; |
| 240 } | 241 } |
| 241 | 242 |
| 242 void GpuProcessPolicy::InitGpuBrokerProcess( | 243 void GpuProcessPolicy::InitGpuBrokerProcess( |
| 243 sandbox::SandboxBPFPolicy* (*broker_sandboxer_allocator)(void), | 244 sandbox::SandboxBPFPolicy* (*broker_sandboxer_allocator)(void), |
| 244 const std::vector<std::string>& read_whitelist_extra, | 245 const std::vector<std::string>& read_whitelist_extra, |
| 245 const std::vector<std::string>& write_whitelist_extra) { | 246 const std::vector<std::string>& write_whitelist_extra) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 267 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), | 268 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), |
| 268 read_whitelist, | 269 read_whitelist, |
| 269 write_whitelist); | 270 write_whitelist); |
| 270 // The initialization callback will perform generic initialization and then | 271 // The initialization callback will perform generic initialization and then |
| 271 // call broker_sandboxer_callback. | 272 // call broker_sandboxer_callback. |
| 272 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, | 273 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, |
| 273 broker_sandboxer_allocator))); | 274 broker_sandboxer_allocator))); |
| 274 } | 275 } |
| 275 | 276 |
| 276 } // namespace content | 277 } // namespace content |
| OLD | NEW |