| 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 // ASan internally uses some syscalls which non-SFI NaCl disallows. | 5 // ASan internally uses some syscalls which non-SFI NaCl disallows. |
| 6 // Seccomp-BPF tests die under TSan v2. See http://crbug.com/356588 | 6 // Seccomp-BPF tests die under TSan v2. See http://crbug.com/356588 |
| 7 #if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) | 7 #if !defined(ADDRESS_SANITIZER) && !defined(THREAD_SANITIZER) |
| 8 | 8 |
| 9 #include "components/nacl/loader/nonsfi/nonsfi_sandbox.h" | 9 #include "components/nacl/loader/nonsfi/nonsfi_sandbox.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "base/bind.h" | 27 #include "base/bind.h" |
| 28 #include "base/callback.h" | 28 #include "base/callback.h" |
| 29 #include "base/compiler_specific.h" | 29 #include "base/compiler_specific.h" |
| 30 #include "base/files/scoped_file.h" | 30 #include "base/files/scoped_file.h" |
| 31 #include "base/logging.h" | 31 #include "base/logging.h" |
| 32 #include "base/posix/eintr_wrapper.h" | 32 #include "base/posix/eintr_wrapper.h" |
| 33 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" | 33 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
| 34 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" | 34 #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
| 35 | 35 |
| 36 // This is a hack. TODO(hamaji), fix crbug.com/364751. | |
| 37 namespace sandbox { | |
| 38 extern const bool kAllowForkWithThreads = true; | |
| 39 } | |
| 40 | |
| 41 namespace { | 36 namespace { |
| 42 | 37 |
| 43 void DoPipe(base::ScopedFD* fds) { | 38 void DoPipe(base::ScopedFD* fds) { |
| 44 int tmp_fds[2]; | 39 int tmp_fds[2]; |
| 45 BPF_ASSERT_EQ(0, pipe(tmp_fds)); | 40 BPF_ASSERT_EQ(0, pipe(tmp_fds)); |
| 46 fds[0].reset(tmp_fds[0]); | 41 fds[0].reset(tmp_fds[0]); |
| 47 fds[1].reset(tmp_fds[1]); | 42 fds[1].reset(tmp_fds[1]); |
| 48 } | 43 } |
| 49 | 44 |
| 50 void DoSocketpair(base::ScopedFD* fds) { | 45 void DoSocketpair(base::ScopedFD* fds) { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 RESTRICT_SYSCALL_EPERM_TEST(open); | 417 RESTRICT_SYSCALL_EPERM_TEST(open); |
| 423 RESTRICT_SYSCALL_EPERM_TEST(ptrace); | 418 RESTRICT_SYSCALL_EPERM_TEST(ptrace); |
| 424 RESTRICT_SYSCALL_EPERM_TEST(set_robust_list); | 419 RESTRICT_SYSCALL_EPERM_TEST(set_robust_list); |
| 425 #if defined(__i386__) || defined(__x86_64__) | 420 #if defined(__i386__) || defined(__x86_64__) |
| 426 RESTRICT_SYSCALL_EPERM_TEST(time); | 421 RESTRICT_SYSCALL_EPERM_TEST(time); |
| 427 #endif | 422 #endif |
| 428 | 423 |
| 429 } // namespace | 424 } // namespace |
| 430 | 425 |
| 431 #endif // !ADDRESS_SANITIZER && !THREAD_SANITIZER | 426 #endif // !ADDRESS_SANITIZER && !THREAD_SANITIZER |
| OLD | NEW |