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 // Sanitizers internally use some syscalls which non-SFI NaCl disallows. | 5 // Sanitizers internally use some syscalls which non-SFI NaCl disallows. |
6 #if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && \ | 6 #if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) && \ |
7 !defined(MEMORY_SANITIZER) && !defined(LEAK_SANITIZER) | 7 !defined(MEMORY_SANITIZER) && !defined(LEAK_SANITIZER) |
8 | 8 |
9 #include "components/nacl/loader/nonsfi/nonsfi_sandbox.h" | 9 #include "components/nacl/loader/nonsfi/nonsfi_sandbox.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "base/callback.h" | 30 #include "base/callback.h" |
31 #include "base/compiler_specific.h" | 31 #include "base/compiler_specific.h" |
32 #include "base/files/scoped_file.h" | 32 #include "base/files/scoped_file.h" |
33 #include "base/logging.h" | 33 #include "base/logging.h" |
34 #include "base/posix/eintr_wrapper.h" | 34 #include "base/posix/eintr_wrapper.h" |
35 #include "base/sys_info.h" | 35 #include "base/sys_info.h" |
36 #include "base/threading/thread.h" | 36 #include "base/threading/thread.h" |
37 #include "base/time/time.h" | 37 #include "base/time/time.h" |
38 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" | 38 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
39 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 39 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
| 40 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
40 #include "sandbox/linux/seccomp-bpf/syscall.h" | 41 #include "sandbox/linux/seccomp-bpf/syscall.h" |
41 #include "sandbox/linux/services/linux_syscalls.h" | 42 #include "sandbox/linux/services/linux_syscalls.h" |
42 #include "third_party/lss/linux_syscall_support.h" // for MAKE_PROCESS_CPUCLOCK | 43 #include "third_party/lss/linux_syscall_support.h" // for MAKE_PROCESS_CPUCLOCK |
43 | 44 |
44 namespace { | 45 namespace { |
45 | 46 |
46 void DoPipe(base::ScopedFD* fds) { | 47 void DoPipe(base::ScopedFD* fds) { |
47 int tmp_fds[2]; | 48 int tmp_fds[2]; |
48 BPF_ASSERT_EQ(0, pipe(tmp_fds)); | 49 BPF_ASSERT_EQ(0, pipe(tmp_fds)); |
49 fds[0].reset(tmp_fds[0]); | 50 fds[0].reset(tmp_fds[0]); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 RESTRICT_SYSCALL_EPERM_TEST(ptrace); | 496 RESTRICT_SYSCALL_EPERM_TEST(ptrace); |
496 RESTRICT_SYSCALL_EPERM_TEST(set_robust_list); | 497 RESTRICT_SYSCALL_EPERM_TEST(set_robust_list); |
497 #if defined(__i386__) || defined(__x86_64__) | 498 #if defined(__i386__) || defined(__x86_64__) |
498 RESTRICT_SYSCALL_EPERM_TEST(time); | 499 RESTRICT_SYSCALL_EPERM_TEST(time); |
499 #endif | 500 #endif |
500 | 501 |
501 } // namespace | 502 } // namespace |
502 | 503 |
503 #endif // !ADDRESS_SANITIZER && !THREAD_SANITIZER && | 504 #endif // !ADDRESS_SANITIZER && !THREAD_SANITIZER && |
504 // !MEMORY_SANITIZER && !LEAK_SANITIZER | 505 // !MEMORY_SANITIZER && !LEAK_SANITIZER |
OLD | NEW |