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> | 9 #include <linux/futex.h> |
10 #include <sched.h> | 10 #include <sched.h> |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 #include "base/files/scoped_file.h" | 24 #include "base/files/scoped_file.h" |
25 #include "base/macros.h" | 25 #include "base/macros.h" |
26 #include "base/posix/eintr_wrapper.h" | 26 #include "base/posix/eintr_wrapper.h" |
27 #include "base/threading/thread.h" | 27 #include "base/threading/thread.h" |
28 #include "build/build_config.h" | 28 #include "build/build_config.h" |
29 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" | 29 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
30 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 30 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
31 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 31 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
32 #include "sandbox/linux/seccomp-bpf/syscall.h" | 32 #include "sandbox/linux/seccomp-bpf/syscall.h" |
33 #include "sandbox/linux/services/android_futex.h" | |
34 #include "sandbox/linux/services/linux_syscalls.h" | |
35 #include "sandbox/linux/services/syscall_wrappers.h" | 33 #include "sandbox/linux/services/syscall_wrappers.h" |
36 #include "sandbox/linux/services/thread_helpers.h" | 34 #include "sandbox/linux/services/thread_helpers.h" |
| 35 #include "sandbox/linux/system_headers/android_futex.h" |
| 36 #include "sandbox/linux/system_headers/linux_syscalls.h" |
37 #include "sandbox/linux/tests/test_utils.h" | 37 #include "sandbox/linux/tests/test_utils.h" |
38 #include "sandbox/linux/tests/unit_tests.h" | 38 #include "sandbox/linux/tests/unit_tests.h" |
39 | 39 |
40 namespace sandbox { | 40 namespace sandbox { |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 // This also tests that read(), write() and fstat() are allowed. | 44 // This also tests that read(), write() and fstat() are allowed. |
45 void TestPipeOrSocketPair(base::ScopedFD read_end, base::ScopedFD write_end) { | 45 void TestPipeOrSocketPair(base::ScopedFD read_end, base::ScopedFD write_end) { |
46 BPF_ASSERT_LE(0, read_end.get()); | 46 BPF_ASSERT_LE(0, read_end.get()); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 ClockGettimeWithDisallowedClockCrashes, | 326 ClockGettimeWithDisallowedClockCrashes, |
327 DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), | 327 DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()), |
328 BaselinePolicy) { | 328 BaselinePolicy) { |
329 struct timespec ts; | 329 struct timespec ts; |
330 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); | 330 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); |
331 } | 331 } |
332 | 332 |
333 } // namespace | 333 } // namespace |
334 | 334 |
335 } // namespace sandbox | 335 } // namespace sandbox |
OLD | NEW |