OLD | NEW |
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/seccomp-bpf-helpers/sigsys_handlers.h" | 17 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
17 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" | 18 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" |
18 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" | 19 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" |
19 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 20 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
20 #include "sandbox/linux/services/linux_syscalls.h" | 21 #include "sandbox/linux/services/linux_syscalls.h" |
21 | 22 |
22 // Changing this implementation will have an effect on *all* policies. | 23 // Changing this implementation will have an effect on *all* policies. |
23 // Currently this means: Renderer/Worker, GPU, Flash and NaCl. | 24 // Currently this means: Renderer/Worker, GPU, Flash and NaCl. |
24 | 25 |
25 using sandbox::bpf_dsl::Allow; | 26 using sandbox::bpf_dsl::Allow; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 DCHECK_EQ(syscall(__NR_getpid), policy_pid_); | 253 DCHECK_EQ(syscall(__NR_getpid), policy_pid_); |
253 } | 254 } |
254 return EvaluateSyscallImpl(fs_denied_errno_, policy_pid_, sysno); | 255 return EvaluateSyscallImpl(fs_denied_errno_, policy_pid_, sysno); |
255 } | 256 } |
256 | 257 |
257 ResultExpr BaselinePolicy::InvalidSyscall() const { | 258 ResultExpr BaselinePolicy::InvalidSyscall() const { |
258 return CrashSIGSYS(); | 259 return CrashSIGSYS(); |
259 } | 260 } |
260 | 261 |
261 } // namespace sandbox. | 262 } // namespace sandbox. |
OLD | NEW |