| OLD | NEW |
| 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 "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" | 5 #include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "sandbox/linux/system_headers/linux_syscalls.h" | 8 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 9 | 9 |
| 10 namespace sandbox { | 10 namespace sandbox { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 return false; | 407 return false; |
| 408 } | 408 } |
| 409 } | 409 } |
| 410 | 410 |
| 411 bool SyscallSets::IsAllowedEpoll(int sysno) { | 411 bool SyscallSets::IsAllowedEpoll(int sysno) { |
| 412 switch (sysno) { | 412 switch (sysno) { |
| 413 #if !defined(__aarch64__) | 413 #if !defined(__aarch64__) |
| 414 case __NR_epoll_create: | 414 case __NR_epoll_create: |
| 415 case __NR_epoll_wait: | 415 case __NR_epoll_wait: |
| 416 #endif | 416 #endif |
| 417 case __NR_epoll_pwait: |
| 417 case __NR_epoll_create1: | 418 case __NR_epoll_create1: |
| 418 case __NR_epoll_ctl: | 419 case __NR_epoll_ctl: |
| 419 return true; | 420 return true; |
| 420 default: | 421 default: |
| 421 #if defined(__x86_64__) | 422 #if defined(__x86_64__) |
| 422 case __NR_epoll_ctl_old: | 423 case __NR_epoll_ctl_old: |
| 423 #endif | 424 #endif |
| 424 case __NR_epoll_pwait: | |
| 425 #if defined(__x86_64__) | 425 #if defined(__x86_64__) |
| 426 case __NR_epoll_wait_old: | 426 case __NR_epoll_wait_old: |
| 427 #endif | 427 #endif |
| 428 return false; | 428 return false; |
| 429 } | 429 } |
| 430 } | 430 } |
| 431 | 431 |
| 432 bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { | 432 bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { |
| 433 switch (sysno) { | 433 switch (sysno) { |
| 434 #if !defined(__aarch64__) | 434 #if !defined(__aarch64__) |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 switch (sysno) { | 1051 switch (sysno) { |
| 1052 case __NR_sysmips: | 1052 case __NR_sysmips: |
| 1053 case __NR_unused150: | 1053 case __NR_unused150: |
| 1054 return true; | 1054 return true; |
| 1055 default: | 1055 default: |
| 1056 return false; | 1056 return false; |
| 1057 } | 1057 } |
| 1058 } | 1058 } |
| 1059 #endif // defined(__mips__) | 1059 #endif // defined(__mips__) |
| 1060 } // namespace sandbox. | 1060 } // namespace sandbox. |
| OLD | NEW |