Allow access to /sys/devices/system/cpu/

PiperOrigin-RevId: 439506287
Change-Id: I5d41ed234860f02329c960144b1da725e24549dd
This commit is contained in:
Sandboxed API Team 2022-04-05 00:28:44 -07:00 committed by Copybara-Service
parent e98133c7b4
commit 1db315207a
2 changed files with 3 additions and 0 deletions

View File

@ -502,6 +502,7 @@ PolicyBuilder& PolicyBuilder::AllowRestartableSequencesWithProcFiles(
AllowRestartableSequences(cpu_fence_mode); AllowRestartableSequences(cpu_fence_mode);
AddFile("/proc/cpuinfo"); AddFile("/proc/cpuinfo");
AddFile("/proc/stat"); AddFile("/proc/stat");
AddDirectory("/sys/devices/system/cpu");
if (cpu_fence_mode == kAllowSlowFences) { if (cpu_fence_mode == kAllowSlowFences) {
AddFile("/proc/self/cpuset"); AddFile("/proc/self/cpuset");
} }

View File

@ -148,6 +148,8 @@ class PolicyBuilder final {
// Allows these files: // Allows these files:
// - "/proc/cpuinfo" // - "/proc/cpuinfo"
// - "/proc/stat" // - "/proc/stat"
// And this directory (including subdirs/files):
// - "/sys/devices/system/cpu/"
// //
// If `cpu_fence_mode` is `kAllowSlowFences`, also permits slow CPU fences. // If `cpu_fence_mode` is `kAllowSlowFences`, also permits slow CPU fences.
// Allows these syscalls: // Allows these syscalls: