| 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/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 Loading... |
| 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. |
| OLD | NEW |