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_parameters_restrictions.h" | 5 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <linux/net.h> | 10 #include <linux/net.h> |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "base/logging.h" | 23 #include "base/logging.h" |
24 #include "base/macros.h" | 24 #include "base/macros.h" |
25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
27 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" | 27 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" |
28 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" | 28 #include "sandbox/linux/bpf_dsl/seccomp_macros.h" |
29 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" | 29 #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" |
30 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 30 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
31 #include "sandbox/linux/system_headers/linux_futex.h" | 31 #include "sandbox/linux/system_headers/linux_futex.h" |
32 #include "sandbox/linux/system_headers/linux_syscalls.h" | 32 #include "sandbox/linux/system_headers/linux_syscalls.h" |
| 33 #include "sandbox/linux/system_headers/linux_time.h" |
33 | 34 |
34 // PNaCl toolchain does not provide sys/ioctl.h header. | 35 // PNaCl toolchain does not provide sys/ioctl.h header. |
35 #if !defined(OS_NACL_NONSFI) | 36 #if !defined(OS_NACL_NONSFI) |
36 #include <sys/ioctl.h> | 37 #include <sys/ioctl.h> |
37 #endif | 38 #endif |
38 | 39 |
39 #if defined(OS_ANDROID) | 40 #if defined(OS_ANDROID) |
40 | 41 |
41 #if !defined(F_DUPFD_CLOEXEC) | 42 #if !defined(F_DUPFD_CLOEXEC) |
42 #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6) | 43 #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6) |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 301 |
301 ResultExpr RestrictClockID() { | 302 ResultExpr RestrictClockID() { |
302 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); | 303 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); |
303 const Arg<clockid_t> clockid(0); | 304 const Arg<clockid_t> clockid(0); |
304 return If( | 305 return If( |
305 #if defined(OS_CHROMEOS) | 306 #if defined(OS_CHROMEOS) |
306 // Allow the special clock for Chrome OS used by Chrome tracing. | 307 // Allow the special clock for Chrome OS used by Chrome tracing. |
307 clockid == base::TimeTicks::kClockSystemTrace || | 308 clockid == base::TimeTicks::kClockSystemTrace || |
308 #endif | 309 #endif |
309 clockid == CLOCK_MONOTONIC || | 310 clockid == CLOCK_MONOTONIC || |
| 311 clockid == CLOCK_MONOTONIC_COARSE || |
310 clockid == CLOCK_PROCESS_CPUTIME_ID || | 312 clockid == CLOCK_PROCESS_CPUTIME_ID || |
311 clockid == CLOCK_REALTIME || | 313 clockid == CLOCK_REALTIME || |
| 314 clockid == CLOCK_REALTIME_COARSE || |
312 clockid == CLOCK_THREAD_CPUTIME_ID, | 315 clockid == CLOCK_THREAD_CPUTIME_ID, |
313 Allow()).Else(CrashSIGSYS()); | 316 Allow()).Else(CrashSIGSYS()); |
314 } | 317 } |
315 | 318 |
316 } // namespace sandbox. | 319 } // namespace sandbox. |
OLD | NEW |