зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1664922 - Allow CPU information in the "utility" sandbox policy, for nsSystemInfo. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D90603
This commit is contained in:
Родитель
1487466d5a
Коммит
5d2c793134
|
@ -683,6 +683,15 @@ SandboxBrokerPolicyFactory::GetUtilityPolicy(int aPid) {
|
|||
|
||||
AddSharedMemoryPaths(policy.get(), aPid);
|
||||
|
||||
// FIXME (bug 1662321): we should fix nsSystemInfo so that every
|
||||
// child process doesn't need to re-read these files to get the info
|
||||
// the parent process already has.
|
||||
policy->AddPath(rdonly, "/proc/cpuinfo");
|
||||
policy->AddPath(rdonly,
|
||||
"/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq");
|
||||
policy->AddPath(rdonly, "/sys/devices/system/cpu/cpu0/cache/index2/size");
|
||||
policy->AddPath(rdonly, "/sys/devices/system/cpu/cpu0/cache/index3/size");
|
||||
|
||||
if (policy->IsEmpty()) {
|
||||
policy = nullptr;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче