mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1769616 - Error(ENOSYS) for set_mempolicy() on Content and Utility AudioDecoder r=jld
Differential Revision: https://phabricator.services.mozilla.com/D146833
This commit is contained in:
parent
25a557ba16
commit
74b64ad41e
@ -761,6 +761,12 @@ void RunTestsUtilityAudioDecoder(SandboxTestingChild* child) {
|
||||
MPOL_F_NODE | MPOL_F_ADDR);
|
||||
return rv;
|
||||
});
|
||||
// set_mempolicy is not allowed in Generic Utility but is on AudioDecoder
|
||||
child->ErrnoValueTest("set_mempolicy"_ns, ENOSYS, [&] {
|
||||
// <numaif.h> not installed by default, let's call directly the syscall
|
||||
long rv = syscall(SYS_set_mempolicy, 0, NULL, 0);
|
||||
return rv;
|
||||
});
|
||||
# elif XP_MACOSX // XP_LINUX
|
||||
RunMacTestLaunchProcess(child);
|
||||
RunMacTestWindowServer(child);
|
||||
|
@ -1611,6 +1611,10 @@ class ContentSandboxPolicy : public SandboxPolicyCommon {
|
||||
case __NR_get_mempolicy:
|
||||
return Allow();
|
||||
|
||||
// Required by libnuma for FFmpeg
|
||||
case __NR_set_mempolicy:
|
||||
return Error(ENOSYS);
|
||||
|
||||
case __NR_kcmp:
|
||||
return KcmpPolicyForMesa();
|
||||
|
||||
@ -2072,9 +2076,8 @@ class UtilityAudioDecoderSandboxPolicy final : public UtilitySandboxPolicy {
|
||||
ResultExpr EvaluateSyscall(int sysno) const override {
|
||||
switch (sysno) {
|
||||
// Required by FFmpeg
|
||||
case __NR_get_mempolicy: {
|
||||
case __NR_get_mempolicy:
|
||||
return Allow();
|
||||
}
|
||||
|
||||
// Required by libnuma for FFmpeg
|
||||
case __NR_sched_getaffinity: {
|
||||
@ -2082,6 +2085,10 @@ class UtilityAudioDecoderSandboxPolicy final : public UtilitySandboxPolicy {
|
||||
return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr));
|
||||
}
|
||||
|
||||
// Required by libnuma for FFmpeg
|
||||
case __NR_set_mempolicy:
|
||||
return Error(ENOSYS);
|
||||
|
||||
// Pass through the common policy.
|
||||
default:
|
||||
return UtilitySandboxPolicy::EvaluateSyscall(sysno);
|
||||
|
Loading…
Reference in New Issue
Block a user