| 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 #include "components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.h" | 5 #include "components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/macros.h" | 9 #include "base/macros.h" | 
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" | 
| 11 | 11 | 
| 12 #if defined(USE_SECCOMP_BPF) | 12 #if defined(USE_SECCOMP_BPF) | 
| 13 | 13 | 
| 14 #include <errno.h> | 14 #include <errno.h> | 
| 15 #include <signal.h> | 15 #include <signal.h> | 
| 16 #include <sys/ptrace.h> | 16 #include <sys/ptrace.h> | 
| 17 #include <sys/types.h> | 17 #include <sys/types.h> | 
| 18 #include <unistd.h> | 18 #include <unistd.h> | 
| 19 | 19 | 
| 20 #include "base/callback.h" | 20 #include "base/callback.h" | 
| 21 #include "base/command_line.h" | 21 #include "base/command_line.h" | 
| 22 #include "base/compiler_specific.h" | 22 #include "base/compiler_specific.h" | 
| 23 #include "base/files/scoped_file.h" | 23 #include "base/files/scoped_file.h" | 
| 24 #include "base/logging.h" | 24 #include "base/logging.h" | 
| 25 | 25 #include "base/memory/scoped_ptr.h" | 
| 26 #include "components/nacl/common/nacl_switches.h" | 26 #include "components/nacl/common/nacl_switches.h" | 
| 27 #include "content/public/common/sandbox_init.h" | 27 #include "content/public/common/sandbox_init.h" | 
| 28 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 28 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 
| 29 #include "sandbox/linux/bpf_dsl/policy.h" | 29 #include "sandbox/linux/bpf_dsl/policy.h" | 
| 30 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 30 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 
| 31 #include "sandbox/linux/system_headers/linux_syscalls.h" | 31 #include "sandbox/linux/system_headers/linux_syscalls.h" | 
| 32 | 32 | 
| 33 #endif  // defined(USE_SECCOMP_BPF) | 33 #endif  // defined(USE_SECCOMP_BPF) | 
| 34 | 34 | 
| 35 namespace nacl { | 35 namespace nacl { | 
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 172       std::move(proc_fd)); | 172       std::move(proc_fd)); | 
| 173   if (sandbox_is_initialized) { | 173   if (sandbox_is_initialized) { | 
| 174     RunSandboxSanityChecks(); | 174     RunSandboxSanityChecks(); | 
| 175     return true; | 175     return true; | 
| 176   } | 176   } | 
| 177 #endif  // defined(USE_SECCOMP_BPF) | 177 #endif  // defined(USE_SECCOMP_BPF) | 
| 178   return false; | 178   return false; | 
| 179 } | 179 } | 
| 180 | 180 | 
| 181 }  // namespace nacl | 181 }  // namespace nacl | 
| OLD | NEW | 
|---|