| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/android/sandbox_bpf_base_policy_android.h
" | 5 #include "content/common/sandbox_linux/android/sandbox_bpf_base_policy_android.h
" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <linux/net.h> | 9 #include <linux/net.h> |
| 10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 case __NR_epoll_pwait: | 73 case __NR_epoll_pwait: |
| 74 case __NR_fdatasync: | 74 case __NR_fdatasync: |
| 75 case __NR_flock: | 75 case __NR_flock: |
| 76 case __NR_fsync: | 76 case __NR_fsync: |
| 77 case __NR_ftruncate: | 77 case __NR_ftruncate: |
| 78 #if defined(__i386__) || defined(__arm__) || defined(__mips__) | 78 #if defined(__i386__) || defined(__arm__) || defined(__mips__) |
| 79 case __NR_ftruncate64: | 79 case __NR_ftruncate64: |
| 80 #endif | 80 #endif |
| 81 #if defined(__x86_64__) || defined(__aarch64__) | 81 #if defined(__x86_64__) || defined(__aarch64__) |
| 82 case __NR_newfstatat: | 82 case __NR_newfstatat: |
| 83 case __NR_getdents64: | |
| 84 #elif defined(__i386__) || defined(__arm__) || defined(__mips__) | 83 #elif defined(__i386__) || defined(__arm__) || defined(__mips__) |
| 85 case __NR_fstatat64: | 84 case __NR_fstatat64: |
| 86 case __NR_getdents: | 85 case __NR_getdents: |
| 87 #endif | 86 #endif |
| 87 case __NR_getdents64: |
| 88 case __NR_getpriority: | 88 case __NR_getpriority: |
| 89 case __NR_ioctl: | 89 case __NR_ioctl: |
| 90 #if defined(__i386__) | 90 #if defined(__i386__) |
| 91 // While mincore is on multiple arches, it is only used on Android by x86. | 91 // While mincore is on multiple arches, it is only used on Android by x86. |
| 92 case __NR_mincore: // https://crbug.com/701137 | 92 case __NR_mincore: // https://crbug.com/701137 |
| 93 #endif | 93 #endif |
| 94 case __NR_mremap: | 94 case __NR_mremap: |
| 95 #if defined(__i386__) | 95 #if defined(__i386__) |
| 96 // Used on pre-N to initialize threads in ART. | 96 // Used on pre-N to initialize threads in ART. |
| 97 case __NR_modify_ldt: | 97 case __NR_modify_ldt: |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 #endif | 211 #endif |
| 212 | 212 |
| 213 if (override_and_allow) | 213 if (override_and_allow) |
| 214 return Allow(); | 214 return Allow(); |
| 215 | 215 |
| 216 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); | 216 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace content | 219 } // namespace content |
| OLD | NEW |