OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <asm/unistd.h> | 5 #include <asm/unistd.h> |
6 #include <dlfcn.h> | 6 #include <dlfcn.h> |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/audit.h> | 9 #include <linux/audit.h> |
10 #include <linux/filter.h> | 10 #include <linux/filter.h> |
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 return RestrictIoctl(sandbox); | 1550 return RestrictIoctl(sandbox); |
1551 case __NR_prctl: | 1551 case __NR_prctl: |
1552 return RestrictPrctl(sandbox); | 1552 return RestrictPrctl(sandbox); |
1553 // Allow the system calls below. | 1553 // Allow the system calls below. |
1554 case __NR_fdatasync: | 1554 case __NR_fdatasync: |
1555 case __NR_fsync: | 1555 case __NR_fsync: |
1556 case __NR_getpriority: | 1556 case __NR_getpriority: |
1557 #if defined(__i386__) || defined(__x86_64__) | 1557 #if defined(__i386__) || defined(__x86_64__) |
1558 case __NR_getrlimit: | 1558 case __NR_getrlimit: |
1559 #endif | 1559 #endif |
| 1560 #if defined(__i386__) || defined(__arm__) |
| 1561 case __NR_ugetrlimit: |
| 1562 #endif |
1560 case __NR_mremap: // See crbug.com/149834. | 1563 case __NR_mremap: // See crbug.com/149834. |
1561 case __NR_pread64: | 1564 case __NR_pread64: |
1562 case __NR_pwrite64: | 1565 case __NR_pwrite64: |
1563 case __NR_sched_getaffinity: | 1566 case __NR_sched_getaffinity: |
1564 case __NR_sched_get_priority_max: | 1567 case __NR_sched_get_priority_max: |
1565 case __NR_sched_get_priority_min: | 1568 case __NR_sched_get_priority_min: |
1566 case __NR_sched_getparam: | 1569 case __NR_sched_getparam: |
1567 case __NR_sched_getscheduler: | 1570 case __NR_sched_getscheduler: |
1568 case __NR_sched_setscheduler: | 1571 case __NR_sched_setscheduler: |
1569 case __NR_setpriority: | 1572 case __NR_setpriority: |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1869 // should enable it, enable it or die. | 1872 // should enable it, enable it or die. |
1870 bool started_sandbox = StartBpfSandbox(command_line, process_type); | 1873 bool started_sandbox = StartBpfSandbox(command_line, process_type); |
1871 CHECK(started_sandbox); | 1874 CHECK(started_sandbox); |
1872 return true; | 1875 return true; |
1873 } | 1876 } |
1874 #endif | 1877 #endif |
1875 return false; | 1878 return false; |
1876 } | 1879 } |
1877 | 1880 |
1878 } // namespace content | 1881 } // namespace content |
OLD | NEW |