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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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-helpers/baseline_policy.h" 5 #include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/syscall.h> 10 #include <sys/syscall.h>
11 #include <sys/types.h> 11 #include <sys/types.h>
12 #include <unistd.h> 12 #include <unistd.h>
13 13
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" 16 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
17 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" 17 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
18 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" 18 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h"
19 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" 19 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h"
20 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 20 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
21 #include "sandbox/linux/services/linux_syscalls.h"
22 #include "sandbox/linux/services/syscall_wrappers.h" 21 #include "sandbox/linux/services/syscall_wrappers.h"
22 #include "sandbox/linux/system_headers/linux_syscalls.h"
23 23
24 // Changing this implementation will have an effect on *all* policies. 24 // Changing this implementation will have an effect on *all* policies.
25 // Currently this means: Renderer/Worker, GPU, Flash and NaCl. 25 // Currently this means: Renderer/Worker, GPU, Flash and NaCl.
26 26
27 using sandbox::bpf_dsl::Allow; 27 using sandbox::bpf_dsl::Allow;
28 using sandbox::bpf_dsl::Arg; 28 using sandbox::bpf_dsl::Arg;
29 using sandbox::bpf_dsl::Error; 29 using sandbox::bpf_dsl::Error;
30 using sandbox::bpf_dsl::If; 30 using sandbox::bpf_dsl::If;
31 using sandbox::bpf_dsl::ResultExpr; 31 using sandbox::bpf_dsl::ResultExpr;
32 32
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 DCHECK_EQ(sys_getpid(), policy_pid_); 261 DCHECK_EQ(sys_getpid(), policy_pid_);
262 } 262 }
263 return EvaluateSyscallImpl(fs_denied_errno_, policy_pid_, sysno); 263 return EvaluateSyscallImpl(fs_denied_errno_, policy_pid_, sysno);
264 } 264 }
265 265
266 ResultExpr BaselinePolicy::InvalidSyscall() const { 266 ResultExpr BaselinePolicy::InvalidSyscall() const {
267 return CrashSIGSYS(); 267 return CrashSIGSYS();
268 } 268 }
269 269
270 } // namespace sandbox. 270 } // namespace sandbox.
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/DEPS ('k') | sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698