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" |
| 6 |
5 #include <string.h> | 7 #include <string.h> |
6 | 8 |
7 #include <limits> | 9 #include <limits> |
8 | 10 |
| 11 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" |
9 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 12 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
10 #include "sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h" | 13 #include "sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h" |
11 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" | 14 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" |
12 #include "sandbox/linux/seccomp-bpf/verifier.h" | |
13 | 15 |
14 namespace sandbox { | 16 namespace sandbox { |
15 | 17 |
16 namespace { | 18 namespace { |
17 | 19 |
18 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); | 20 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); |
19 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; | 21 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; |
20 const uint64_t kFull64Bits = std::numeric_limits<uint64_t>::max(); | 22 const uint64_t kFull64Bits = std::numeric_limits<uint64_t>::max(); |
21 | 23 |
22 struct State { | 24 struct State { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 break; | 388 break; |
387 default: | 389 default: |
388 *err = "Unexpected instruction in BPF program"; | 390 *err = "Unexpected instruction in BPF program"; |
389 break; | 391 break; |
390 } | 392 } |
391 } | 393 } |
392 return 0; | 394 return 0; |
393 } | 395 } |
394 | 396 |
395 } // namespace sandbox | 397 } // namespace sandbox |
OLD | NEW |