Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: sandbox/linux/seccomp-bpf/sandbox_bpf.cc

Issue 11639038: ucontext_t support for Android x86. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ucontext_t support for Android x86 Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/linux/sandbox_linux.gypi ('k') | sandbox/linux/services/android_ucontext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "sandbox/linux/services/android_arm_ucontext.h" 22 #include "sandbox/linux/services/android_ucontext.h"
23 #endif 23 #endif
24 24
25 namespace { 25 namespace {
26 26
27 void WriteFailedStderrSetupMessage(int out_fd) { 27 void WriteFailedStderrSetupMessage(int out_fd) {
28 const char* error_string = strerror(errno); 28 const char* error_string = strerror(errno);
29 static const char msg[] = "You have reproduced a puzzling issue.\n" 29 static const char msg[] = "You have reproduced a puzzling issue.\n"
30 "Please, report to crbug.com/152530!\n" 30 "Please, report to crbug.com/152530!\n"
31 "Failed to set up stderr: "; 31 "Failed to set up stderr: ";
32 if (HANDLE_EINTR(write(out_fd, msg, sizeof(msg)-1)) > 0 && error_string && 32 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
983 int Sandbox::proc_fd_ = -1; 983 int Sandbox::proc_fd_ = -1;
984 Sandbox::Evaluators Sandbox::evaluators_; 984 Sandbox::Evaluators Sandbox::evaluators_;
985 Sandbox::Traps *Sandbox::traps_ = NULL; 985 Sandbox::Traps *Sandbox::traps_ = NULL;
986 Sandbox::TrapIds Sandbox::trap_ids_; 986 Sandbox::TrapIds Sandbox::trap_ids_;
987 ErrorCode *Sandbox::trap_array_ = NULL; 987 ErrorCode *Sandbox::trap_array_ = NULL;
988 size_t Sandbox::trap_array_size_ = 0; 988 size_t Sandbox::trap_array_size_ = 0;
989 bool Sandbox::has_unsafe_traps_ = false; 989 bool Sandbox::has_unsafe_traps_ = false;
990 Sandbox::Conds Sandbox::conds_; 990 Sandbox::Conds Sandbox::conds_;
991 991
992 } // namespace 992 } // namespace
OLDNEW
« no previous file with comments | « sandbox/linux/sandbox_linux.gypi ('k') | sandbox/linux/services/android_ucontext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698