Bug 1304220 - Allow media plugins to use the times(2) syscall. r=gcp, a=ritu
authorJed Davis <jld@mozilla.com>
Mon, 26 Sep 2016 16:32:00 -0400
changeset 350554 a2b93143108f572f21721ac682ff4487da07a2a5
parent 350553 c97ea049e8f4d5159af2d33280f58b82037e121c
child 350555 122bf25cc33c72993cabef590e0c8566014c8df9
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp, ritu
bugs1304220
milestone50.0
Bug 1304220 - Allow media plugins to use the times(2) syscall. r=gcp, a=ritu
security/sandbox/linux/SandboxFilter.cpp
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -830,16 +830,20 @@ public:
     case __NR_sched_get_priority_min:
     case __NR_sched_get_priority_max:
     case __NR_sched_setscheduler: {
       Arg<pid_t> pid(0);
       return If(pid == 0, Allow())
         .Else(Trap(SchedTrap, nullptr));
     }
 
+    // For clock(3) on older glibcs; bug 1304220.
+    case __NR_times:
+      return Allow();
+
     default:
       return SandboxPolicyCommon::EvaluateSyscall(sysno);
     }
   }
 };
 
 UniquePtr<sandbox::bpf_dsl::Policy>
 GetMediaSandboxPolicy(SandboxOpenedFile* aPlugin)