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

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

Issue 639183003: Linux sandbox: Restrict sched_* calls in the renderer policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split out cros arm gpu part into a separate CL. Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_renderer_policy_linux.h" 5 #include "content/common/sandbox_linux/bpf_renderer_policy_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 25 matching lines...) Expand all
36 case __NR_fsync: 36 case __NR_fsync:
37 #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) 37 #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
38 case __NR_getrlimit: 38 case __NR_getrlimit:
39 #endif 39 #endif
40 #if defined(__i386__) || defined(__arm__) 40 #if defined(__i386__) || defined(__arm__)
41 case __NR_ugetrlimit: 41 case __NR_ugetrlimit:
42 #endif 42 #endif
43 case __NR_mremap: // See crbug.com/149834. 43 case __NR_mremap: // See crbug.com/149834.
44 case __NR_pread64: 44 case __NR_pread64:
45 case __NR_pwrite64: 45 case __NR_pwrite64:
46 case __NR_sched_getaffinity:
47 case __NR_sched_get_priority_max: 46 case __NR_sched_get_priority_max:
48 case __NR_sched_get_priority_min: 47 case __NR_sched_get_priority_min:
49 case __NR_sched_getparam:
50 case __NR_sched_getscheduler:
51 case __NR_sched_setscheduler:
52 case __NR_sysinfo: 48 case __NR_sysinfo:
53 case __NR_times: 49 case __NR_times:
54 case __NR_uname: 50 case __NR_uname:
55 return Allow(); 51 return Allow();
52 case __NR_sched_getaffinity:
53 case __NR_sched_getparam:
54 case __NR_sched_getscheduler:
55 case __NR_sched_setscheduler:
56 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
56 case __NR_prlimit64: 57 case __NR_prlimit64:
57 return Error(EPERM); // See crbug.com/160157. 58 return Error(EPERM); // See crbug.com/160157.
58 default: 59 default:
59 // Default on the content baseline policy. 60 // Default on the content baseline policy.
60 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); 61 return SandboxBPFBasePolicy::EvaluateSyscall(sysno);
61 } 62 }
62 } 63 }
63 64
64 } // namespace content 65 } // 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