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

Unified Diff: sandbox/linux/seccomp-bpf/sandbox_bpf.h

Issue 10546041: Added a new Verifier class to the BPF compiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored error handling and rebased on head of the trunk Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/linux/seccomp-bpf/sandbox_bpf.h
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.h b/sandbox/linux/seccomp-bpf/sandbox_bpf.h
index 3501e62807ffdb77882c354efe33b7625fb4e64b..0d8b754c1044fe80b025de9aca52c479b56bd640 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf.h
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.h
@@ -108,6 +108,10 @@ struct arch_seccomp_data {
#ifdef SECCOMP_BPF_STANDALONE
#define arraysize(x) sizeof(x)/sizeof(*(x)))
#define HANDLE_EINTR TEMP_FAILURE_RETRY
+#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
jln (very slow on Chromium) 2012/06/08 19:28:22 If/once we make demo.cc a proper test in Chrome, I
+ TypeName(); \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
#endif
@@ -115,6 +119,7 @@ namespace playground2 {
class Sandbox {
friend class Util;
+ friend class Verifier;
public:
enum SandboxStatus {
@@ -153,6 +158,7 @@ class Sandbox {
typedef ErrorCode (*EvaluateSyscall)(int sysno);
typedef int (*EvaluateArguments)(int sysno, int arg,
Constraint *constraint);
+ typedef std::vector<std::pair<EvaluateSyscall,EvaluateArguments> >Evaluators;
// There are a lot of reasons why the Seccomp sandbox might not be available.
// This could be because the kernel does not support Seccomp mode, or it
@@ -235,8 +241,7 @@ class Sandbox {
static bool suppressLogging_;
static SandboxStatus status_;
static int proc_fd_;
- static std::vector<std::pair<EvaluateSyscall,
- EvaluateArguments> > evaluators_;
+ static Evaluators evaluators_;
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698