Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: sandbox/linux/seccomp-bpf/verifier.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/syscall_set.h"
15 #include "sandbox/linux/seccomp-bpf/errorcode.h" 16 #include "sandbox/linux/seccomp-bpf/errorcode.h"
16 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" 17 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
17 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 18 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
18 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h"
19 19
20 namespace sandbox { 20 namespace sandbox {
21 21
22 namespace { 22 namespace {
23 23
24 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max(); 24 const uint64_t kLower32Bits = std::numeric_limits<uint32_t>::max();
25 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32; 25 const uint64_t kUpper32Bits = static_cast<uint64_t>(kLower32Bits) << 32;
26 const uint64_t kFull64Bits = std::numeric_limits<uint64_t>::max(); 26 const uint64_t kFull64Bits = std::numeric_limits<uint64_t>::max();
27 27
28 struct State { 28 struct State {
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 break; 392 break;
393 default: 393 default:
394 *err = "Unexpected instruction in BPF program"; 394 *err = "Unexpected instruction in BPF program";
395 break; 395 break;
396 } 396 }
397 } 397 }
398 return 0; 398 return 0;
399 } 399 }
400 400
401 } // namespace sandbox 401 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc ('k') | sandbox/linux/services/credentials_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698