Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc

Issue 1122153002: Fixit: Fork base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FIXIT_timeclasses_1of2
Patch Set: REBASE after it passed CQ but did not commit to tree Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS()); 298 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS());
299 } 299 }
300 #endif // !defined(OS_NACL_NONSFI) 300 #endif // !defined(OS_NACL_NONSFI)
301 301
302 ResultExpr RestrictClockID() { 302 ResultExpr RestrictClockID() {
303 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); 303 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit");
304 const Arg<clockid_t> clockid(0); 304 const Arg<clockid_t> clockid(0);
305 return If( 305 return If(
306 #if defined(OS_CHROMEOS) 306 #if defined(OS_CHROMEOS)
307 // Allow the special clock for Chrome OS used by Chrome tracing. 307 // Allow the special clock for Chrome OS used by Chrome tracing.
308 clockid == base::TimeTicks::kClockSystemTrace || 308 clockid == base::TraceTicks::kClockSystemTrace ||
309 #endif 309 #endif
310 clockid == CLOCK_MONOTONIC || 310 clockid == CLOCK_MONOTONIC ||
311 clockid == CLOCK_MONOTONIC_COARSE || 311 clockid == CLOCK_MONOTONIC_COARSE ||
312 clockid == CLOCK_PROCESS_CPUTIME_ID || 312 clockid == CLOCK_PROCESS_CPUTIME_ID ||
313 clockid == CLOCK_REALTIME || 313 clockid == CLOCK_REALTIME ||
314 clockid == CLOCK_REALTIME_COARSE || 314 clockid == CLOCK_REALTIME_COARSE ||
315 clockid == CLOCK_THREAD_CPUTIME_ID, 315 clockid == CLOCK_THREAD_CPUTIME_ID,
316 Allow()).Else(CrashSIGSYS()); 316 Allow()).Else(CrashSIGSYS());
317 } 317 }
318 318
319 } // namespace sandbox. 319 } // namespace sandbox.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698