Bug 1304220 - Allow media plugins to use the times(2) syscall. r=gcp
authorJed Davis <jld@mozilla.com>
Mon, 26 Sep 2016 16:32:00 -0400
changeset 315483 17592aa0049962153db68fb10e4893b99116b8f2
parent 315482 d044a6f7756c18de820e0c239d649240ecdb0030
child 315484 11a470398b1f22a7be23b4a02d42fcb3fbf343da
push id32628
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 14:56:02 +0000
treeherderautoland@3a5db9f20b43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1304220
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1304220 - Allow media plugins to use the times(2) syscall. r=gcp
security/sandbox/linux/SandboxFilter.cpp
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -836,16 +836,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)