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 #include "sandbox/linux/seccomp-bpf/verifier.h" | 5 #include "sandbox/linux/seccomp-bpf/verifier.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 11 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
12 #include "sandbox/linux/bpf_dsl/bpf_dsl_impl.h" | 12 #include "sandbox/linux/bpf_dsl/bpf_dsl_impl.h" |
13 #include "sandbox/linux/bpf_dsl/policy.h" | 13 #include "sandbox/linux/bpf_dsl/policy.h" |
14 #include "sandbox/linux/bpf_dsl/policy_compiler.h" | 14 #include "sandbox/linux/bpf_dsl/policy_compiler.h" |
| 15 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" |
15 #include "sandbox/linux/bpf_dsl/syscall_set.h" | 16 #include "sandbox/linux/bpf_dsl/syscall_set.h" |
16 #include "sandbox/linux/seccomp-bpf/errorcode.h" | 17 #include "sandbox/linux/seccomp-bpf/errorcode.h" |
17 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" | |
18 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 18 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
| 19 #include "sandbox/linux/system_headers/linux_seccomp.h" |
19 | 20 |
20 namespace sandbox { | 21 namespace sandbox { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); | 25 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); |
25 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; | 26 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; |
26 const uint64_t kFull64Bits = std::numeric_limits<uint64_t>::max(); | 27 const uint64_t kFull64Bits = std::numeric_limits<uint64_t>::max(); |
27 | 28 |
28 struct State { | 29 struct State { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 break; | 393 break; |
393 default: | 394 default: |
394 *err = "Unexpected instruction in BPF program"; | 395 *err = "Unexpected instruction in BPF program"; |
395 break; | 396 break; |
396 } | 397 } |
397 } | 398 } |
398 return 0; | 399 return 0; |
399 } | 400 } |
400 | 401 |
401 } // namespace sandbox | 402 } // namespace sandbox |
OLD | NEW |