OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SANDBOX_BPF_H__ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <sys/wait.h> | 10 #include <sys/wait.h> |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <limits> | 13 #include <limits> |
14 #include <map> | 14 #include <map> |
15 #include <set> | 15 #include <set> |
16 #include <utility> | 16 #include <utility> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
20 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
21 #include "sandbox/linux/seccomp-bpf/die.h" | 21 #include "sandbox/linux/seccomp-bpf/die.h" |
22 #include "sandbox/linux/seccomp-bpf/errorcode.h" | 22 #include "sandbox/linux/seccomp-bpf/errorcode.h" |
23 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" | 23 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" |
24 #include "sandbox/sandbox_export.h" | 24 #include "sandbox/sandbox_export.h" |
25 | 25 |
26 namespace sandbox { | 26 namespace sandbox { |
27 | 27 |
| 28 // This must match the kernel's seccomp_data structure. |
28 struct arch_seccomp_data { | 29 struct arch_seccomp_data { |
29 int nr; | 30 int nr; |
30 uint32_t arch; | 31 uint32_t arch; |
31 uint64_t instruction_pointer; | 32 uint64_t instruction_pointer; |
32 uint64_t args[6]; | 33 uint64_t args[6]; |
33 }; | 34 }; |
34 | 35 |
35 struct arch_sigsys { | 36 struct arch_sigsys { |
36 void* ip; | 37 void* ip; |
37 int nr; | 38 int nr; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 scoped_ptr<const SandboxBPFPolicy> policy_; | 260 scoped_ptr<const SandboxBPFPolicy> policy_; |
260 Conds* conds_; | 261 Conds* conds_; |
261 bool sandbox_has_started_; | 262 bool sandbox_has_started_; |
262 | 263 |
263 DISALLOW_COPY_AND_ASSIGN(SandboxBPF); | 264 DISALLOW_COPY_AND_ASSIGN(SandboxBPF); |
264 }; | 265 }; |
265 | 266 |
266 } // namespace sandbox | 267 } // namespace sandbox |
267 | 268 |
268 #endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ | 269 #endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_H__ |
OLD | NEW |