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

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

Issue 628823003: sandbox_bpf: rework how unsafe traps are compiled/verified (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policies
Patch Set: Sync Created 6 years, 2 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/sandbox_bpf.cc ('k') | sandbox/linux/seccomp-bpf/trap.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SANDBOX_BPF_POLICY_H_ 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_POLICY_H_
6 #define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_POLICY_H_ 6 #define SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_POLICY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "sandbox/sandbox_export.h" 9 #include "sandbox/sandbox_export.h"
10 10
(...skipping 14 matching lines...) Expand all
25 // "errno" value; or it can request inspection of system call argument(s) by 25 // "errno" value; or it can request inspection of system call argument(s) by
26 // returning a suitable ErrorCode. 26 // returning a suitable ErrorCode.
27 // Will only be called for valid system call numbers. 27 // Will only be called for valid system call numbers.
28 virtual ErrorCode EvaluateSyscall(SandboxBPF* sandbox_compiler, 28 virtual ErrorCode EvaluateSyscall(SandboxBPF* sandbox_compiler,
29 int system_call_number) const = 0; 29 int system_call_number) const = 0;
30 30
31 // The InvalidSyscall method specifies the behavior used for invalid 31 // The InvalidSyscall method specifies the behavior used for invalid
32 // system calls. The default implementation is to return ENOSYS. 32 // system calls. The default implementation is to return ENOSYS.
33 virtual ErrorCode InvalidSyscall(SandboxBPF* sandbox_compiler) const; 33 virtual ErrorCode InvalidSyscall(SandboxBPF* sandbox_compiler) const;
34 34
35 // HasUnsafeTraps returns true if the policy includes any unsafe traps.
36 virtual bool HasUnsafeTraps() const = 0;
37
35 private: 38 private:
36 DISALLOW_COPY_AND_ASSIGN(SandboxBPFPolicy); 39 DISALLOW_COPY_AND_ASSIGN(SandboxBPFPolicy);
37 }; 40 };
38 41
39 } // namespace sandbox 42 } // namespace sandbox
40 43
41 #endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_POLICY_H_ 44 #endif // SANDBOX_LINUX_SECCOMP_BPF_SANDBOX_BPF_POLICY_H_
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/sandbox_bpf.cc ('k') | sandbox/linux/seccomp-bpf/trap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698