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

Side by Side Diff: content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc

Issue 260793003: [MIPS] Add seccomp bpf support (Closed) Base URL: https://git.chromium.org/git/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 7 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 "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h" 5 #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 24 matching lines...) Expand all
35 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 35 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
36 #include "sandbox/linux/services/linux_syscalls.h" 36 #include "sandbox/linux/services/linux_syscalls.h"
37 37
38 using sandbox::BaselinePolicy; 38 using sandbox::BaselinePolicy;
39 using sandbox::SyscallSets; 39 using sandbox::SyscallSets;
40 40
41 #else 41 #else
42 42
43 // Make sure that seccomp-bpf does not get disabled by mistake. Also make sure 43 // Make sure that seccomp-bpf does not get disabled by mistake. Also make sure
44 // that we think twice about this when adding a new architecture. 44 // that we think twice about this when adding a new architecture.
45 #if !defined(ARCH_CPU_MIPS_FAMILY)
46 #error "Seccomp-bpf disabled on supported architecture!" 45 #error "Seccomp-bpf disabled on supported architecture!"
47 #endif // !defined(ARCH_CPU_MIPS_FAMILY)
48 46
49 #endif // 47 #endif //
50 48
51 namespace content { 49 namespace content {
52 50
53 #if defined(USE_SECCOMP_BPF) 51 #if defined(USE_SECCOMP_BPF)
54 namespace { 52 namespace {
55 53
56 void StartSandboxWithPolicy(sandbox::SandboxBPFPolicy* policy); 54 void StartSandboxWithPolicy(sandbox::SandboxBPFPolicy* policy);
57 55
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 scoped_ptr<sandbox::SandboxBPFPolicy> 292 scoped_ptr<sandbox::SandboxBPFPolicy>
295 SandboxSeccompBPF::GetBaselinePolicy() { 293 SandboxSeccompBPF::GetBaselinePolicy() {
296 #if defined(USE_SECCOMP_BPF) 294 #if defined(USE_SECCOMP_BPF)
297 return scoped_ptr<sandbox::SandboxBPFPolicy>(new BaselinePolicy); 295 return scoped_ptr<sandbox::SandboxBPFPolicy>(new BaselinePolicy);
298 #else 296 #else
299 return scoped_ptr<sandbox::SandboxBPFPolicy>(); 297 return scoped_ptr<sandbox::SandboxBPFPolicy>();
300 #endif // defined(USE_SECCOMP_BPF) 298 #endif // defined(USE_SECCOMP_BPF)
301 } 299 }
302 300
303 } // namespace content 301 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698