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

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: 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..0d4b8e33ca9edd0aecc0d76c1dfe0d776135b89e 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -169,7 +169,12 @@ 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() {}
@@ -198,6 +203,9 @@ ResultExpr GpuProcessPolicy::EvaluateSyscall(int sysno) const {
case __NR_sched_getaffinity:
case __NR_sched_setaffinity:
return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
+ case __NR_mincore:
+ if (allow_mincore_)
+ return Allow();
Jorge Lucangeli Obes 2014/10/20 19:01:07 We try to keep this in alphabetical order, but it'
default:
if (SyscallSets::IsEventFd(sysno))
return Allow();
« 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