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 #ifndef SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ |
7 | 7 |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 11 #include "sandbox/linux/bpf_dsl/bpf_dsl_forward.h" |
12 #include "sandbox/sandbox_export.h" | 12 #include "sandbox/sandbox_export.h" |
13 | 13 |
14 // These are helpers to build seccomp-bpf policies, i.e. policies for a | 14 // These are helpers to build seccomp-bpf policies, i.e. policies for a |
15 // sandbox that reduces the Linux kernel's attack surface. They return a | 15 // sandbox that reduces the Linux kernel's attack surface. They return a |
16 // bpf_dsl::ResultExpr suitable to restrict certain system call parameters. | 16 // bpf_dsl::ResultExpr suitable to restrict certain system call parameters. |
17 | 17 |
18 namespace sandbox { | 18 namespace sandbox { |
19 | 19 |
20 // Allow clone(2) for threads. | 20 // Allow clone(2) for threads. |
21 // Reject fork(2) attempts with EPERM. | 21 // Reject fork(2) attempts with EPERM. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // | 83 // |
84 // sched_getaffinity(), sched_getattr(), sched_getparam(), sched_getscheduler(), | 84 // sched_getaffinity(), sched_getattr(), sched_getparam(), sched_getscheduler(), |
85 // sched_rr_get_interval(), sched_setaffinity(), sched_setattr(), | 85 // sched_rr_get_interval(), sched_setaffinity(), sched_setattr(), |
86 // sched_setparam(), sched_setscheduler() | 86 // sched_setparam(), sched_setscheduler() |
87 SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSchedTarget(pid_t target_pid, | 87 SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSchedTarget(pid_t target_pid, |
88 int sysno); | 88 int sysno); |
89 | 89 |
90 } // namespace sandbox. | 90 } // namespace sandbox. |
91 | 91 |
92 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ | 92 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ |
OLD | NEW |