Chromium Code Reviews| Index: content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc |
| diff --git a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc |
| index ac6de8b5fe749a37ce94cdf209516ea418833246..c9cc63642d925bd12d91f3ddba0420c6bf37f592 100644 |
| --- a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc |
| +++ b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc |
| @@ -57,6 +57,9 @@ inline bool IsArchitectureArm() { |
| } |
| void AddArmMaliGpuWhitelist(std::vector<BrokerFilePermission>* permissions) { |
| + // XXX: Generalize CrosArmGpuProcessPolicy to a new |
|
Ken Russell (switch to Gerrit)
2016/05/04 20:36:17
TODO(j.isorce@samsung.com) instead of XXX, here an
|
| + // GpuProcessPolicyEarlySandbox and move that part to IsArchitectureArm() |
| + |
| // Device file needed by the ARM GPU userspace. |
| static const char kMali0Path[] = "/dev/mali0"; |
| @@ -68,6 +71,8 @@ void AddArmMaliGpuWhitelist(std::vector<BrokerFilePermission>* permissions) { |
| } |
| void AddArmGpuWhitelist(std::vector<BrokerFilePermission>* permissions) { |
| + // XXX: Generalize CrosArmGpuProcessPolicy to a new |
| + // GpuProcessPolicyEarlySandbox and move that part to IsArchitectureArm() |
| // On ARM we're enabling the sandbox before the X connection is made, |
| // so we need to allow access to |.Xauthority|. |
| static const char kXAuthorityPath[] = "/home/chronos/.Xauthority"; |
| @@ -159,11 +164,14 @@ bool CrosArmGpuProcessPolicy::PreSandboxHook() { |
| // Add ARM-specific files to whitelist in the broker. |
| std::vector<BrokerFilePermission> permissions; |
| + // XXX: Generalize CrosArmGpuProcessPolicy to a new |
| + // GpuProcessPolicyEarlySandbox and move that part to IsArchitectureArm() |
| AddArmGpuWhitelist(&permissions); |
| InitGpuBrokerProcess(CrosArmGpuBrokerProcessPolicy::Create, permissions); |
| const int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE; |
| + // XXX |
| // Preload the Mali library. |
| dlopen("/usr/lib/libmali.so", dlopen_flag); |
| // Preload the Tegra V4L2 (video decode acceleration) library. |