| 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 "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h" | 5 #include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <linux/futex.h> | |
| 10 #include <sched.h> | 9 #include <sched.h> |
| 11 #include <signal.h> | 10 #include <signal.h> |
| 12 #include <string.h> | 11 #include <string.h> |
| 13 #include <sys/prctl.h> | 12 #include <sys/prctl.h> |
| 14 #include <sys/resource.h> | 13 #include <sys/resource.h> |
| 15 #include <sys/socket.h> | 14 #include <sys/socket.h> |
| 16 #include <sys/stat.h> | 15 #include <sys/stat.h> |
| 17 #include <sys/syscall.h> | 16 #include <sys/syscall.h> |
| 18 #include <sys/time.h> | 17 #include <sys/time.h> |
| 19 #include <sys/types.h> | 18 #include <sys/types.h> |
| 20 #include <sys/wait.h> | 19 #include <sys/wait.h> |
| 21 #include <time.h> | 20 #include <time.h> |
| 22 #include <unistd.h> | 21 #include <unistd.h> |
| 23 | 22 |
| 24 #include "base/files/scoped_file.h" | 23 #include "base/files/scoped_file.h" |
| 25 #include "base/macros.h" | 24 #include "base/macros.h" |
| 26 #include "base/posix/eintr_wrapper.h" | 25 #include "base/posix/eintr_wrapper.h" |
| 27 #include "base/threading/thread.h" | 26 #include "base/threading/thread.h" |
| 28 #include "build/build_config.h" | 27 #include "build/build_config.h" |
| 29 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" | 28 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
| 30 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 29 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
| 31 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 30 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
| 32 #include "sandbox/linux/seccomp-bpf/syscall.h" | 31 #include "sandbox/linux/seccomp-bpf/syscall.h" |
| 33 #include "sandbox/linux/services/syscall_wrappers.h" | 32 #include "sandbox/linux/services/syscall_wrappers.h" |
| 34 #include "sandbox/linux/services/thread_helpers.h" | 33 #include "sandbox/linux/services/thread_helpers.h" |
| 35 #include "sandbox/linux/system_headers/android_futex.h" | 34 #include "sandbox/linux/system_headers/linux_futex.h" |
| 36 #include "sandbox/linux/system_headers/linux_syscalls.h" | 35 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 37 #include "sandbox/linux/tests/test_utils.h" | 36 #include "sandbox/linux/tests/test_utils.h" |
| 38 #include "sandbox/linux/tests/unit_tests.h" | 37 #include "sandbox/linux/tests/unit_tests.h" |
| 39 | 38 |
| 40 namespace sandbox { | 39 namespace sandbox { |
| 41 | 40 |
| 42 namespace { | 41 namespace { |
| 43 | 42 |
| 44 // This also tests that read(), write() and fstat() are allowed. | 43 // This also tests that read(), write() and fstat() are allowed. |
| 45 void TestPipeOrSocketPair(base::ScopedFD read_end, base::ScopedFD write_end) { | 44 void TestPipeOrSocketPair(base::ScopedFD read_end, base::ScopedFD write_end) { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 ClockGettimeWithDisallowedClockCrashes, | 325 ClockGettimeWithDisallowedClockCrashes, |
| 327 DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), | 326 DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), |
| 328 BaselinePolicy) { | 327 BaselinePolicy) { |
| 329 struct timespec ts; | 328 struct timespec ts; |
| 330 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); | 329 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); |
| 331 } | 330 } |
| 332 | 331 |
| 333 } // namespace | 332 } // namespace |
| 334 | 333 |
| 335 } // namespace sandbox | 334 } // namespace sandbox |
| OLD | NEW |