| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_ | 5 #ifndef CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_ |
| 6 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_ | 6 #define CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h" | 9 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 // This policy is for Chrome OS ARM. | 13 // This policy is for Chrome OS ARM. |
| 14 class CrosArmGpuProcessPolicy : public GpuProcessPolicy { | 14 class CrosArmGpuProcessPolicy : public GpuProcessPolicy { |
| 15 public: | 15 public: |
| 16 explicit CrosArmGpuProcessPolicy(bool allow_shmat); | 16 explicit CrosArmGpuProcessPolicy(bool allow_shmat); |
| 17 ~CrosArmGpuProcessPolicy() override; | 17 ~CrosArmGpuProcessPolicy() override; |
| 18 | 18 |
| 19 sandbox::bpf_dsl::ResultExpr EvaluateSyscall( | 19 sandbox::bpf_dsl::ResultExpr EvaluateSyscall( |
| 20 int system_call_number) const override; | 20 int system_call_number) const override; |
| 21 bool PreSandboxHook() override; | 21 bool PreSandboxHook() override; |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 #if defined(__arm__) || defined(__aarch64__) |
| 24 const bool allow_shmat_; // Allow shmat(2). | 25 const bool allow_shmat_; // Allow shmat(2). |
| 26 #endif |
| 25 DISALLOW_COPY_AND_ASSIGN(CrosArmGpuProcessPolicy); | 27 DISALLOW_COPY_AND_ASSIGN(CrosArmGpuProcessPolicy); |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 } // namespace content | 30 } // namespace content |
| 29 | 31 |
| 30 #endif // CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_ | 32 #endif // CONTENT_COMMON_SANDBOX_LINUX_BPF_CROS_ARM_GPU_POLICY_LINUX_H_ |
| OLD | NEW |