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

Side by Side Diff: sandbox/linux/bpf_dsl/policy_compiler.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
« no previous file with comments | « sandbox/linux/bpf_dsl/policy_compiler.h ('k') | sandbox/linux/bpf_dsl/syscall_set.h » ('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/bpf_dsl/policy_compiler.h" 5 #include "sandbox/linux/bpf_dsl/policy_compiler.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <linux/filter.h> 8 #include <linux/filter.h>
9 #include <sys/syscall.h> 9 #include <sys/syscall.h>
10 10
11 #include <limits> 11 #include <limits>
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" 15 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
16 #include "sandbox/linux/bpf_dsl/bpf_dsl_impl.h" 16 #include "sandbox/linux/bpf_dsl/bpf_dsl_impl.h"
17 #include "sandbox/linux/bpf_dsl/codegen.h"
17 #include "sandbox/linux/bpf_dsl/policy.h" 18 #include "sandbox/linux/bpf_dsl/policy.h"
18 #include "sandbox/linux/seccomp-bpf/codegen.h" 19 #include "sandbox/linux/bpf_dsl/syscall_set.h"
19 #include "sandbox/linux/seccomp-bpf/die.h" 20 #include "sandbox/linux/seccomp-bpf/die.h"
20 #include "sandbox/linux/seccomp-bpf/errorcode.h" 21 #include "sandbox/linux/seccomp-bpf/errorcode.h"
21 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" 22 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
22 #include "sandbox/linux/seccomp-bpf/syscall.h" 23 #include "sandbox/linux/seccomp-bpf/syscall.h"
23 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h"
24 24
25 namespace sandbox { 25 namespace sandbox {
26 namespace bpf_dsl { 26 namespace bpf_dsl {
27 27
28 namespace { 28 namespace {
29 29
30 #if defined(__i386__) || defined(__x86_64__) 30 #if defined(__i386__) || defined(__x86_64__)
31 const bool kIsIntel = true; 31 const bool kIsIntel = true;
32 #else 32 #else
33 const bool kIsIntel = false; 33 const bool kIsIntel = false;
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 return ErrorCode(argno, 488 return ErrorCode(argno,
489 width, 489 width,
490 mask, 490 mask,
491 value, 491 value,
492 &*conds_.insert(passed).first, 492 &*conds_.insert(passed).first,
493 &*conds_.insert(failed).first); 493 &*conds_.insert(failed).first);
494 } 494 }
495 495
496 } // namespace bpf_dsl 496 } // namespace bpf_dsl
497 } // namespace sandbox 497 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/policy_compiler.h ('k') | sandbox/linux/bpf_dsl/syscall_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698