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/bpf_dsl/verifier.h" | 5 #include "sandbox/linux/bpf_dsl/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/errorcode.h" |
13 #include "sandbox/linux/bpf_dsl/policy.h" | 14 #include "sandbox/linux/bpf_dsl/policy.h" |
14 #include "sandbox/linux/bpf_dsl/policy_compiler.h" | 15 #include "sandbox/linux/bpf_dsl/policy_compiler.h" |
15 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" | 16 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" |
16 #include "sandbox/linux/bpf_dsl/syscall_set.h" | 17 #include "sandbox/linux/bpf_dsl/syscall_set.h" |
17 #include "sandbox/linux/seccomp-bpf/errorcode.h" | |
18 #include "sandbox/linux/system_headers/linux_filter.h" | 18 #include "sandbox/linux/system_headers/linux_filter.h" |
19 #include "sandbox/linux/system_headers/linux_seccomp.h" | 19 #include "sandbox/linux/system_headers/linux_seccomp.h" |
20 | 20 |
21 namespace sandbox { | 21 namespace sandbox { |
22 namespace bpf_dsl { | 22 namespace bpf_dsl { |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); | 26 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); |
27 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; | 27 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 default: | 387 default: |
388 *err = "Unexpected instruction in BPF program"; | 388 *err = "Unexpected instruction in BPF program"; |
389 break; | 389 break; |
390 } | 390 } |
391 } | 391 } |
392 return 0; | 392 return 0; |
393 } | 393 } |
394 | 394 |
395 } // namespace bpf_dsl | 395 } // namespace bpf_dsl |
396 } // namespace sandbox | 396 } // namespace sandbox |
OLD | NEW |