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

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

Issue 598203004: Linux sandbox: Restrict sched_* syscalls on the GPU and ppapi processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_ppapi_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc b/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc
index 91b4c401d8f99918ac38f45786f2a17f31c27449..092cfcf7e80e39ba5e4d20b5086dae6aeae06e65 100644
--- a/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_ppapi_policy_linux.cc
@@ -31,12 +31,13 @@ ResultExpr PpapiProcessPolicy::EvaluateSyscall(int sysno) const {
case __NR_pwrite64:
case __NR_sched_get_priority_max:
case __NR_sched_get_priority_min:
+ case __NR_times:
+ return Allow();
case __NR_sched_getaffinity:
case __NR_sched_getparam:
case __NR_sched_getscheduler:
case __NR_sched_setscheduler:
- case __NR_times:
- return Allow();
+ return sandbox::RestrictSchedTarget(current_pid(), sysno);
case __NR_ioctl:
return Error(ENOTTY); // Flash Access.
default:

Powered by Google App Engine
This is Rietveld 408576698