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

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

Issue 11411254: SECCOMP-BPF: Added supported for inspection system call arguments from BPF filters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt at fixing the rebase Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/linux/seccomp-bpf/util.cc ('k') | sandbox/linux/seccomp-bpf/verifier.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_VERIFIER_H__ 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_VERIFIER_H__
6 #define SANDBOX_LINUX_SECCOMP_BPF_VERIFIER_H__ 6 #define SANDBOX_LINUX_SECCOMP_BPF_VERIFIER_H__
7 7
8 #include <linux/filter.h> 8 #include <linux/filter.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const std::vector<struct sock_filter>& program; 53 const std::vector<struct sock_filter>& program;
54 const struct arch_seccomp_data& data; 54 const struct arch_seccomp_data& data;
55 unsigned int ip; 55 unsigned int ip;
56 uint32_t accumulator; 56 uint32_t accumulator;
57 bool acc_is_valid; 57 bool acc_is_valid;
58 58
59 private: 59 private:
60 DISALLOW_IMPLICIT_CONSTRUCTORS(State); 60 DISALLOW_IMPLICIT_CONSTRUCTORS(State);
61 }; 61 };
62 62
63 static bool VerifyErrorCode(const std::vector<struct sock_filter>& prg,
64 struct arch_seccomp_data *data,
65 const ErrorCode& code, const char **err);
63 static void Ld (State *state, const struct sock_filter& insn, 66 static void Ld (State *state, const struct sock_filter& insn,
64 const char **err); 67 const char **err);
65 static void Jmp(State *state, const struct sock_filter& insn, 68 static void Jmp(State *state, const struct sock_filter& insn,
66 const char **err); 69 const char **err);
67 static uint32_t Ret(State *state, const struct sock_filter& insn, 70 static uint32_t Ret(State *state, const struct sock_filter& insn,
68 const char **err); 71 const char **err);
69 72
70 DISALLOW_IMPLICIT_CONSTRUCTORS(Verifier); 73 DISALLOW_IMPLICIT_CONSTRUCTORS(Verifier);
71 }; 74 };
72 75
73 } // namespace 76 } // namespace
74 77
75 #endif // SANDBOX_LINUX_SECCOMP_BPF_VERIFIER_H__ 78 #endif // SANDBOX_LINUX_SECCOMP_BPF_VERIFIER_H__
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/util.cc ('k') | sandbox/linux/seccomp-bpf/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698