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" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #endif | 55 #endif |
56 | 56 |
57 // Restrict |sysno| (which must be kill, tkill or tgkill) by allowing tgkill or | 57 // Restrict |sysno| (which must be kill, tkill or tgkill) by allowing tgkill or |
58 // kill iff the first parameter is |target_pid|, crashing otherwise or if | 58 // kill iff the first parameter is |target_pid|, crashing otherwise or if |
59 // |sysno| is tkill. | 59 // |sysno| is tkill. |
60 bpf_dsl::ResultExpr RestrictKillTarget(pid_t target_pid, int sysno); | 60 bpf_dsl::ResultExpr RestrictKillTarget(pid_t target_pid, int sysno); |
61 | 61 |
62 // Crash if FUTEX_CMP_REQUEUE_PI is used in the second argument of futex(2). | 62 // Crash if FUTEX_CMP_REQUEUE_PI is used in the second argument of futex(2). |
63 bpf_dsl::ResultExpr RestrictFutex(); | 63 bpf_dsl::ResultExpr RestrictFutex(); |
64 | 64 |
| 65 // Crash if |which| is not PRIO_PROCESS. EPERM if |who| is not 0, neither |
| 66 // |target_pid| while calling setpriority(2) / getpriority(2). |
| 67 bpf_dsl::ResultExpr RestrictGetSetpriority(pid_t target_pid); |
| 68 |
65 } // namespace sandbox. | 69 } // namespace sandbox. |
66 | 70 |
67 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ | 71 #endif // SANDBOX_LINUX_SECCOMP_BPF_HELPERS_SYSCALL_PARAMETERS_RESTRICTIONS_H_ |
OLD | NEW |