OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <signal.h> | 5 #include <signal.h> |
6 #include <sys/prctl.h> | 6 #include <sys/prctl.h> |
7 #include <sys/syscall.h> | 7 #include <sys/syscall.h> |
8 | 8 |
9 #ifndef SECCOMP_BPF_STANDALONE | 9 #ifndef SECCOMP_BPF_STANDALONE |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/posix/eintr_wrapper.h" | 11 #include "base/posix/eintr_wrapper.h" |
12 #endif | 12 #endif |
13 | 13 |
14 #include "sandbox/linux/seccomp-bpf/codegen.h" | 14 #include "sandbox/linux/seccomp-bpf/codegen.h" |
15 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 15 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
16 #include "sandbox/linux/seccomp-bpf/syscall.h" | 16 #include "sandbox/linux/seccomp-bpf/syscall.h" |
17 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" | 17 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" |
18 #include "sandbox/linux/seccomp-bpf/verifier.h" | 18 #include "sandbox/linux/seccomp-bpf/verifier.h" |
19 | 19 |
20 // Android's signal.h doesn't define ucontext etc. | 20 // Android's signal.h doesn't define ucontext etc. |
21 #if defined(OS_ANDROID) && defined(__arm__) | 21 #if defined(OS_ANDROID) |
22 #if defined(__arm__) | |
22 #include "sandbox/linux/services/android_arm_ucontext.h" | 23 #include "sandbox/linux/services/android_arm_ucontext.h" |
24 #elif defined(__i386__) | |
Markus (顧孟勤)
2012/12/21 02:03:54
Since you picked a file name that was independent
yfw.chromium
2012/12/21 07:23:17
Android just has i386 ABI support now. So we don't
| |
25 #include "sandbox/linux/services/android_x86_ucontext.h" | |
26 #endif | |
27 | |
23 #endif | 28 #endif |
24 | 29 |
25 namespace { | 30 namespace { |
26 | 31 |
27 void WriteFailedStderrSetupMessage(int out_fd) { | 32 void WriteFailedStderrSetupMessage(int out_fd) { |
28 const char* error_string = strerror(errno); | 33 const char* error_string = strerror(errno); |
29 static const char msg[] = "You have reproduced a puzzling issue.\n" | 34 static const char msg[] = "You have reproduced a puzzling issue.\n" |
30 "Please, report to crbug.com/152530!\n" | 35 "Please, report to crbug.com/152530!\n" |
31 "Failed to set up stderr: "; | 36 "Failed to set up stderr: "; |
32 if (HANDLE_EINTR(write(out_fd, msg, sizeof(msg)-1)) > 0 && error_string && | 37 if (HANDLE_EINTR(write(out_fd, msg, sizeof(msg)-1)) > 0 && error_string && |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
983 int Sandbox::proc_fd_ = -1; | 988 int Sandbox::proc_fd_ = -1; |
984 Sandbox::Evaluators Sandbox::evaluators_; | 989 Sandbox::Evaluators Sandbox::evaluators_; |
985 Sandbox::Traps *Sandbox::traps_ = NULL; | 990 Sandbox::Traps *Sandbox::traps_ = NULL; |
986 Sandbox::TrapIds Sandbox::trap_ids_; | 991 Sandbox::TrapIds Sandbox::trap_ids_; |
987 ErrorCode *Sandbox::trap_array_ = NULL; | 992 ErrorCode *Sandbox::trap_array_ = NULL; |
988 size_t Sandbox::trap_array_size_ = 0; | 993 size_t Sandbox::trap_array_size_ = 0; |
989 bool Sandbox::has_unsafe_traps_ = false; | 994 bool Sandbox::has_unsafe_traps_ = false; |
990 Sandbox::Conds Sandbox::conds_; | 995 Sandbox::Conds Sandbox::conds_; |
991 | 996 |
992 } // namespace | 997 } // namespace |
OLD | NEW |