| OLD | NEW |
| 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 #include <sys/ioctl.h> | 8 #include <sys/ioctl.h> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 case __NR_sysinfo: | 81 case __NR_sysinfo: |
| 82 case __NR_times: | 82 case __NR_times: |
| 83 case __NR_uname: | 83 case __NR_uname: |
| 84 return Allow(); | 84 return Allow(); |
| 85 case __NR_sched_getaffinity: | 85 case __NR_sched_getaffinity: |
| 86 case __NR_sched_getparam: | 86 case __NR_sched_getparam: |
| 87 case __NR_sched_getscheduler: | 87 case __NR_sched_getscheduler: |
| 88 case __NR_sched_setscheduler: | 88 case __NR_sched_setscheduler: |
| 89 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); | 89 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); |
| 90 case __NR_prlimit64: | 90 case __NR_prlimit64: |
| 91 return Error(EPERM); // See crbug.com/160157. | 91 // See crbug.com/662450. |
| 92 return sandbox::RestrictPrlimitToGetrlimit(GetPolicyPid()); |
| 92 default: | 93 default: |
| 93 // Default on the content baseline policy. | 94 // Default on the content baseline policy. |
| 94 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); | 95 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); |
| 95 } | 96 } |
| 96 } | 97 } |
| 97 | 98 |
| 98 } // namespace content | 99 } // namespace content |
| OLD | NEW |