| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/nonsfi/nonsfi_sandbox.h" | 5 #include "components/nacl/loader/nonsfi/nonsfi_sandbox.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <linux/net.h> | 9 #include <linux/net.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| 11 #include <sys/mman.h> | 11 #include <sys/mman.h> |
| 12 #include <sys/prctl.h> | 12 #include <sys/prctl.h> |
| 13 #include <sys/socket.h> | 13 #include <sys/socket.h> |
| 14 #include <sys/syscall.h> | 14 #include <sys/syscall.h> |
| 15 #include <sys/time.h> | 15 #include <sys/time.h> |
| 16 | 16 |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 20 #include "content/public/common/sandbox_init.h" | 21 #include "content/public/common/sandbox_init.h" |
| 21 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 22 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
| 22 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" | 23 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
| 23 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 24 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" |
| 24 #include "sandbox/linux/system_headers/linux_futex.h" | 25 #include "sandbox/linux/system_headers/linux_futex.h" |
| 25 #include "sandbox/linux/system_headers/linux_signal.h" | 26 #include "sandbox/linux/system_headers/linux_signal.h" |
| 26 #include "sandbox/linux/system_headers/linux_syscalls.h" | 27 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 27 | 28 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 new nacl::nonsfi::NaClNonSfiBPFSandboxPolicy()), | 340 new nacl::nonsfi::NaClNonSfiBPFSandboxPolicy()), |
| 340 std::move(proc_fd)); | 341 std::move(proc_fd)); |
| 341 if (!sandbox_is_initialized) | 342 if (!sandbox_is_initialized) |
| 342 return false; | 343 return false; |
| 343 RunSandboxSanityChecks(); | 344 RunSandboxSanityChecks(); |
| 344 return true; | 345 return true; |
| 345 } | 346 } |
| 346 | 347 |
| 347 } // namespace nonsfi | 348 } // namespace nonsfi |
| 348 } // namespace nacl | 349 } // namespace nacl |
| OLD | NEW |