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

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

Issue 937303005: Revert of bpf_dsl: decouple PolicyCompiler from Syscall (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc ('k') | sandbox/linux/seccomp-bpf/trap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/sandbox_bpf.cc
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
index dc29f2252a21e28773816d39996376914dceec14..31975a1b98e33539d60a977cf70e789d09ecd6d5 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc
@@ -79,14 +79,6 @@
}
}
-uint64_t EscapePC() {
- intptr_t rv = Syscall::Call(-1);
- if (rv == -1 && errno == ENOSYS) {
- return 0;
- }
- return static_cast<uint64_t>(static_cast<uintptr_t>(rv));
-}
-
} // namespace
SandboxBPF::SandboxBPF(bpf_dsl::Policy* policy)
@@ -193,9 +185,6 @@
#endif
DCHECK(policy_);
bpf_dsl::PolicyCompiler compiler(policy_.get(), Trap::Registry());
- if (Trap::SandboxDebuggingAllowedByUser()) {
- compiler.DangerousSetEscapePC(EscapePC());
- }
scoped_ptr<CodeGen::Program> program = compiler.Compile();
// Make sure compilation resulted in a BPF program that executes
« no previous file with comments | « sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc ('k') | sandbox/linux/seccomp-bpf/trap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698