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

Side by Side Diff: sandbox/linux/bpf_dsl/syscall_set.h

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.cc ('k') | sandbox/linux/bpf_dsl/syscall_set.cc » ('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 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_ITERATOR_H__ 5 #ifndef SANDBOX_LINUX_BPF_DSL_SYSCALL_SET_H__
6 #define SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_ITERATOR_H__ 6 #define SANDBOX_LINUX_BPF_DSL_SYSCALL_SET_H__
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <iterator> 10 #include <iterator>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "sandbox/sandbox_export.h" 13 #include "sandbox/sandbox_export.h"
14 14
15 namespace sandbox { 15 namespace sandbox {
16 16
17 // TODO(mdempsky): Rename this header to syscall_set.h.
18
19 // Iterates over the entire system call range from 0..0xFFFFFFFFu. This 17 // Iterates over the entire system call range from 0..0xFFFFFFFFu. This
20 // iterator is aware of how system calls look like and will skip quickly 18 // iterator is aware of how system calls look like and will skip quickly
21 // over ranges that can't contain system calls. It iterates more slowly 19 // over ranges that can't contain system calls. It iterates more slowly
22 // whenever it reaches a range that is potentially problematic, returning 20 // whenever it reaches a range that is potentially problematic, returning
23 // the last invalid value before a valid range of system calls, and the 21 // the last invalid value before a valid range of system calls, and the
24 // first invalid value after a valid range of syscalls. It iterates over 22 // first invalid value after a valid range of syscalls. It iterates over
25 // individual values whenever it is in the normal range for system calls 23 // individual values whenever it is in the normal range for system calls
26 // (typically MIN_SYSCALL..MAX_SYSCALL). 24 // (typically MIN_SYSCALL..MAX_SYSCALL).
27 // 25 //
28 // Example usage: 26 // Example usage:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 DISALLOW_ASSIGN(Iterator); 93 DISALLOW_ASSIGN(Iterator);
96 }; 94 };
97 95
98 SANDBOX_EXPORT bool operator==(const SyscallSet::Iterator& lhs, 96 SANDBOX_EXPORT bool operator==(const SyscallSet::Iterator& lhs,
99 const SyscallSet::Iterator& rhs); 97 const SyscallSet::Iterator& rhs);
100 SANDBOX_EXPORT bool operator!=(const SyscallSet::Iterator& lhs, 98 SANDBOX_EXPORT bool operator!=(const SyscallSet::Iterator& lhs,
101 const SyscallSet::Iterator& rhs); 99 const SyscallSet::Iterator& rhs);
102 100
103 } // namespace sandbox 101 } // namespace sandbox
104 102
105 #endif // SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_ITERATOR_H__ 103 #endif // SANDBOX_LINUX_BPF_DSL_SYSCALL_SET_H__
OLDNEW
« no previous file with comments | « sandbox/linux/bpf_dsl/policy_compiler.cc ('k') | sandbox/linux/bpf_dsl/syscall_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698