| 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 "sandbox/linux/seccomp-bpf/trap.h" | 5 #include "sandbox/linux/seccomp-bpf/trap.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <signal.h> | 8 #include <signal.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <sys/prctl.h> | 10 #include <sys/prctl.h> |
| 11 #include <sys/syscall.h> | 11 #include <sys/syscall.h> |
| 12 | 12 |
| 13 #include <limits> | 13 #include <limits> |
| 14 | 14 |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/posix/eintr_wrapper.h" | |
| 17 #include "sandbox/linux/seccomp-bpf/codegen.h" | 16 #include "sandbox/linux/seccomp-bpf/codegen.h" |
| 18 #include "sandbox/linux/seccomp-bpf/die.h" | 17 #include "sandbox/linux/seccomp-bpf/die.h" |
| 19 #include "sandbox/linux/seccomp-bpf/syscall.h" | 18 #include "sandbox/linux/seccomp-bpf/syscall.h" |
| 20 | 19 |
| 21 // Android's signal.h doesn't define ucontext etc. | 20 // Android's signal.h doesn't define ucontext etc. |
| 22 #if defined(OS_ANDROID) | 21 #if defined(OS_ANDROID) |
| 23 #include "sandbox/linux/services/android_ucontext.h" | 22 #include "sandbox/linux/services/android_ucontext.h" |
| 24 #endif | 23 #endif |
| 25 | 24 |
| 26 namespace { | 25 namespace { |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 if (global_trap_ && id > 0 && id <= global_trap_->trap_array_size_) { | 345 if (global_trap_ && id > 0 && id <= global_trap_->trap_array_size_) { |
| 347 return global_trap_->trap_array_[id - 1]; | 346 return global_trap_->trap_array_[id - 1]; |
| 348 } else { | 347 } else { |
| 349 return ErrorCode(); | 348 return ErrorCode(); |
| 350 } | 349 } |
| 351 } | 350 } |
| 352 | 351 |
| 353 Trap* Trap::global_trap_; | 352 Trap* Trap::global_trap_; |
| 354 | 353 |
| 355 } // namespace playground2 | 354 } // namespace playground2 |
| OLD | NEW |