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

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

Issue 935333002: Update from https://crrev.com/316786 (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
« no previous file with comments | « sandbox/linux/seccomp-bpf/trap.cc ('k') | sandbox/linux/services/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/trap.cc ('k') | sandbox/linux/services/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698