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

Unified Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.cc

Issue 656023003: Fix crash with --use-gl=egl on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use allow_mincore_ instead of new class 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 side-by-side diff with in-line comments
Download patch
Index: content/common/sandbox_linux/bpf_gpu_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index 74f9871fc30a92c8cd3abca5527c5ebb896937d1..e82916e3eb711969b110399d851e4488e4998bda 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -169,12 +169,20 @@ bool UpdateProcessTypeAndEnableSandbox(sandbox::bpf_dsl::SandboxBPFDSLPolicy* (
} // namespace
-GpuProcessPolicy::GpuProcessPolicy() : broker_process_(NULL) {}
+GpuProcessPolicy::GpuProcessPolicy() : GpuProcessPolicy(false) {
+}
+
+GpuProcessPolicy::GpuProcessPolicy(bool allow_mincore)
+ : broker_process_(NULL), allow_mincore_(allow_mincore) {
+}
GpuProcessPolicy::~GpuProcessPolicy() {}
// Main policy for x86_64/i386. Extended by CrosArmGpuProcessPolicy.
ResultExpr GpuProcessPolicy::EvaluateSyscall(int sysno) const {
+ if (allow_mincore_ && sysno == __NR_mincore)
Jorge Lucangeli Obes 2014/10/20 18:41:02 Please add this as a case in the switch statement
+ return Allow();
+
switch (sysno) {
case __NR_ioctl:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
« no previous file with comments | « content/common/sandbox_linux/bpf_gpu_policy_linux.h ('k') | content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698