Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.cc

Issue 1930223002: Allow sysinfo in the GPU policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h" 5 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) 255 #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
256 // The Nvidia driver uses flags not in the baseline policy 256 // The Nvidia driver uses flags not in the baseline policy
257 // (MAP_LOCKED | MAP_EXECUTABLE | MAP_32BIT) 257 // (MAP_LOCKED | MAP_EXECUTABLE | MAP_32BIT)
258 case __NR_mmap: 258 case __NR_mmap:
259 #endif 259 #endif
260 // We also hit this on the linux_chromeos bot but don't yet know what 260 // We also hit this on the linux_chromeos bot but don't yet know what
261 // weird flags were involved. 261 // weird flags were involved.
262 case __NR_mprotect: 262 case __NR_mprotect:
263 // TODO(jln): restrict prctl. 263 // TODO(jln): restrict prctl.
264 case __NR_prctl: 264 case __NR_prctl:
265 case __NR_sysinfo:
265 return Allow(); 266 return Allow();
266 #if !defined(__aarch64__) 267 #if !defined(__aarch64__)
267 case __NR_access: 268 case __NR_access:
268 case __NR_open: 269 case __NR_open:
269 #endif // !defined(__aarch64__) 270 #endif // !defined(__aarch64__)
270 case __NR_faccessat: 271 case __NR_faccessat:
271 case __NR_openat: 272 case __NR_openat:
272 DCHECK(broker_process_); 273 DCHECK(broker_process_);
273 return Trap(GpuSIGSYS_Handler, broker_process_); 274 return Trap(GpuSIGSYS_Handler, broker_process_);
274 case __NR_sched_getaffinity: 275 case __NR_sched_getaffinity:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 359 }
359 360
360 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), permissions); 361 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), permissions);
361 // The initialization callback will perform generic initialization and then 362 // The initialization callback will perform generic initialization and then
362 // call broker_sandboxer_callback. 363 // call broker_sandboxer_callback.
363 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, 364 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox,
364 broker_sandboxer_allocator))); 365 broker_sandboxer_allocator)));
365 } 366 }
366 367
367 } // namespace content 368 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698