Skip to content

Commit 51639c0

Browse files
happyCoder92copybara-github
authored andcommitted
Automated rollback of commit f2ad018.
PiperOrigin-RevId: 906827281 Change-Id: If955e00feb5aadb5afc941ab6698c0806399c158
1 parent 08965f3 commit 51639c0

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

sandboxed_api/sandbox2/policybuilder.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,14 +1127,12 @@ PolicyBuilder& PolicyBuilder::AllowRestartableSequences(
11271127
});
11281128
AllowPrctlSetVma();
11291129

1130-
AddFileIfNamespaced("/proc/cpuinfo");
1131-
AddFileIfNamespaced("/proc/stat");
1130+
AddDirectoryIfNamespaced("/proc");
11321131
AddDirectoryIfNamespaced("/sys/devices/system/cpu");
11331132
}
11341133
if (cpu_fence_mode == kAllowSlowFences && !allowed_complex_.slow_fences) {
11351134
AllowSyscall(__NR_sched_getaffinity);
11361135
AllowSyscall(__NR_sched_setaffinity);
1137-
AddFileIfNamespaced("/proc/self/cpuset");
11381136
allowed_complex_.slow_fences = true;
11391137
} else if (cpu_fence_mode == kRequireFastFences) {
11401138
allowed_complex_.fast_fences = true;

sandboxed_api/sandbox2/policybuilder.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,18 +267,14 @@ class PolicyBuilder final {
267267
// - futex(WAIT)
268268
// - futex(WAKE)
269269
// - rt_sigprocmask(SIG_SETMASK)
270-
// Allows these files:
271-
// - "/proc/cpuinfo"
272-
// - "/proc/stat"
273-
// And this directory (including subdirs/files):
270+
// Allows these directories (including subdirs/files):
271+
// - "/proc"
274272
// - "/sys/devices/system/cpu/"
275273
//
276274
// If `cpu_fence_mode` is `kAllowSlowFences`, also permits slow CPU fences.
277275
// Allows these syscalls:
278276
// - sched_getaffinity
279277
// - sched_setaffinity
280-
// Allows these files:
281-
// - "/proc/self/cpuset"
282278
//
283279
// If `cpu_fence_mode` is `kRequireFastFences`, RSEQ functionality may not
284280
// be enabled if fast CPU fences are not available.

0 commit comments

Comments
 (0)