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

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

Issue 921563002: Linux Sandbox: reorganize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android_futex includes. Created 5 years, 10 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
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 "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 5 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
6 6
7 // Some headers on Android are missing cdefs: crbug.com/172337. 7 // Some headers on Android are missing cdefs: crbug.com/172337.
8 // (We can't use OS_ANDROID here since build_config.h is not included). 8 // (We can't use OS_ANDROID here since build_config.h is not included).
9 #if defined(ANDROID) 9 #if defined(ANDROID)
10 #include <sys/cdefs.h> 10 #include <sys/cdefs.h>
(...skipping 16 matching lines...) Expand all
27 #include "sandbox/linux/bpf_dsl/dump_bpf.h" 27 #include "sandbox/linux/bpf_dsl/dump_bpf.h"
28 #include "sandbox/linux/bpf_dsl/policy.h" 28 #include "sandbox/linux/bpf_dsl/policy.h"
29 #include "sandbox/linux/bpf_dsl/policy_compiler.h" 29 #include "sandbox/linux/bpf_dsl/policy_compiler.h"
30 #include "sandbox/linux/bpf_dsl/syscall_set.h" 30 #include "sandbox/linux/bpf_dsl/syscall_set.h"
31 #include "sandbox/linux/seccomp-bpf/die.h" 31 #include "sandbox/linux/seccomp-bpf/die.h"
32 #include "sandbox/linux/seccomp-bpf/errorcode.h" 32 #include "sandbox/linux/seccomp-bpf/errorcode.h"
33 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" 33 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
34 #include "sandbox/linux/seccomp-bpf/syscall.h" 34 #include "sandbox/linux/seccomp-bpf/syscall.h"
35 #include "sandbox/linux/seccomp-bpf/trap.h" 35 #include "sandbox/linux/seccomp-bpf/trap.h"
36 #include "sandbox/linux/seccomp-bpf/verifier.h" 36 #include "sandbox/linux/seccomp-bpf/verifier.h"
37 #include "sandbox/linux/services/linux_syscalls.h"
38 #include "sandbox/linux/services/syscall_wrappers.h" 37 #include "sandbox/linux/services/syscall_wrappers.h"
39 #include "sandbox/linux/services/thread_helpers.h" 38 #include "sandbox/linux/services/thread_helpers.h"
39 #include "sandbox/linux/system_headers/linux_syscalls.h"
40 40
41 namespace sandbox { 41 namespace sandbox {
42 42
43 namespace { 43 namespace {
44 44
45 bool IsRunningOnValgrind() { return RUNNING_ON_VALGRIND; } 45 bool IsRunningOnValgrind() { return RUNNING_ON_VALGRIND; }
46 46
47 bool IsSingleThreaded(int proc_task_fd) { 47 bool IsSingleThreaded(int proc_task_fd) {
48 return ThreadHelpers::IsSingleThreaded(proc_task_fd); 48 return ThreadHelpers::IsSingleThreaded(proc_task_fd);
49 } 49 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } else { 241 } else {
242 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) { 242 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) {
243 SANDBOX_DIE("Kernel refuses to turn on BPF filters"); 243 SANDBOX_DIE("Kernel refuses to turn on BPF filters");
244 } 244 }
245 } 245 }
246 246
247 sandbox_has_started_ = true; 247 sandbox_has_started_ = true;
248 } 248 }
249 249
250 } // namespace sandbox 250 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc ('k') | sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698