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

Side by Side Diff: sandbox/linux/services/syscall_wrappers.h

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 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 #ifndef SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ 5 #ifndef SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
6 #define SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ 6 #define SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include "sandbox/sandbox_export.h" 10 #include "sandbox/sandbox_export.h"
11 11
12 struct sock_fprog;
13
12 namespace sandbox { 14 namespace sandbox {
13 15
14 // Provide direct system call wrappers for a few common system calls. 16 // Provide direct system call wrappers for a few common system calls.
15 // These are guaranteed to perform a system call and do not rely on things such 17 // These are guaranteed to perform a system call and do not rely on things such
16 // as caching the current pid (c.f. getpid()). 18 // as caching the current pid (c.f. getpid()).
17 19
18 SANDBOX_EXPORT pid_t sys_getpid(void); 20 SANDBOX_EXPORT pid_t sys_getpid(void);
19 21
20 SANDBOX_EXPORT pid_t sys_gettid(void); 22 SANDBOX_EXPORT pid_t sys_gettid(void);
21 23
22 SANDBOX_EXPORT long sys_clone(unsigned long flags); 24 SANDBOX_EXPORT long sys_clone(unsigned long flags);
23 25
24 // |regs| is not supported and must be passed as nullptr. 26 // |regs| is not supported and must be passed as nullptr.
25 SANDBOX_EXPORT long sys_clone(unsigned long flags, 27 SANDBOX_EXPORT long sys_clone(unsigned long flags,
26 void* child_stack, 28 void* child_stack,
27 pid_t* ptid, 29 pid_t* ptid,
28 pid_t* ctid, 30 pid_t* ctid,
29 decltype(nullptr) regs); 31 decltype(nullptr) regs);
30 32
31 SANDBOX_EXPORT void sys_exit_group(int status); 33 SANDBOX_EXPORT void sys_exit_group(int status);
32 34
35 // The official system call takes |args| as void* (in order to be extensible),
36 // but add more typing for the cases that are currently used.
37 SANDBOX_EXPORT int sys_seccomp(unsigned int operation,
38 unsigned int flags,
39 const struct sock_fprog* args);
40
33 } // namespace sandbox 41 } // namespace sandbox
34 42
35 #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_ 43 #endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_
OLDNEW
« no previous file with comments | « sandbox/linux/services/proc_util_unittest.cc ('k') | sandbox/linux/services/syscall_wrappers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698